Skeleton
FeedbackReserves the visual shape of content while its real data is still loading.
Try it
Add to your project
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/skeleton.jsonThe command includes the component’s shared dependencies. Your project keeps editable source files.
Include the complete example
This example also composes button, input, field. Install its parts together:
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/button.json https://luv-jeri.github.io/cojeev-ui/r/skeleton.json https://luv-jeri.github.io/cojeev-ui/r/input.json https://luv-jeri.github.io/cojeev-ui/r/field.jsonUsing skeleton
Choose skeleton shapes and groups that approximate the content that will replace them.
Replace placeholders with the completed content or a useful error state when loading finishes.
AsyncContent accepts optional loading and fallback props. The real content stays mounted across loading changes so input edits survive; omitted loading preserves the original static wrapper.
API
Compose the exported parts below. The prop types are read from the React source during the registry build.
Native element or underlying primitive props are inherited where declared, including accessible labels, event handlers and refs.
SkeletonProps
| Prop | Type | Required |
|---|---|---|
variant | "line" | "default" | "pill" | "card" | "disk" | "skel-group" | null | undefined | No |
size | "default" | null | undefined | No |
as | React.ElementType | No |
SkeletonGroupProps
| Prop | Type | Required |
|---|---|---|
variant | "default" | null | undefined | No |
size | "default" | null | undefined | No |
as | React.ElementType | No |
AsyncContentProps
| Prop | Type | Required |
|---|---|---|
variant | "default" | null | undefined | No |
size | "default" | null | undefined | No |
as | React.ElementType | No |
loadingCaller-owned loading state. Omit to preserve the static composition. | boolean | No |
fallback | React.ReactNode | No |
AsyncRowProps
| Prop | Type | Required |
|---|---|---|
variant | "default" | null | undefined | No |
size | "default" | null | undefined | No |
as | React.ElementType | No |
QuietProps
| Prop | Type | Required |
|---|---|---|
variant | "default" | null | undefined | No |
size | "default" | null | undefined | No |
as | React.ElementType | No |
Accessibility
Hide decorative placeholders from assistive technology and expose the loading state once on the surrounding content region.
States and appearance
For conditional content, keep a MotionPresence boundary around keyed MotionSurface children. The shared entrance and exit states work with native primitives and respect your motion preference.
Try pointer and keyboard interaction, and switch the appearance control in the navigation to compare light and dark mode. Motion respects reduced motion preferences.