Split confirmPro
A pill that confirms by splitting: it stretches with a small overshoot, a check bubble pinches off its end and the label turns to the past tense; the bubble is Undo for four seconds, and a failure shakes once with a cross and Try again.
oxyn add split-confirmRefund $84.00 to Ada Lin
The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Confirm an important action with a moment of weight: the button stretches and a check pinches off, which doubles as Undo.
When not to use
- An action label that swaps to its next state while keeping its place: use Action states instead.
- A Give to your agent split button: use Agent prompt copy instead.
- Eight variants and five sizes, with a shimmering loading state, a progress fill, press-and-hold for destructive actions and a shortcut chip: use Button instead.
Installation
Split confirm is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add split-confirmUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Approve
Approve → Approved.
Refund $84.00 to Ada Lin
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Send large
Send at the large size (Oxyn extra).
Reply to the vendor thread
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Fails
Merge that fails and offers Try again.
PR #214 into main
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
SplitConfirm
| Prop | Type | Default | Description |
|---|---|---|---|
nowrequired | ClockMs | — | Host clock. |
label | usize | Default::default() | Label pair (0 Approve, 1 Send, 2 Merge). |
fail | bool | Default::default() | The action fails. |
size | String | "md" | `md` or `lg`. |
context | bool | true | A context line above the button. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| EnterorSpace | Confirm, or try again after a failure |
| Backspace · Cmd/CtrlZ | Undo while the check is showing |
| Escape | Reset |
Accessibility
- The pill is a real button; the bubble is a labelled Undo button while it can undo.
- Result text changes in place and is announced; failure reads 'Didn't go through'.
- Reduced motion drops the stretch and shake but keeps the bubble.
From the spec
The pill is a real button; the bubble is a named Undo button while it can undo; results are announced; Backspace or Cmd/Ctrl+Z undo. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.
Motion & interaction
The pill stretches with a small overshoot from its left edge; the bubble grows out of its right end and settles 6 px away with a springy pop; the label crossfades to the past tense.
Timing
Everything on screen is derived from the host clock now (no timers in the component), so playback, tests and the GPUI view agree.
| Transition | Duration | Easing |
|---|---|---|
| Stretch | 260 ms (STRETCH_MS) | sine overshoot |
| Split | 420 ms (SPLIT_MS) | ease-out cubic |
| Bubble pop | 320 ms | spring |
| Undo window | 4000 ms (UNDO_MS) | — |
Reduced motion: CSS motion is cut to a frame; decorative bands and rings are hidden or still; state and text changes stay.
Responsive behaviour
- Fixed size; it never wraps.
Edge cases (spec)
Fixed size (md 40 px, lg 52 px); never wraps. Label pairs: Approve/Approved, Send/Sent, Merge/Merged. Checked at 1440, 768 and 390 px in light and dark with no text overlap. Chrome is monochrome grey; colour is semantic only (success, warning, danger, info) plus the official coloured brand marks.
Notes for AI
- Import
SplitConfirmfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
XPostViewinoxyn_gpui. - Props to set first:
now. - It reads a clock (
now) for live timers; pass one clock for the whole page rather than one per component. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.