react-native-picker-select
react-native-picker-select copied to clipboard
Add support for iOS dark mode
I added a new prop darkTheme
to have a dark theme on the picker (only on iOS). I used the same color as the native iOS picker in dark system theme when you open a <select>
on the web. I wrote a test with the feature.
Preview
Picture
Video
https://user-images.githubusercontent.com/2452603/138324017-8165abd9-2841-4653-8636-5b847eebc8cf.mp4
Test the feature
- Download the codeSandbox repo. I could not make a snack because I use the
Appearance
API ofreact-native
in the example. To useAppearance
, you need to edit the App.json if you use expo, a thing you can't do in a snack. I provided the App.json file in the codeSandbox repo. -
npm i && expo start
- Open the App with expo and open the picker, change your system theme on iOS then switch back to the App and open the picker again.
Related issue
#245
Thank you! This would be such a big win for our team.
@lfkwtz is there anything i can do to help get this merged in?
I just made a fix to apply the proper custom styles for the light & dark themes.
@lfkwtz is there anything i can do to help get this merged in?
You guys have any update on this PR? This would be a really important one for me and the project I'm working on 😊️
@lawnstarter
Any updates?
@lawnstarter
Any updates? Has this repository been abandoned?
Why the PR has not been merged?
@lawnstarter this PR has multiple approvals & would be very helpful, please merge or provide an update if you can. Thanks! :)
Or is @LawnStarterTeam the correct @? ^
- 1
Any updates on this, please? @LawnStarterTeam
Any updates on this, please? @LawnStarterTeam
Any updates? I think it's time to start a fork of this project and fix all these problems, working on it...
use npm install react-native-picker-select-updated
to get dark mode