Ariakit
/

SelectItemSelected

Exposes whether the closest SelectItem is selected through a function child.

As a value component, it doesn't render any DOM elements and therefore doesn't accept HTML props.

Code examples

<Select />
<SelectItem value="Apple">
{(selected) => (selected ? <CheckIcon /> : null)}
Apple

Required Props


children

(selected: boolean) => React.ReactNode

A function that gets called with the closest SelectItem component's selected state.

Stay tuned

Join 1,000+ subscribers and receive monthly tips & updates on new Ariakit content.

No spam. Unsubscribe anytime. Read latest issue