Skip to content
Spec00
Animations
fade · slide · scale · custom
Swipe
up · down · left · right
Thread
UI · worklets
Backdrop
color · yours · none
Control
visible · ref
Platforms
iOS · Android · web
Peers
reanimated · gesture handler
License
MIT

react-native-reanimated-modal

A lightweight, performant modal for React Native — animations on the UI thread, swipe to dismiss in any direction, on top of the native Modal.
The example app: modals fading, sliding and scaling in, dismissed with a swipe, over a dimmed and a blurred backdrop
Fig. 01The example app

A modal built on React Native’s own Modal — so it behaves like one on every platform — with its animations and gestures in Reanimated and Gesture Handler: they run on the UI thread, and stay smooth while JavaScript is busy.

npm install react-native-reanimated-modal
  • Animations

    fade, slide from any edge and scale, each with its duration — as a string, or a typed config.

  • Your own animations

    Worklets for the content and the backdrop get the progress, the swipe offset and the state, and return a style: on top of a preset, or as custom on their own.

  • Swipe to dismiss

    In one direction or all four, with a distance to reach, and a spring back when it is not reached; the backdrop fades as the content goes.

  • Backdrop

    A color and an opacity, your own component (a blur), or none; a press closes the modal, or calls your handler, or does nothing.

  • Declarative or imperative

    visible and onHide like any modal, or ref.current.open() / close() when the modal is mounted visible.

  • Several at once

    coverScreen draws the modal in your tree instead of a native window: modals stack, and sit in a FullWindowOverlay above React Navigation’s screens.

  • Native behaviour

    The Android back button (or your handler for it), translucent status and navigation bars, iOS orientations — the native Modal’s props, passed through.

  • Testable

    Test IDs for the container, the backdrop and the content; works with Jest and React Native Testing Library.

  • Small

    One component in TypeScript, no dependencies of its own: Reanimated, Worklets and Gesture Handler are peers.

Every page is also Markdown: add .md to its URL, or use Copy page above its title. llms.txt lists them, llms-full.txt is all of them in one file — LLMs.