@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.
50 lines • 1.32 kB
TypeScript
import * as React from 'react';
import { type MenuRoot } from "../menu/root/MenuRoot.js";
import { BaseUIComponentProps } from "../utils/types.js";
/**
* The container for menus.
*
* Documentation: [Base UI Menubar](https://base-ui.com/react/components/menubar)
*/
export declare const Menubar: React.ForwardRefExoticComponent<MenubarProps & React.RefAttributes<HTMLDivElement>>;
export interface MenubarState {
/**
* The orientation of the menubar.
*/
orientation: MenuRoot.Orientation;
/**
* Whether the menubar is modal.
*/
modal: boolean;
/**
* Whether any submenu within the menubar is open.
*/
hasSubmenuOpen: boolean;
}
export interface MenubarProps extends BaseUIComponentProps<'div', Menubar.State> {
/**
* Whether the menubar is modal.
* @default true
*/
modal?: boolean;
/**
* Whether the whole menubar is disabled.
* @default false
*/
disabled?: boolean;
/**
* The orientation of the menubar.
* @default 'horizontal'
*/
orientation?: MenuRoot.Orientation;
/**
* Whether to loop keyboard focus back to the first item
* when the end of the list is reached while using the arrow keys.
* @default true
*/
loopFocus?: boolean;
}
export declare namespace Menubar {
type State = MenubarState;
type Props = MenubarProps;
}