Components
Hold button
Confirm by holding, not tapping. The fill charges while you hold; let go early and it glides back with nothing spent. It is how Aurora asks for a commitment that costs money or time.
Overview
Press and hold. Let go early to cancel.
Everyone else ends a booking on a green tick after a price breakdown, a payment sheet and a page of terms. Aurora has already done that work, so the confirmation has to be worth the gesture: deliberate enough to be safe, short enough never to feel like a wait.
Anatomy
- 1ContainerThe same 46px box as a button, with a strong hairline so it reads as the primary control in its row.
--au-bg-raised-hover - 2FillA bone layer that scales from the left. Linear while held, because it tracks time itself. Glides home on release.
--au-bg-inverse - 3LabelBlended with difference, so it stays legible as the fill passes under it: bone on dark, dark on bone.
mix-blend-mode: difference
States
| State | Label | What happens |
|---|---|---|
| idle | Hold to confirm | Resting. The fill is at zero. |
| charging | Keep holding | The fill runs left to right over 840ms, linear. A parent gap charges its light in step. |
| released | Hold to confirm | Let go early and the fill glides back over 420ms. Nothing was spent. |
| done | Confirmed | The fill stays, the border turns bone, and onConfirm fires 280ms later so the change is seen first. |
Usage
Use it for the one commitment on a card, beside a quiet way out of the same height.
Don’t use it for low-stakes actions like opening or saving. A hold on everything turns a safeguard into friction.
Accessibility
- Keyboard: hold Enter or Space. Key repeat is ignored, and releasing the key early cancels, exactly like a pointer.
- Announced: it carries an accessible description, “Press and hold to confirm”, and announces “Confirmed” through a polite live region.
- Reduced motion: the hold shortens to 380ms but never disappears. It is a safeguard against accidental bookings, not decoration.
- Pointer capture: sliding a finger off the button cancels, so a scroll can never confirm by accident.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| onConfirm | () => void | — | Called once, 280ms after the hold completes. |
| onChargeChange | (charging: boolean) => void | — | Fires as the hold starts and stops, so a parent can charge its light. |
| duration | number | 840 | Milliseconds to hold. Change it only with a reason. |
| label | string | 'Hold to confirm' | Resting label. |
| holdingLabel | string | 'Keep holding' | Shown while charging. |
| doneLabel | string | 'Confirmed' | Shown once confirmed, and announced. |
| block | boolean | false | Fill the width of the container. |
Tokens
| Token | Value | Used for |
|---|---|---|
| --au-dur-hold | 840ms | How long a hold to confirm takes. A safeguard, not decoration. |
| --au-ease-linear | cubic-bezier(0, 0, 1, 1) | Time itself. Only for progress that tracks a held gesture. |
| --au-ease-glide | cubic-bezier(0.32, 0.72, 0, 1) | Decelerates into place. Anything that moves or changes size. |
| --au-bg-inverse | → stone.50 · #EDEBE5 | Fills that have been committed, like a held button. |
| --au-bg-raised-hover | → night.850 · #131418 | Raised surfaces under a pointer. |
| --au-border-strong | → night.700 · #2A2D33 | Hover, and controls that need a visible edge. |
| --au-border-inverse | → stone.50 · #EDEBE5 |
Code
import { HoldButton, Button } from './aurora';
<div className="actions">
<HoldButton onConfirm={book} onChargeChange={setCharging} />
<Button variant="quiet" onClick={decline}>Not today</Button>
</div>