Skip to content

<sessions-skeleton-text>

A text placeholder while data loads.

Preact & React<SkeletonText>GroupLoadingDrawn asSkeletonText

Preview

Drawn by the same renderers Sessions uses for your extension, from the DOM example beside it, without its event handlers.

When to use it

Render the shape of what is coming, in the same box, then replace it — never a spinner.

In Preact and React, import the component of the same name from @sessions/apps/preact or @sessions/apps/react. Attributes become camelCase props, a boolean attribute is a boolean prop, and an event is an on prop that receives the event’s detail.

Attributes

Attribute
lines
How many lines.Prop lines
width
A CSS width for the line(s).Prop width
Example
import {SkeletonText} from '@sessions/apps/preact';

<SkeletonText lines="2" />

In the same group