Skip to content

Toolbar

a primitive for creating a Toolbar component.

Anatomy

Figure: Anatomy of Toolbar component

API Reference

const {
toolbarProps
} = createToolbar<T extends HTMLElement>(args: ToolbarArguments, ref: Accessor<T | null>): AriaToolbar;
const {
toolbarProps, toolbarRef
} = createToolbar<T extends HTMLElement>(args: ToolbarArguments): AriaToolbarWithRef<T>;

Parameters [ToolbarArguments]

Name Type Default Description
'aria-labelledby' string - The `id` of the element that hold the label text.
'aria-label' string - Alternative to `aria-labelledby` when the element with the label text is not available.
orientation 'horizontal' | 'vertical' 'horizontal' Changes keyboard controls to match the orientation of the toolbar.

Return value [AriaToolbar]

Name Type Description
toolbarProps * JSX.HTMLAttributes<T> Props to spread on the toolbar element.
toolbarRef (node: T) => void Solid.js directive for refrerencing the toolbar DOM element.

Example

Screen reader