Overview
Reference usage
DockedActionBar keeps a page's main actions at the bottom of its scrolling area, so they never scroll away: a live run's field with Send a message and Cancel run, or a review's Deny and Approve on a phone.
It is position: sticky, so it sits in the flow at the end of the content. The page scrolls behind it, and the content above it needs no bottom padding of its own because the bar occupies exactly that space. Put it inside the element that scrolls, as the last child. To dock it to the bottom of a short page as well, make its parent a flex column at least as tall as the scrolling area (display: flex; flex-direction: column; min-block-size: 100%): the bar's margin-block-start: auto pushes it down, and the parent's gap sets the space above it.
-
Variant:
strip(the default) is flush with its container and has only a top border, as the phone decision bar draws it.cardis a bordered, rounded, raised card, as the run page draws it on a wide screen. -
Safe area: the bar's bottom padding is at least
env(safe-area-inset-bottom), so it clears the home indicator. -
Keyboard: while the bar is mounted,
--_cinder-keyboard-insetcarries how much of the screen the on-screen keyboard covers, and the bar rides above it. A bottom drawer and the toast region read the same property. -
Touch: the bar draws its controls at their own compact size on every pointer and at every width. Under a coarse pointer only a Button's hit area grows to 44px, through the Button's own pseudo-element, so its face stays compact.
-
Edge: the bar's inline padding is 16px, a GroupedList row's text inset, so its words start on the same edge as the rows above it.
-
Height: while the bar is docked to the bottom of the viewport, or to the top of a bottom
NavigationBar, the distance to its top edge, safe area included, is the internal--_cinder-docked-action-bar-heighton the document element (otherwise its own height is), andToastRegionreads it to sit above the bar. The bar is sticky and in the flow, so the content above it never needs bottom padding of its own. -
Off:
offandreasonturn the actions off together. Buttons inside that opted in withmutatinggo inert exactly as under aStaleRegion(focusable,aria-disabled, described by the reason), and the reason is drawn under the row and announced politely. A field in the bar is the page's to make read-only, and the bar mutes anInputorTextareainside it (the inset fill and muted text) while it is off. -
A padded scrolling area: the bar sticks to the bottom of what its scrolling area shows, inside that area's bottom padding, so a strip of the page shows under it as tall as the padding. A shell that wants room at the end of its scrolling area keeps it with a spacer after the content instead, and the bar sits flush at the bottom.
-
Narrow: below 40rem of bar width the content stacks above the actions, which take their own row, each at its own compact width, ending at the trailing edge with the primary last; more actions than fit wrap onto further lines instead of overflowing.
Usage
The run is working on step 3. This page is short, and the bar still sits at its bottom edge.
The run is working on step 3. Scroll this panel: the bar stays at the bottom edge while the text moves behind it.
Step 4 waits for approval. The page keeps its place, and the actions never scroll away.
Step 5 drafts the notes once the approval comes back, then the run ends.
A step that fails shows its reason here, above the bar, until you answer it.
When to use
- Actions must never scroll away: a live run's Send a message and Cancel run, or a review's Deny and Approve on a phone.
- The actions can go off together for one stated reason, such as a dropped connection.
- The actions belong to a form inside a dialog or drawer — use the modal or drawer footer.
- A banner states a page-level condition — use banner so it sits above the content instead.
Examples
A live run keeps its actions in reach
The bar docks to the bottom of the page, flush, with a top border. On a short page it sits at the bottom edge rather than under the text (its parent is a flex column as tall as the page); on a long one the page scrolls behind it. It clears the home indicator and rides above the on-screen keyboard, and on touch every control is 44px.
A decision bar
Deny and Approve keep their compact width and end at the trailing edge, Approve last. The bar is a flush strip with a top border, docked to the bottom of the screen; below 32rem of bar width the pair takes its own row under the consequence line.
Off together, with the reason
While the stream is reconnecting the bar is off. Buttons that opt in with mutating stay focusable and are described by the reason, which is drawn under the row and announced politely. The field is read-only and muted, and at phone width the actions wrap instead of overflowing.
Props
Name | Type | Default | Description |
|---|---|---|---|
label | text | 'Actions' | Accessible name of the bar, read as the name of its group: "Run actions", "Decision". |
variant | 'strip' | 'card' | 'strip' | How the bar is drawn: a flush strip with only a top border, or a bordered, raised card. The bar
docks to the bottom of a short page when its parent is a flex column at least as tall as the
scrolling area; the parent's gap sets the space above the bar. |
off | boolean | false | Turns the bar's actions off together, for one reason. Controls inside that opted in with
mutating go inert (aria-disabled, still focusable, described by reason), exactly as under
a <StaleRegion>, and the bar draws reason under its row. A field in the bar is the page's to
make read-only; the bar mutes an Input or Textarea inside it while it is off. The bar keeps
its place and its height, so nothing under it moves. |
reason | text | Why the actions are off, drawn under the row and read as the description of every inert
control: "Reconnecting… Send a message and Cancel run are off until the connection is back."
It is announced politely when it appears. Ignored while the bar is not off. | |
children | snippet | The leading part of the bar: a field, a consequence line. It takes the room the actions leave. | |
actions required | snippet | The buttons, kept together at the end of the row. |