Primitives
22
Skeleton
A placeholder for content that has not arrived. Always aria-hidden — reading "loading" once per placeholder is worse than silence; put aria-busy on the waiting region instead, since that is the thing with a name.
plain markup — no library on the page
rendered by aura-react
rendered by aura-vue
rendered by aura-svelte
built from aura-angular's own class helpers
Code
index.html
<div class="aura-stack" style="--aura-dir:column;--aura-gap:var(--space-3)" aria-busy="true">
<span aria-hidden="true" class="aura-skeleton aura-skeleton--circle" style="width:40px;height:40px"></span>
<span aria-hidden="true" class="aura-skeleton aura-skeleton--text aura-anim-shimmer" style="width:220px"></span>
<span aria-hidden="true" class="aura-skeleton aura-skeleton--text aura-anim-shimmer" style="width:160px"></span>
</div>Demo.tsx
import { Skeleton, Stack } from '@ilomee/aura-react';
export default function Demo() {
// aria-busy belongs on the region that is waiting — the skeletons themselves are hidden.
return (
<Stack gap={3} aria-busy="true">
<Skeleton variant="circle" width="40px" height="40px" />
<Skeleton variant="text" width="220px" animated />
<Skeleton variant="text" width="160px" animated />
</Stack>
);
}Demo.vue
<script setup lang="ts">
import { Skeleton } from '@ilomee/aura-vue';
</script>
<template>
<Skeleton variant="text" width="180px" animated />
</template>Demo.svelte
<script lang="ts">
import { Skeleton } from '@ilomee/aura-svelte';
</script>
<Skeleton variant="text" width="180px" animated />Used as aura-skeleton.
demo.component.ts
import { AuraSkeleton } from '@ilomee/aura-angular';
@Component({
standalone: true,
imports: [AuraSkeleton],
template: `<aura-skeleton variant="text" width="180px" [animated]="true" />`,
})
export class DemoComponent {}Props
Plain markup has no props — the classes below are the whole API. The four packages do nothing more than set these same classes for you.
| Name | Type | Default | Notes |
|---|---|---|---|
| variant | 'block' | 'text' | 'circle' | 'block' | |
| width | string | — | |
| height | string | — | |
| animated | boolean | false |
| Name | Type | Default | Notes |
|---|---|---|---|
| variant | 'block' | 'text' | 'circle' | 'block' | |
| width | string | — | |
| height | string | — | |
| animated | boolean | false |
| Name | Type | Default | Notes |
|---|---|---|---|
| variant | 'block' | 'text' | 'circle' | 'block' | |
| width | string | — | |
| height | string | — | |
| animated | boolean | false |
| Name | Type | Default | Notes |
|---|---|---|---|
| variant | 'block' | 'text' | 'circle' | 'block' | |
| width | string | — | |
| height | string | — | |
| animated | boolean | false |
Emitted classes
Every framework emits the same classes — that is what makes the four libraries look identical. You can use them directly, without any component library.
| Class | Role | Notes |
|---|---|---|
| .aura-skeleton | base | Required. A modifier does nothing without it. |
| .aura-skeleton--text | modifier | |
| .aura-skeleton--circle | modifier |
Tokens and rules
components.css- fill
- var(--surface-2)
- radius
- var(--skeleton-radius)
- shimmer
- .aura-anim-shimmer — opt-in, needs animations.css