Page:
Skeleton
Pages
Accordion
AccordionItem
Alert
Avatar
Badge
BarChart
Button
ButtonGroup
Card
Changelog
ChartLegend
Checkbox
CodeEditor
Collapsible
ColorSwatches
Combobox
CommandPalette
ContextMenu
CopyButton
DatePicker
Dialog
DonutChart
Drawer
Field
FileInput
FileList
Forms
Gauge
Getting started
Heatmap
Home
Image
InlineEdit
Input
Kbd
Label
LineChart
Menu
MultiSelect
NumberInput
Overlays
Pagination
Popover
Progress
RadioGroup
ResponsiveDialog
Scroller
Select
Separator
ShareBar
Sheet
SidePanel
Skeleton
Slider
Sparkline
Spinner
StatCard
Switch
Table
Tabs
TagsInput
Textarea
Theming
Toaster
Toggle
Tooltip
Tree
Treemap
No results
3
Skeleton
L4stIdi0t edited this page 2026-11-17 10:55:14 +01:00
Skeleton
Loading placeholder, sized with class.
(e.g. h-4 w-32). Build it in the shape of the content that is coming, not as one grey box. shimmer (the default) sweeps one band of light across every skeleton on the page at once: the gradient is fixed to the viewport, so neighbouring placeholders read as one surface loading rather than a dozen blinking boxes. pulse fades opacity instead. Both are static under prefers-reduced-motion.
Feedback
<script lang="ts">
import { Skeleton } from '@l4st/driftwood';
</script>
| Light | Dark |
|---|---|
![]() |
![]() |
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
variant |
Variant |
'shimmer' |
shimmer sweeps a light band across all skeletons in sync; pulse fades. |
class |
string |
— | Merged with the component's own classes, last — so yours win. |
Example
The markup behind the screenshot above, lifted from src/routes/shots/ — so it
compiles, and it is exactly what produced the image.
<Skeleton class="size-10 rounded-full" />
<div class="flex flex-1 flex-col gap-2">
<Skeleton class="h-4 w-1/3" />
<Skeleton class="h-3 w-2/3" />
</div>
<Skeleton class="h-8 w-16" />
Feedback · Badge · Alert · Progress · Spinner · Toaster · Avatar · Image
driftwood
Layout
Actions
Forms
- Field
- Input
- FileInput
- FileList
- Textarea
- CodeEditor
- Combobox
- RadioGroup
- ColorSwatches
- NumberInput
- InlineEdit
- Label
- Select
- MultiSelect
- DatePicker
- TagsInput
- Checkbox
- Switch
- Slider
Feedback
Charts
Overlays
Navigation
Generated from the source by pnpm wiki · repository · v0.34.0

