--- title: Loader description: A customizable loading indicator with bouncing squares. 🔄 lastUpdated: 20 Aug, 2025 links: source: https://github.com/logging-studio/RetroUI/blob/main/components/retroui/Loader.tsx ---

#### 1. Install dependencies: ```sh npm install class-variance-authority ```
#### 2. Copy the code 👇 into your project:


## Examples ### Default

### Secondary

### Outline

### Sizes

### Custom Configurations

## Usage ```tsx import { Loader } from "@/components/ui/loader" // Default // With variants // Custom configuration // Fully customized ``` ## Props - - `variant` * Type: `default` | `secondary` | `outline` * Default: `default` * Description: Defines the style variant for the component - - `size` * Type: `sm` | `md` | `lg` * Default: `md` * Description: Controls the size of the loader squares - - `count` * Type: `number` * Default: `3` * Description: Sets the number of bouncing squares - - `duration` * Type: `number` * Default: `0.5` * Description: Controls the animation duration in seconds - - `delayStep` * Type: `number` * Default: `100` * Description: Defines the delay between squares in milliseconds - - `className` * Type: `string` * Default: `undefined` * Description: Allows for adding additional CSS classes for custom styling - - `asChild` * Type: `boolean` * Default: `false` * Description: When `true`, merges the component's props onto its immediate child element ## Accessibility The Loader component includes the following attributes: - `role="status"` - `aria-label="Loading..."` This ensures screen readers can properly announce the loading state to users.