Mobilecn-UI / nativecn-ui

Beautiful and customizable React Native components
https://nativecn.mintlify.app
MIT License
931 stars 47 forks source link

New component: Switch #11

Closed okalil closed 7 months ago

okalil commented 7 months ago

Hello, guys. I'm happy that shadcn idea has reached React Native community, and I would like to suggest a few more components that are very commonly used in native mobile apps.

Contribution: new Switch component

The switch Button component is a very used control component, specially in profile and configuration forms where we toggle preferences and other options.

Implementation details:

The native switch component is not so customizable, so I think the best option would be implementing a custom component with Pressable and View.

For reference, NativeBase library includes a component like that: https://docs.nativebase.io/switch

carlos-garciamoran commented 7 months ago

Hi @okalil, we just released the Switch component.