SkeletonList
HkSkeletonList is the stacked loading placeholder: a list-shaped block of rows, all the same height and separated by one gap, drawn while the real rows are still on the way. It is the Vue-side convenience built out of HkSkeleton, so a list page needs one component instead of a loop of atoms.
- A single bar, an avatar, or a placeholder of an arbitrary size is an HkSkeleton: this component only ever draws full-width rows.
- A wait whose shape is not a list — a chart, a card, a whole page — belongs to a HkSpinner or a hand-placed set of skeleton blocks.
- Once the request finishes with no rows at all, the placeholder gives way to an HkEmptyState.
Import
;
This component has no Rust counterpart: the mirror crate ships only the HkSkeleton atom, whose rows prop covers the same case on the Rust side.
Count, height and gap
count is how many rows to draw (default 3), itemHeight the height of each (default "40px", the height of a typical list row) and gap the space between them (default "8px"). Match count to the rows that fit above the fold rather than to the page size: a placeholder list longer than the viewport scrolls without finishing, which is never the impression you want.
Tone
tone passes straight through to the atoms: primary (the default) or muted, the calmer grey for a list that sits on a tinted panel. All rows in one list share the tone, because a list of rows that are some light and some dark reads as data rather than as a placeholder.
Accessibility
- The list is aria-hidden and every row inside it is too: nothing here is content, and a screen reader must not walk a column of empty rows.
- The loading state belongs on the region that owns the list — set aria-busy="true" on it while the rows are being fetched and clear it when they arrive.
- Keep the placeholder's geometry close to the real rows (height and gap): the point is to reserve the layout, and a mismatch produces exactly the jump the skeleton exists to prevent.
- Because the rows are unnamed, the region also needs its own busy text or heading; the placeholder alone says nothing to assistive technology.
API
Vue
Props
| Name | Type | Default | Required |
|---|---|---|---|
| count | Number | 3 | — |
| itemHeight | String | "40px" | — |
| gap | String | "8px" | — |
| tone | String as PropType<SkeletonTone> | "primary" | — |
Related components
- HkSkeleton — the single placeholder atom this list is made of.
- HkEmptyState — the panel to show when the load returns nothing.
- HkSpinner — the busy indicator for a wait whose layout is not a list.
- HkLoadingVeil — a blocking overlay when the whole surface is waiting.