Display@knitui/components
Skeleton
Skeleton renders an animated placeholder while content is loading. visible (default true) switches between the placeholder and real children. circle forces a round block. animate drives a soft opacity pulse. radius rounds the corners via the shared radius variant.
import { Skeleton } from "@knitui/components";A Skeleton is one placeholder block. A loading SCREEN is many of them, so wrap
the layout in a SkeletonGroup:
<SkeletonGroup flex={1} gap="md">
<Skeleton height={220} radius="none" />
<Skeleton width="60%" height={20} />
<Skeleton width="40%" height={14} />
</SkeletonGroup>The group runs ONE animation for the whole silhouette — on web a compositor CSS animation, on native a single reanimated shared value — and the blocks inside schedule none of their own. Its timeline:
- hold invisible for
delayMs(default150): a load that finishes inside it swaps straight to the content, so a fast response never strobes grey; - fade in over
fadeMs(default200); - pulse every block in phase (
durationMsper half-cycle, down tominOpacity;pulse={false}to stay solid).
The group is the single aria-busy region (role="progressbar", named by
label, default "Loading"); grouped blocks are hidden from assistive tech.
Reduced motion keeps the hold and drops the fade and pulse.
Playground
Loading playground…
<Skeleton
visible
circle={false}
animate
width={200}
height="xs"
/>Examples
Text Block
A block of stacked skeletons mimicking a text-heavy content card.
Loading example…
Circle
Circle variant — useful for avatar placeholders; height is mirrored onto width.
Loading example…
Radii
All supported radius values applied to the same block.
Loading example…
Shadows
Elevation shadow ladder applied via the inherited shadow prop.
Loading example…
No Animation
Animate disabled — static placeholder with no pulse. Useful for reduced-motion contexts.
Loading example…
Content Loaded
When visible is false the real children are rendered and the placeholder is gone.
Loading example…
Controlled
Controlled toggle — press the button to flip between loading and loaded states.
Loading example…
Card Layout
Card skeleton — a realistic layout with a circle avatar and stacked text lines.
Loading example…
Group
A whole loading silhouette animated as ONE: the group holds invisible for delayMs (so a fast load never flashes), fades in, then pulses every block in phase — one animation for the layout instead of one per block. Grouped Skeletons schedule no loop of their own.
Loading example…
Props
| Prop | Type | Default | Description |
|---|---|---|---|
animate | boolean | undefined | true | Soft opacity pulse while the placeholder is visible. |
circle | boolean | undefined | false | Force an equal-sided round block. Mirrors `height` onto `width`. |
disabled system | boolean | undefined | — | — |
radius system | RadiusValue | undefinedxs · sm · md · lg · xl · none · full | — | Corner radius — maps to the shared radius variant. |
shadow system | "xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined | — | — |
theme system | ThemeName | null | undefined | — | Applies a theme to this element |
visible | boolean | undefined | true | When false, renders children normally with no placeholder. |
Plus 805 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.