BaseChip
Basic Chip component
Props
| Prop name | Description | Type | Values | Default |
|---|---|---|---|---|
| modelValue | pass the text for the chip | string | - | |
| isLinked | set if entry is a linked data entry and displayed with grey background | boolean | - | true |
| chipActive | set chip active (set color) | boolean | - | false |
| isRemovable | flag to specify if chip can be removed | boolean | - | true |
| textStyling | add some custom text styling | object | - | {} |
| editable | define true if chip should be editable on click | boolean | - | false |
| assistiveText | text read when a chip is focused - currently only available with propeditable true | string | - | '' |
| interpretTextAsHtml | if necessary chip text can be rendered as html this feature is currently only available if the chip is not editable caveat: setting this variable true can lead to XSS attacks. Only usethis prop on trusted content and never on user-provided content. | boolean | - | false |
Events
| Event name | Properties | Description |
|---|---|---|
| clicked | event emitted when chip is clicked | |
| update:model-value | undefined string - the displayed text string after edit | if chip is editable value is updated with this event |
| remove-entry | undefined string - the displayed chip string | triggered when the remove icon is clicked and returns the data behind the chip |
Demo
Chips with not-linked and linked styling - the latter one being editable