---
title: "WordNav コンポーネント — zenit Zig UI"
description: "文字体系をまたいだ単語単位のカーソル移動。単語ジャンプは Unicode の単語境界に従い、ギリシャ文字、キリル文字、絵文字をまたいで動作します。"
url: https://zenit.z.express/ja/components/wordnav
language: ja
alternate_en: https://zenit.z.express/components/wordnav.md
alternate_zh: https://zenit.z.express/zh/components/wordnav.md
alternate_es: https://zenit.z.express/es/components/wordnav.md
alternate_ko: https://zenit.z.express/ko/components/wordnav.md
alternate_fr: https://zenit.z.express/fr/components/wordnav.md
alternate_de: https://zenit.z.express/de/components/wordnav.md
project: zenit v0.1.0-alpha (Zig 0.15.2, macOS)
source: https://github.com/version-next/zenit
---

# WordNav

`ui.widgets.Textarea`

文字体系をまたいだ単語単位のカーソル移動。

[Video](https://zenit.z.express/media/stories/wordnav.mp4?v=1fd0aa8709)

**BEHAVIOR CONTRACT**

単語ジャンプは Unicode の単語境界に従い、ギリシャ文字、キリル文字、絵文字をまたいで動作します。

**RECORDED INTERACTION**

harness がテキストボックス内で ⌥← を押して単語ごとに移動します。

`examples/storybook/stories.zig:4575`

```zig
pub fn buildWordNav(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
    const a = cx.allocator;
    const c = try col(cx, 12);
    try c.appendChild(a, try label(cx, "Word navigation — Alt+←/→ jumps whole Greek/Cyrillic words; double-click selects the word; family emoji is one cluster"));

    const ta = try W.Textarea(.{
        .label_text = "Mixed-script sample",
        .value = WORDNAV_TEXT,
        .rows = 3,
        .width = 560,
    }).mount(scope, cx);
    ta.meta.ownership.meta.test_id = "story.wordnav.ta";
    try c.appendChild(a, ta);

    try c.appendChild(a, try label(cx, "Expected Alt+Right stops (byte offsets): 7 14 27 34 40 46 72 75"));
    return c;
}
```

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

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

### TextareaProps

`ui.widgets.Textarea`

[src/ui/components/input/textarea.zig:2092](https://github.com/version-next/zenit/blob/HEAD/src/ui/components/input/textarea.zig#L2092)

```zig
fn Textarea(props: TextareaProps) TextareaBuilder
```

| フィールド | 型 | デフォルト値 | 説明 |
| --- | --- | --- | --- |
| `value` | `?[]const u8` | `null` | — |
| `placeholder` | `?[]const u8` | `null` | — |
| `label_text` | `?[]const u8` | `null` | — |
| `helper` | `?[]const u8` | `null` | — |
| `error_msg` | `?[]const u8` | `null` | — |
| `rows` | `u32` | `4` | — |
| `disabled` | `bool` | `false` | — |
| `required` | `bool` | `false` | — |
| `readonly` | `bool` | `false` | — |
| `width` | `?f32` | `null` | — |
| `on_change` | `?core_ui.HandlerRef` | `null` | — |
| `context` | `?*anyopaque` | `null` | — |

### \*Node

`ui.widgets.Textarea`

mount は `*Node` を直接返します。親ノードに append してください。
