Clickable Chip
Interactive button used to categorize or highlight content attributes. They are often displayed near the content they classify, enhancing discoverability by allowing users to identify items with similar properties.
Anchor to propertiesProperties
- Anchor to accessibilityLabelaccessibilityLabelstring
A label that describes the purpose or contents of the Chip. It will be read to users using assistive technologies such as screen readers.
- Anchor to disableddisabledbooleanDefault: false
Disables the chip, disallowing any interaction.
- booleanDefault: false
Determines whether the chip is hidden.
If this property is being set on each framework render (as in 'controlled' usage), and the chip is
removable, ensure you update app state for this property when theremoveevent fires.If the chip is not
removable, it can still be hidden by setting this property.- Anchor to hrefhrefstring
The URL to link to.
- If set, it will navigate to the location specified by
hrefafter executing theclickevent.
- If set, it will navigate to the location specified by
- string
A unique identifier for the element.
- Anchor to removableremovablebooleanDefault: false
Whether the chip is removable.
Anchor to eventsEvents
Learn more about registering events.
- Anchor to afterhideafterhideCallbackEventListener<typeof tagName>
Event handler when the chip has fully hidden.
The
hiddenproperty will betruewhen this event fires.- Anchor to clickclickCallbackEventListener<typeof tagName>
Event handler when the chip is clicked.
- Anchor to removeremoveCallbackEventListener<typeof tagName>
Event handler when the chip is removed.
CallbackEventListener
(EventListener & {
(event: CallbackEvent<TTagName, Event> & TData): void;
}) | nullCallbackEvent
TEvent & {
currentTarget: HTMLElementTagNameMap[TTagName];
}Anchor to slotsSlots
Learn more about component slots.
- Anchor to graphicgraphicHTMLElement
The graphic to display inside of the chip.
Only
s-iconelement and itstypeattribute are supported.
Code
Examples
Code
Default
<s-clickable-chip removable>Shipping insurance</s-clickable-chip>
Preview
