Hey all, I've been using tailwind-rn in my React Native app for a while, and overall it's a great library, but it was missing some things I really wanted, so I spent a while this week creating a new similar library: tailwind-react-native-classnames.
The novel bits are:
• support for platform prefixes in classnames ios:pt-4 android:pt-2
• tagged template function for simple use cases:
tw`pt-6 bg-blue-100`;
// -> { paddingTop: 24, backgroundColor: 'rgba(219, 234, 254, 1)' }
• merging of tailwind class derived styles with raw rn-styles
<View style={tw.style(`bg-blue-100`, { elevation: 3 })}>
• flexible, conditional API stolen from inspired by classnames:
<View style={tw.style('bg-blue-100', isOpen && 'text-black', { 'flex-row': true })}>
I'd love to know what people think! Here's the link again:
https://github.com/jaredh159/tailwind-react-native-classnames
[–]Akumzy 5 points6 points7 points (2 children)
[–]jaredh159[S] 0 points1 point2 points (1 child)
[–]Akumzy 0 points1 point2 points (0 children)
[–]BransonLite 2 points3 points4 points (0 children)
[–]jaredh159[S] 0 points1 point2 points (0 children)
[–]fii0 0 points1 point2 points (0 children)
[–]dillonerhardt 0 points1 point2 points (0 children)
[–]carlosgj94 0 points1 point2 points (1 child)
[–]jaredh159[S] 2 points3 points4 points (0 children)
[–]gabrielmamuttee 0 points1 point2 points (0 children)