Meet Frontfriend.Your brand. Your rules. Your agents, connected.Explore what’s new
DocumentationSkeleton

Skeleton

Use to show a placeholder while content is loading.

Interactive preview

Rendered from the shared Frontfriend stories with React Base, the same preview Studio shows. Styling comes from your Design System; the code below is native to Base UI.

Installation

Complete project setup first. Your configuration must select react/base and include your Design System ID.

pnpm exec frontfriend download skeleton -f react --primitive base

Review dependencies reported by the downloader and keep your source changes in version control.

Usage

import { Skeleton } from "@/components/ui/skeleton";
<Skeleton
  style={{
    width: 240,
    height: 80,
    maxWidth: "100%",
  }}
/>;

Examples

Default

import { Skeleton } from "@/components/ui/skeleton";
<div className="flex items-center space-x-4">
  <Skeleton className="h-12 w-12 rounded-full" />
  <div className="space-y-2">
    <Skeleton className="h-4 w-[250px]" />
    <Skeleton className="h-4 w-[200px]" />
  </div>
</div>;

Card

import { Skeleton } from "@/components/ui/skeleton";
<div className="flex flex-col space-y-3">
  <Skeleton className="h-[125px] w-[250px] rounded-xl" />
  <div className="space-y-2">
    <Skeleton className="h-4 w-[250px]" />
    <Skeleton className="h-4 w-[200px]" />
  </div>
</div>;

API reference

Frontfriend-owned props. Native HTML and inherited primitive props remain documented by Base UI.

This component adds no props of its own to Base UI.

Configuration determines the actual classes and available styling hooks. See Theming & component configuration before introducing a repeated local override.