Columns

@sgroup/tailwind-plugins/columns

Our grid system is a tiny layer of flexbox utilities, combined with Tailwind's width classes. We add .row and .col classes, which adds:

  • Auto full-width on mobile
  • Sensible defaults for padding (with small/no padding option)
  • Not having to write flex flex-wrap all the time.
Default columns
Small gutters

As usual, you can override padding and other classes at the template level as well.

No gutters

You can also completely use Tailwind classes to achieve the same result.

Tailwind classes

Configuration

Configure the @sgroup/tailwind-plugins/columns plugin using theme options.

theme: {
    column: (theme) => {
        return {
            padding: theme('padding.8'),
        };
    },
},