-
Notifications
You must be signed in to change notification settings - Fork 41
Welcome to uniwind Discussions! #52
-
👋 Welcome!
We’re using Discussions as a place to connect with other members of our community. We hope that you:
- Ask questions you’re wondering about.
- Share ideas.
- Engage with other community members.
- Welcome others and are open-minded. Remember that this is a community we
build together 💪.
To get started, comment below with an introduction of yourself and tell us about what you do with this community.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 7 comments 14 replies
-
Will uniwind support variants, similar to how unistyles does? Or is it recommended to use class-variance-authority, clsx, and tailwind-merge? Loving uniwind so far btw!
Beta Was this translation helpful? Give feedback.
All reactions
-
You can use whatever you like!
https://docs.uniwind.dev/tailwind-basics#advanced-pattern-variants-and-compound-variants
Beta Was this translation helpful? Give feedback.
All reactions
-
🚀 1
-
I just finished reading the docs and it's already amazing. Looking forward to using it man. Respect for the work..
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
-
Is there any schedule or planned date or roadmap for the premium version or what it would look like for things like reanimated 4 transition etc?
Beta Was this translation helpful? Give feedback.
All reactions
-
Pro beta will be released before end of this month!
Beta Was this translation helpful? Give feedback.
All reactions
-
🎉 1
-
Pro beta will be released before end of this month!
Has the official release date for the Pro version been set?
Beta Was this translation helpful? Give feedback.
All reactions
-
End of this month 😪
We had to make OSS version stable. Right now we're polishing pro, building licensing system and redesigning landing page. We're almost there..
Beta Was this translation helpful? Give feedback.
All reactions
-
In the free version, it's marked same performance as Unistyles v3
but without the runtime C++ engine and the no re-render that comes with it, how is that possible? Unless Unistyles didn't have the C++ engine and no-re-render logic ?
Trying to see if i better wait fro pro version to be available or not :)
Altho the biggest thing i feel like is how reanimated will be integrated since so far we don't really know how it will work unless i missed a blog post or a twitter post or something showing it.
is there any example how you will handle Pressable with pressed state with animation with or without pro version?
Beta Was this translation helpful? Give feedback.
All reactions
-
Uniwind can handle some tasks during build time, which is why it’s on par with Unistyles 3.0, which performs everything at runtime.
Uniwind Pro will do both approaches, making it the fastest.
is there any example how you will handle Pressable with pressed state with animation with or without pro version?
@Brentlok do you have any video / code snippet for Reanimated from alpha?
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
-
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
-
is there any example how you will handle Pressable with pressed state with animation with or without pro version?
If you're asking about the code, it should look something like that
<Pressable className="bg-red-500 active:bg-red-300 transition-colors" />
Nothing special, just your regular tailwind classes. It will work in the pro version out of the box
Beta Was this translation helpful? Give feedback.
All reactions
-
🎉 1
-
Sorry evaluating so trying to get a good overview before committing, is uniwind setup unistyles also?
if i need custom style or access to unistyles runtime (safe area, keybaord avoid, etc). Do i need to setup that separately or it's part of uniwind setup to have Unistyles for things like custom css/style (not using tailwind classes) ?
Also things like keyboard avoid or safe area will be custom classes in the future in uniwind? since as far as i know it's not something that is part of tailwind by default.
Beta Was this translation helpful? Give feedback.
All reactions
-
You don't need to setup Unistyles. Everything will be a part of Uniwind package.
Also things like keyboard avoid or safe area will be custom classes in the future in uniwind? since as far as i know it's not something that is part of tailwind by default.
It's part of Tailwind, but requires eg. react-native-safe-area-context. We will inject this values directly from C++ (no 3rd party dependency).
Beta Was this translation helpful? Give feedback.
All reactions
-
but if i want to use it style and not in the css classes of tailwind/uniwind. It will be possible ? or i guess i will need to use useUniwind hook to get the theme values etc to do custom stylesheet ?
Beta Was this translation helpful? Give feedback.
All reactions
-
Why do you want to use style? Like in the entire app or for some components?
You can use styles even now, they will override classNames.
If you want to access theme variables then you need to use useResolveClassNames
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Excited to see a new project supporting Tailwind 4!
I think many of us have a couple of key questions, for example:
-
We know the Pro version is powerful, but how does the free version compare to NativeWind? What would be the compelling reasons for a NativeWind user to switch to the free version of UniWind? For instance, are there any performance advantages, and if so, what are they attributed to?
-
Does UniWind support dynamic theme creation? NativeWind supports this via dynamic themes, but in the UniWind docs, I seem to only find information on static theme customization. Is there any guidance or documentation on this?
Thanks for the hard work on this project!
Beta Was this translation helpful? Give feedback.
All reactions
-
We know the Pro version is powerful, but how does the free version compare to NativeWind
Faster, more stable, 99% feature parity.
https://github.com/Unistyles-OSS/uniwind-benchmarks
Does UniWind support dynamic theme creation
No, we rely on Tailwind compiler and Tailwind 4 syntax. There is no JS in the middle like with Tailwind 3
Beta Was this translation helpful? Give feedback.
All reactions
-
No, we rely on Tailwind compiler and Tailwind 4 syntax. There is no JS in the middle like with Tailwind 3
I spent some time digging into the source code and tried adding a setThemeCSSVariables method in useUniwind.native.ts to enable dynamic theme updates. Although my implementation is a bit rough, it seems to work for updating theme variables at runtime.
Do you think this approach could be a good starting point for a PR, or as a reference for supporting dynamic/custom themes in the future?
import { useEffect, useState } from "react"; import { Uniwind } from "../core"; import { UniwindStore } from "../core/native"; import { StyleDependency } from "../types"; export const useUniwind = () => { const [theme, setTheme] = useState(Uniwind.currentTheme); const [hasAdaptiveThemes, setHasAdaptiveThemes] = useState( Uniwind.hasAdaptiveThemes ); const setThemeCSSVariables = (newVars: Record<string, unknown>) => { Object.defineProperties( UniwindStore.vars, Object.getOwnPropertyDescriptors(newVars) ); UniwindStore.notifyListeners([StyleDependency.Theme]); }; useEffect(() => { const dispose = UniwindStore.subscribe(() => { setTheme(Uniwind.currentTheme); setHasAdaptiveThemes(Uniwind.hasAdaptiveThemes); }, [StyleDependency.Theme]); return () => { dispose(); }; }, []); return { theme, hasAdaptiveThemes, setThemeCSSVariables, }; };
Beta Was this translation helpful? Give feedback.
All reactions
-
It is definitely possible to achieve dynamic themes support but we need to take some things for consideration
- should you be able to change the theme (even light/dark) while you've updated theme variables?
- could you change variables for specific theme? For example only changing variables for a dark theme
- web implementation - your implementation won't work on web since UniwindStore in native only
And to match our API, this method should be placed under Uniwind config.ts, since it doesn't require any state, there's no need for it to be inside a hook
Beta Was this translation helpful? Give feedback.
All reactions
-
I've previously reviewed Tamagui but are doubting the direction of the project.
Unwind looks very promising but compared to Tamagui you offer fewer components. Tamagui also offer takeout and bento.
- Bento is a paid service similar to Shadcn where you can copy components and takeout is a paid starter kind of a admin template.
- Both have their issues and I'm not super impressed how they are maintained.
I've come across Uniwind before and since you are in the https://www.better-t-stack.dev you showed up again.
What I noticed:
- You don't get a preview of the existing React Native components.
- It's not clear (at a first glance) if you can use the same components on the web and for native.
- How easy is it to take existing Tailwind 4 components and convert them to Uniwind components?
If its easy, providing more advanced components (as bento) would be easier, if not, it would be even more important to help more people getting started and migrating to the framework.
Beta Was this translation helpful? Give feedback.
All reactions
-
Uniwind looks very promising but compared to Tamagui you offer fewer components.
Hey! We don’t ship our own components, we only provide bindings for existing React Native components. It’s hard to compare a full UI Kit like Tamagui with a styling library like Uniwind.
If you’re looking for ready-made components, check out HeroUI Native (the first UI Kit powered by Uniwind).
You don’t get a preview of the existing React Native components.
Same as above, we’re not a UI Kit 😁
It’s not clear at first glance if you can use the same components on the web and native.
That’s exactly what Uniwind is designed for. You write once and your styles run cross-platform. We can definitely improve the visibility of this point.
How easy is it to take existing Tailwind 4 components and convert them to Uniwind components?
You should approach it from the opposite direction. Start from mobile, make it work there first, and then bring it to the web. You’ll need React Native Web to make the components cross-platform.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1