1.0.0 • Published 1 year ago

tailwind-plugin-type-number-reset v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

jcaillot/tailwind-plugin-type-number-reset

A Tailwind plugin for removing inputtype=number increment arrows

Installation

Install the plugin from npm:

npm install -D tailwind-plugin-type-number-reset

or

yarn add -D tailwind-plugin-type-number-reset

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

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

Examples

Standard input type number with increment arrows:

Safari:

Before in Safari

Firefox:

Before in Firefox

After, using type-number-reset plugin:

After in Safari

Basic usage

<input type="number"
       min="0"
       class="
          w-24 
          rounded 
          type-number-reset"
       value="10"/>

Note: the field is still an input type number. The keyboard up and down arrows still increment the input value.

How to run test

jest --coverage

Licence

This project is licensed under the MIT License.

Authors

1.0.0

1 year ago