Ariakit
/

ComboboxValue

Renders the current value state in the combobox store.

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

It takes a children function that gets called with the current value as an argument. This can be used as an uncontrolled API to render the combobox value in a custom way.

Code examples

<Combobox />
{(value) => `Current value: ${value}`}

Optional Props


children

((value: string) => React.ReactNode) | undefined

A function that gets called with the current value as an argument. It can be used to render the combobox value in a custom way.


store

ComboboxStore<ComboboxStoreSelectedValue> | undefined

Object returned by the useComboboxStore hook. If not provided, the closest ComboboxProvider component's context will be used.

Stay tuned

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

No spam. Unsubscribe anytime. Read latest issue