Skeleton
---import { Skeleton } from "@/components/starwind/skeleton";---
<div class="flex items-center space-x-4"> <Skeleton class="h-12 w-12 rounded-full" /> <div class="space-y-2"> <Skeleton class="h-4 w-[250px]" /> <Skeleton class="h-4 w-[200px]" /> </div></div>
Installation
pnpx starwind@latest add skeleton
npx starwind@latest add skeleton
yarn dlx starwind@latest add skeleton
Usage
Card Skeleton
---import { Skeleton } from "@/components/starwind/skeleton";---
<div class="flex flex-col space-y-3"> <Skeleton class="h-[125px] w-[250px] rounded-xl" /> <div class="space-y-2"> <Skeleton class="h-4 w-[250px]" /> <Skeleton class="h-4 w-[200px]" /> </div></div>
Table Skeleton
---import { Skeleton } from "@/components/starwind/skeleton";---
<div class="space-y-2 w-[250px]"> <Skeleton class="h-8 w-full" /> <Skeleton class="h-8 w-full" /> <Skeleton class="h-8 w-full" /> <Skeleton class="h-8 w-full" /> <Skeleton class="h-8 w-full" /></div>
API Reference
The Skeleton component is built with a minimal API and accepts all standard HTML attributes for the <div>
element. The default styles can be extended or overridden using the class
prop.
Changelog
v1.0.0
- Initial release with starwind v1.7.0