tailwind-plugin-type-number-reset

1.0.0 • Public • Published

jcaillot/tailwind-plugin-type-number-reset

A Tailwind plugin for removing input[type=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

Readme

Keywords

none

Package Sidebar

Install

npm i tailwind-plugin-type-number-reset

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

8.66 kB

Total Files

11

Last publish

Collaborators

  • jcaillot