Skip to content
This repository was archived by the owner on Sep 25, 2020. It is now read-only.

tailwindlabs/tailwindcss-plugin-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tailwind CSS Example Plugins

To get started, clone the project and install the dependencies:

# Using npm
npm install

# Using Yarn
yarn

After that, you can process the CSS by running:

# Using npm
npm run build

# Using Yarn
yarn run build

Load up ./index.html in your browser and you're off to the races!

Object-Fit Utilities

In plugins/object-fit/index.js you'll find an example of a plugin that adds a set of simple, non-configurable utility classes for the object-fit property.

The only option it exposes are the variants you'd like to generate (responsive, hover, focus, etc.), which you pass to the plugin as a simple array:

plugins: {
    // ...
    require('./plugins/object-fit')(['responsive']),
}

This is just about the simplest type of plugin you could make.

Simple Buttons

In plugins/simple-buttons/index.js you'll find an example of a plugin that adds new component classes.

About

Examples to help you get started building your own Tailwind CSS plugins.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •