Components

Skeleton

Animated loading placeholders with card, list, table, and calendar presets.

iOSAndroid
Preview Skeleton on your device

Scan with Expo Go

Download Expo Go, then scan the QR code to preview native components.

Installation

pnpm dlx @docyrus/cli add @docyrus/rn-skeleton
Required Packages(1 package)
pnpm add react-native-reanimated

Usage

import {
  SkeletonBase, SkeletonCard, SkeletonList,
  SkeletonTable, SkeletonCalendar
} from '@/components/docyrus-native/skeleton';

<SkeletonBase width={200} height={16} />
<SkeletonCard showImage lines={3} />
<SkeletonList items={5} showAvatar showSubtitle />
<SkeletonTable rows={4} columns={3} />
<SkeletonCalendar events={2} />

API Reference

SkeletonBase

PropTypeDefaultDescription
widthnumber | string | 'auto''100%'Element width (number for px, string for %)
heightnumber | string | 'auto'—Element height (falls back to size preset)
variant'default' | 'light' | 'dark''default'Background color variant
rounded'none' | 'sm' | 'md' | 'lg' | 'full''md'Border radius preset
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'Height preset when height is not set
animatedbooleantrueEnable pulse animation
classNamestring—Additional CSS classes

SkeletonCard

PropTypeDefaultDescription
showImagebooleantrueShow image placeholder
imageHeightnumber160Image placeholder height
linesnumber3Number of text line placeholders
variant'default' | 'light' | 'dark''default'Color variant
classNamestring—Additional CSS classes

SkeletonList

PropTypeDefaultDescription
itemsnumber5Number of list items
showAvatarbooleantrueShow avatar circle placeholder
showSubtitlebooleanfalseShow subtitle line
showActionbooleanfalseShow action button placeholder
variant'default' | 'light' | 'dark''default'Color variant
classNamestring—Additional CSS classes

SkeletonTable

PropTypeDefaultDescription
rowsnumber5Number of table rows
columnsnumber4Number of table columns
showHeaderbooleantrueShow header row
variant'default' | 'light' | 'dark''default'Color variant
classNamestring—Additional CSS classes

SkeletonCalendar

PropTypeDefaultDescription
eventsnumber3Number of event placeholders
variant'default' | 'light' | 'dark''default'Color variant
classNamestring—Additional CSS classes

Components

ComponentDescription
SkeletonBaseBase animated skeleton element
SkeletonCardCard loading placeholder with image and text lines
SkeletonListList loading placeholder with avatar and text
SkeletonTableTable loading placeholder with header and rows
SkeletonCalendarCalendar loading placeholder with grid and events

Type Exports

TypeDescription
SkeletonBasePropsProps for SkeletonBase
SkeletonCardPropsProps for SkeletonCard
SkeletonListPropsProps for SkeletonList
SkeletonTablePropsProps for SkeletonTable
SkeletonCalendarPropsProps for SkeletonCalendar
SkeletonVariant'default' | 'light' | 'dark'
SkeletonRounded'none' | 'sm' | 'md' | 'lg' | 'full'
SkeletonSize'xs' | 'sm' | 'md' | 'lg' | 'xl'

On this page