Skip to content

How to embed any Tailwind class #754

Answered by ben-rogerson
dvdbrk asked this question in Q&A
Discussion options

You must be logged in to vote

Twin doesn't support dynamic classes like you've found here.

Try something like this:

<Title $primary={false} $extraTailwindClasses={tw`font-large`}>

Then twin can do the conversion and the css object is supplied to styled components.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dvdbrk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants