Magoo Component UI logo Magoo Component UI
← Catalog

Rich-text Toolbar

rich-text-toolbar molecule experimental

A compact formatting toolbar of grouped icon buttons that emit format commands for a rich-text editor.

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default
ActiveBold

Props

NameTypeReq
label string
groups array

Related components

How to use

The toolbar is self-contained skeleton UI: it does not edit any content itself. Clicking a button toggles its own pressed state (data-active and aria-pressed) and dispatches a bubbling CustomEvent "format:command" with { command, active }. Wire a listener on the toolbar (or a parent) to run the actual formatting against your editor. The portable self-init reads the command from each button's data-command attribute; no props object is passed.

Use cases

toolbarcontrols WCAG AA SEO 20 dir: both ai-generated