@base-ui-components/react
Version:
Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.
28 lines (26 loc) • 687 B
JavaScript
'use client';
import * as React from 'react';
import { AriaCombobox } from "./AriaCombobox.js";
/**
* Groups all parts of the combobox.
* Doesn't render its own HTML element.
*
* Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)
*/
import { jsx as _jsx } from "react/jsx-runtime";
export function ComboboxRoot(props) {
const {
multiple = false,
defaultValue,
value,
onValueChange,
...other
} = props;
return /*#__PURE__*/_jsx(AriaCombobox, {
...other,
selectionMode: multiple ? 'multiple' : 'single',
selectedValue: value,
defaultSelectedValue: defaultValue,
onSelectedValueChange: onValueChange
});
}