Skip to content

Component ComboBox

MeowLynxSea edited this page Jan 23, 2026 · 6 revisions

ComboBox

A searchable dropdown.

Use this when you have a large list of options and want inline filtering.

Example

use gpui::ElementId;
use yororen_ui::component::{combo_box, ComboBoxOption};

let view = combo_box()
    .key(ElementId::from(("settings", "channel")))
    .placeholder("Select a channel…")
    .options([
        ComboBoxOption::new("stable", "Stable"),
        ComboBoxOption::new("beta", "Beta"),
        ComboBoxOption::new("nightly", "Nightly"),
    ])
    .on_change(|value, _window, _cx| {
        // value: SharedString
    });

Clone this wiki locally