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.

30 lines (29 loc) 1.02 kB
import * as React from 'react'; export type CompositeMetadata<CustomMetadata> = { index?: number | null; } & CustomMetadata; /** * Provides context for a list of items in a composite component. * @ignore - internal component. */ declare function CompositeList<Metadata>(props: CompositeList.Props<Metadata>): React.JSX.Element; declare namespace CompositeList { var propTypes: any; } declare namespace CompositeList { interface Props<Metadata> { children: React.ReactNode; /** * A ref to the list of HTML elements, ordered by their index. * `useListNavigation`'s `listRef` prop. */ elementsRef: React.RefObject<Array<HTMLElement | null>>; /** * A ref to the list of element labels, ordered by their index. * `useTypeahead`'s `listRef` prop. */ labelsRef?: React.RefObject<Array<string | null>>; onMapChange?: (newMap: Map<Node, CompositeMetadata<Metadata> | null>) => void; } } export { CompositeList };