# Auto Complete ```rust demo let value = RwSignal::new(String::new()); let options = Memo::>::new(move |_| { let prefix = value .get() .split_once('@') .map_or(value.get(), |v| v.0.to_string()); vec!["@gmail.com", "@163.com"] .into_iter() .map(|suffix| (format!("{prefix}{suffix}"), format!("{prefix}{suffix}"))) .collect() }); view! { {option.1} } ``` ### Disabled ```rust demo view! { } ``` ### Prefix & Suffix ```rust demo view! { } ``` ### AutoComplete Props | Name | Type | Default | Description | | --- | --- | --- | --- | | class | `OptionalProp>` | `Default::default()` | Additional classes for the autocomplete element. | | value | `Model` | `Default::default()` | Input of autocomplete. | | placeholder | `OptionalProp>` | `Default::default()` | Autocomplete's placeholder. | | options | `MaybeSignal>` | `Default::default()` | Options to autocomplete from. | | disabled | `MaybeSignal` | `false` | Whether the input is disabled. | | allow_free_input | `bool` | `false` | Whether free text input is allowed. | | invalid | `MaybeSignal` | `false` | Whether the input is invalid. | | clear_after_select | `MaybeSignal` | `false` | Whether to clear after selection. | | blur_after_select | `MaybeSignal` | `false` | Whether to blur after selection. | | on_select | `Option>` | `None` | On select callback function. | | attr: | `Vec<(&'static str, Attribute)>` | `Default::default()` | The dom attrs of the input element inside the component. | ### AutoCompleteOption Properties | Name | Type | Description | | ----- | -------- | ------------------- | | value | `String` | Option ID. | | label | `String` | Option label value. | ### AutoCompleteOption Slots | Name | Default | Description | | ------------------ | ------- | --------------------------- | | AutoCompletePrefix | `None` | AutoCompletePrefix content. | | AutoCompleteSuffix | `None` | AutoCompleteSuffix content. | ### AutoComplete Ref | Name | Type | Description | | ----- | ----------- | ------------------------ | | focus | `Fn(&self)` | Focus the input element. | | blur | `Fn(&self)` | Blur the input element. |