Skeleton

Feedback & Status
stable

Loading placeholder with an opacity pulse. Supports text, rectangular, circular and pill variants — primitives to compose inside an OrigamSkeletonGroup. Renders real content via the default slot when loading=false.

Aperçu

Rendu de l’aperçu en cours…

text

Rendu de l’aperçu en cours…

rectangular

Rendu de l’aperçu en cours…

circular

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

Anatomy of OrigamSkeletonSchematic of the Skeleton component with 1 numbered part: the placeholder block. rectangular variant (standalone) 1
Anatomy of <origam-skeleton> — 1 part: the placeholder block ①.
1.origam-skeleton
The single-block element rendered for every variant (text, rectangular, circular, pill). Inside an OrigamSkeletonGroup it is aria-hidden and the group makes the one announcement.

API

Props

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

variant
'rectangular'
Skeleton shape primitive. 'text' → single-line text height, 'rectangular' → block shape, 'circular' → circle (height mirrors width), 'pill' → fully rounded capsule.
loading
boolean
true
Controls skeleton vs real content. true = show skeleton placeholder; false = render the default slot.
pulse
boolean
true
Enables the wave shimmer animation on text and rectangular variants, and the spin animation on circular. Disabled automatically under prefers-reduced-motion.
animation
TSkeletonAnimation
label
string
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
color
Override the skeleton foreground color.
bgColor
Override the skeleton background color.
size
'default'
Size token applied to the skeleton (affects font-size / dimensional scale).
Border-radius override. Defaults to circular token for variant=circular.
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
height
number | string
Height of the skeleton block. Defaults to --origam-skeleton---text-height (1.2em) for text variant; mirrors width for circular.
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
Width of the skeleton block. Accepts a CSS length or a number (px). Defaults to 100% for text variant.

API

Slots

Emplacements de contenu exposés par ce composant.

#default
Real content rendered when loading=false. When loading=true, the default slot is hidden and the skeleton placeholder is shown instead.

API

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to child components.
Ref<string>
Reactive CSS string generated by useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet. Called automatically on mount.
() => void
Removes the injected style sheet. Called automatically on unmount.
Ref<boolean>
True once the style sheet has been injected.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

Base background color of the skeleton block.
Border-radius for text and rectangular variants.
Border-radius for circular variant (50% = full circle).
Duration of the shimmer / spin animation.
Height of the text variant block.
Gap of an OrigamSkeletonGroup.
Highlight color of the shimmer wave. Derived from background-color by default.

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

status

Notes

  • Each skeleton block has role="status", aria-busy="true" and aria-label="Loading". This ensures screen readers announce the loading state without repeating a full description.
  • The pulse animation is disabled under prefers-reduced-motion: reduce. The skeleton remains visible as a static placeholder.
  • When loading=false, the skeleton is replaced by real content via the default slot. Ensure the revealed content is semantically correct (headings, alt text, etc.).

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

Source
color
color-mix(in srgb, currentColor 10%, transparent)
Base placeholder background color.
dimension
var(--origam-radius---sm)
Border-radius for text and rectangular variants.
dimension
var(--origam-radius---full)
Border-radius for circular variant.
duration
var(--origam-motion__duration---loop)
Pulse animation duration.
dimension
0.7em
Text variant line height.
dimension
var(--origam-space---3)
Gap of an OrigamSkeletonGroup.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic variants

vue

Loading gate

vue

Without pulse

vue