Components
Button
The one thing on a screen that looks pressable, in six variants.
Accepted· apps/web/components/ui/button.tsxImport from @/components/ui/button.tsx. One component replaced six copies of the same button, and each copy had drifted: a UA font on a marketing CTA, the wrong weight, two different hovers.
Variants
States and forms
Usage
- One filled button per step. A second action is
secondaryorquiet. - A GET that changes state is never a link. Recording, sending, paying and deleting are a form and a
<button>. - Labels are a verb and a noun in the polite plural: "Sačuvajte kiriju", "Odustanite"; never "Da" or "U redu".
- The alarm budget is four screens, once each. Nothing in code can enforce it; this is where it is written down.
Size and depth
Accepted 21.11.2026 (D-2026-11-21-15): with a mouse a button is 36px high, with touch 44px (48 for a sheet's primary), chosen by pointer type; radius 8 from the ladder; buttons carry small layered shadows and pressed goes down. The examples above are the component as it ships today (44px, 3px, flat); the change to button.module.css is its own lane.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | The label. A verb and a noun: "Sačuvajte kiriju". |
variant | "primary" | "secondary" | "ink" | "quiet" | "alarm" | "wash" | "primary" | What the button is on the screen. alarm is for the four exceptions only, at most once per screen. |
block | boolean | false | Full width: the phone form of most actions. |
compact | boolean | false | 44px high, 14px sides, 16px type, for a button in a row of other things. |
href | string | — | Renders an <a> that looks the same. Only for going somewhere; anything that records, sends, pays or deletes is a form and a <button>. No disabled on this branch. |
type | "submit" | "button" | "reset" | HTML's (submit) | Deliberately no button default: every screen works before JavaScript, so a button in a form submits it. |
className / style | — | — | Not accepted. Something new is a new variant in button.tsx. |