The Horizontal Ruler Date Picker
Engineered for Fluid Mobile UX
A high-performance horizontal ruler date picker & scroll wheel for React Native and Expo. Decay physics, virtualized graduations, adaptive haptics, and compound component freedom.
Everything You Need in a Ruler Picker
Crafted from scratch to eliminate dropped frames, erratic scroll jumps, and rigid layouts.
60 FPS Reanimated 3 Physics
Inertial velocity deceleration, smooth decay animations, and magnetic snap-to-tick alignment execute on the native UI thread without JS bridge traffic.
Dual-Speed Tactile Haptics
Micro-click feedback during delicate, slow fine-tuning and continuous sensory vibrations during high-velocity fling swipes (supports `expo-haptics`).
Windowed Virtualized Rendering
Only renders visible graduations plus a configurable buffer (`bufferTicks`), ensuring constant 60 FPS performance and zero memory bloat across infinite dates.
Multi-Tier Rule-Based Graduations
Built-in graduation styles (`'calendar'`, `'metric'`, `'minimal'`) or declarative rule arrays for custom heights, widths, colors, and date label formatters.
Compound Anatomy Architecture
Complete structural control via Ruler.Root, Ruler.Header, Ruler.Track, Ruler.Indicator, and Ruler.Ticks—or drop in <RulerDatePicker /> for one-line simplicity.
Adaptive Cupertino Theming
Auto-detects device light & dark appearance with full custom theme token overrides for indicator needles, tick bars, text, and track backgrounds.
The Anatomy of the Package
Whether you need instant drop-in convenience or custom UI composition, our compound architecture gives you total control.
Houses Reanimated 3 shared values, gesture handlers, inertial decay physics, and date synchronization context.
Displays the currently active date, month, year, or custom label formatters with optional jump-to-today action.
Constrains the graduation track, applies overflow clipping, and orchestrates horizontal pan gesture interactions.
Fixed center cursor needle with customizable width, height, corner radius, color, or a custom React component.
Efficiently calculates and renders only visible graduation marks + configurable buffer ticks for optimal 60 FPS frame rates.
Context-aware reset button that automatically appears when scrolled away from today or the initial date.
Dedicated compound system featuring Root, Track, Highlight band, and Header for selecting fluid date spans.
import React, { useState } from 'react';
import { RulerDatePicker } from 'react-native-ruler-date-picker';
export default function AppointmentPicker() {
const [date, setDate] = useState(new Date());
return (
<RulerDatePicker
value={date}
onChange={(newDate, str) => {
setDate(newDate);
console.log('Selected date:', str);
}}
ticks="calendar"
header={{ showResetToToday: true }}
theme={{
indicatorColor: '#38BDF8',
accentColor: '#38BDF8',
}}
/>
);
}Install in Seconds
Compatible with React Native 0.70+, Expo SDK 49+, and React Native Web.