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.

37 lines 1.3 kB
import * as React from 'react'; import { BaseUIComponentProps, Orientation as BaseOrientation } from "../../utils/types.js"; /** * A container for grouping a set of controls, such as buttons, toggle groups, or menus. * Renders a `<div>` element. * * Documentation: [Base UI Toolbar](https://base-ui.com/react/components/toolbar) */ export declare const ToolbarRoot: React.ForwardRefExoticComponent<ToolbarRootProps & React.RefAttributes<HTMLDivElement>>; export interface ToolbarRootItemMetadata { focusableWhenDisabled: boolean; } export type ToolbarRootOrientation = BaseOrientation; export interface ToolbarRootState { disabled: boolean; orientation: ToolbarRoot.Orientation; } export interface ToolbarRootProps extends BaseUIComponentProps<'div', ToolbarRoot.State> { disabled?: boolean; /** * The orientation of the toolbar. * @default 'horizontal' */ orientation?: ToolbarRoot.Orientation; /** * If `true`, using keyboard navigation will wrap focus to the other end of the toolbar once the end is reached. * * @default true */ loopFocus?: boolean; } export declare namespace ToolbarRoot { type ItemMetadata = ToolbarRootItemMetadata; type Orientation = ToolbarRootOrientation; type State = ToolbarRootState; type Props = ToolbarRootProps; }