On this page
@addTagHelper *, Webority.Ui.RazorPlaceholder bars
Stack a few bars to sketch the shape of the content underneath, so the layout holds while it loads.
Table rows
Fill a table body with one placeholder per cell, using the same column count as the table it stands in for.
Radius and classes
Keep the corner radius close to the shape it stands in for, so a round avatar reads as round.
Every option
Every value of every prop, one cell each.
width
width="100%" (default)width="50%"width="200px"width="2rem"height
height="8"height="14" (default)height="24"height="2rem"radius
radius="0"radius="6" (default)radius="12"radius="50%"class and style passthrough
class="kpi-skel", appended to the base skeleton classstyle="margin-top:8px", merged with the computed width, height and radiusstyle="width:min(300px,100%)", an authored style wins over the width attributetable skeleton rows: rows × cols
rows=4 cols=5 (default), React: AppSkeletonRows rows={4} cols={5}
rows=2 cols=3, React: AppSkeletonRows rows={2} cols={3}
rows=1 cols=1, React: AppSkeletonRows rows={1} cols={1}
rows=0: no rows, React: AppSkeletonRows rows={0} cols={5}
cols=0: rows with no cells, React: AppSkeletonRows rows={2} cols={0}
Guidance
What to do, and what to avoid.
Use it when
- A component is loading its first data, the classic loading && data.length === 0 case.
- You want the page layout to hold its shape so content doesn't jump on arrival.
- A table or list is fetching its first page and you want per-row placeholders.
Reach for something else when
- The data loaded but the result set is empty. → AppEmptyState
- A table query returned no rows. → AppEmptyState variant="table"
- A short, indeterminate action is running (a button submit). → AppButton loading
- The whole page is blocked on a single request. → a page-level spinner
Echo the layout that is loading
A few bars that echo the real layout, a heading over two body lines. The eye reads it as "content, loading".
One giant block tells the user nothing about what's coming and reflows hard when the real, smaller content lands.
Match table columns while loading
Table skeletons use the same column count as the loaded table, so headers and widths never shift.
Two loose bars where a table is loading leaves the columns to snap into place on arrival.
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
3 props. The 3 most used come first.
Used on most screens 3 props
| Prop | Type | Default | Description |
|---|---|---|---|
| widthdefault 100% | string | 100% | Width of the bar: a number is px, a string is any CSS length. |
| heightdefault 14 | string | 14 | Height of the bar: a number is px, a string is any CSS length. |
| radiusdefault 6 | string | 6 | Corner radius of the bar: a number is px, a string is any CSS length. |
Screen reader
2 notes- The bar is a span with aria-hidden set to true, so screen readers skip it.
- The bar has no role and takes no focus.
Do and avoid
2 pairsEcho the layout that is loading
A few bars that echo the real layout, a heading over two body lines. The eye reads it as "content, loading".
One giant block tells the user nothing about what's coming and reflows hard when the real, smaller content lands.
Match table columns while loading
Table skeletons use the same column count as the loaded table, so headers and widths never shift.
Two loose bars where a table is loading leaves the columns to snap into place on arrival.