No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

Toolbar

A toolbar is a container for grouping a set of controls, such as buttons, menubuttons, or checkboxes.

usage
import { Toolbar, ToolbarContext, useToolbarContext, useToolbarProps, ClearToolbar } from "@sharegate/orbit-ui";
sources
Github

Usage

Default

A default toolbar.

Editable example

Disabled

A toolbar can have a few disabled controls.

Editable example

Or disabled all the controls.

Editable example

Gap

The gap between a toolbar controls is configurable.

Editable example

Orientation

A toolbar can change his orientation to vertical to render his controls horizontally.

Editable example

Wrapped

Toolbar controls can wrap on multiple lines.

Editable example

Custom components

Any component can be added to a toolbar. However to benefit from the toolbar behaviors, a component must implement the ToolbarContext. This is done by using the useToolbarProps hook.

Editable example

API

Toolbar

usage
import { Toolbar } from "@sharegate/orbit-ui";
NameDescriptionDefault
alignX
The horizontal alignment of the elements.
"center" | "end" | "start" | ResponsiveValue<FlexAlignment>
-
alignY
The vertical alignment of the elements.
"center" | "end" | "start" | ResponsiveValue<FlexAlignment>
-
autoFocus
Whether or not the toolbar should autoFocus the first tabbable element on render.
numberfalsetrue
-
children*
React children.
string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal
-
disabled
Whether or not the toolbar elements are disabled.
falsetrue
-
fluid
Whether the toolbar take up the width of its container.
false | true | ResponsiveValue<boolean>
-
orientation
The orientation of the elements.
"horizontal" | "vertical" | ResponsiveValue<FlexOrientation>
horizontal
wrap
Whether or not the elements are forced onto one line or can wrap onto multiple lines
false | true | ResponsiveValue<boolean>
true