jaredh159 / tailwind-react-native-classnames

simple, expressive API for tailwindcss + react-native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question - How to override utilities in runtime

liaoliao666 opened this issue · comments

My goal is to change the font size at runtime as follows

tw.setUtilities("text-content", 'text-[17px]')

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?