Theme
Thetheme prop controls the overall color scheme of the picker, supporting light mode, dark mode, and automatic detection.
Theme Options
"light"- Force light theme"dark"- Force dark theme"auto"- Automatically match device appearance (default)
Usage
Default Behavior
Whentheme is not specified or set to "auto", the picker will:
- Detect the device’s color scheme using React Native’s
AppearanceAPI - Automatically apply light or dark styling based on the device setting
- Update when the user changes their device theme
The theme prop affects the overall appearance including background colors, text colors, and button colors.
Button Color (Android Modal Only)
ThebuttonColor prop customizes the color of the confirm and cancel buttons in the modal on Android.
Usage
Theme-Based Button Colors
If you don’t specifybuttonColor, it will automatically adapt to the theme:
- Light theme: Black buttons
- Dark theme: White buttons
Divider Color (Android Only)
ThedividerColor prop customizes the color of the divider/separator lines in the picker on Android.
Usage
Theme-Based Divider Colors
If you don’t specifydividerColor, it will automatically adapt to the theme:
- Light theme: Black divider
- Dark theme: White divider
The
dividerColor prop only affects Android. iOS uses the native iOS picker styling which cannot be customized in this way.Custom Text Labels (Modal Only)
When using modal mode, you can customize the title, confirm button text, and cancel button text.Title
Thetitle prop sets the modal’s title text. Set to null to remove the title entirely.
Default Title Behavior
If you don’t specify a title, the picker will use a default based on the mode:- Time mode: “Select time”
- Date or DateTime mode: “Select date”
Confirm Text
TheconfirmText prop customizes the confirm button label.
"Confirm"
Cancel Text
ThecancelText prop customizes the cancel button label.
"Cancel"
Complete Modal Customization Example
Font Size (Android Only)
To change the font size on Android, you need to modify your Android theme configuration.Steps
- Open
android/app/src/main/res/values/styles.xml - Add the following code right above
</resources>:
- Rebuild your Android app
The font size cannot be changed on iOS out of the box due to platform limitations. However, some iOS workarounds are available in the community.
Platform-Specific Styling
Android
buttonColor- Customize modal button colorsdividerColor- Customize separator line colors- Font size via
styles.xml
iOS
- Uses native iOS picker wheels
- Styling options are limited by iOS platform constraints
- Respects system appearance settings
Both Platforms
theme- Light/dark/auto theme selectiontitle,confirmText,cancelText- Modal text customization
Summary of Customization Props
| Prop | Type | Platform | Modal/Inline | Description |
|---|---|---|---|---|
theme | "light" | "dark" | "auto" | Both | Both | Overall color scheme |
buttonColor | string | Android | Modal only | Confirm/cancel button color |
dividerColor | string | Android | Both | Divider/separator line color |
title | string | null | Both | Modal only | Modal title text |
confirmText | string | Both | Modal only | Confirm button label |
cancelText | string | Both | Modal only | Cancel button label |