Skip to content
Back

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-confirm

Refund $84.00 to Ada Lin

The code is part of Oxyn Pro

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.

Get Pro

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.

Terminal
oxyn add split-confirm

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Approve

Approve → Approved.

Refund $84.00 to Ada Lin

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Send large

Send at the large size (Oxyn extra).

Reply to the vendor thread

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Fails

Merge that fails and offers Try again.

PR #214 into main

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

SplitConfirm

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
labelusizeDefault::default()Label pair (0 Approve, 1 Send, 2 Merge).
failboolDefault::default()The action fails.
sizeString"md"`md` or `lg`.
contextbooltrueA context line above the button.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EnterorSpaceConfirm, or try again after a failure
Backspace · Cmd/CtrlZUndo while the check is showing
EscapeReset

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.

TransitionDurationEasing
Stretch260 ms (STRETCH_MS)sine overshoot
Split420 ms (SPLIT_MS)ease-out cubic
Bubble pop320 msspring
Undo window4000 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 SplitConfirm from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: XPostView in oxyn_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.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI