Adding variants while supporting group-*
and peer-*
#15409
-
I want to add some custom variants but the docs specify that |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
You can try following the core plugin code for tailwindcss/src/corePlugins.js Lines 155 to 200 in f875ab9 With some slight variation to work in custom land: https://play.tailwindcss.com/bQynqFD6AM |
Beta Was this translation helpful? Give feedback.
In v4 the group and peer stuff is indeed all handled automatically 👍 Highly recommend using the CSS syntax by the way instead of the JS APIs, using the JS APIs triggers some very slow backward compatibility code paths that are otherwise completely skipped if we see you are only using modern APIs.