selection
These attributes can be added to any container component to enable selection behavior.
🛠Attributes
selectionMode
string
No
Selection behavior (single
, multiple
)
maxSelections
number
No
Maximum number of selectable items
allowDeselect
boolean
No
Allow deselecting selected items
selectedClass
string
No
CSS class to apply to selected items
onSelect
string
No
Handler for selection events
Child Item Attributes
These attributes can be applied to items within a selection-enabled container:
selectable
boolean
No
Whether the item can be selected
selected
boolean
No
Initial selected state
disabled
boolean
No
Prevent selection
💡 Examples
Photo Gallery Selection
List with Single Selection
Nested Selection Groups
🧩 AI Interpretation Guidelines
Add appropriate selection state management
Generate selection event handlers
Apply selectedClass to selected items
Handle selection constraints (maxSelections)
Manage selection mode (single/multiple)
Support keyboard navigation and accessibility
Handle nested selection contexts
Last updated