Rime

Skeleton

Loading placeholders shaped like the content they stand in for, with a soft shimmer.

Skeleton draws a block, a text line or a circle. Size each one to the real content (the Table does this per column) so nothing jumps when data arrives.

Installation

npx shadcn@latest add KezLahd/rime/skeleton

Also installs: base.

Usage

import { Skeleton, SkeletonText } from "@/components/ui";

<Skeleton width={180} height={20} />
<SkeletonText lines={3} />

Examples

Shapes

API

Generated from the component's TypeScript types and JSDoc (scripts/gen-ui-registry.mjs), so it always matches the source.

Skeleton

Skeleton props
PropTypeDefaultDescription
widthnumber | string"100%"Size to the real content it stands in for, not a generic block.
heightnumber | string
variant"text" | "block" | "circle""block"text = a line of text at the given font size's height; circle = avatar.
radiusnumber | string
classNamestring
styleCSSProperties

SkeletonText

SkeletonText props
PropTypeDefaultDescription
linesnumber3
lastLineWidthstring"62%"Last line is shorter, as real paragraphs are.
lineHeightnumber14
classNamestring

Theme tokens

Per-component tokens are undeclared by default, so the default shown is the fallback the CSS uses. Set one at :root (or in theme.css) to restyle every instance. Live values are read from this page, so they follow the Rime Studio.

Skeleton per-component tokens
TokenDefaultLive value
--r-circle50%…
--r-flatvar(--skeleton-radius)…

System tokens it reads

Skeleton system tokens
TokenDefaultLive value
--easetokens.css…
--r-2xstokens.css…
--r-xstokens.css…
--rgb-brand-deeptokens.css…
--rgb-whitetokens.css…
--skeleton-radiustokens.css…

Accessibility

  • Hidden from assistive tech; mark the loading region aria-busy instead.

Do and don't

Do

  • Match the real layout's dimensions.

Don't

  • Don't show grey blocks with no relation to the content.

For AI agents

This page as markdown, rendered from the same registry entry. Point an agent at it (or add .md to this page's URL), or at /llms.txt for the index.

Open skeleton.md