Question - How to override utilities in runtime #216
Replies: 4 comments
-
There's no current way to do something like this. Although there's nothing stopping you from providing runtime arbitrary values, like: <View style={tw`text-[${someVar}]`} /> Would that satisfy your use case? |
Beta Was this translation helpful? Give feedback.
-
This way is so inconvinient when u got a lot of utilities u want update. .text-content: {
color: `var(--text-content)`
} And it seems difficult to implement in React Native. Or Maybe this library can support a way to allow user-defined prefixes. like below a user-defined theme tw`text-[#333] dark:text-[#fff] dim:text-[#e7e9ea]` |
Beta Was this translation helpful? Give feedback.
-
are you targeting RN Web? |
Beta Was this translation helpful? Give feedback.
-
No. just show an example how can i update tailwind uitility in web. but can not do this way in RN. |
Beta Was this translation helpful? Give feedback.
-
My goal is to change the font size at runtime as follows
Beta Was this translation helpful? Give feedback.
All reactions