Skeleton

Skeletons are used to provide a visual representation of where content will eventually be drawn.

There are two built-in effects, sheen and pulse. Effects are intentionally subtle, as they can be distracting when used extensively. The default is none, which displays a static, non-animated skeleton.

None Sheen Pulse

Use multiple skeletons and some clever styles to simulate paragraphs.

Set a matching width and height to make a circle, square, or rounded avatar skeleton.

import '@ods/components/web.skeleton';

Note: You only need to import a web component once in your code, as it registers itself globally when defined, allowing you to use it anywhere within your application without needing to re-import it each time you want to use the component.

Properties

Please note, both DOM properties and HTML attributes are shown in the table below. Unless otherwise specified, the property and attribute names are identical.

Property/AttributeReflectsTypeDefault
effect
'pulse' | 'sheen' | 'none''none'

Parts

NameDescription
baseThe component's base wrapper.
indicatorThe skeleton's indicator which is responsible for its color and animation.

Search