Back to docs
Animation

Swipe Dismiss

Swipe-to-dismiss wrapper with threshold callback.

Install

npx shadcn@latest add @native-bits/swipe-dismiss

Dependencies

react-native-reanimatedreact-native-gesture-handler
Try in Sandbox
animationgesturemobile

Props

PropTypeDefaultDescription
childrenReactNode-Dismissable content
thresholdnumber80Dismiss threshold in px
onDismiss() => void-Dismiss callback

Usage

```tsx
import { swipe-dismiss } from '@/components/native-bits/swipe-dismiss'

<SwipeDismiss onDismiss={removeItem}>
  <InboxCard />
</SwipeDismiss>
```

Source code

Loading...