<sessions-skeleton-text>
A text placeholder while data loads.
Preact & React
<SkeletonText>GroupLoadingDrawn asSkeletonTextPreview
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
linesHow many lines.Prop
lineswidthA CSS width for the line(s).Prop
widthExample
import {SkeletonText} from '@sessions/apps/preact';
<SkeletonText lines="2" />