Skip to main content
Version: v0.22.x

API reference

Every export from @elik56a/react-native-pickers, grouped. Each name links to its full documentation.

Components​

ExportDescription
WheelPicker<T>Single scrolling wheel
MultiWheelPickerSeveral wheels in one band
TimePickerHour / minute / second / AM-PM wheels
DurationPickerA length of time in seconds: wheels, number boxes or columns
DatePickerCalendar (display="calendar") or wheel (display="wheel")
CalendarMonth calendar: single / range / multiple / ranges
DateWheelPickerDay / month / year wheels
MonthPickerMonth and year: wheels (iOS) or a grid of months (Material, web)
WeekStripOne week of days in a row, swipe or arrows to page
DateTimePickerDay + time wheels (display="wheel") or calendar + time (display="calendar")
SelectPicker<T>Field + searchable sheet
SelectList<T>Inline searchable list
CountryPickerCountry field: flags, dialing codes, localized names
PhoneFieldPhone number input: country code button, formats as you type, E.164 value
HorizontalList<T>Segmented control or chips that scroll sideways
EmojiPickerEmoji keyboard
ColorPickeriOS's tabs, Google's swatch circles or the browser's spectrum; hex with opacity
BottomSheetAnimated sheet

Sheets​

ExportDescription
PickerSheetBottomSheet with Cancel / Done
DatePickerSheetCalendar or date wheel in a sheet
TimePickerSheetTimePicker in a sheet
DateTimePickerSheetDateTimePicker in a sheet
DurationPickerSheetDurationPicker in a sheet
MonthPickerSheetMonthPicker in a sheet
WheelPickerSheet<T>WheelPicker in a sheet
EmojiPickerSheetEmojiPicker in a sheet
ColorPickerSheetColorPicker in a sheet
useDraft(value, visible)Draft state that resets on open

Fields​

ExportDescription
PickerFieldLabelled field that opens the sheet its child renders
DatePickerFieldField + DatePickerSheet; shows the date, range or dates
TimePickerFieldField + TimePickerSheet; shows the time
DateTimePickerFieldField + DateTimePickerSheet; shows the date and time
DurationPickerFieldField + DurationPickerSheet; shows 1 h 30 min
MonthPickerFieldField + MonthPickerSheet; shows October 2026
WheelPickerField<T>Field + WheelPickerSheet; shows the item's label
EmojiPickerFieldField + EmojiPickerSheet; shows value
ColorPickerFieldField + ColorPickerSheet; shows a swatch and the hex code

Theme​

ExportDescription
PickersProviderApp-wide theme, colour scheme, platform and design
usePickerTheme(override?)Resolved active theme
createTheme(overrides, base?)Full theme from overrides
mergeTheme(base, override?)Deep merge
lightTheme / darkThemeBuilt-in themes
DESIGN / DESIGN_TOKENS / resolveDesign(preference, platform)The iOS, Material and web designs
textStyle(theme, size, weight?)Text style from tokens

Date utilities​

startOfDay · startOfMonth · daysInMonth · addDays · addMonths · isSameDay · isSameMonth · compareDay · isBetweenDays · isOutOfRange · clampDate · toDateKey · buildMonthGrid · getMonthNames · getWeekdayNames · formatMonthYear · formatDate · uses12HourClock · getFirstDayOfWeek · getDayPeriods

CALENDAR_MODE: the calendar selection modes as constants (single, range, multiple, ranges), e.g. mode={CALENDAR_MODE.ranges}.

Emoji utilities​

getAllEmojis · searchEmojis · findEmoji · withSkinTone · EMOJI_CATEGORIES · DEFAULT_CATEGORY_LABELS · DEFAULT_CATEGORY_ICONS

Color utilities​

normalizeHex · hexToHsv · hsvToHex · withAlpha · DEFAULT_COLORS

Country utilities​

getCountry · getAllCountries · getCountryFlag

Phone utilities​

parsePhone · formatNationalNumber · isValidPhone · toE164

Duration utilities​

formatDuration(seconds, { showHours?, labels? }): 5400 → '1 h 30 min'

