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.

46 lines 1.32 kB
import * as React from 'react'; import type { BaseUIComponentProps, NonNativeButtonProps } from "../../utils/types.js"; /** * An individual option in the select popup. * Renders a `<div>` element. * * Documentation: [Base UI Select](https://base-ui.com/react/components/select) */ export declare const SelectItem: React.NamedExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>; export interface SelectItemState { /** * Whether the item should ignore user interaction. */ disabled: boolean; /** * Whether the item is selected. */ selected: boolean; /** * Whether the item is highlighted. */ highlighted: boolean; } export interface SelectItemProps extends NonNativeButtonProps, Omit<BaseUIComponentProps<'div', SelectItem.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; /** * Specifies the text label to use when the item is matched during keyboard text navigation. * * Defaults to the item text content if not provided. */ label?: string; } export declare namespace SelectItem { type State = SelectItemState; type Props = SelectItemProps; }