All pages

Components

Button

Curation ships one button. Every labelled action on the site — the top band's Publish, a dialog's Save, a login form's Continue, a chat card's Apply — is Button at some variant and size. Pick those two props and nothing else: fill, hover, focus, disabled and corner are fixed in the component, so two buttons that do the same job always look the same.

It replaced three components and about sixty hand-rolled buttons that had drifted on every axis — two primary fills, nine heights, six corners, four focus treatments, three disabled rules. A new className on a button should place it (flex-1, mt-4, tablet:w-auto); one that restyles it is a missing variant, and belongs in components/ui/button.tsx.

import { Button } from "@/components/ui/button";

<Button>Publish</Button>

Variants

One primary per view. It is the --brand-fill plate with --brand-foreground on it — black on light, white on dark, as mobile's primary action is — and never bg-ink, which is a shade darker in light mode and reads as a different button beside it.

secondary is the ink/[0.06] tint, the partner of a primary (Cancel beside Save) or the lead of a view with no primary. outline is the border-only plate, for an action that sits over a picture or beside a brand mark — the login providers, the showcase's arrows. ghost has no plate until hovered. danger is the destructive fill; a destructive action that should not be the loudest thing on its row is a secondary with text-danger instead. link is a word: no box, an underline on hover.

<Button variant="primary" />
<Button variant="secondary" />
<Button variant="outline" />
<Button variant="ghost" />
<Button variant="danger" />
<Button variant="link" />

Sizes

Four labelled steps. Each pins a height, a type step and a corner from the Radius ladder — rounded-md, the controls' corner, up to lg; rounded-lg, the form controls', at xl.

xl is w-full; a form button spans its column. Where a row of them should take their own width past a breakpoint, say so — tablet:w-auto, or the dialog footer's sm:w-auto sm:px-6.

sm   2rem      0.81rem   chat cards, a card's corner action, beside a field
md   2.25rem   0.81rem   the default: a page's top band, beside the sort menu
lg   2.5rem    0.88rem   dialog footers, the item editor's row, a profile's Edit
xl   3.13rem   1rem      full width: a form's last row, login, marketing CTAs

Icons

An SVG child is sized to the step automatically and set a gap from the label; give it its own size-* class only to break the rule. Icon-only buttons are the squares — icon-sm 2rem, icon 2.25rem, icon-lg 2.5rem — and must carry an aria-label.

<Button><PlusIcon /> New list</Button>
<Button size="sm">Publish <ArrowRightIcon /></Button>
<Button size="icon" variant="ghost" aria-label="Delete"><Trash2Icon /></Button>

States

Disabled swaps the plate rather than fading it — mobile's rule. Every filled variant falls to the ink/[0.04] tint with an ink-quiet label, which reads as "not now" where an opacity fade would drag the label below AA. Hover is gated on not-disabled:, so a disabled button never answers the pointer.

Busy is a prop: busy disables the button, sets aria-busy and leads the label with a spinner. Swap the label too when there is a word for the work ("Saving…").

Focus is the ring pair, ring-[3px] ring-ring/50, on every variant.

<Button disabled>Publish</Button>
<Button busy>Saving…</Button>

A navigation is a link, not a button with a router push. Give it the button's look with asChild, or with buttonVariants where the element is built elsewhere (a StartCreatingCTA, an <a> to the App Store):

<Button asChild variant="secondary">
<Link href={routes.search}>Search</Link>
</Button>

<a href={APP_STORE} className={buttonVariants({ size: "xl" })}>Get the app</a>

Not buttons

Rows, tiles, chips, tabs, segmented tracks, carousel dots, a scrim, and the list templates under components/list-styles are pressable but are not this component. They are their own controls with their own pages — a chip that took a button's plate would read as an action, and a row that took its height would stop reading as a row.