BNA

BNA UI
26

Skeleton

A placeholder component to show a loading state while content is being fetched.

Installation

pnpm dlx bna-ui add skeleton

Usage

import { Skeleton } from '@/components/ui/skeleton';
<Skeleton width={200} height={20} />

Examples

Default

Different Sizes

Card Layout

Profile Layout

List Items

Custom Shapes

API Reference

Skeleton

A loading placeholder component with animated pulsing effect.

PropTypeDefaultDescription
widthnumber | string100%The width of the skeleton.
heightnumber100The height of the skeleton in pixels.
styleViewStyle-Additional styles to apply to the skeleton.

Accessibility

The Skeleton component is built with accessibility in mind:

  • Uses appropriate color contrast for loading states
  • Provides visual feedback during content loading
  • Maintains layout stability while content loads
  • Compatible with screen readers through proper semantic structure