Shell Component
A decorative wrapper around <input> that provides border, focus ring, hover, disabled, invalid states, and supports prefix/suffix icons/text.
Notes
- Base:
.shell. Wraps an <input> with visual styling while keeping input functionality.
- Variants:
shell-subtle, shell-ghost, shell-underline, shell-outline (default).
- Prefer compound variant+color classes like
shell-outline-primary over shell-outline shell-primary.
- Floating placeholder: add
[data-role="placeholder"] and input[placeholder=" "]. Minimum size shell-10 recommended.
- Sizes:
shell-4 ~ shell-15. Width: shell-scale, shell-ratio, shell-full. Layout: shell-v (vertical).
Basic usage
Default shell
With suffix text / icons
Floating placeholder
Basic floating
Sizes
Floating + variant colors
Floating + suffix elements
Floating + full width
Floating + custom colors
Visual variants
shell-subtle
shell-muted
shell-outline
shell-ghost
shell-underline
Theme colors (outline variant)
Primary / Secondary / Tertiary
Success / Error / Info
Highlight / Warning / Caution
Ink / Title / Description / Caption / Disabled
Theme colors + variant compounds
shell-outline-*
shell-muted-*
shell-subtle-*
shell-ghost-*
shell-underline-*
Custom colors
Multiple color formats are supported:
- 1. Theme semantic colors, e.g.
*-error, *-error-hover
- 2. Tailwind built-in colors, e.g.
*-indigo-500
- 3. Raw color values, e.g.
*-[#ff0000]
- 4. CSS named colors, e.g.
*-[red], *-[green]
Outline variant
Subtle variant
Muted variant
Ghost variant
Underline variant
Vertical layout (shell-v)
Sizes (shell-4 ~ shell-15)
16px (shell-4)
20px (shell-5)
24px (shell-6)
28px (shell-7)
32px (shell-8, default)
36px (shell-9)
40px (shell-10)
44px (shell-11)
48px (shell-12)
52px (shell-13)
56px (shell-14)
60px (shell-15)
Shapes
shell-pill
shell-rounded
shell-square
shell-fluid
Width modifiers
shell-scale (fixed)
shell-scale-2 (2x)
shell-ratio (1:1)
shell-ratio-2 (2:1)
shell-full (100%)
State
Combinations
Search with icon + shortcut
With action button
Vertical + icon + button
Variant comparison (primary)
For input (type=text) or textarea utilities, see demo-input.html.