Kinetik UI

Skeleton Sweep

.md

Loading placeholders with one band of light sweeping across the whole layout.

v1.0.0Live on webreact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add skeleton-sweep

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/skeleton-sweep.json

Install manually

  1. Install dependencies
    npx expo install react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/skeleton-sweep.tsx
    View source files

Usage

import { Skeleton, SkeletonGroup } from '@/components/kinetik/skeleton-sweep';

<SkeletonGroup accessibilityLabel="Loading messages">
  <Skeleton circle={44} />
  <Skeleton width="60%" height={14} />
  <Skeleton width="90%" height={12} />
</SkeletonGroup>;

All skeletons in a group share one clock and offset the light by their position on screen, so one band of light passes over the whole layout.

When to use

  • Content whose shape is known before it loads: lists, profiles, cards.
  • Loads that usually take longer than about 300 ms.

When not to use

  • Very fast loads. A skeleton that flashes for 100 ms is noisier than nothing.
  • Unknown or highly variable layouts. Use a spinner or a progress bar.

Notes

  • Pass active={false} while the screen is out of focus to stop the sweep.
  • A Skeleton outside a group runs its own sweep.
  • The group is announced as a busy progress bar; the blocks themselves are hidden from screen readers.

Props

SkeletonGroupProps

PropTypeDefaultDescription
childrenrequiredReactNode—
activebooleantruePause the sweep, e.g. while the screen is not focused. Defaults to true.
periodnumber1400Time for one pass across the screen, in ms. Defaults to 1400.
accessibilityLabelstring'Loading'Announced to screen readers. Defaults to "Loading".
styleStyleProp<ViewStyle>—

SkeletonProps

PropTypeDefaultDescription
widthDimensionValue'100%'
heightDimensionValue14
radiusnumber—Corner radius. Defaults to the theme `sm` radius.
circlenumber—Shorthand for a circle of this diameter.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
One repeating timing per group; each block applies a single translate. Pauses when `active` is false.
Measured

Pixel 9 emulator, API 35, release build · interaction median 0.85× the system Settings app on the same emulator (indicative only) · keeps drawing at rest · 147 MB app memory. Sweeps by design while loading; unmounts with the placeholder.

Real-device measurement pending.

Accessibility

Reduced motion
Static placeholders with no sweep.
Screen readers
The group is a busy progress bar with a label ('Loading' by default); individual blocks are hidden.
Touch target
Not interactive.

Source files

components/kinetik/skeleton-sweep.tsx is in the Code tab of the preview above.