---
title: "Textarea 컴포넌트 — zenit Zig UI"
description: "helper, error, 비활성 상태를 지원하는 여러 줄 편집.줄바꿈, 선택 영역, 스크롤, 자소 경계, IME preedit / commit이 한 줄 입…"
url: https://zenit.z.express/ko/components/textarea
language: ko
alternate_en: https://zenit.z.express/components/textarea.md
alternate_zh: https://zenit.z.express/zh/components/textarea.md
alternate_es: https://zenit.z.express/es/components/textarea.md
alternate_ja: https://zenit.z.express/ja/components/textarea.md
alternate_fr: https://zenit.z.express/fr/components/textarea.md
alternate_de: https://zenit.z.express/de/components/textarea.md
project: zenit v0.1.0-alpha (Zig 0.15.2, macOS)
source: https://github.com/version-next/zenit
---

# Textarea

`ui.widgets.Textarea`

helper, error, 비활성 상태를 지원하는 여러 줄 편집.

[Video](https://zenit.z.express/media/stories/textarea.mp4?v=01136a4b5d)

**BEHAVIOR CONTRACT**

줄바꿈, 선택 영역, 스크롤, 자소 경계, IME preedit / commit이 한 줄 입력과 동일하게 동작합니다.

**RECORDED INTERACTION**

harness가 텍스트 상자에 포커스를 두고 두 줄을 입력합니다.

`examples/storybook/stories.zig:2923`

```zig
// ── Textarea ──
pub fn buildTextarea(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
    const a = cx.allocator;
    const c = try col(cx, 12);

    const ta = try W.Textarea(.{ .label_text = "Notes", .placeholder = "Write something…", .rows = 5, .width = 420 }).mount(scope, cx);
    ta.meta.ownership.meta.test_id = "story.textarea.box";
    try c.appendChild(a, ta);

    try c.appendChild(a, try W.Textarea(.{ .label_text = "With helper", .placeholder = "Bio", .helper = "Max 500 characters", .rows = 3, .width = 420 }).mount(scope, cx));
    try c.appendChild(a, try W.Textarea(.{ .label_text = "With error", .value = "too short", .error_msg = "Please write more", .rows = 3, .width = 420 }).mount(scope, cx));
    try c.appendChild(a, try W.Textarea(.{ .label_text = "Disabled", .placeholder = "Cannot edit", .disabled = true, .rows = 3, .width = 420 }).mount(scope, cx));
    return c;
}
```

[GitHub에서 소스 보기examples/storybook/stories.zig:2923](https://github.com/version-next/zenit/blob/HEAD/examples/storybook/stories.zig#L2923)

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하면 됩니다.
