Kinetik UI

Slide to Confirm

.md

Drag the knob across to confirm. A trail follows it, light sweeps the track, and it lands as a check.

v1.0.0Live on web@shopify/react-native-skiareact-native-gesture-handlerreact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add slide-confirm

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/slide-confirm.json

Install manually

  1. Install dependencies
    npx expo install @shopify/react-native-skia react-native-gesture-handler react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/slide-confirm.tsx
    View source files

Usage

import { SlideConfirm } from '@/components/kinetik/slide-confirm';

<SlideConfirm label="Slide to send" confirmedLabel="Sent" onConfirm={send} />;

It fills the width of its parent. Past threshold (80% of the track by default), or with a quick flick past halfway, the knob runs to the end and onConfirm fires once. It returns to the start after resetAfter ms; pass null to keep it confirmed.

When to use

  • Payments, transfers and other actions that should not happen by accident.
  • Lock screens and handoffs, where the gesture itself says "I mean it".

When not to use

  • Actions that need to be fast or repeated. A tap is kinder.
  • Inside horizontal scroll views or pagers; both want the sideways drag.

Notes

  • A tick plays as the knob crosses the threshold, and a success haptic on confirm.
  • Screen readers confirm with the activate action, no dragging needed.
  • The sweeping light stops once confirmed, while disabled and with reduced motion.

Props

SlideConfirmProps

PropTypeDefaultDescription
labelrequiredstring—Instruction on the track, e.g. "Slide to pay".
onConfirmrequired() => void—
confirmedLabelstring'Done'Shown once confirmed, e.g. "Paid". Defaults to 'Done'.
thresholdnumber0.8Share of the track the knob must pass to confirm, 0.5–0.95. Defaults to 0.8.
resetAfternumber | null1800Return to the start this many ms after confirming. `null` stays confirmed. Defaults to 1800.
disabledbooleanfalse
hapticsbooleantrueA tick when the knob passes the threshold and success on confirm. Defaults to true.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
The knob follows the finger on the UI thread; the idle sweep is one repeating timing on a transform.
Measured

Pixel 9 emulator, API 35, release build · interaction median 0.90× the system Settings app on the same emulator (indicative only) · keeps drawing at rest · 159 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
No sweeping light; the knob still follows the finger and snaps without overshoot.
Screen readers
A button named by the label; 'activate' confirms without dragging. After confirming it reads the confirmed label.
Touch target
The knob is 56 pt; the track is 64 pt tall.

Source files

components/kinetik/slide-confirm.tsx is in the Code tab of the preview above.