A set of dismissible elements.

DismissibleGroup itself is a primitive. It has not been designed so it should not be used out-of-the-box as a user facing component. Test the component is accessible depending on each implementation use case.

<DismissibleGroup
onDismiss={(value) => {
alert(`dismiss ${value}`)
}}
>
<DismissibleGroup.Item value="a">
A
<DismissibleGroup.Trigger aria-label="Dismiss A" />
</DismissibleGroup.Item>
<DismissibleGroup.Item value="b" disabled>
B
<DismissibleGroup.Trigger />
</DismissibleGroup.Item>
<DismissibleGroup.Item value="c" disabled>
C
</DismissibleGroup.Item>
</DismissibleGroup>

API Reference

DismissibleGroupRoot

PropTypeDefaultRequired
asJSX.IntrinsicElements

-

-

disabled
boolean

-

-

onDismiss(value: ReactText) => void

-

DismissibleGroup.Item

PropTypeDefaultRequired
asChild
boolean

-

-

value
string | number

-

onDismiss
(value: ReactText) => void

-

-

disabled
boolean

-

-