Skeleton
Styled skeleton component built on the zw-skeleton primitive.
@zeus-web/skeletonFeedbackzweb add skeletonGenerated
Playground
Source
Choose the framework entry that matches your application.
html
<script type="module">
import '@zeus-web/skeleton/wc/auto'
</script>
<zw-skeleton style="display:block;width:16rem;height:4rem"></zw-skeleton>tsx
import { Skeleton } from '@zeus-web/skeleton/react'
export function SkeletonExample() {
return (
<Skeleton style={{ display: 'block', width: '16rem', height: '4rem' }} />
)
}vue
<script setup lang="ts">
import { Skeleton } from '@zeus-web/skeleton/vue'
</script>
<template>
<Skeleton style="display: block; width: 16rem; height: 4rem" />
</template>Add
bash
zweb add skeletonImports
Styled registry component:
tsx
import { Skeleton } from '@/components/ui/skeleton'Primitive React wrapper:
tsx
import { Skeleton } from '@zeus-web/skeleton/react'Web Component entry:
ts
import '@zeus-web/skeleton/wc/auto'Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | SkeletonVariantValues: text, rect, circle | rect | Shape variant. |
animated | boolean | true | Enables loading animation. |
Events
No public events documented.
Slots
No slots documented.
Styling
Uses Tailwind: yes
Theme tokens:
bg-muted
Internal selectors:
[data-slot=skeleton-root]
Registry
Registry source: available.
Add command: zweb add skeleton
Type: component
Dependencies:
@zeus-web/skeleton
Registry dependencies:
cnglobals
Files:
templates/react/skeleton.tsx→components/ui/skeleton.tsxtemplates/vue/skeleton.ts→components/ui/skeleton.ts
AI usage rules
Do:
- Use Skeleton for loading placeholders.
Do not:
- Do not show Skeleton for content that loads instantly.
Examples
React styled usage
tsx
import { Skeleton } from '@/components/ui/skeleton'
export function Example() {
return <Skeleton className="h-4 w-12" />
}