Select utilities​

ExportDescription
defaultFilter(option, query)The default search: case-, accent- and niqqud-insensitive; every word must match label, description or keywords

Types​

See TypeScript for the full list. The most used:

interface DateRange { start: Date | null; end: Date | null }

interface MarkedDate { dots?: string[]; disabled?: boolean; label?: string; textColor?: string }

interface SelectOption<T> {
label: string; value: T; description?: string; disabled?: boolean;
icon?: React.ReactNode; group?: string; keywords?: string[];
}

interface WheelItem<T> { label: string; value: T; disabled?: boolean; key?: string }

type SkinTone = 0 | 1 | 2 | 3 | 4 | 5;

/** Every sheet's `presentation`. */
type SheetPresentation = 'auto' | 'bottomSheet' | 'modal';

/** A field's `presentation`: a sheet presentation, or a dropdown under the field. Its `auto` (the default) is a dropdown on the web. */
type FieldPresentation = SheetPresentation | 'dropdown';

/** SelectPicker's `presentation`; its `auto` is a dropdown on the web. */
type SelectPresentation = FieldPresentation;

/** The field slots every `*PickerField` and `PickerField` takes in `styles`. */
type PickerFieldSlot = 'label' | 'trigger' | 'triggerText' | 'placeholder' | 'chevron' | 'clear';

type SlotStyles<K extends string> = Partial<Record<K, StyleProp<TextStyle>>>;

interface ThemableProps { theme?: DeepPartial<PickerTheme> }

Default strings​

WherePropDefault
SheetsconfirmLabel / cancelLabelDone (iOS, web) · OK (Material) / Cancel
SelectPicker, fieldsplaceholderSelect…
SelectListsearchPlaceholder / emptyText / loadingText / searchPromptSearch / No results / Loading… / Type to search
CountryPickerplaceholder / searchPlaceholder / preferredLabel / allCountriesLabelSelect a country / Search countries / Suggested / All countries
PhoneFieldlabel / countrySheetTitlenone (read as Phone number) / Country code
EmojiPickersearchPlaceholder / emptyTextSearch emoji / No emoji found
TimePickerdayPeriodLabelsfrom locale (AM / PM)
ColorPickerlabelsGrid, Spectrum, Sliders, Hue, Opacity, Red, Green, Blue, Hex, Copy, Copied, Custom colour…
DurationPickerlabels{ hours: 'h', minutes: 'min', seconds: 's' }

Default values at a glance​

PropDefaultComponents
itemHeight40wheels
visibleItems5wheels
variant'3d'wheels
rotation / fadeTo20 / 0.3WheelPicker
loopfalse WheelPicker · true TimePicker, DurationPicker, DateWheelPicker, MonthPickerwheels
keyboardInputtrueWheelPicker
minuteInterval / secondInterval1TimePicker, DurationPicker
format'auto'TimePicker
display'wheel' iOS · 'dial' Material · 'list' webTimePicker
display'wheel' iOS · 'input' Material · 'list' webDurationPicker
display'wheel' iOS · 'grid' Material, webMonthPicker
display'tabs' iOS · 'swatches' Material · 'spectrum' webColorPicker
display / timeDisplay'wheel' / 'wheel' iOS · 'calendar' / 'input' Material · 'calendar' / 'list' webDateTimePicker
timePosition'beside' web · 'below' otherDateTimePicker
dayHeight44Calendar
fixedWeeks / showOutsideDaystrueCalendar
enableSwipe / enableQuickJumptrueCalendar
weekdayFormat'short' · 'narrow' MaterialCalendar
monthFormat'long'DateWheelPicker, MonthPicker
searchableoptions.length > 8 · true emojiSelect, Emoji
closeOnSelecttrueSelectPicker, EmojiPickerSheet
chipstrueSelectPicker
clearable / disabledfalseSelectPicker, fields
columns / height8 / 380 (420 in sheet)EmojiPicker
maxRecent24EmojiPicker
maxHeightRatio0.9BottomSheet
bottomInset24 iOS · 12 otherBottomSheet