Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Toolbar

An editor toolbar with formatting and alignment commands.

Preview

Live preview

Changes apply to this preview only.

boldleft
The release is ready. Toggle the controls above to apply formatting to this paragraph.
Last action: Nothing selected yet

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

History actions

A toolbar with disabled history actions and an observable save command.

Open preview

Vertical rail

With orientation="vertical", the arrow axis turns and separators become horizontal. The toolbar still has a single tab stop.

Open preview

Links, disabled root and navigation

ToolbarLink keeps link semantics. A disabled toolbar disables every control at once, including links.

Open preview

Usage

Keep related commands together and use groups or separators to clarify their relationship.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluToolbarProps

Type source
PimoluToolbarProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
orientationPimoluToolbarOrientation | undefined"horizontal"Layout and arrow-key axis. Defaults to "horizontal".
labelstring | undefined"Toolbar"Accessible name of the toolbar. Defaults to "Toolbar".
disabledboolean | undefinedfalseDisable every control in the toolbar.
onChangeChangeEventHandler<HTMLDivElement, Element> | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
onClickMouseEventHandler<HTMLDivElement> | undefined—Standard React/HTML attribute.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

orientation

PimoluToolbarOrientation | undefined

Default: "horizontal"

Layout and arrow-key axis. Defaults to "horizontal".

label

string | undefined

Default: "Toolbar"

Accessible name of the toolbar. Defaults to "Toolbar".

disabled

boolean | undefined

Default: false

Disable every control in the toolbar.

onChange

ChangeEventHandler<HTMLDivElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

onClick

MouseEventHandler<HTMLDivElement> | undefined

No default extracted.

Standard React/HTML attribute.

PimoluToolbarGroupProps

Type source
PimoluToolbarGroupProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
onChangeChangeEventHandler<HTMLDivElement, Element> | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLDivElement> | undefined—Standard React/HTML attribute.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

onChange

ChangeEventHandler<HTMLDivElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLDivElement> | undefined

No default extracted.

Standard React/HTML attribute.

PimoluToolbarButtonProps

Type source
PimoluToolbarButtonProps public API
NameTypeDefaultDescription
childrenReactNode—Public Pimolu prop; see the source declaration for details.
disabledboolean | undefinedfalseStandard React/HTML attribute.
namestring | undefined—Standard React/HTML attribute.
type"submit" | "reset" | "button" | undefined—Standard React/HTML attribute.
valuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
onChangeChangeEventHandler<HTMLButtonElement, Element> | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLButtonElement> | undefined—Standard React/HTML attribute.
children

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

disabled

boolean | undefined

Default: false

Standard React/HTML attribute.

name

string | undefined

No default extracted.

Standard React/HTML attribute.

type

"submit" | "reset" | "button" | undefined

No default extracted.

Standard React/HTML attribute.

value

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

onChange

ChangeEventHandler<HTMLButtonElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLButtonElement> | undefined

No default extracted.

Standard React/HTML attribute.

PimoluToolbarLinkProps

Type source
PimoluToolbarLinkProps public API
NameTypeDefaultDescription
currentboolean | undefinedfalseMark the link as the current page.
typestring | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onChangeChangeEventHandler<HTMLAnchorElement, Element> | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLAnchorElement> | undefined—Standard React/HTML attribute.
current

boolean | undefined

Default: false

Mark the link as the current page.

type

string | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onChange

ChangeEventHandler<HTMLAnchorElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLAnchorElement> | undefined

No default extracted.

Standard React/HTML attribute.

PimoluToolbarSeparatorProps

Type source
PimoluToolbarSeparatorProps public API
NameTypeDefaultDescription
aria-labelstring | undefined—Kept for a consumer that wants a different accessible label.
onChangeChangeEventHandler<HTMLDivElement, Element> | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
childrenReactNode—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLDivElement> | undefined—Standard React/HTML attribute.
aria-label

string | undefined

No default extracted.

Kept for a consumer that wants a different accessible label.

onChange

ChangeEventHandler<HTMLDivElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLDivElement> | undefined

No default extracted.

Standard React/HTML attribute.

PimoluToolbarToggleGroupProps

Type source
PimoluToolbarToggleGroupProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
disabledboolean | undefinedfalseDisable every toggle in this group.
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
aria-labelstring | undefined—Accessible name of the group.
aria-labelledbystring | undefined—Id of the element that names the group.
type"single" | "multiple" | undefined—One selected value at a time. Any number of selected values.
valuestring | string[] | undefined—Public Pimolu prop; see the source declaration for details.
defaultValuestring | string[] | undefined—Public Pimolu prop; see the source declaration for details.
onValueChange((value: string) => void) | ((value: string[]) => void) | undefined—Public Pimolu prop; see the source declaration for details.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

disabled

boolean | undefined

Default: false

Disable every toggle in this group.

className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

aria-label

string | undefined

No default extracted.

Accessible name of the group.

aria-labelledby

string | undefined

No default extracted.

Id of the element that names the group.

type

"single" | "multiple" | undefined

No default extracted.

One selected value at a time. Any number of selected values.

value

string | string[] | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

defaultValue

string | string[] | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

onValueChange

((value: string) => void) | ((value: string[]) => void) | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

PimoluToolbarToggleItemProps

Type source
PimoluToolbarToggleItemProps public API
NameTypeDefaultDescription
valueRequiredstring—Value toggled by this item.
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
onChangeChangeEventHandler<HTMLButtonElement, Element> | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
onClickMouseEventHandler<HTMLButtonElement> | undefined—Standard React/HTML attribute.
disabledboolean | undefinedfalseStandard React/HTML attribute.
namestring | undefined—Standard React/HTML attribute.
valueRequired

string

No default extracted.

Value toggled by this item.

childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

onChange

ChangeEventHandler<HTMLButtonElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

onClick

MouseEventHandler<HTMLButtonElement> | undefined

No default extracted.

Standard React/HTML attribute.

disabled

boolean | undefined

Default: false

Standard React/HTML attribute.

name

string | undefined

No default extracted.

Standard React/HTML attribute.

Accessibility

  • Check roving focus, disabled-item skipping and the names of every icon button.
Read the accessibility guide →