Breakpoints

Our breakpoints are largely modelled after Tailwind's breakpoints, and are mobile-first. Namely, we've added a xs breakpoint for even more control.

screens: {
    'xs': '520px',   // => @media (min-width: 520px) { ... }
    'sm': '640px',   // => @media (min-width: 640px) { ... }
    'md': '768px',   // => @media (min-width: 768px) { ... }
    'lg': '1024px',  // => @media (min-width: 1024px) { ... }
    'xl': '1280px',  // => @media (min-width: 1280px) { ... }
    '2xl': '1536px', // => @media (min-width: 1536px) { ... }
}
Breakpoints - Mobile-first

Desktop-first and single-breakpoint

We include some additional utilities for breakpoints:

Breakpoints - Desktop-first
Breakpoints - md-only

Configuration

You can customise the breakpoints your project uses by configuring the @sgroup/tailwind-base preset.

module.exports = {
   presets: [
       require('@sgroup/tailwind-base')({
           screens: {
               // Custom breakpoints for your project
               xs: 480, sm: 640, md: 768, lg: 1024,
           },
       }),
   ],
};