UNPKG

@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.

43 lines (42 loc) 1.33 kB
import * as React from 'react'; import type { BaseUIComponentProps } from '../../utils/types.js'; /** * An individual option in the select menu. * Renders a `<div>` element. * * Documentation: [Base UI Select](https://base-ui.com/react/components/select) */ declare const SelectItem: React.ForwardRefExoticComponent<SelectItem.Props & React.RefAttributes<HTMLDivElement>>; declare namespace SelectItem { interface State { /** * Whether the component should ignore user interaction. */ disabled: boolean; highlighted: boolean; selected: boolean; /** * Whether the select menu is currently open. */ open: boolean; } interface Props extends Omit<BaseUIComponentProps<'div', State>, 'id'> { children?: React.ReactNode; /** * A unique value that identifies this select item. * @default null */ value?: any; /** * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; /** * Overrides the text label to use on the trigger when this item is selected * and when the item is matched during keyboard text navigation. */ label?: string; } } export { SelectItem };