Bridge UI

Skeleton

Placeholder block for loading states.

Introduction

Skeletons are placeholder blocks that pulse while content loads. They preserve layout shape so the interface feels stable instead of jumping when data arrives.

When to use: Show a loading stand-in for text lines, avatars, images, or card sections while data is fetching.

Compared to similar components:

  • Avatar — Renders a real image, initials, or icon. Use Skeleton with rounded="full" as a temporary stand-in until the Avatar data is ready.
  • Card — Groups real content. Compose Skeletons inside a Card to preview its structure during loading.
  • Progress / Spinner — Communicate how far work has progressed. Prefer Skeleton when you want to preserve layout shape instead of a progress indicator.

Size skeletons with Tailwind height and width classes (h-* / w-*). There is no built-in size prop.

Use the framework selector in the site header to switch between React and Vue.

Import

import { Skeleton } from "@bridge-ui/vue/Components/Skeleton";
import { Skeleton } from "@bridge-ui/react/Components/Skeleton";

Basic usage

Compose multiple Skeleton blocks to mirror the layout of the content that will replace them. Control dimensions with utility classes on className (React) or class (Vue).

Media card

Stack a large media block with avatar, text lines, and pill-shaped actions to preview a card while its content loads.

List

Repeat a row pattern—thumbnail, text stack, and trailing control—for feed or inbox loading states.

Page layout

Combine a page title, metric tiles, a wide content area, and a sidebar of cards for larger loading screens.

Rounded

Use the rounded prop to control border radius. Available values: none, xs, sm, md, lg, xl, 2xl, 3xl, 4xl, and full. The default is md.

Customization

Fine-tune appearance with className (React) or class (Vue), and the classes prop to target the root element—for example, to change the pulse background color.

Accessibility

  • Skeleton is decorative layout chrome. When it replaces content that is still loading, put aria-busy="true" on the container that owns the pending region, and update it when loading finishes.
  • Prefer a short visible or accessible status (e.g. aria-live="polite") on the parent region so assistive technology knows content is loading.
  • Do not rely on the pulse animation alone—animation is not a reliable signal for all users.

Anatomy

Skeleton renders a single empty root <div> with pulse animation and a gray background:

<div class="skeleton-root"></div>

Avatar, Card, Progress, Spinner

API

Prop Type Default Description
classes SkeletonClasses Classes for root.
rounded SkeletonRounded "md" Border radius.