Skip to main content

fast-toolbar

As defined by the W3C:

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

When a set of controls is visually presented as a group, the toolbar role can be used to communicate the presence and purpose of the grouping to screen reader users. Grouping controls into toolbars can also be an effective way of reducing the number of tab stops in the keyboard interface.

Setup#

import {    provideFASTDesignSystem,    fastToolbar} from "@microsoft/fast-components";
provideFASTDesignSystem()    .register(        fastToolbar()    );

Usage#

Live Editor
Result
SyntaxError: Unexpected token (1:8)
1 : return ()
            ^

Create your own design#

import {    Toolbar,    toolbarTemplate as template,} from "@microsoft/fast-foundation";import { toolbarStyles as styles } from "./my-toolbar.styles";
export const myToolbar = Toolbar.compose({    baseName: "toolbar",    template,    styles,    shadowOptions: {        delegatesFocus: true,    },});

Additional resources#