Sign in to Reactiive

Use your Google or Apple account.
Signing in subscribes you to the newsletter: new content and the occasional promotion. Unsubscribe at any time.
Skip to content

Airbnb Slider with Reanimated and Gesture Handler

Wednesday, November 1, 2023
enzomanuelmangano
demos
airbnb-slider
An ongoing collection of React Native animations crafted with Reanimated, Gesture Handler, and Skia.
TypeScript
3.2k
296
An elegant price range slider inspired by Airbnb's design, featuring smooth animations and a dynamic price display. The component combines a custom slider with animated digits for a polished user experience.

What's This About?

This component recreates Airbnb's price selector with animated transitions for both the slider and price display. As users adjust the slider, the price updates with a rolling number animation while the currency symbol smoothly repositions itself.

Technical Implementation

The component uses spring animations for natural movement and shared values for state management. The price display intelligently handles digit spacing and currency positioning, while the slider provides smooth, responsive feedback.

Usage

// The component accepts these main props type Props = { initialProgress?: number; minValue?: number; maxValue: number; onUpdate: (value: number) => void; }; // Example usage <AirbnbSlider maxValue={4500} onUpdate={(price) => console.log(price)} />;

Unlock the beauty of React Native animations

Learn Reanimated, Gesture Handler & Skia with Reanimate.dev

Feedback on Airbnb Slider

Ideas, bugs, or anything that felt off: I read every message. For anything else, write to hello@reactiive.io.
Send feedback