Ask Rift AI
Theme: Smoke
Layout: Contained
Background: Field
Search or ask anythingAsk Rift AI
Theme: Smoke
Layout: Contained
Background: Field
Colour mode: System

Action bar

The way out of a long list

A class register, a long form, a queue of claims: the button that finishes the work belongs where the reader is, not at the end of the scroll. The action bar holds a summary line and the primary actions at the bottom of the scroll container. The rows dissolve into it under a progressive blur instead of stopping at a hard edge.

Docked with a blur

By default the bar sticks to the bottom of its scroll container, with the blur reaching a little above it. Mark a student and the count changes. The summary is a polite live region, so a screen reader hears the new line once it settles.

16 students still to mark

Solid

blur={false} draws the bar on the page surface with a hairline above it. Point --ds-action-bar-surface at another fill when the list sits on a container.

16 students still to mark

In flow

sticky={false} leaves the bar after the last row, where it scrolls with the list. Use it when the list is short enough that its end is always in view.

16 students still to mark

Alternatives

  • Use Toolbar instead when the controls act on a canvas or a view and sit together in one pill, rather than closing out a list.
  • Use Table toolbar instead when the bar sits over a table and holds its search, filters and view settings.

Props

Read from the same JSDoc that ships in the package's types. A required prop is marked with an asterisk.

ActionBar props
PropTypeDefaultDescription
summary
ReactNode
The summary line at the bar's start, such as "23 students still to mark". It is a polite live region, so a count that changes while the reader works is announced once it settles.
actions
ReactNode
The actions at the bar's end, typically one or two Buttons with the primary action last. On a narrow bar they wrap below the summary and hold the end edge.
sticky
boolean
true
Whether the bar holds to the bottom of its scroll container while the content scrolls under it. Off, it sits in flow after the content.
blur
boolean
true
Whether the content fades under a progressive blur that reaches above the bar. Off, the bar is a solid surface with a hairline at its top edge.
className
string
''
Additional CSS classes on the root.

Keys

The bar adds no keys of its own: its actions are buttons, and the browser owns Tab, Enter and Space. Those keys belong to the platform, so no test of this library presses them.

tsx
// From the npm package
import { ActionBar } from 'rift-ds/components/ActionBar/ActionBar';

// Or as source you own, via the shadcn CLI
npx shadcn@latest add https://rift-ds.com/r/action-bar.json

0.5 kB gzipped, with everything it imports. Peer dependencies are not counted.

For agents: the props, their allowed values and defaults, and the tested keys, as markdown or as a JSON schema.