# Multi Select > Searchable multi-select for objects, shown as chips Source: https://shellui.dev/docs/v0.4/components/form/multi-select `MultiSelect` picks several objects from a list, with a search box. Selected items appear as removable chips. ## Installation ```bash shellui add multi-select ``` ## Usage ```razor

@_selected.Count selected

@code { private List _selected = new(); } @code { private List _people = new() { new(1, "Ada Lovelace", "Engineering"), new(2, "Grace Hopper", "Engineering"), new(3, "Katherine Johnson", "Research"), }; record Person(int Id, string Name, string Team); } ``` ## Custom chips ```razor
@context.Name (@context.Team)
@code { private List _selected = new(); private List _people = new() { new(1, "Ada Lovelace", "Engineering"), new(2, "Grace Hopper", "Compilers"), new(3, "Alan Turing", "Research"), }; record Person(int Id, string Name, string Team); } ``` ## API Reference | Property | Type | Default | Description | |----------|------|---------|-------------| | `TItem` | `Generic type` | — | The item type | | `TKey` | `Generic type` | — | The key type returned by `KeySelector` | | `Items` | `IEnumerable` | required | Items to choose from | | `Values` | `List` | empty list | Selected items (supports `@bind-Values`) | | `ValuesChanged` | `EventCallback>` | — | Raised when the selection changes | | `KeySelector` | `Func` | required | Unique key for each item | | `DisplaySelector` | `Func?` | `null` | Text shown for an item (defaults to `ToString()`) | | `SearchPredicate` | `Func?` | `null` | Custom search match (defaults to a case-insensitive match on the display text) | | `ChipTemplate` | `RenderFragment?` | `null` | Custom rendering of each selected chip | | `OptionTemplate` | `RenderFragment?` | `null` | Custom rendering for each option in the list | | `Placeholder` | `string` | `"Select..."` | Text shown when nothing is selected | | `SearchPlaceholder` | `string` | `"Search..."` | Placeholder of the search box | | `EmptyText` | `string` | `"No results found."` | Text shown when the search matches nothing | | `Disabled` | `bool` | `false` | Disables the control | | `CloseOnScroll` | `bool` | `false` | Close the list when the page scrolls | | `Class` | `string?` | `null` | Additional CSS classes |