New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

react-native-drum-picker

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-drum-picker

Android-native iOS-style drum/wheel picker for React Native (Fabric)

Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
58
-35.56%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-drum-picker

npm version license platform React Native

A smooth Android-native iOS-style drum/wheel picker for React Native (Fabric / New Architecture).

Preview

DateDrumPicker on Android (day · month · year):

DateDrumPicker preview — day, month, year columns

Features

  • Android-native implementation (Kotlin + RecyclerView)
  • iOS-style wheel / drum picker with smooth snapping
  • Center selection indicator (optional)
  • Transparent background by default
  • Custom text colors and sizes
  • TypeScript API
  • Flexible DateDrumPicker wrapper (day / month / year columns)
  • Fabric View / New Architecture

Installation

yarn add react-native-drum-picker
npm install react-native-drum-picker

This package includes native Android code. Rebuild your app after installing:

cd android && ./gradlew clean && cd ..
npx react-native run-android

On Windows:

cd android
.\gradlew clean
cd ..
npx react-native run-android

Platform support

PlatformStatus
AndroidSupported
iOSNot supported yet
WebNot supported

Requires React Native 0.76+ with the New Architecture enabled.

Basic usage

import { DrumPicker } from 'react-native-drum-picker';

export function Example() {
  return (
    <DrumPicker
      items={['Mon 7 Sep', 'Tue 8 Sep', 'Wed 9 Sep']}
      selectedIndex={1}
      itemHeight={44}
      visibleItemCount={5}
      onChange={(event) => {
        console.log(event.nativeEvent.index, event.nativeEvent.value);
      }}
      style={{ width: 150, height: 220 }}
    />
  );
}

Set style.height ≈ itemHeight * visibleItemCount (default 44 × 5 = 220).

DateDrumPicker

Higher-level date columns (TypeScript only). Renders wheels only — no built-in titles; add labels in your app if needed.

import { useState } from 'react';
import { DateDrumPicker } from 'react-native-drum-picker';

export function DateExample() {
  const [date, setDate] = useState({ day: 21, month: 5, year: 2026 });

  return (
    <DateDrumPicker
      mode="day-month-year"
      value={date}
      onChange={setDate}
    />
  );
}
<DateDrumPicker
  mode="month-year"
  monthFormat="long"
  minYear={2020}
  maxYear={2035}
  value={{ month: 5, year: 2026 }}
  onChange={(value) => console.log(value)}
/>

Controlled: pass value and update in onChange.
Uncontrolled: omit value; internal state updates and onChange still fires.

Day count follows month/year (e.g. February has 28/29 days).

API reference

DrumPicker

PropTypeDefaultDescription
itemsstring[]requiredWheel labels
selectedIndexnumber0Selected row index
itemHeightnumber44Row height (dp)
visibleItemCountnumber5Visible rows (odd recommended)
textColorstring#8E8E93Unselected text
selectedTextColorstring#1C1C1ESelected text
textSizenumber20Unselected size (sp)
selectedTextSizenumber22Selected size (sp)
backgroundColorstringtransparentRoot view background
containerBackgroundColorstringtransparentRecyclerView background
itemBackgroundColorstringtransparentRow background
showSelectionIndicatorbooleantrueCenter lines
selectionIndicatorColorstring#D1D1D6Line color
selectionIndicatorHeightnumber1Line thickness (dp)
onChangefunction—nativeEvent: { index, value }
styleViewStyle—Size and layout

DateDrumPicker

PropTypeDefaultDescription
modeDateDrumPickerModeday-month-yearWhich columns to show
value{ day?, month?, year? }—Controlled value
onChangefunction—{ day, month, year }
minYearnumbernow − 100Year range start
maxYearnumbernow + 50Year range end
monthFormat'short' | 'long' | 'number'shortMonth labels
localestringenIntl locale for month names
itemHeightnumber44Passed to each column
visibleItemCountnumber5Passed to each column
textColorstring—Passed to each column
selectedTextColorstring—Passed to each column
textSizenumber—Passed to each column
selectedTextSizenumber—Passed to each column
showSelectionIndicatorboolean—Passed to each column
selectionIndicatorColorstring—Passed to each column
selectionIndicatorHeightnumber—Passed to each column
backgroundColorstringtransparentPassed to each column
itemBackgroundColorstringtransparentPassed to each column
containerBackgroundColorstringtransparentPassed to each column
styleViewStyle—Row container
columnStyleViewStyle—All columns
columnStylesobject—Per column: day, month, year

DateDrumPicker modes

Column order is left → right:

modeColumns
dayday
monthmonth
yearyear
day-monthday, month
month-yearmonth, year
day-month-yearday, month, year
month-day-yearmonth, day, year
year-month-dayyear, month, day
type DateDrumPickerMode =
  | 'day'
  | 'month'
  | 'year'
  | 'day-month'
  | 'month-year'
  | 'day-month-year'
  | 'month-day-year'
  | 'year-month-day';

Styling

Backgrounds are transparent by default. Only text and optional indicator lines are visible.

<DrumPicker
  items={['Small', 'Medium', 'Large']}
  selectedTextColor="#111827"
  textColor="#9CA3AF"
  selectionIndicatorColor="#D1D1D6"
  backgroundColor="transparent"
  style={{ width: 120, height: 220 }}
/>

Use an odd visibleItemCount (e.g. 5) for a symmetric wheel.

Troubleshooting

IssueWhat to try
Must rebuild after installNative library — run a full Android rebuild
Metro shows old codenpx react-native start --reset-cache
Gradle / build errorscd android && ./gradlew clean (Windows: .\gradlew clean)
adb not foundInstall Android SDK Platform-Tools; add to PATH
Empty or white pickerEnable New Architecture; set explicit width / height in style
Props not appliedRebuild app after native changes; run yarn build in the library before packing
iOSNot supported — Android only

New Architecture: This library is a Fabric view. Ensure New Architecture is enabled in your app (required for RN 0.76+).

Development

git clone https://github.com/scrollDynasty/react-native-drum-picker.git
cd react-native-drum-picker
yarn
yarn build
cd example
yarn android

From the repo root:

yarn lint
yarn build
yarn typecheck

See CONTRIBUTING.md.

License

MIT © Umar Matyokubov

Keywords

react-native

FAQs

Package last updated on 21 May 2026

Related posts