---
title: "Button"
status: accepted
source: "apps/web/components/ui/button.tsx"
updated: "21.11.2026."
url: https://design.mojakirija.rs/components/button
---

# Button

Accepted · apps/web/components/ui/button.tsx

The one thing on a screen that looks pressable, in six variants.

Import 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

```tsx
<Button variant="primary">Sačuvajte</Button>
<Button variant="secondary">Sačuvajte</Button>
<Button variant="ink">Sačuvajte</Button>
<Button variant="quiet">Sačuvajte</Button>
<Button variant="alarm">Sačuvajte</Button>
<Button variant="wash">Sačuvajte</Button>
```

| Variant | When |
| --- | --- |
| `primary` | Accent fill. The one filled action of a step. |
| `secondary` | Hairline, ink text. The quieter half of a pair. |
| `ink` | Ink fill, for a form's submit on paper. |
| `quiet` | No chrome, accent text. |
| `alarm` | One of the four exceptions. Once per screen. |
| `wash` | A section's call to action in three levels; never a step's primary. |

## States and forms

```tsx
<Button>Sačuvajte</Button>
<Button disabled>Sačuvajte</Button>
<Button compact variant="secondary">Promenite</Button>
<Button block>Pošaljite stanaru</Button>
<Button href="/primer" variant="secondary">Otvorite obračun</Button>
<IconButton glyph="close" label="Zatvorite" />
```

## Usage

- **One filled button per step.** A second action is `secondary` or `quiet`.
- **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](https://design.mojakirija.rs/decisions#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`. |
