---
title: "Sheet コンポーネント — zenit Zig UI"
description: "ウィンドウの端からスライドインする補助パネル。left / right の配置、barrier、パネルのヒットテスト、アニメーション、閉じ方の方針が一貫しています。"
url: https://zenit.z.express/ja/components/sheet
language: ja
alternate_en: https://zenit.z.express/components/sheet.md
alternate_zh: https://zenit.z.express/zh/components/sheet.md
alternate_es: https://zenit.z.express/es/components/sheet.md
alternate_ko: https://zenit.z.express/ko/components/sheet.md
alternate_fr: https://zenit.z.express/fr/components/sheet.md
alternate_de: https://zenit.z.express/de/components/sheet.md
project: zenit v0.1.0-alpha (Zig 0.15.2, macOS)
source: https://github.com/version-next/zenit
---

# Sheet

`ui.widgets.Sheet`

ウィンドウの端からスライドインする補助パネル。

[Video](https://zenit.z.express/media/stories/sheet.mp4?v=0895b1607c)

**BEHAVIOR CONTRACT**

left / right の配置、barrier、パネルのヒットテスト、アニメーション、閉じ方の方針が一貫しています。

**RECORDED INTERACTION**

harness が右側の Sheet を開き、スライドインの全過程を記録します。

`examples/storybook/stories.zig:2532`

```zig
pub fn buildSheet(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
    const a = cx.allocator;
    const c = try col(cx, 12);
    const vis = try scope.createSignal(bool, false);
    const st = try cx.bindState(SheetStory, .{ .visible = vis });
    const sbtn = try W.Button(.{ .label = "Open Sheet", .on_click = cx.on(SheetStory, st, SheetStory.open) }).mount(scope, cx);
    sbtn.meta.ownership.meta.test_id = "story.sheet.open";
    try c.appendChild(a, sbtn);

    const sh = try W.Sheet(.{ .side = .right, .width = 320 }).visible(vis).mount(scope, cx);
    sh.panel.meta.ownership.meta.test_id = "story.sheet.panel";
    try sh.content.appendChild(a, try ui.text(cx, "Sheet panel content.", .{ .font_size = 14, .color = light.color.fg_primary }));
    if (!sh.portaled) try c.appendChild(a, sh.overlay);
    return c;
}
```

[GitHub でソースを見るexamples/storybook/stories.zig:2532](https://github.com/version-next/zenit/blob/HEAD/examples/storybook/stories.zig#L2532)

Storybook にあるこの story のコードそのままです（zenit 5f9add5+wip 2026-09-30）。`W` は `ui.widgets` のことで、`col` / `row` / `label` は Storybook 内の小さなレイアウトヘルパーです。

### SheetProps

`ui.widgets.Sheet`

[src/ui/components/sheet/mod.zig:34](https://github.com/version-next/zenit/blob/HEAD/src/ui/components/sheet/mod.zig#L34)

```zig
fn Sheet(props: SheetProps) SheetBuilder
```

| フィールド | 型 | デフォルト値 | 説明 |
| --- | --- | --- | --- |
| `side` | `SheetSide` `.left` `.right` `.top` `.bottom` | `.right` | — |
| `width` | `f32` | `320` | — |
| `height` | `f32` | `320` | — |
| `overlay_color` | `?Color` | `null` | — |
| `background` | `?Color` | `null` | — |
| `close_on_overlay` | `bool` | `true` | — |
| `close_on_escape` | `bool` | `true` | — |
| `visible` | `?*Signal(bool)` | `null` | — |
| `animation_ms` | `f32` | `250` | — |

### SheetResult

`ui.widgets.Sheet`

[src/ui/components/sheet/mod.zig:47](https://github.com/version-next/zenit/blob/HEAD/src/ui/components/sheet/mod.zig#L47)

| フィールド | 型 | デフォルト値 | 説明 |
| --- | --- | --- | --- |
| `overlay` | `*Node` | — | — |
| `panel` | `*Node` | — | — |
| `content` | `*Node` | — | — |
| `portaled` | `bool` | `false` | 见 Modal.mount：true = overlay 已挂到 portal root，caller 不要再 append。 |
