Overview
Loader components provide visual feedback for asynchronous operations and progress tracking. These components are designed to be lightweight and easily integrated into various UI contexts.Components
InlineLoadingBar
A compact, animated loading indicator ideal for inline contexts and table loading states. Props: This component accepts no props - it’s a self-contained loading indicator. Features:- Fixed dimensions: 40px wide by 10px tall
- Smooth ease-in-out animation
- Infinite loop animation
- Border and rounded corners for visual polish
- Uses CSS animation for performance
ProgressBarThreeColor
A multi-segment progress bar that displays progress across three color zones (green, red, and blue background). Props:| Prop | Type | Default | Description |
|---|---|---|---|
firstProgress | number | - | Required. Percentage for first segment (green) |
secondProgress | number | - | Required. Percentage for second segment (red) |
- Three color segments: green, red, and blue (remaining)
- Smooth rounded progress bar
- Percentage-based width calculation
- Full width responsive design
Color Scheme
InlineLoadingBar
- Border:
border-darkBlue-80 - Fill:
bg-static-emphasized - Background: Transparent
ProgressBarThreeColor
- First segment (green):
bg-green-50 - Second segment (red):
bg-red-50 - Remaining/background (blue):
bg-darkBlue-50
Animation Details
InlineLoadingBar
The component uses inline CSS animation styles:progress-loading animation is defined in inlineLoading.css.
Use Cases
InlineLoadingBar
- Table loading states (used by
TableSkeleton) - Inline form submission feedback
- Card content loading
- Small UI sections awaiting data
ProgressBarThreeColor
- Task completion tracking with multiple states
- Resource usage indicators (e.g., storage, bandwidth)
- Multi-phase progress tracking
- Success/warning/remaining visualizations
- Test result summaries (passed/failed/pending)
Styling
Both components use Tailwind CSS utility classes for styling:Accessibility
Consider adding ARIA attributes for screen readers:Performance
Both components are optimized for performance:- CSS animations (hardware accelerated)
- No JavaScript-driven animation loops
- Minimal re-renders
- Small bundle size
Related Components
TableSkeleton- UsesInlineLoadingBarinternally- Table components - Often used together for loading states