troberts-28 / react-native-timer-picker

A simple, flexible, performant duration picker for React Native apps (Expo & Bare Workflow). Great for timers, alarms and duration inputs. Includes iOS-style haptic and audio feedback.
https://www.npmjs.com/package/react-native-timer-picker
MIT License
141 stars 16 forks source link

Native look #36

Open andredewaard opened 2 months ago

andredewaard commented 2 months ago

Is it possible, or does someone already made some styles to make it look more native like this package does?

Screenshot 2024-08-08 at 11 03 52
troberts-28 commented 2 months ago

It's definitely possible to style it to look more native by supplying custom styling under the styles prop (you could make it look similar to both the native iOS and Android looks). We'll see if someone might be able to help you out with some examples?

There's currently no way to achieve the 'squished' look of the numbers above and below the picker, as in the screenshot you shared. To achieve that, we'd need use the React Native Animated API and scale each item in the picker based on its position in the viewport. It's possible but isn't on the roadmap right now. Of course, if you're keen for it and fancied having a go, very open to a PR!