Action Row

A row of buttons that answer one thing together: one primary and quieter ones, with the gap and the phone wrap built in.

Installation

$
npx shadcn@latest add https://ui.mattdowney.com/r/action-row.json

Usage

import { ActionRow } from "@/components/ui/action-row"

Examples

Default

Under a result or a page's content: the primary first, the way out last. For buttons under a heading and copy, use Lockup's action instead.

At the end

align="end" for a footer or the end of a panel. The primary goes last, in the corner the eye reads toward.

Wrapping

In a narrow space the row wraps at the same gap rather than squeezing a label. Shown here in a 16rem box.

API Reference

PropTypeDefaultDescription
align"start" | "end""start"Which edge the row sits on, and so which edge the primary goes on: first in start, last in end.
childrenReactNodeNoneButtons, one variant="default" and the rest quieter, all one size.
align"start" | "end" = "start"Which edge the row sits on, and so which edge the primary goes on: first in start, last in end.
childrenReactNodeButtons, one variant="default" and the rest quieter, all one size.