Listbox
Formsatlas-listboxExamples
Single and multiple
An always-visible list. With multi , the value is an array.
- AdministratorFull access
- EditorCan edit content
- ViewerRead-only
Role: editor
- AdministratorFull access
- EditorCan edit content
- ViewerRead-only
Roles: viewer
Descriptions and icons
Options can carry an icon and a description line under the label. A disabled option is skipped by the arrow keys.
- FreeOne project, community support
- TeamUnlimited projects, 10 members
- EnterpriseContact sales to enable
Plan: team
Horizontal, no wrapping
orientation="horizontal" lays the options out in a row and moves with Left/Right. With [wrap]="false" the arrow keys stop at the first and last option instead of cycling.
- XS
- S
- M
- L
- XL
Size: M
API
Generated from the library source, so it always matches the code.
AtlasListboxComponent atlas-listbox
| Input | Type | Default | Description |
|---|---|---|---|
| options required | ListboxOption[] | — | description and icon ; disabled options cannot be chosen. |
| value two-way | string | string[] | '' | multi (two-way, or Signal Forms [field] ). |
| disabled | boolean | false | [field] . |
| errors | readonly ValidationError.WithOptionalFieldTree[] | [] | [field] . |
| required | boolean | false | [field] . |
| invalid | boolean | false | [field] . |
| touched | boolean | false | [field] . |
| readonly | boolean | false | [field] . |
| pending | boolean | false | [field] . |
| name | string | '' | [field] . |
| multi | boolean | false | value is then an array. Space toggles the focused option. |
| orientation | 'vertical' | 'horizontal' | 'vertical' | vertical , Left/Right for horizontal (options wrap onto lines). |
| wrap | boolean | true | |
| ariaLabel | string | undefined | undefined | |
| ariaLabelledBy | string | undefined | undefined | atlas-form-field the field label. |
| inputId | string | undefined | undefined | id of the focusable element, so a visible <label atlasLabel for="…"> names it. Inside atlas-form-field the field supplies one. |
| ariaDescribedBy | string | null | null | aria-describedby , merged with the surrounding form field's hint or error. |
| class | string | '' | cn() ; yours win on conflicts. |
| Output | Payload | Description |
|---|---|---|
| touch | void |
Types
ListboxOption
| Property | Type | Description |
|---|---|---|
| value | string | |
| label | string | |
| description? | string | |
| disabled? | boolean | |
| icon? | string |