Accent Components

Content toolbar

The strip on every content seat — tree toggle, the trail as a preference, verbs as arguments.


The strip that says where you are and what you can do here: CmsContentToolbar (src/components/CmsContentToolbar.tsx) is the content seat's toolbar. The page editor, the record editor, the media library, the trash, and Site Management all wear it — what varies between them is only how the crumbs are built and what sits on the right, and both are arguments.

It earned its extraction the hard way: the strip was hand-written on five surfaces and the copies drifted — hiding the breadcrumbs and hiding the viewport toggle each had to be threaded through every copy by hand, and each pass shipped a bug where one copy was missed.

Anatomy

  • The tree toggle sits at the left edge — that is its home, so it is always in the same place on every seat. A seat with no rail omits it (treeToggle: null).
  • The trail (crumbs) fills the middle. It is a preference — the rail's gear can hide it — and hidden still reserves the space, so the right-hand verbs never slide. A crumb with onClick is a button; muted is structure with no page behind it; current is where you are; liProps exists because the media library's crumbs are drop targets.
  • The verb cluster is children — publish state, view switches, seat verbs. A seat with nothing to say passes nothing: Site Management renders the toolbar with an empty cluster while its admin verbs are designed, which is the codified way to "hide the asset buttons."

Position

position is top (the strip), or left/right — a vertical icon rail docked inside the seat. Docked, the trail does not come along: crumbs are a horizontal thing, and the point of docking is to give the canvas its height back. The gear's breadcrumb preference therefore governs the top position only.

On this page