Loading
Loading indicator component with multiple animation variants including spin, dots, pulse, and ping.
import { Loading } from "@ninna-ui/feedback"pnpm add @ninna-ui/feedbackRequires @ninna-ui/core (auto-installed) + CSS setup.
Usage
Import and use the Loading component in your application.
import { Loading } from "@ninna-ui/feedback";
export default function Example() { return ( <div> <Loading variant="spin" color="primary" size="md" /> <Loading variant="dots" color="success" size="lg" /> <Loading variant="pulse" color="info" size="xl" /> </div> );}Spin Variant
Classic spinning circle loader.
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Dots Variant
Bouncing dots animation.
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Pulse Variant
Pulsing circle animation.
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Ping Variant
Expanding ping animation.
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Sizes
Loading indicators in different sizes from xs to 3xl.
Loading...
xsLoading...
smLoading...
mdLoading...
lgLoading...
xlLoading...
2xlLoading...
3xlUse Cases
Real-world loading indicator usage examples.
Button Loading
Card Loading
Loading...
Loading content...Inline Loading
Fetching data
Loading...
Overlay Loading
Background content
Loading...
Please wait...API Reference
Complete list of props for the Loading component.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'spin' | 'ping' | 'pulse' | 'dots' | 'spin' | Animation style of the loading indicator |
color | 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'danger' | 'primary' | Color theme of the loading indicator |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'md' | Size of the loading indicator |
className | string | - | Additional CSS classes |
label | string | 'Loading...' | Accessible label for screen readers |
Accessibility
- Uses
role="status"to indicate loading state - Includes
aria-labelfor screen reader announcement - Hidden text with
sr-onlyclass provides context - Default label is "Loading..." but can be customized via
labelprop - Animations respect
prefers-reduced-motionmedia query - Color contrast meets WCAG AA standards for all color variants