Form field

Input with a label that floats up when you type or focus.

CSS onlyFloating label
BackgroundGridAccent

Corners

SharpDefaultRound

Shadow

NoneNoneStrong

Motion

NoneDefaultBounce
<style>
.ux-field{position:relative;width:100%;max-width:250px;font-family:system-ui}
.ux-field input{width:100%;height:56px;padding:20px 14px 6px;border:1.5px solid var(--line,#cfd2da);border-radius:calc(12px * var(--r,1));background:transparent;color:var(--fg,#14151a);font-size:16px;outline:0;transition:border-color var(--dur,.15s) var(--ease,ease),box-shadow var(--dur,.15s) var(--ease,ease)}
.ux-field label{position:absolute;left:15px;top:17px;color:var(--muted,#6b6f7b);font-size:16px;pointer-events:none;transition:all var(--dur,.15s) var(--ease,ease)}
.ux-field input:focus{border-color:var(--accent,#cc4a26);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent,#cc4a26) 18%,transparent)}
.ux-field input:focus+label,.ux-field input:not(:placeholder-shown)+label{top:8px;font-size:12px;color:var(--accent,#cc4a26)}
</style>

<div class="ux-field">
  <input id="ux-email" type="email" placeholder=" ">
  <label for="ux-email">Email address</label>
</div>

When to use it

Use this inside a form where people type or paste information. It should feel at home next to your other fields, with the same spacing and focus style.

Accessibility

Check that it reaches every state with the keyboard alone before you ship it, and keep the focus ring instead of removing it for looks. It has no JavaScript dependency, so it keeps working if a script fails to load, and it is built on native form controls or semantics rather than divs pretending to be one. Colors are read from CSS custom properties, so they follow your light or dark theme and you can raise contrast globally without touching this component.