Props
| Prop | Type | Default |
|---|---|---|
| label Shimmering text in the track. | string | labels.slideToConfirm |
| confirmedLabel Text once completed. | string | labels.confirmed |
| onConfirm Fires at the end. Return a promise to show a spinner in the thumb; a rejection shakes the track, flashes the danger colour and slides back. | () => void | Promise<unknown> | — |
| variant Tinted track with a solid thumb, opt-in two-tone gradient track with a white thumb, transparent track with a tinted hairline, or a 48pt slim track. | "default" | "gradient" | "outline" | "compact" | "default" |
| accent Thumb, trail and track colour; only the gradient variant derives a second tone from it. | string | theme accent |
| icon Custom thumb icon. | ReactNode | animated chevrons |
| resetAfter Auto-reset after this many ms. Otherwise call ref.reset(). | number | — |
| threshold Fraction of the track that confirms on release. | number | 0.82 |
| haptics Ticks at 25 / 50 / 75 %, success on confirm, error on failure. | boolean | true |
| disabled Locks the thumb. | boolean | false |
| ref Imperative reset. | { reset(): void } | — |
| style Style for the track (merged over its height, radius and colour). | StyleProp<ViewStyle> | — |
| className Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. | string | — |
Customization
You own the source file — tune appearance with props (no fork required for most tweaks). For brand-wide colours and radius, wrap your app in KitProvider; for one-off looks, use the style props below.
Design theme
Open Design theme on the live preview — accent, corner radius and font update every variant instantly (same as KitProvider in your app).
Variants
Pick the Variants chip above the preview, or set variant=… — "default" | "gradient" | "outline" | "compact".
Style props
React Native style and typed slots like fieldStyle, plus optional root className when you use NativeWind or Uniwind (cnProps from kit).
- variant
- "default" | "gradient" | "outline" | "compact" · default "default"Tinted track with a solid thumb, opt-in two-tone gradient track with a white thumb, transparent track with a tinted hairline, or a 48pt slim track.
- accent
- string · default theme accentThumb, trail and track colour; only the gradient variant derives a second tone from it.
- style
- StyleProp<ViewStyle>Style for the track (merged over its height, radius and colour).
- className
- stringTailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides.
Map tokens from your design system on Bring your design system or read Theming for KitProvider and NativeWind / Uniwind setup.
Behaviour & accessibility
- Touch
- Drag past the threshold, or flick fast past the halfway point, to confirm; anything less springs back. If onConfirm returns a promise the thumb spins until it settles.
- Motion
- The thumb swells while held and a check draws on success; a rejected promise shakes the track and slides it back.
- Reduced motion
- The idle nudge and the chevron shimmer on the thumb are turned off.
- Haptics
- Selection ticks at 25, 50 and 75 percent of the drag, a medium impact on release, then a success or error notification.
- Screen readers
- A button whose label switches to confirmedLabel when done, with busy and disabled state. The 'activate' action (double tap) confirms without dragging.
Source
FAQ
How do I make a swipe-to-confirm button in React Native?
Does Slide to Confirm work in Expo Go?
react-native-svg, expo-haptics) are all included in Expo Go.How do I add Slide to Confirm to my Expo app?
react-native-svg, expo-haptics, so the code is yours to change. The install command is on this page for Pro members.Is Slide to Confirm free?
npx @expokit/cli@latest login) and it installs the full source into your app.Can I change how Slide to Confirm looks?
useKit(), so wrapping your app in <KitProvider accent radius> re-skins it with every other ExpoKit component. The code lives in your project, so you can also edit anything directly.