Support variant styles
See original GitHub issueFrom what I can tell dessert-box doesn’t support variant styles yet, and I think it would be a great addition.
The API I’m looking for is something like
// Button
<Button variant="primary">Call to action</Button>
<Button variant="tertiary">Cancel</Button>
// Text
<Text variant="h1">Lorem ipsum dolor</Text>
<Text variant="h3">Lorem ipsum dolor sit amet</Text>
The variant prop would need to be able to set multiple style properties, e.g. setting variant=primary could change fontSize, backgroundColor etc
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Difference between core styles and variants
Core styles include color, shape and form, typography, and imagery. Variants. Variants are a different version of the theme, usually different ...
Read more >font-variant - CSS: Cascading Style Sheets - MDN Web Docs
The font-variant CSS shorthand property allows you to set all the font variants for a font.
Read more >Support product variants - Shopify.dev
Support product variants. Products can be broken up into a maximum of three options, and a single combination of those options is a...
Read more >How to use the Variants Style add-on - EcomSolid Help Center
In this article, we will take a deep dive into the Variants Style add-on and how it enables you to customize your product...
Read more >Create and use variants - Figma Help Center
As you create components and build out your design system, you'll find the need for components that are similar to each other, with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@tmm @graup @alexandernanberg so as
@vanilla-extract/recipeswas released, that does provide a great API for variants when using vanilla extract. So with that in mind thecreateVariantsAPI was removed, and instead I documented how to use this library with recipes:https://github.com/TheMightyPenguin/dessert-box#variants
I’ll be documenting more patterns, and common use cases in the README!
Awesome, @graup @tmm thanks for the feedback, expect a new release over the upcoming weekend 🙌