Skip to main content

Breakpoints - Responsive

Breakpoints define the points at which your interface should adapt to different screen sizes. They are essential for achieving a truly responsive experience across all devices.

  • Breakpoints allow you to adjust the layout based on the available width, activating specific styles as the viewport grows. They are the foundation for building interfaces that look good on mobiles, tablets, and desktops.
  • Mobile first: We use @media queries with min-width to apply conditional styles from a minimum size upwards. This follows the mobile-first philosophy, where you start with a simple base for mobiles and progressively enhance it.

Available Breakpoints

BreakpointPrefixDimensionpx
Mobile< 30 rem< 480 px
Smallsm> 30 rem> 480 px
Mediummd> 48 rem> 768 px
Largelg> 62 rem> 992 px
Extra largexl> 80 rem> 1280 px
Extra extra largexxl> 96 rem> 1536 px

Responsive

The helpers that use breakpoints are as follows:

Display

Examples

ClassDescription
.md:is-hidden
Hides the element (display: none) for screens larger than md.
is-hidden .sm:is-flex
Hides the element for mobile screens and makes it a flex container (display: flex) for screens larger than md.

Spaces

Examples

ClassDescription
.sm:pt-2
Adds a padding-top of space 2 when the screen is larger than sm.
pb-3 .lg:pb-2
Adds a padding-bottom of space 3 for mobile screens and sets the padding-bottom to space 2 when the screen is larger than lg.

Flex columns

Examples

ClassDescription
.md:is-col-6
Sets the component's width to a 6/12 ratio for screens larger than md.
.is-col-12 .md:is-col-4
Sets the component's width to a 12/12 ratio (i.e., 100%) for mobile screens and a 4/12 ratio when the screen is larger than md.