Last active
March 8, 2026 03:15
-
-
Save sadiqsalau/0469f83f1f7df1aa492856c5472ebf6f to your computer and use it in GitHub Desktop.
TailwindCSS autofill override
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <input | |
| {...props} | |
| className={cn( | |
| "w-full", | |
| "bg-neutral-900", | |
| "px-3 py-2 rounded-xl", | |
| "outline-0", | |
| "read-only:opacity-60", | |
| "disabled:opacity-60", | |
| "focus:ring-2 focus:ring-blue-400", | |
| /* Autofill Styles - Source - https://stackoverflow.com/a/14205976*/ | |
| "autofill:bg-clip-text autofill:caret-white", | |
| "autofill:inset-ring-30 autofill:inset-ring-neutral-900", | |
| "autofill:[-webkit-text-fill-color:var(--color-white)]", | |
| props.className, | |
| )} | |
| /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment