Native only
Swipe to confirm
drag past 85% commits · tone primary/destructive · reset via key
function SwipeToConfirmDemo() { const [key, setKey] = React.useState(0); return ( <View className="w-full gap-3"> <SwipeToConfirm key={key} label="Slide to proceed" onConfirm={() => {}} /> <SwipeToConfirm key={key + 1000} label="Slide to delete" confirmLabel="Deleted" tone="destructive" onConfirm={() => {}} /> <Button variant="outline" onPress={() => setKey((k) => k + 1)}> <Text>Reset</Text> </Button> </View> );}Usage
For irreversible actions (submit, delete, pay). Reset by changing its key.
API
<SwipeToConfirm label onConfirm confirmLabel? tone="primary|destructive" />Get it
Already in every copy of the native kit:
import { SwipeToConfirm } from '@/components/kit/swipe-to-confirm';Details
- Exports
SwipeToConfirm- Packages
- lucide-react-native@^1.21.0, react-native-gesture-handler@~2.32.0
- Installs with
- @halftone-native/icon, @halftone-native/lib-haptics, @halftone-native/lib-reduced-motion, @halftone-native/lib-theme, @halftone-native/lib-utils, @halftone-native/text
- Also searched as
- slide, drag, commit, high stakes
- Registry JSON
- /r/native/swipe-to-confirm.json
Agents: the whole registry is at /llms.txt.