---
title: "Composant Skeleton — zenit Zig UI"
description: "Structure provisoire pendant le chargement du contenu. Les variantes text / rect / circle, les rayons et le shimmer suivent le thème."
url: https://zenit.z.express/fr/components/skeleton
language: fr
alternate_en: https://zenit.z.express/components/skeleton.md
alternate_zh: https://zenit.z.express/zh/components/skeleton.md
alternate_es: https://zenit.z.express/es/components/skeleton.md
alternate_ja: https://zenit.z.express/ja/components/skeleton.md
alternate_ko: https://zenit.z.express/ko/components/skeleton.md
alternate_de: https://zenit.z.express/de/components/skeleton.md
project: zenit v0.1.0-alpha (Zig 0.15.2, macOS)
source: https://github.com/version-next/zenit
---

# Skeleton

`ui.widgets.Skeleton`

Structure provisoire pendant le chargement du contenu.

[Video](https://zenit.z.express/media/stories/skeleton.mp4?v=64767cb17e)

**BEHAVIOR CONTRACT**

Les variantes text / rect / circle, les rayons et le shimmer suivent le thème.

**RECORDED INTERACTION**

Montre la vraie animation shimmer.

`examples/storybook/stories.zig:651`

```zig
// ── Skeleton ──
pub fn buildSkeleton(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
    const a = cx.allocator;
    const c = try col(cx, 12);
    // 同 spinner：框到骨架图形本身，避开标题/描述文字的像素。
    c.meta.ownership.meta.test_id = "story.skeleton.col";
    try c.appendChild(a, try W.Skeleton(.{ .variant = .text, .width = 280, .height = 14 }).mount(scope, cx));
    try c.appendChild(a, try W.Skeleton(.{ .variant = .text, .width = 200, .height = 14 }).mount(scope, cx));
    try c.appendChild(a, try W.Skeleton(.{ .variant = .circular, .width = 48, .height = 48 }).mount(scope, cx));
    try c.appendChild(a, try W.Skeleton(.{ .variant = .rectangular, .width = 280, .height = 80 }).mount(scope, cx));
    return c;
}
```

[Voir le code sur GitHubexamples/storybook/stories.zig:651](https://github.com/version-next/zenit/blob/HEAD/examples/storybook/stories.zig#L651)

Le code source tel quel de la story dans le Storybook (zenit 5f9add5+wip 2026-09-30). `W` désigne `ui.widgets` ; `col` / `row` / `label` sont de petits helpers de mise en page du Storybook.

### SkeletonProps

`ui.widgets.Skeleton`

[src/ui/components/skeleton/mod.zig:35](https://github.com/version-next/zenit/blob/HEAD/src/ui/components/skeleton/mod.zig#L35)

```zig
fn Skeleton(props: SkeletonProps) SkeletonBuilder
```

| Champ | Type | Défaut | Description |
| --- | --- | --- | --- |
| `variant` | `SkeletonVariant` `.text` `.circular` `.rectangular` | `.text` | — |
| `width` | `f32` | `200` | — |
| `height` | `f32` | `16` | — |
| `animate` | `bool` | `true` | — |
| `count` | `u8` | `1` | — |
| `gap` | `f32` | `8` | — |

### \*Node

`ui.widgets.Skeleton`

mount renvoie directement `*Node` : ajoutez-le à un parent.
