Replies: 1 comment
-
|
The reason you can't use responsive styles inside defaultVariants is because defaultVariants only supports static values — it’s evaluated once, not per breakpoint. Media queries like @sm, @md, etc., are part of the style rules, not the variant selection logic. ✅ What to do instead: Move your responsive logic into the styles of a single variant: This way, you get a responsive default without trying to apply media queries inside defaultVariants. Hope that clears it up!! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
why can't use responsive styles as a default variant?
the Container component is a great example :
Beta Was this translation helpful? Give feedback.
All reactions