Overview
Hux UI provides loading components for indicating async operations:- HuxLoading - Customizable loading indicators
- HuxLoadingOverlay - Full-screen loading overlays

Component Variants
Small Loading Indicator
Compact loading indicator for tight spaces:Medium Loading Indicator
Standard loading indicator (default size):Large Loading Indicator
Prominent loading indicator for important operations:Extra Large Loading Indicator
Maximum size loading indicator:Loading with Custom Colors
Loading indicator with theme-aware colors:HuxLoading
Sizes
small
- Compact loading indicatormedium
- Standard loading indicator (default)large
- Prominent loading indicator
HuxLoadingOverlay
Full-screen overlay that blocks user interaction during loading operations. Perfect for API calls, file uploads, or any long-running processes.Properties
isLoading
- Boolean flag to control overlay visibilitymessage
- Optional loading message displayed above the spinnerchild
- The main content widget that will be covered by the overlaybarrierColor
- Optional custom barrier color (defaults to semi-transparent black)spinnerColor
- Optional custom spinner color (defaults to theme primary color)
Advanced Usage
Usage Example
Best Practices
- Use for blocking operations - Perfect for API calls, file uploads, or data processing
- Provide clear messages - Help users understand what’s happening
- Consider duration - For very short operations (< 500ms), consider using inline loading instead
- Accessibility - The overlay automatically handles screen reader announcements
- Theme integration - Colors automatically adapt to light/dark themes
Accessibility Features
- Screen reader support - Loading state is announced to assistive technologies
- Focus management - Prevents interaction with background content during loading
- High contrast support - Uses Hux UI’s accessible color tokens
- Keyboard navigation - Properly blocks keyboard input during loading states