To customize the placeholder appearance, you can utilize the Tailwind placeholder:
pseudo-class feature (refer to: https://tailwindcss.com/docs/hover-focus-and-other-states#placeholder-text ).
Although direct padding and margin adjustments do not seem to affect the placeholder directly, classes like placeholder:text-gray-500
will still take effect. It might be more suitable to add padding to the input field itself (pl-[14px]
), especially since user-generated text will replace the placeholder eventually.
<input className="placeholder:text-gray-500 pl-[14px] focus:outline-none border border-gray-500 rounded-xl h-12 w-160" type="text" name="name" placeholder="পুরাতন পাসওয়ার্ড দিন" />
For a live example that you can experiment with, check out this link: https://play.tailwindcss.com/v7HJ30jXga