components / 32

marked toolbar

tools should remember what the hand chose. focus leaves briefly; toggles stay marked until the state changes.

shadcnnpx shadcn@latest add berkantay/cheez/marked-toolbar
live

format without losing the page

last action: waiting
draft / 07

tools should feel close to the thought.

use left and right arrows inside the toolbar
ink
size
character
activebold
<MarkedToolbar aria-label="formatting" tone="orange" size="medium">
  <MarkedToolbarGroup>
    <MarkedToolbarButton pressed={bold} onPressedChange={setBold}>bold</MarkedToolbarButton>
    <MarkedToolbarButton pressed={italic} onPressedChange={setItalic}>italic</MarkedToolbarButton>
  </MarkedToolbarGroup>
  <MarkedToolbarSeparator />
  <MarkedToolbarInput aria-label="zoom" defaultValue="100%" />
  <MarkedToolbarLink href="/help">help</MarkedToolbarLink>
</MarkedToolbar>
orientation

the same grammar turns ninety degrees

arrow direction follows orientation
roving focusone tab stop.
every tool reachable.

Tab enters once. Arrow keys move within the set. Home and End jump to the edges.

reference

api

Base UI behavior, Cheez state
partproptypedefaultpurpose
Rootorientation"horizontal" | "vertical""horizontal"roving focus direction
RootloopFocusbooleantruewrap focus at each end
Rootdisabledbooleanfalsedisable every control
RoottoneMarkedToolbarTone"orange"outer frame ink
Rootsizesmall | medium | large"medium"control density
RootcharacterCheezCharacter"calm"drawing pressure
Buttonpressedbooleanpersistent toggle state
ButtononPressedChangefunctiontoggle callback
ButtonfocusableWhenDisabledbooleantruekeep disabled item discoverable
Buttontone"default" | "danger""default"destructive treatment
Linkhrefstringnative destination
InputdefaultValuestringtoolbar-native text field
SeparatororientationOrientationopposite rootsemantic group boundary

behavior notes

  • the toolbar exposes one tab stop and uses arrow keys for internal focus
  • pressed state is controlled and represented with aria-pressed
  • disabled controls remain focusable by default so their labels stay discoverable
  • links and inputs keep their native browser semantics
  • orientation changes keyboard direction and separator direction together
  • roving focus and disabled behavior come from Base UI
  • no Framer Motion is shipped