|
| 1 | +# Tailwind CSS Plugin Filter utilities |
| 2 | + |
| 3 | +This plugins adds some filter utilities to your configuration. Based on the default colors this plugin renders the following utilities for you: |
| 4 | + |
| 5 | +- drop-shadow |
| 6 | + - drop-shadow-{SIZE} |
| 7 | + - sizex: sm, md, lg, xl and 2xl |
| 8 | + - drop-shadow-{COLOR}-{INDEX} |
| 9 | + - Tailwind CSS default colors |
| 10 | +- backdrop-blur |
| 11 | + - Sizes from 1 - 5 |
| 12 | +- blur |
| 13 | + - Sizes from 1 - 5 |
| 14 | + |
| 15 | +The drop shadow utility uses CSS custom properties to make it easier to define your favorite style. |
| 16 | + |
| 17 | +## Install |
| 18 | + |
| 19 | +1. Install the plugin: |
| 20 | + |
| 21 | + ```bash |
| 22 | + # Using npm |
| 23 | + npm install @markusantonwolf/tailwindcss-filters --save-dev |
| 24 | + |
| 25 | + # Using Yarn |
| 26 | + yarn add @markusantonwolf/tailwindcss-filters -D |
| 27 | + ``` |
| 28 | + |
| 29 | +2. Add it to your `tailwind.config.js` file: |
| 30 | + |
| 31 | + ```js |
| 32 | + // tailwind.config.js |
| 33 | + module.exports = { |
| 34 | + // ... |
| 35 | + plugins: [ |
| 36 | + require('@markusantonwolf/tailwindcss-filters') |
| 37 | + ] |
| 38 | + } |
| 39 | + ``` |
| 40 | + |
| 41 | +## Usage |
| 42 | + |
| 43 | +```html |
| 44 | +<div class="drop-shadow drop-shadow-xl drop-shadow-gray-100"></div> |
| 45 | +<div class="backdrop-blur-5"></div> |
| 46 | +<div class="blur-5"></div> |
| 47 | +``` |
| 48 | + |
| 49 | +## Features |
| 50 | + |
| 51 | +- CSS filters: |
| 52 | + - backdrop-filter: blur |
| 53 | + - filter: drop-shadow |
| 54 | + - filter: blur |
| 55 | +- Options: |
| 56 | + - variants: default | ["responsive"] |
| 57 | + - utilities: default | ["drop-shadow","blur","backdrop-blur"] |
| 58 | + |
| 59 | +## Options example |
| 60 | + |
| 61 | +```js |
| 62 | +// tailwind.config.js |
| 63 | +module.exports = { |
| 64 | +// ... |
| 65 | + plugins: [ |
| 66 | + require("@markusantonwolf/tailwindcss-filters")({ |
| 67 | + variants: ["responsive"], |
| 68 | + utilities: ["drop-shadow", "blur", "backdrop-blur"], |
| 69 | + }), |
| 70 | + ] |
| 71 | +} |
| 72 | +``` |
| 73 | + |
| 74 | +## Licence |
| 75 | + |
| 76 | +Tailwind CSS Plugin Filter utilities is released under the [MIT license](https://github.com/markusantonwolf/tailwindcss-filters/blob/master/licence.md) & supports modern environments. |
| 77 | + |
| 78 | +## Copyright |
| 79 | + |
| 80 | +© 2020 Markus A. Wolf |
| 81 | +<https://www.markusantonwolf.com> |
0 commit comments