Skeleton
Theme-aware, responsive skeleton component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<Skeleton
color="primary"
label="Loading"
size="md"
lines="3"
/>Legacy mount name: data-component="Skeleton".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
color | string | Optional | "primary" |
label | string | Optional | "Loading" |
size | string | Optional | "md" |
lines | number | Optional | 3 |
class | string | Optional | "" |
Slots
This component does not declare a slot.
Events
This component does not declare a custom event.
Source contract
Installed source: components/skeleton.wrn
component Skeleton {
props {
color = "primary"
label = "Loading"
size = "md"
lines = 3
class = ""
}
view {
<div class="wire-next wire-next--color-{color} wire-next--size-{size} wire-next--skeleton wire-next--size-{size} {class}" role="status" aria-label="{label}">
{#if "Skeleton" === "Skeleton"}{#each Array(lines).fill(0) as line}<span>
</span>{/each}{:else}<i aria-hidden="true">
</i>{/if}
</div>
}
}