How to Remove Arrow on Input type Number with Tailwind CSS

Viewed 10710

i have an input type number, and i want to remove the arrow by default, how can i do that with tailwindCSS, i look for it and found nothing to solve the problem.

 input type="number" placeholder="Numéro de téléphone" className="border p-4 outline-none"
3 Answers

So i found the solution for this -> On your global.css you have to add

@layer base {
  input[type="number"]::-webkit-inner-spin-button,
  input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
}
<input type="number" placeholder="Numéro de téléphone" className="border p-4
outline-none appearance-none" />

this with tailwind here a link you can look on it tailwind

and with normal css :

<style>
  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
</style>
<input
  type="number"
  placeholder="Numéro de téléphone"
  className="border p-4
  outline-none"
/>
Related