Combine multiple variants/modifiers
See original GitHub issueThe option to use multiple variants / modifiers has been discussed at length on theme-ui. However, to my understanding, this hasn’t been implemented anywhere yet. While I like to stay within the theme-ui spec for this library, I’m not sure if it’s worth waiting for an implementation on their end.
I think this issue could serve as a way to think through the best way to do multiple variants (or modifiers) on components. An array syntax is a bit tricky, since it’s already used for responsive styles. An alternative could be comma-separated strings, but it’s not pretty, and there’s no type support there (unless we use some intense TS 4.1 template literals.)
Related discussions from theme UI: https://github.com/system-ui/theme-ui/issues/403
Since we’re considering building opinionated UI libraries on top of Dripsy, this seems like essential functionality to avoid tons of boilerplate.
To illustrate the need, consider the difficulty of building all the buttons on this page with multiple modifiers vs. without: https://react.geist-ui.dev/en-us/components/button
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (7 by maintainers)

Top Related StackOverflow Question
This is published, been working with it so far and I really like it. I don’t really use responsive styles in variants to begin with, but even so, the array syntax is pretty easy to understand.
Sweet definitely have to try this out when I get the chance.