suiss/ui · Component
Skeleton
A pulsing placeholder block that stands in for content while it loads.
Skeleton is an open-source component from suiss/ui for React, React Native, SwiftUI and Jetpack Compose. The @esuiss/ui CLI copies its source into your project, so you own the code.
Skeleton is a plain div with a pulsing animation, rounded corners and a muted fill. It has no size of its own; set width, height and shape with utility classes so each placeholder matches the content it replaces.
Combine several skeletons to sketch a layout, such as an avatar with two lines of text. For an indeterminate activity indicator, use Spinner instead.
Installation
CLI
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Manual
-
Add the
cnhelper. -
Copy the source into
components/ui/skeleton.tsx:
- Update the import paths to match your project.
Usage
Size every skeleton with classes such as h-4 w-48. Use rounded-full for avatars and other rounded shapes to override the default rounded-md.
Examples
Profile
Sketches an avatar beside two lines of text.
Card
Sketches a media card with an image and two lines of text.
List
Sketches a list of rows, each with an icon and two lines of text.
API Reference
Skeleton
A pulsing placeholder block.
Also accepts the props of React.ComponentProps<"div">.
Accessibility
Skeletonrenders an emptydivwith no role or text, so it isn't announced. Let assistive technologies know content is loading another way, for example witharia-busyon the region that's loading.
Notes
- Uses
data-slot="skeleton", theanimate-pulseanimation and thebg-mutedtoken.

Skeleton is a Reanimated View with a rounded background whose opacity pulses between 1 and 0.5 on a loop. It has no fixed size; you shape it with classes to match the content it stands in for.
Installation
Manual
- Install the dependencies:
- Copy the source into
components/ui/skeleton.tsx:
- Update the import paths to match your project.
- Install the dependencies:
- Copy the source into
components/ui/skeleton.tsx:
- Update the import paths to match your project.
- Install the dependencies:
- Copy the source into
components/ui/skeleton.tsx:
- Update the import paths to match your project.
-
Target iOS 17 or later.
-
Copy the theme files every view uses:
- Copy the source:
- Add the files to your app target.
- Set
minSdkto 24 or higher and add the dependencies:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Update the
com.esuiss.uipackage names to match your project.
Usage
Set width, height and radius through className, for example h-4 w-48 for a line of text or size-12 rounded-full for an avatar. Compose several skeletons to mirror the layout of the loaded content, then swap them for the real content once it arrives.
Examples
Profile
An avatar circle with two lines of text.

Card
A media block with two lines of text below it.

List
Rows with a thumbnail and two lines of text.

API Reference
Skeleton
Also accepts the props of React.ComponentProps<typeof View>, React.RefAttributes<View>.
Accessibility
- The skeleton is a plain view with no role or label. If loading state matters to the user, announce it elsewhere, for example with a
Spinnerthat has anaccessibilityLabel.
Notes
- Uses the
bg-mutedtoken. - The pulse runs on the UI thread through Reanimated, with a 1000 ms cycle.
- Light and dark colors follow the system appearance.



