Reset Number Input

Removes the arrows from number inputs.

Class
Properties
reset-number-input
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
-moz-appearance: textfield;
}

Usage

Single import

// tailwind.config.js
 
import { resetNumberInput } from "tailwindcss-addons"
 
export default {
    plugins: [resetNumberInput()],
}

Multi import

// tailwind.config.js
 
import { allAddons } from "tailwindcss-addons"
 
export default {
    plugins: [
        ...allAddons({
            resetNumberInput: false, // Enabled by default.
        }),
    ],
}

Options

function resetNumberInput(options?: { base?: boolean })

base

If set to true the reset-number-input class gets included in the base styles as:

input[type="number"] {
    @apply reset-number-input;
}
Return to top