Skip to main content

Variant backgrounds and grids for themes and breakpoints

  • May 12, 2022
  • 1 reply
  • 612 views

Hoby-Van-Hoose

I’ve been using variants for 2 things a lot lately and it would be nice to get built in support to make these display/organize easier:

  1. Themes - showing various background colors
  2. Responsive breakpoints - showing different grids

Since variants always show up in a container, supporting these uses isn’t so easy.

For themes what I do is put all of the (for example) “dark” variants on the end of the variant frame that I’ve added a gradient background to, that shows one side as clear and the other side as the dark background color. This can work for simple individual components but when it comes to something like a big icon library, that would be a time consuming nightmare to lay out by hand. For those, I’ve avoided variants entirely and kept them as separate components for this reason. Otherwise I’d prefer to use variants.
Screen Shot 2022-05-11 at 5.53.15 PM

For responsive breakpoints, what I’ve been doing is setting a grid for desktop in either the component frame outside the variants or a parent frame outside all of that. This lets me see the desktop grid but doesn’t allow me to see the smaller screen grids for those variants.

This topic has been closed for comments

1 reply

  • 0 replies
  • August 10, 2022

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings