How to use variants with Box, Flex, etc.? #2011
-
Looking at the docs here: https://theme-ui.com/components/variants It says:
But it does not specify how to use Using the How do you define variants for |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Ah, we should totally make this clearer! If there's no theme key, that means you can use any variant from anywhere in the theme, but it needs a category prefix. E.g. you can write |
Beta Was this translation helpful? Give feedback.
Ah, we should totally make this clearer! If there's no theme key, that means you can use any variant from anywhere in the theme, but it needs a category prefix. E.g. you can write
<Grid variant="cards.sunken"
to make a Grid look like a Card, orvariant="layout.container"
to add Container's styling. (See the former in use here.)