Skeleton

OverviewExamplesPropertiesCSS PropertiesUsageIntegration

Skeletons are used to provide a low fidelity representation of content before it appears in a view. This improves the perceived loading time for our users.

Properties

PropertyAttribute Description TypeDefault
effecteffectDetermines which animation effect the skeleton will use. The default is no animation.'pulse' | 'sheen' | undefined

CSS Properties

CSS Custom Properties provide more fine grain control over component presentation. We advise utilizing existing properties on the component before using these.

PropertyDescriptionDefault
--n-skeleton-border-radiusControls how rounded the corners are, using border radius tokens.var(--n-border-radius)
--n-skeleton-colorControls the main color of the skeleton, using our color tokens.var(--n-color-border)
--n-skeleton-sheen-colorControls the sheen color of the skeleton, using our color tokens.var(--n-color-border-strong)

Usage

This section includes guidelines for designers and developers about the usage of this component in different contexts.

Do

  • Use skeleton component for dynamic content only.
  • Use to give the user an indication of what the page layout will be like once loaded.
  • Mimick the actual layout using multiple Skeleton components.
  • Use aria-busy="true" to indicate which area on the screen is currently loading and remove it or set it to false once loaded.

Don’t

  • Don’t use Skeleton component for static content.
  • Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.

Integration

For integration guidelines, please see Web Components documentation .

Was this page helpful?

Yes No

We use this feedback to improve our documentation.