TextPreset
Skeleton preset for a single line of text. It is a shortcut for a
Skeleton with a single Rect covering
the area — ideal for quick placeholders for cells, labels and short
titles.
When to use
| ✅ Use when… | 🚫 Avoid when… |
|---|---|
|
|
Example
import { Text } from '@apollion-dsi/core/elements/text';
import { TextPreset } from '@apollion-dsi/core/skeleton/text-preset';
function Title({ isLoading, value }) {
if (isLoading) return <TextPreset width="80%" />;
return <Text as="h1" text={value} />;
}Multiple lines
<Flex gap="small">
<TextPreset width="100%" />
<TextPreset width="80%" />
<TextPreset width="60%" />
</Flex>See also
- Storybook story: Components / TextPreset
- Base composer:
Skeleton.