plushie/widget/combo_box

Combo box widget builder (text field with suggestions dropdown).

Types

pub opaque type ComboBox

Values

pub fn a11y(cb: ComboBox, a: a11y.A11y) -> ComboBox

Set accessibility properties for this widget.

pub fn build(cb: ComboBox) -> node.Node

Build the combo box into a renderable Node.

pub fn ellipsis(cb: ComboBox, e: String) -> ComboBox

Set the text ellipsis mode.

pub fn font(cb: ComboBox, f: font.Font) -> ComboBox

Set the font.

pub fn icon(cb: ComboBox, i: node.PropValue) -> ComboBox

Set a custom icon. Pass a DictVal with keys like code_point, size, font, etc.

pub fn line_height(cb: ComboBox, h: Float) -> ComboBox

Set the line height.

pub fn menu_height(cb: ComboBox, h: Float) -> ComboBox

Set the dropdown menu height.

pub fn menu_style(cb: ComboBox, ms: node.PropValue) -> ComboBox

Set dropdown menu style overrides. Pass a DictVal with optional keys: background, text_color, selected_text_color, selected_background, border, shadow.

pub fn new(
  id: String,
  options: List(String),
  value: String,
) -> ComboBox

Create a new combo box builder.

pub fn on_close(cb: ComboBox, enabled: Bool) -> ComboBox

Enable the close event.

pub fn on_open(cb: ComboBox, enabled: Bool) -> ComboBox

Enable the open event.

pub fn on_option_hovered(cb: ComboBox, enabled: Bool) -> ComboBox

Enable the option-hovered event.

pub fn on_submit(cb: ComboBox, enabled: Bool) -> ComboBox

Enable the submit event.

pub fn padding(cb: ComboBox, p: padding.Padding) -> ComboBox

Set the padding.

pub fn placeholder(cb: ComboBox, p: String) -> ComboBox

Set the placeholder text.

pub fn shaping(cb: ComboBox, s: shaping.Shaping) -> ComboBox

Set the text shaping strategy.

pub fn size(cb: ComboBox, s: Float) -> ComboBox

Set the size.

pub fn style(cb: ComboBox, s: String) -> ComboBox

Set the style.

pub fn width(cb: ComboBox, w: length.Length) -> ComboBox

Set the width.

Search Document