Skeleton
A placeholder component used to show a loading state while content is being fetched.
import { Skeleton } from "@rhinolabs/ui"
export default function SkeletonDemo() { return <Skeleton className="h-4 w-[250px]" />}Examples
Section titled “Examples”Basic Skeleton
Section titled “Basic Skeleton”Simple loading placeholder.
<div className="flex items-center space-x-4"> <Skeleton className="h-12 w-12 rounded-full" /> <div className="space-y-2"> <Skeleton className="h-4 w-[250px]" /> <Skeleton className="h-4 w-[200px]" /> </div></div>Card Skeleton
Section titled “Card Skeleton”Loading state for a card component.
<div className="space-y-3"> <Skeleton className="h-[125px] w-full rounded-xl" /> <div className="space-y-2"> <Skeleton className="h-4 w-[250px]" /> <Skeleton className="h-4 w-[200px]" /> </div></div>Table Skeleton
Section titled “Table Skeleton”Loading state for table rows.
<div className="space-y-3"> <Skeleton className="h-4 w-full" /> <Skeleton className="h-4 w-full" /> <Skeleton className="h-4 w-full" /> <Skeleton className="h-4 w-[250px]" /></div>The Skeleton component accepts all standard HTML div attributes.
| Prop | Type | Description |
|---|---|---|
className | string | Additional CSS classes |
Design Considerations
Section titled “Design Considerations”- Match content dimensions
- Use consistent spacing
- Apply appropriate timing
- Consider mobile layouts
- Maintain visual hierarchy
Accessibility
Section titled “Accessibility”- Indicates loading state
- Uses semantic markup
- Provides visual feedback
- Handles screen readers
- Maintains content flow