retro ui logo
RetroUI
  • Components
  • Blocks
  • Templates
  • Figma
Sign InGet Access

Getting Started

IntroductionInstallationThemesChangelogMCP ServerBlocksProTemplatesProFigma KitPro

Components

AccordionAlertAvatarBadgeBreadcrumbButtonCardCalendarCarouselCheckboxCommandDialogDrawerNewEmptyNewInputLabelLoaderMenuContext MenuPopoverProgressRadioSelectSliderSonnerSwitchTabTableTable Of ContentsNewTextareaTextToggleToggle GroupTooltip

Chart

Bar ChartUpdatedLine ChartArea ChartPie Chart

Utilities

cn
RetroUI

RetroUI

The platform for developers and designers who love unique, playful, and brutalist design.

PRODUCT
  • OS Components
  • UI Blocks
  • Templates
  • Figma Kit
  • Themes
  • Neo Screenshot
SUPPORT
  • Pricing
  • FAQ
  • Documentation
  • Changelog
  • Discord Community
  • Email Support
COMPANY
  • Blog
  • Contact
  • Terms of Use
  • Privacy Policy
Footer decoration

© 2026 AZENCOT LLC. ALL RIGHTS RESERVED.

Loader

A customizable loading indicator with bouncing squares. 🔄

Source


pnpm dlx shadcn@latest add @retroui/loader


Examples

Default



Secondary



Outline



Sizes



Custom Configurations



Usage

import { Loader } from "@/components/ui/loader"
 
// Default
<Loader />
 
// With variants
<Loader variant="secondary" size="lg" />
 
// Custom configuration
<Loader
  count={4}           // Number of squares
  duration={1.2}      // Animation duration in seconds
  delayStep={120}     // Delay between squares in milliseconds
/>
 
// Fully customized
<Loader
  variant="secondary"
  size="lg"
  count={4}
  duration={1.2}
  delayStep={120}
  className="my-4"
/>

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.

Last Updated: 20 Aug, 2025

On this Page

  • Examples [#examples]
    • Default [#default]
    • Secondary [#secondary]
    • Outline [#outline]
    • Sizes [#sizes]
    • Custom Configurations [#custom-configurations]
  • Usage [#usage]
  • Props [#props]
  • Accessibility [#accessibility]