A · Introduction
Adopted 2026-11-11. Buttons V2 replaced the Day One Home button everywhere in Evantis. The old doh-btn styles stay in the DS stylesheet for parity with the design system artifact, but no component renders them.
Why V2
One button system shared with the portfolio, so the case study and the product speak the same button language. Corners follow the DS radius scale.
Variants
Primary: teal fill, the main action. Secondary: bronze outline (500) that fills bronze-500 with a white label on hover. Link: bronze text with a soft hover background. Danger: red fill, only for remove or revoke.
Semantics
Button renders a real button. ButtonLink renders next/link for internal routes, or an anchor with a safe rel for external ones. One look, two elements.
Icon side
Left by default, for actions: Add, Call, Save. Right only when the button goes somewhere: an external link, a new page, the next step. Only a right-side icon moves on hover. ButtonLink defaults to right.
Sizes
Large 48px for the main caregiver action. Medium 40px for ordinary use. Small 32px for dense rows and cards.
B · Visual matrix
One block per variant, with the default left icon: rows Large → Medium → Small, columns are the six states. States are forced with preview-only classes; the real component implements pointer and keyboard behaviour underneath.
Primary · teal
Secondary · bronze
Link · bronze
Danger · red
B.5 · Link motion
Right-side icons only: these buttons go somewhere. Hover the live links. Each icon moves with its intent, and the link gains a soft bronze background behind the whole target. Reduced motion turns the movement off and shortens the fade.
Forward arrow
The shaft grows from the left and the head nudges forward: the arrow reaches.
External link
A small step up and to the right: leaving Evantis.
Download
A 2px downward pull toward the device.
C · Interactive playground
The real component. Pointer and keyboard work. Theme follows the side panel.
<Button
variant="primary"
size="md"
icon={"add"}
>
Add Medication
</Button>E · Tokens & dimensions
Dimensions (Large → Small)
| Size | Height | Radius | Horizontal padding | Font size / weight | Icon size / weight | Label–icon gap |
|---|---|---|---|---|---|---|
LG | 48px | 12px · radius-12 | 22px | 16px / 400 | 16px · light 300 | 10px |
MD | 40px | 8px · radius-8 | 18px | 14px / 400 | 14px · 400 | 8px |
SM | 32px | 8px · radius-8 | 14px | 12px / 400 | 12px · 400 | 6px |
Color tokens (light | dark)
| Role | Token |
|---|---|
| Primary · fill | btn-primary-bg |
| Primary · hover fill | btn-primary-bg-hover |
| Primary · pressed fill | btn-primary-bg-active |
| Primary · text | btn-primary-fg |
| Secondary · border and text | btn-secondary-ink |
| Secondary · hover fill | btn-secondary-bg-hover |
| Secondary · hover text | btn-secondary-fg |
| Secondary · pressed fill | btn-secondary-bg-active |
| Link · text | accent-text |
| Link · hover background | btn-secondary-tint-hover |
| Danger · fill | error-fill |
| Danger · text | on-error |
| Focus ring | focus-ring |
Unlike V2's fixed cream and navy hex, every color is a Day One Home semantic token, so the button needs no surface prop and can't drift from the system.
F · Before vs after
The Day One Home button API next to the Buttons V2 API that replaced it.
| Day One Home (before) | Buttons V2 (now) | Example |
|---|---|---|
tone="primary" variant="filled" | variant="primary" | |
variant="outline" | variant="secondary" | |
variant="text" | variant="link" | |
tone="danger" | variant="danger" | |
iconLeft / iconRight | icon + iconPosition (left by default) | |
32 / 48 / 64px, radius 4–12 | 32 / 40 / 48px, radius 8 / 8 / 12 |
G · Adoption policy
- Button is the only action button in Evantis. Don't style a raw button or anchor to look like one.
- One primary per view. A second action is secondary or link.
- Danger only for remove or revoke, and always inside a confirm step.
- Navigation is ButtonLink, never Button with a router push.
- Labels are Title Case and start with a verb.
- Icons sit left for actions. Put them right only when the button goes somewhere: external, a new page, the next step.
- The doh-btn classes stay for design-system parity; never use them in new code.
- Changing a button color means changing the token in tokens.json, not this component.
H · Readiness checklist
| Requirement | Status | Note |
|---|---|---|
| Button + ButtonLink implemented | Complete | |
| Primary / Secondary / Link / Danger | Complete | Danger kept from the Day One Home button, drawn in the V2 style. |
| Large / Medium / Small | Complete | V2 heights 48 / 40 / 32px; labels Inter Regular 16 / 14 / 12px. |
| Light and dark themes | Complete | Colors are DS tokens, so both themes follow the document. No surface prop. |
| States: hover, pressed, focus, disabled, loading | Complete | |
| Keyboard focus ring | Complete | DS focus-ring token, 2px at 2px offset (V2 used currentColor). |
| All Evantis buttons migrated | Complete | Cards, alerts, modals and every lab demo. |
| WCAG 2.2 AA contrast, every variant and state | Pending | Fills come from DS tokens rated AA; the link hover background and the 0.55 disabled opacity are not yet measured. |
| Touch target on the caregiver surface | Pending | Medium is 40px; the Day One Home caregiver guidance was 48px. Use Large for primary caregiver actions until tested. |