Skip to main content

Modal Sizing

路 One min read
Josh Weaver
Mainsail UI Core Team

Modal sizing is primarily controlled by content. This means you only need to concern yourself with the size of the body. As such, it includes an optional prop called bodyWidth (and bodyHeight though rarely needed) that supports passing an array of sizes in for the 3 breakpoints we use in our app.

鈿★笍 See a demo of a responsive Modal setup here on Stackblitz.

Icon Coloring Tip

路 One min read
Josh Weaver
Mainsail UI Core Team

When using the new <Icon /> from Mainsail-ui, you may find a special edge case that needs a different color than the 3 blues available from the color prop.

You're in luck, because className works as an escape hatch with our CSS Utility Class colors for text.

// Only offers 3 choices (light, default, dark), that cover most implementations<Icon color="light" name="delete"/>
// Use a css utility class instead, will override the svg's color<Icon className="text-red-dark" name="delete"/>

Because sometimes you just need a red trash can.