Skip to content

Actions

Button

The primary action control. Seven variants and four sizes, including the convex white fill that carries BTS's primary affordance.
Available
Ports as-is
Dual breakpoint

All variants

Every variant this component declares, rendered together in one frame from its maintained Storybook story. Lantern stores only the story id and embeds Storybook rather than duplicating the component or its demo.

Button

Rendered live from Storybook

Storybook must be running for this to load — bun run start:storybook from the monorepo root, or set NEXT_PUBLIC_STORYBOOK_URL to a deployed instance.

Props

The component's public API, read from its TypeScript source. Descriptions come from TSDoc on the prop, so this table cannot drift from the component.

PropTypeDefaultDescription
asChildbooleanfalseRenders the child element with the button's styles instead of a `button`. Use it for links, so the element stays semantically correct.
variant"default" | "destructive" | "outline" | "secondary" | "tertiary" | "ghost" | "link""default"Visual weight. `default` is the convex white fill that carries the primary action; `tertiary` is a BTS addition with a hairline border on a raised dark surface.
size"default" | "sm" | "lg" | "icon""default"Control height and padding. All but `icon` grow to a 48px tap target below the md breakpoint.
...propsReact.ButtonHTMLAttributes<HTMLButtonElement>—Native attributes are forwarded to the underlying element, along with the ref.

Reference

Transcribed from the component audit. If this disagrees with the source, the source is right.

Source
src/components/ui/button.tsx
Portability
Copies across unchanged — only the utils import path moves.
Variants
default (.btn-white)destructive (.btn-destructive)outlinesecondarytertiary (BTS addition)ghostlink
States to cover
hoveractivefocus ringdisabledleading/trailing iconicon-onlyasChild anchor
Dependencies
@radix-ui/react-slotclass-variance-authority
Responsive
Carries a load-bearing max-md: / md: pair. Sign off at both viewports — see the rule.
Notes
Ported first: buttonVariants is consumed by AlertDialog, Calendar, Carousel and Pagination. Three of the four sizes grow to a 48px tap target below md.