React Native · Components
Skeleton
A faded box that holds the place of content while it loads.
4 exports
Live example
The preview runs in the browser with the web component; the native component takes the same props and looks the same on iOS and Android.
Preview
Code
Events
- Events appear here when you interact with the preview.
Import
Skeleton
componentA faded box that holds the place of content while it loads. The animation runs on the native driver; it stops with the "reduce motion" preference. Hidden from screen readers.
Examples
SkeletonShape
typeSkeleton shape: rect box, circle round (avatar), text text line.
Animation: pulse fading, shimmer sliding sheen, none static.
SkeletonProps
interfaceSkeleton props.
| Name | Type | Default | Description |
|---|---|---|---|
shape? | SkeletonShape | "rect"`, `"text"` when `lines` is given | Shape. |
lines? | number | Paragraph: this many lines are drawn, the last line stays short. | |
width? | DimensionValue | Width (pixels or percent). The diameter for circle. | |
height? | DimensionValue | text` 12, `rect` 16, `circle` the width | Height. |
animation? | SkeletonAnimation | "pulse" | Animation. |
loading? | boolean | true | Automatic skeleton: when children is given and this is true, the content is hidden and a faded box of the same size is shown; when false the content appears. |
children? | ReactNode | Content whose place is held in the automatic skeleton. | |
style? | StyleProp<ViewStyle> | Container style. |