Examples

Loading card

Mark the container aria-busy; skeletons are hidden from assistive technology.

Preview
Example.tsx
import { Card, HStack, Skeleton, Stack } from '@reactloom/ui';

export default function Example() {
  return (
    // Mark the region busy; skeletons themselves are hidden from assistive technology.
    <Card role="group" aria-busy="true" aria-label="Loading customer" style={{ width: '100%', maxWidth: 380 }}>
      <HStack gap="3">
        <Skeleton shape="circle" height={40} />
        <Stack gap="1" style={{ flex: 1 }}>
          <Skeleton width="55%" />
          <Skeleton width="35%" />
        </Stack>
      </HStack>
      <Skeleton lines={3} />
    </Card>
  );
}

API reference

Skeleton props
PropTypeDefault
shape
'text' | 'rect' | 'circle''text'
width / height
number | string—
lines
Text lines; the last is shorter.
number1

Customization

Extracted from the component’s source on every build, so it matches the code. How the layers fit together is explained in Customization.

State attributes

Target these in your CSS to style states without depending on class names.

AttributeValues
[data-shape]text · rect · circle

Theme tokens it reads

--pl-color-bg-muted --pl-color-bg-surface --pl-radius-md --pl-radius-sm

Accessibility

  • Skeletons are aria-hidden. Set aria-busy on the region and announce when content is ready.
  • The shimmer stops under reduced motion.

Usage guidelines

Do

  • Match the skeleton to the final layout.

Don’t

  • Don’t show skeletons for more than a few seconds without feedback.