Data display
Skeleton
Loading placeholders that mirror the real layout, and the loading region that holds them.
import { EcoSkeleton } from "vue-ecosphere"
Rows
Shape the skeleton like the content it stands in for: rows for a list.
Bars
Bars for figures and text.
Loading a view
One role="status" per loading region, named with what is loading. Set aria-busy on the region being replaced, and show exactly one of loading, error, empty or content at a time.
Loading invoices…
Inside a card
loading--inline drops the padding and starts with a visible line saying what is loading, so no hidden status text is needed.
Charges on this invoice
Loading charges for this invoice…
One line, in a form
40px high, so it occupies the space of the control it stands in for.
Loading cost centres…
API
| Name | Type | Default | Description |
|---|---|---|---|
shape | "bar" | "circle" | "row" | "lines" | "bar" | Rows for a list, bars for a table, lines for text. |
count | number | 1 | How many rows, lines or bars. |
width / height | string | — | CSS size of a bar or circle. |
onfill | boolean | false | For a skeleton on a filled ground (skel--onfill). |
label | string | — | What is loading. Makes it the loading region: role="status", named with these words. |
layout | "block" | "inline" | "line" | "block" | Whole region (hidden status text), inside a card or section (visible body-sm line), or one form field. |
heading | boolean | false | In a block, lead with a 24px heading bar about 35% wide. |