Where the session should start.

Enter a valid email address.

<div class="field">
  <label class="label" for="url">Website</label>
  <input class="input" id="url" placeholder="https://example.com" />
  <p class="field-hint">Where the session should start.</p>
</div>

Spec

Part Value
.input 32px tall, 10px radius, 1px input border, transparent fill (a faint white tint in dark), 10px side padding
.textarea Same, 80px minimum height, 6px vertical padding, resizes vertically
.select Same height and border on the page colour, with a muted up-down chevron on the right. Works on a native <select> or a headless select's trigger
Text 16px on touch screens (stops mobile zoom), 14px from 768px up
Placeholder muted-foreground
.label 14px medium. Wraps checkboxes and switches with a 6px gap
.field A grid with 8px between label, control and hint
.field-hint / .field-error 14px, muted or destructive

States

State Trigger Look
Focus :focus-visible Border turns ring, plus the 3px half-strength ring
Invalid aria-invalid="true" Destructive border and a 20% destructive ring. Pair with a .field-error message
Disabled disabled 50% opacity, a faint input fill, not-allowed cursor

Checkbox and switch

  • .checkbox on <input type="checkbox">: 16px, 6px radius, input border. Checked or indeterminate fills with primary.
  • .switch on <input type="checkbox" role="switch"> or <button role="switch" aria-checked>: a 36×20px pill on input, with a 16px thumb in card. On turns the track primary and slides the thumb over 200ms on ease-out-strong.

Rules

  • Settings that need no validation apply on change, with no Save button.
  • Errors say what to do: "Enter a valid email address", not "Invalid input".
sesan.studio