Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bly-th/tailwind-custom-utilities


https://github.com/bly-th/tailwind-custom-utilities

Last synced: 8 days ago
JSON representation

Awesome Lists containing this project

README

        

# tailwind-custom-utilities

> Generates custom utility classes

Install the plugin from npm:

```
$ npm install tailwind-custom-utilities
```

Then add the plugin to your `tailwind.config.js` file:

```js
// tailwind.config.js
module.exports = {
theme: {
// ...
// Optional. Your plugin might not have any options at all.
customUtilities: {
// ...
YOUR_PLUGIN_CUSTOM_OPTION: true,
// ...
},
},
variants: {
// ...
// Optional. Your plugin might not have any variants at all.
customUtilities: ['responsive'],
// ...
},
plugins: [
// ...
require('tailwind-custom-utilities'),
// ...
],
};
```

This plugin will generate following CSS:

```css
/* ... */
.example-utility-class {
display: block;
}

.custom-utility-class {
background-color: red;
}
/* ... */
```

## License

tailwind-custom-utilities is licensed under the MIT License.

## Credits

Created with [create-tailwind-plugin](https://github.com/Landish/create-tailwind-plugin).