Data display / Skeleton

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

NameTypeDefaultDescription
shape"bar" | "circle" | "row" | "lines""bar"Rows for a list, bars for a table, lines for text.
countnumber1How many rows, lines or bars.
width / heightstring—CSS size of a bar or circle.
onfillbooleanfalseFor a skeleton on a filled ground (skel--onfill).
labelstring—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.
headingbooleanfalseIn a block, lead with a 24px heading bar about 35% wide.