Skip to main content
Version: v0.6.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
DatePickerCalendar (display="calendar") or wheel (display="wheel")
CalendarMonth calendar: single / range / multiple
DateWheelPickerDay / month / year wheels
DateTimePickerDay + time wheels (display="wheel") or calendar + time (display="calendar")
SelectPicker<T>Field + searchable sheet
SelectList<T>Inline searchable list
EmojiPickerEmoji keyboard
BottomSheetAnimated sheet

Sheets​

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

Theme​

ExportDescription
PickersProviderApp-wide theme and colour scheme
usePickerTheme(override?)Resolved active theme
createTheme(overrides, base?)Full theme from overrides
mergeTheme(base, override?)Deep merge
lightTheme / darkThemeBuilt-in themes
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

Emoji utilities​

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

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';

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

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

interface ThemableProps { theme?: DeepPartial<PickerTheme> }

Default strings​

WherePropDefault
SheetsconfirmLabel / cancelLabelDone / Cancel
SelectPickerplaceholderSelect…
SelectListsearchPlaceholder / emptyTextSearch / No results
EmojiPickersearchPlaceholder / emptyTextSearch emoji / No emoji found
TimePickerdayPeriodLabelsfrom locale (AM / PM)

Default values at a glance​

PropDefaultComponents
itemHeight40wheels
visibleItems5wheels
variant'3d'wheels
rotation / fadeTo20 / 0.3WheelPicker
loopfalse WheelPicker · true TimePicker, DateWheelPickerwheels
keyboardInputtrueWheelPicker
minuteInterval / secondInterval1TimePicker
format'auto'TimePicker
dayHeight44Calendar
fixedWeeks / showOutsideDaystrueCalendar
enableSwipe / enableQuickJumptrueCalendar
weekdayFormat'short'Calendar
monthFormat'long'DateWheelPicker
searchableoptions.length > 8 · true emojiSelect, Emoji
closeOnSelecttrueSelectPicker, EmojiPickerSheet
chipstrueSelectPicker
columns / height8 / 380 (420 in sheet)EmojiPicker
maxRecent24EmojiPicker
maxHeightRatio0.9BottomSheet
bottomInset24 iOS · 12 otherBottomSheet