-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Box does not accept variants in theme #2456
Comments
Hi @hutber, Box is a generic component and cannot accept variant in theme. I'd recommend that you create a wrapper component and use the You can also consider using the layer and text styles described here: https://next.chakra-ui.com/docs/features/text-and-layer-styles |
On a sidenote, you have version mismatching going on there: "@chakra-ui/color-mode": "^1.0.0-next.3",
"@chakra-ui/core": "^1.0.0-rc.7",
"@chakra-ui/media-query": "^1.0.0-rc.7", they should all be on the same version, notably |
Thank you guys, it would be great if there was a list of items that weren't styleable? |
|
And |
I know this is closed, but it would be great to throw an error or warning on this. I spun on this for a bit trying to debug before I did the trusty Google search. 🤷♂️ |
Is this a technical limitation @segunadebayo? Because from an API design perspective, I think it's confusing. My use case: I want to create a card, and I think a div/Box is the most relevant element from ChakraUI. Any alternative that you'd recommend? |
FWIW the links from Segun's comment were broken when I tried to access them, but these appear to be the corresponding URLs for the current documentation: |
Currently it seems I am unable to use a
variant
on the Box component. I believe this is not meant to be the case?Output:
Versions:
Theme:
Output:
The text was updated successfully, but these errors were encountered: