tailwind-plugin-progress-variant

1.0.1 • Public • Published

jcaillot/tailwind-plugin-progress-variant

A TailwindCSS plugin for adding a progress bar variant

Static Badge

GitHub

Installation

Install the plugin from npm:

npm install -D tailwind-plugin-progress-variant

or

yarn add -D tailwind-plugin-progress-variant

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

// tailwind.config.js
module.exports = {
  theme: {
    // ...
  },
  plugins: [
    require('tailwind-plugin-progress-variant'),
    // ...
  ],
}

Examples

Default HTML progress in Chrome:

default

After Tailwind CSS reset:

reset

After adding custom TW classes using progress variant:

style

Basic usage

<progress
  max="100"
  value="40"
  aria-label="completion"
  class="
            w-1/2
            h-[32px]
            
            progress-bar:bg-amber-100
            progress-bar:rounded-r-full
            progress-bar:shadow-inner

            progress-value:bg-gradient-to-r from-indigo-500 from-10% via-sky-500 via-30% to-emerald-500 to-90%
            progress-value:rounded-r-full
    "
>40%
</progress>

Note: Text placed between the element's tags is not an accessible label, it is only recommended as a fallback for old browsers that do not support this element.

How to run test

jest --coverage

Licence

This project is licensed under the MIT License.

Authors

Readme

Keywords

none

Package Sidebar

Install

npm i tailwind-plugin-progress-variant

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

142 kB

Total Files

13

Last publish

Collaborators

  • jcaillot