pub fn Root(_: RootProps) -> ElementExpand description
Context provider for the select compound component.
Wraps a Trigger (or Input) and a Content popup. Ships zero
visual styles — all state is expressed through data-* attributes.
§Variants
- Select-only: Compose
Trigger+Valueinside Root (noInput). - Combobox: Compose
Inputinside Root (enables search/filter). - Multiselect: Set
multiple: true.
§Data attributes
data-select-state="open|closed"data-select-disabled="true"(when disabled)
§Props
For details, see the props struct definition.
attributes:Vec<Attribute>default_value:Option<String>Initial value (uncontrolled, single-select).
value:Option<Signal<String>>Controlled single-select value.
on_value_change:Option<EventHandler<String>>Fires when single-select value changes.
default_values:Option<Vec<String>>Initial values (uncontrolled, multi-select).
values:Option<Signal<Vec<String>>>Controlled multi-select values.
on_values_change:Option<EventHandler<Vec<String>>>Fires when multi-select values change.
multiple:boolEnable multi-select mode.
disabled:boolDisable the entire select.
default_open:boolWhether popup starts open.
open:Option<Signal<bool>>Controlled open state.
on_open_change:Option<EventHandler<bool>>Fires when open state changes.
autocomplete:AutoCompleteAutocomplete mode (only relevant when
Inputchild is present).open_on_focus:boolAuto-open dropdown when input receives focus (combobox variant).
filter:Option<CustomFilter>Custom filter function. Overrides built-in nucleo fuzzy matching.
children:Element