---
title: "ComboBox 컴포넌트 — zenit Zig UI"
description: "검색과 필터링이 가능하고 값을 다시 채워 넣는 조합 입력.입력 버퍼, 후보 필터링, overlay, active option, 최종 value를 단계별로 관…"
url: https://zenit.z.express/ko/components/combobox
language: ko
alternate_en: https://zenit.z.express/components/combobox.md
alternate_zh: https://zenit.z.express/zh/components/combobox.md
alternate_es: https://zenit.z.express/es/components/combobox.md
alternate_ja: https://zenit.z.express/ja/components/combobox.md
alternate_fr: https://zenit.z.express/fr/components/combobox.md
alternate_de: https://zenit.z.express/de/components/combobox.md
project: zenit v0.1.0-alpha (Zig 0.15.2, macOS)
source: https://github.com/version-next/zenit
---

# ComboBox

`ui.widgets.ComboBox`

검색과 필터링이 가능하고 값을 다시 채워 넣는 조합 입력.

[Video](https://zenit.z.express/media/stories/combobox.mp4?v=f15dabefd2)

**BEHAVIOR CONTRACT**

입력 버퍼, 후보 필터링, overlay, active option, 최종 value를 단계별로 관리합니다.

**RECORDED INTERACTION**

harness가 “ap”를 입력하면 필터링된 결과가 나타납니다.

`examples/storybook/stories.zig:3113`

```zig
// ── ComboBox / Autocomplete ──
pub fn buildComboBox(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
    const a = cx.allocator;
    const c = try col(cx, 12);
    const opts = [_]ui.widgets.ComboOption{
        .{ .value = "ap", .label = "Apple" },
        .{ .value = "ba", .label = "Banana" },
        .{ .value = "ch", .label = "Cherry" },
        .{ .value = "gr", .label = "Grape" },
        .{ .value = "ma", .label = "Mango" },
    };
    const cb = try ui.widgets.ComboBox(.{
        .options = &opts,
        .label_text = "Fruit",
        .placeholder = "Type to search fruit",
        .width = 260,
    }, scope, cx);
    cb.input.meta.ownership.meta.test_id = "story.combobox.input";
    cb.panel.meta.ownership.meta.test_id = "story.combobox.panel";
    try c.appendChild(a, cb.wrapper);
    return c;
}
```

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

Storybook에 있는 이 story의 원본 코드입니다(zenit 5f9add5+wip 2026-09-30). `W`는 `ui.widgets`이며, `col` / `row` / `label`은 Storybook 내부의 작은 레이아웃 헬퍼입니다.

### ComboBoxProps

`ui.widgets.ComboBox`

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

```zig
fn mountComboBox(props: ComboBoxProps, scope: *Scope, cx: *Cx) !ComboBoxMount
```

| 필드 | 타입 | 기본값 | 설명 |
| --- | --- | --- | --- |
| `options` | `[]const ComboOption` | `&.{}` | — |
| `placeholder` | `[]const u8` | `"Type to search…"` | — |
| `label_text` | `?[]const u8` | `null` | — |
| `width` | `f32` | `240` | — |
| `max_dropdown_height` | `f32` | `280` | — |
| `disabled` | `bool` | `false` | — |
| `on_change` | `?core.HandlerRef` | `null` | 选中提交回调；caller 在回调里读 state.selectedOption() |

### ComboBoxMount

`ui.widgets.ComboBox`

[src/ui/components/combo\_box/mod.zig:110](https://github.com/version-next/zenit/blob/HEAD/src/ui/components/combo_box/mod.zig#L110)

| 필드 | 타입 | 기본값 | 설명 |
| --- | --- | --- | --- |
| `wrapper` | `*Node` | — | — |
| `input` | `*Node` | — | Input wrapper（含 label） |
| `panel` | `*Node` | — | — |
| `is_open` | `*Signal(bool)` | — | — |
| `state` | `*ComboBoxState` | — | — |
