Skip to content

Instantly share code, notes, and snippets.

@sadiqsalau
Last active March 8, 2026 03:15
Show Gist options
  • Select an option

  • Save sadiqsalau/0469f83f1f7df1aa492856c5472ebf6f to your computer and use it in GitHub Desktop.

Select an option

Save sadiqsalau/0469f83f1f7df1aa492856c5472ebf6f to your computer and use it in GitHub Desktop.
TailwindCSS autofill override
<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