Page History
(this page was created automatically. In case of formatting issues, please visit the official Wiki Page)
Multi-Select
Link to Figma: https://www.figma.com/design/yck1tcUXgdQ5aYX6iUAwrO/GE---Astronaut-Design-System?node-id=14847-56066&t=ftfrOGkPzlG2GaTo-1
Overview
- The Multi-Select component is a form control that lets users choose multiple values from a dropdown list.
- It supports configuration for data sources, appearance, and behavior.
- It is useful when users need to select multiple items, such as tags, categories, or related elements.
- The component can handle large datasets through static lists or API integration.
...
- validation - Configures validation rules for the multi-select control, including:
- required - When set to true, at least one option must be selected before the form can be submitted. This ensures users make a selection when the information is essential.
Guidelines
...
...
(Technical Details Example)
{
"content": [
{ "id": "1", "name": "Option 1" },
{ "id": "2", "name": "Option 2" }
],
"totalElements": 100,
"totalPages": 10,
"number": 0,
"size": 10,
"first": true,
"last": false,
"empty": false
}
Usage
- Use Multi-Select when users must pick multiple values; prefill via
defaultValueand persist viasaveInLocalStorage. - Prefer dynamic data for long/volatile lists:
useStaticData: falsewithdataSourceId/dataSourcePath. UseuseStaticData: truewithstaticDatafor short, stable lists. - Map readable labels and stable IDs with
modelDisplayValue(label) andmodelValue(submitted value). - Make the field required only when necessary using
validation.required. - Tooltips may be used for added explanation but must stay concise and never carry essential information.
Sizing & Layout
- Keep lists scannable by tuning
pageSize; for small datasets, simplify withloadAll: true. - Maintain 24px spacing around form controls, and 8px spacing when fields are placed next to each other.
- Use sublines to separate input groups, with optional explanatory text below.
States & Feedback
- Present a non-editable summary with
readonly: true. - Initialize predictable selections with
defaultValue; react to edits usingevents.ON_VALUE_CHANGE. - Show validation errors inline with clear, actionable messages.
Visibility & Authorization
- Gate editability using
authorizationDisablewhen users may see but not change selections. - Remove the control entirely when inapplicable with
hidden: true.
Content & Localization
- Provide a concise, localized prompt using
placeholderTranslations. - For static lists, localize option
textvalues instaticData.
Dos & Don’ts
| Do | Don’t | Article setting(s) |
|---|---|---|
| Prefill common choices to speed completion. | Force users to reselect frequent values each visit. | defaultValue, saveInLocalStorage |
| Use dynamic data for long/volatile lists. | Hard-code large or frequently changing lists. | useStaticData: false, dataSourceId, dataSourcePath |
| Expose readable labels and stable IDs. | Display raw IDs or ambiguous labels. | modelDisplayValue, modelValue |
| Require only when truly needed. | Mark every Multi-Select as required. | validation.required |
| Tune list length for scanability. | Dump hundreds of items on one page. | pageSize, loadAll |
| Emit full objects when downstream logic needs attributes. | Add extra requests to rehydrate selected IDs. | emitObject: true |
| Disable for permission gaps; show selected values. | Hide controls users expect to see with missing feedback. | authorizationDisable, readonly |
| Hide the control when it must not appear. | Show a control that isn’t applicable and hope it’s ignored. | hidden: true |
| Localize the empty prompt. | Leave an English-only placeholder. | placeholderTranslations |
| Wire dependent updates to changes. | Rely on manual refresh after selection. | events.ON_VALUE_CHANGE |
| Prepare parameters before first render. | Build request parameters lazily after user input. | events.ON_INIT, getEntityCollectionHttpRequestParametersMap |
| Clean up on teardown. | Leave subscriptions or requests hanging. | events.ON_DESTROY |
| Align submission location with backend. | Always send values in the body regardless of API contract. | controlsRequestType, dataField |
Accessibility
...
- Labels must be short (1–2 words) and never include colons.
- Provide help text below the form title for guidance; it must always remain visible.
- Provide a localized, descriptive empty-state prompt via
placeholderTranslations. - Ensure understandable options with
modelDisplayValue(human-readable label) and stable submissions withmodelValue. - Use
readonlyto clearly communicate non-editable state without misleading interaction affordances. - Avoid color-only meaning; rely on clear labels surfaced through
modelDisplayValue. - Keep option text concise and specific to reduce navigation effort in large lists (complemented by
pageSize/loadAllconfiguration handled in Guidelines).