npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

tailwindcss-gitter

v1.0.0

Published

Gitter Plugin for tailwindcss

Readme

Gitter

Plugin for Tailwind CSS

This Tailwind CSS plugin adds additional utility classes for a fluid response grid system to facilitate the positioning and alignment of content and design elements. The number of columns can be configured for each breakpoint, respectively.

In contrary to common grid systems like the Bootstrap grid, Gitter cols have a fixed width according to the screen size and are independent of the width of their parent element.

Installation

Gitter is part of the npm registry and can be installed using npm or yarn:

npm install tailwindcss-gitter

or

yarn add tailwindcss-gitter

Then you can require the plugin in your Tailwind config:

plugins: [
  require('tailwindcss-gitter')
]

Introduction

Gitter divides the available space of the screen into a predefined number of columns of equal width:

Each column has a defined left and right padding. This padding is referred to as gutter:

This gutter ensures, that there is a gab between the contents of two adjacent columns:

Additionally, there is an extra padding before the first and after the last column, to ensure, that all content on the page has at least one gutter width of distance to the edges of the screen (or browser window):

The gutter can be handled with Tailwind CSSs default utility classes for horizontal padding. The extra padding outside of the section can be configured in the gitter tailwind settings (outerGutter).

The number of columns can vary between different projects. However, it can also differ between screen sizes. For example a display with a width of 320 pixels could have six columns:

while from a width of 800 pixels, the number of columns could be twelve:

The previous illustrations would indicate, that the grid always spans across 100% of the available space and fill out the whole viewport. This assumption is true, up to a certain point. For large screens, there is often need for a maximum width for the content area, which is typically centered on the screen. The default value for the maximum content width is 1440 pixels:

In this case the grid is supposed to be used inside this area. The default number of columns for screens is 24:

Usage

Section Utility

Many layouts will have a maximum content width, where the content area has a width of 100% (minus the outer gutter) on smaller devices and a fixed with of e.g. 1440px for screens bigger than that. This is the exact use case of a Section. A Section is created by using the section utility class on an html-element. The element will than have the max-width defined for the project or a width of 100%, if the viewport is smaller than the defined max-width. If the section should have a padding is up to you to define using Tailwinds padding utilities.

By default a Section is not centered. To get a centered Section, just use the Tailwind CSS default utility mx-auto:

Column Utilities

Per default Gitter will generate 24 utility classes for specifying the width of elements according to the configured grid:

| Utility | Description | |----------|-----------------------------------------------------| | w-col-1 | The width of the element should be 1 of 24 columns | | w-col-2 | The width of the element should be 2 of 24 columns | | w-col-3 | The width of the element should be 3 of 24 columns | | ... | ... | | w-col-24 | The width of the element should be 24 of 24 columns |

If costum responsiveCols are defined additional classes prefixed with the specified breakpoints will be genereated (using media queries).

Settings

Gitter offers various configurations to adapt to the needs of different projects:

| Setting | Default | Description | |-----------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | cols | 24 | Defines the default number of columns (if no breakpoints are specified). | | responsiveCols | {} | Allows to define different amount of columns for specific breakpoints. The key must correlate with a breakpoint defined in Tailwind CSS and the value is the number of cols. | | outerGutter | 1rem | Defines the spacing between the browser window and the section width. | | sectionMaxWidth | 1440px | Defines the maximum width for a section. If set to false, section will have no max-width. |

Custom settings

Example config using a different number of cols on mobile and desktop:

// tailwind.config.js

module.exports = {
  ...
  theme: {
    ...
    gitter: {
      cols: 24,
      responsiveCols: {
        xs: '6',
        lg: '24'
      },
      outerGutter: '1rem',
      sectionMaxWidth: false
    }
  }
};

With this configuration, the following classes will be generated in addition to the default column utilities:

| Utility | Description | |-------------|-----------------------------------------------------| | xs:w-col-1 | The width of the element should be 1 of 6 columns | | xs:w-col-2 | The width of the element should be 2 of 6 columns | | xs:w-col-3 | The width of the element should be 3 of 6 columns | | ... | ... | | xs:w-col-6 | The width of the element should be 6 of 6 columns | | | | | lg:w-col-1 | The width of the element should be 1 of 24 columns | | lg:w-col-2 | The width of the element should be 2 of 24 columns | | lg:w-col-3 | The width of the element should be 3 of 24 columns | | ... | ... | | lg:w-col-24 | The width of the element should be 24 of 24 columns |

Default config

If no custom settings are defined, Gitter defaults to the following values:

{
  cols: 24,
  responsiveCols: {},
  outerGutter: '1rem',
  sectionMaxWidth: '1440px',
}