Input

The .glass-input utility class for styling non-input elements with glass form styling.

Use .glass-input when you need input styling on an element that isn’t a standard form input (e.g., a contenteditable div).

Preview

Editable div with glass-input

Usage

<div class="glass-input" contenteditable="true">Editable content</div>
<input class="glass-input" type="text" placeholder="Also works on inputs" />

States

StateBehavior
DefaultFrosted glass with subtle inset shadow
Placeholder--glass-text-muted color
FocusAccent glow ring, brighter background
Disabledopacity: 0.5, cursor: not-allowed

CSS Properties

PropertyValue
Backgroundrgba(255, 255, 255, 0.15) with blur(8px)
Border1px solid var(--glass-border)
Border Radiusvar(--glass-radius-md) (14px)
Padding0.75rem 1rem
FontInherited, 0.95rem
Width100%
Inset Shadowinset 0 1px 2px rgba(0, 0, 0, 0.03)
Focus Ring0 0 0 3px rgba(accent, 0.25) + accent border