Skip to content
Elements Skeleton

Skeleton

A pulsing placeholder for content that is loading. Mark the loading region with aria-busy.

On this page

Examples

Loading profile

The placeholders are hidden from assistive technology; the busy region is announced once.

Loading profile
Razor
@* The region is marked busy and announced once; the placeholders themselves are hidden from assistive technology. *@
<div aria-busy="true" class="flex items-center gap-4">
    <span role="status" class="sr-only">Loading profile</span>
    <KlySkeleton Class="size-12 rounded-full" />
    <div class="flex flex-col gap-2">
        <KlySkeleton Class="h-4 w-60" />
        <KlySkeleton Class="h-4 w-40" />
    </div>
</div>

API

KlySkeleton

Placeholder that shows where content is loading. It is hidden from assistive technology.

Parameters

Name Type Description
Class string Classes added to the root element, merged last so they win over the theme.
Ui SkeletonUi Per-instance class overrides of the slots of the skeleton, see SkeletonUi . They are merged after the theme and the Class parameter wins on the root slot.

Ui slots

Ui takes a SkeletonUi with one class string per slot, merged after the theme.

Slot Styles
Base Classes merged into the base slot of KlySkeleton , after the theme and the app configuration.