Button
A single discrete action. The variant axis encodes emphasis, the accent axis encodes tone — keep one primary-blue per surface.
Buttons trigger an action — they do not navigate. For navigation render an `<a>` or `<Link>` styled as a button. The variant axis goes from filled and visible (primary) to outlined (secondary) to chrome-on-hover (tertiary). Accent overrides the colour — default for neutral chrome, blue for the main affirmative action, danger for irreversible operations. Hover, active, focus-visible and disabled states are all token-driven; nothing is hard-coded.
data-* selectors that the Twenty Remote DOM bridge strips. For panel content, import { Button } from @8maverik8/twenty-design/twenty-ui — re-exports the same primitive from twenty-sdk/ui, which Twenty has verified inside front-component'ов.Install
Pull from the workspace packages (already available if you ran pnpm add):
Examples
Variants × default accent
Same affordance, decreasing emphasis. Hover any of them — the background, border and focus ring all respond.
Blue accent — the affirmative axis
Primary blue is the loudest CTA. Secondary / tertiary blue keep the colour but quiet down the surface — useful for inline links or "More info" actions inside content.
Danger accent — irreversible
Reserve red for actions a user cannot undo without backups. Pair with a confirm dialog when destructive.
Sizes
Pick the smallest size that still feels comfortable for the surface. Settings forms = md, dense table rows = sm, marketing heroes = lg.
With icons
Leading icon = preview of the action ("✚ Add"), trailing icon = direction or external link.
States — focus, disabled, loading
Tab into the row to see the focus ring. The disabled button is still tab-stopped (screen readers can announce it). The loading button swaps the start icon for a spinner and blocks further clicks.
Full width — inside narrow surfaces
For sign-in cards, sheet footers, mobile primary CTAs.
Variants
primarydefaultFilled surface, highest emphasis. Use for the single main action on a screen.secondaryOutlined, equal-weight alternative next to a primary (Save / Cancel pairs, secondary toolbar actions).tertiaryNo chrome until hover. Use inside menus, table rows, and dense toolbars where buttons should disappear when idle.defaultdefaultNeutral tone — uses `--t-background-*` for fills, `--t-font-color-secondary` for text.blueAffirmative or primary CTA — uses `--t-color-blue` family. At most one per screen.dangerIrreversible operations only — delete, purge, revoke. Uses `--t-color-red` family.sm24 px tall — inline row actions, chips, dense toolbars.mddefault32 px tall — forms, dialogs, settings (default Twenty surface density).lg40 px tall — heroes, onboarding, marketing CTAs.Anatomy
startIconOptional leading icon — automatically sized down and tightened to the label.children (label)Action verb. Use sentence case ("Save changes", not "SAVE CHANGES").endIconOptional trailing icon — most often a directional cue (`→`, `▾`) or external-link marker.isLoadingReplaces the start icon with a spinner; button becomes disabled and announces busy.