CSS Input Generator

Style a text field and its focus ring.


The focus style uses box-shadow rather than the browser outline so the ring follows the radius. A visible focus style matters for keyboard users, so the copy keeps it.

Frequently asked questions

Does this style every input?

Only elements with the .field class, so buttons and checkboxes on the same page stay as they are.

What about the placeholder?

Add .field::placeholder { color: #94a3b8; } if you want it lighter than the typed text.