Quick Install
Terminal
npx expo install react-native-gesture-handler react-native-reanimated react-native-svg

Target Dependencies & Architecture

react-native-gesture-handler@~2.28.0react-native-reanimated@~4.1.0react-native-svg@15.12.1
Gestures & Physics

Switch XX

react native animationsreact native reanimatedmicro interactionswitchbuttonreact native toggle

Interaction & Gesture Mechanics

A custom animated switch component that mirrors the API of React Native’s built-in `Switch`, making it a true plug-and-play replacement. It’s written in TypeScript and leverages `react-native-reanimated` for smooth animations, along with `react-native-gesture-handler` to support a `LongPress` gesture. This component is fully customizable and supports the following props: * `onValueChange`: Callback triggered with the new `value` when the switch changes state * `value`: The current value of the switch (controlled mode) * `defaultValue`: The initial value of the switch (uncontrolled mode) * `size`: Controls the overall size of the switch * `disabled`: Disables the switch and prevents gesture interactions Ideal for replacing the native `Switch` with a more animated and interactive experience—no extra setup needed.

Import directly via AI Coding Agents

Use RafayLabs Animation MCP to search, adapt, and insert this animation into your screens automatically in Cursor, Claude Code, or VS Code.

Connect Animation MCP

Related UI Motion Components

More animations in Gestures & Physics

View All Animations →
2d scrollable grid - Reanimated2 + Gesture Handler
Free ComponentGestures & Physics

2d scrollable grid - Reanimated2 + Gesture Handler

2d scrollable grid - Reanimated2 + Gesture Handler

reanimated2custom grid animationreact native gestures
Reanimated 4
Preview & Code
Custom vertical scroll list - StarWars like casting - Reanimated2 + Gestures
Free ComponentGestures & Physics

Custom vertical scroll list - StarWars like casting - Reanimated2 + Gestures

Custom vertical scroll list - StarWars like casting - Reanimated2 + Gestures

react native animationsreanimated2react native reanimated2
Reanimated 4
Preview & Code
Drag tasks - React Native Reanimated2 animation
Free ComponentGestures & Physics

Drag tasks - React Native Reanimated2 animation

Drag tasks - React Native Reanimated2 animation

gesturesreanimated2custom gestures
Reanimated 4
Preview & Code