Components · Loading States
Skeleton
StableAdded v0.0.1
Placeholder loading animation that mimics content layout.
import { Skeleton } from '@nexub/react';Playground
Props
animation
shape
<Skeleton width="60%" />Examples
Default
Shapes
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| shape | 'circle' | 'line' | 'rect' | 'line' | Shape of the skeleton placeholder. |
| width | string | number | — | Width of the skeleton element. |
| height | string | number | — | Height of the skeleton element. |
| animated | boolean | true | Enables the shimmer animation. |
| animation | 'pulse' | 'shimmer' | 'pulse' | Effect when animated: pulse fades, shimmer sweeps a highlight across. Both stop under reduced motion. |
On iOS & Android: Skeleton
@nexub/react-nativeAlpha
import { Skeleton } from '@nexub/react-native';
<Skeleton width="60%" height={16} />Interactive preview of @nexub/react-native rendered for the web. Native chrome (switches, pickers, Liquid Glass) looks like the platform on a device.
On device

iPhone (iOS simulator)

Pixel (Android emulator)
Screenshots from the latest CI run of the showcase app; the live frame renders the same code for the web.
Skeleton props
| Prop | Type | Default | Description |
|---|---|---|---|
| width | ViewStyle['width'] | — | — |
| height | number | 16 | — |
| radius | 'field' | 'control' | 'container' | number | 'field' | — |
| animation | 'pulse' | 'shimmer' | 'pulse' | pulse fades, shimmer sweeps a highlight across. Both stop under Reduce Motion. |
| animated | boolean | true | false keeps the placeholder still (no pulse or shimmer), e.g. for many skeletons at once. |
| shape | 'line' | 'rect' | 'circle' | — | Preset form, as on web: line is a text line (small corners), rect a block
(container corners), circle a round avatar (width follows height). radius still wins. |
| style | StyleProp<ViewStyle> | — | — |