Type aliases
ItemId
ItemId: string | number
Functions
Const Menu
- Menu<T>(props: MenuProps<T, any> & { ref?: ForwardedRef<MenuImperativeHandle<any>> }): null | ReactElement<any, string | JSXElementConstructor<any>>
Type parameters
T: HTMLElement = HTMLDivElement
Parameters
Returns null | ReactElement<any, string | JSXElementConstructor<any>>
MenuItem
- MenuItem<E, D>(__namedParameters: MenuItemProps<E, D>): null | ReactElement<any, string | JSXElementConstructor<any>>
Type parameters
E: HTMLElement = HTMLDivElement
D = any
Parameters
Returns null | ReactElement<any, string | JSXElementConstructor<any>>
Const useMenu
- useMenu<E, D>(__namedParameters: UseMenuProps<E, D>): { Provider: Provider<MenuContextProps>; contextProps: MenuContextProps; focusItem: (itemId: ItemId, passive?: any) => void; focusedItem: null | ItemId; getItem: (id: ItemId) => undefined | RegisteredItem; items: MutableRefObject<RegisteredItem[]>; moveFocusIndexRelative: (direction: "up" | "down") => void; moveFocusToCharacter: (character: string) => void; moveFocusToEnd: () => void; moveFocusToStart: () => void; renderProps: MenuRenderProps<E, D>; reorder: () => void }
Type parameters
E: HTMLElement = HTMLDivElement
D = any
Parameters
Returns { Provider: Provider<MenuContextProps>; contextProps: MenuContextProps; focusItem: (itemId: ItemId, passive?: any) => void; focusedItem: null | ItemId; getItem: (id: ItemId) => undefined | RegisteredItem; items: MutableRefObject<RegisteredItem[]>; moveFocusIndexRelative: (direction: "up" | "down") => void; moveFocusToCharacter: (character: string) => void; moveFocusToEnd: () => void; moveFocusToStart: () => void; renderProps: MenuRenderProps<E, D>; reorder: () => void }
focusItem: (itemId: ItemId, passive?: any) => void
- (itemId: ItemId, passive?: any): void
focusedItem: null | ItemId
moveFocusIndexRelative: (direction: "up" | "down") => void
- (direction: "up" | "down"): void
moveFocusToCharacter: (character: string) => void
- (character: string): void
moveFocusToEnd: () => void
moveFocusToStart: () => void
reorder: () => void
Const useMenuItem
Type parameters
E: HTMLElement = HTMLDivElement
D = any
Parameters
Returns { hasFocus: boolean; id: string | number; renderProps: MenuItemRenderProps<E, D> }
hasFocus: boolean
id: string | number