@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.
14 lines (13 loc) • 468 B
TypeScript
export interface UseCompositeListItemParameters<Metadata> {
label?: string | null;
metadata?: Metadata;
}
interface UseCompositeListItemReturnValue {
ref: (node: HTMLElement | null) => void;
index: number;
}
/**
* Used to register a list item and its index (DOM position) in the `CompositeList`.
*/
export declare function useCompositeListItem<Metadata>(params?: UseCompositeListItemParameters<Metadata>): UseCompositeListItemReturnValue;
export {};