Suggestion Chips is a multi-select control that displays clickable chips for quick selection. It's perfect for categorization, tagging, and gathering structured feedback. Users can select multiple predefined options with a simple click.
maxEvery code snippet below is fully editable! Feel free to modify the code, experiment with different values, and see your changes reflected instantly in the live preview on the right.
Use the play button to run different snippet, or the refresh button to restore the original example.
Start with a simple setup: define an array of suggestions with id and name for each chip. Users can click to select multiple chips.
Use max to limit how many chips users can select. Once the limit is reached, remaining chips become disabled. Users can still deselect to change their choices.
Use alignment to position the chips: 'left' (default), 'center', or 'right'.
Make suggestions a function that returns different options based on other field values. The chips update automatically when dependencies change.
Use isVisible to show different suggestion sets based on user responses. This creates branching survey logic - happy users see one set, unhappy users see another.
Access the field value using form.suggestionChips('id')?.value(). The value is a simple string[] array of selected chip IDs.
Set isRequired: true to require at least one chip selection. The form cannot be submitted without a selection.
Need free-text input alongside chips? Simply add a Textarea field after your SuggestionChips. This modular approach gives you full control over both components.
Let's combine everything into a real-world feedback survey. Suggestion Chips works seamlessly with other controls to gather comprehensive feedback.
| Property | Type | Default | Description |
|---|---|---|---|
suggestions | {id, name}[] | Required | Clickable chip options |
max | number | unlimited | Max chips that can be selected |
min | number | undefined | Min chips that must be selected |
alignment | 'left' | 'center' | 'right' | 'left' | Chip horizontal alignment |
The control returns a simple array of selected chip IDs:
string[] // e.g., ['speed', 'quality', 'support']
You've mastered Suggestion Chips! This versatile control is perfect for tagging, categorization, and structured feedback collection.
Continue to Matrix Question TutorialOther learning paths: