Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Slide to Confirm

ProNew

Tactile drag-to-confirm slider button with shimmering track prompt, progressive fill, and spring snap-back.

Installation

pnpm dlx shadcn@latest add @viewport/slide-to-confirm

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
labelstring

Shimmering track label shown before confirmation.

"Slide to deploy"
confirmedLabelstring

Label shown once confirmed.

"Deployed"
tone"default" | "destructive"

Visual emphasis for destructive or primary actions.

"default"
onConfirm() => void

Called once the thumb reaches the end of the track.

—
classNamestring—

Accessibility

  • Focusable button that also confirms via Enter or Space for keyboard and assistive-tech users.
  • Confirmation state is announced through a status region.
  • Shimmer and spring snap-back respect prefers-reduced-motion.