01 — Buttons

Neumorphic Button

The foundational neumorphic pattern. Button is the same color as the background — only paired shadows (light top-left, dark bottom-right) give it shape. On :active, both shadows move inside for a pressed look.

paired box-shadow + :active inset BUTTON
<button class="neu-btn">Click me</button>

<!-- Must sit on the SAME background color -->
<body style="background: #e0e5ec">
02 — Buttons

Icon Button

A round variant for navigation or controls. Uses the same shadow pairing as the text button — the circular shape makes the extrusion read especially well.

round neumorphic + icon BUTTON
<button class="neu-icon" aria-label="play">
  <i class="ph-fill ph-play"></i>
</button>
03 — Buttons

Toggle Button

A button that stays "pressed" after you click — for binary on/off states like bold/italic in a toolbar. Uses :has(input:checked) to flip between raised and inset shadows.

checkbox + :has() + inset shadows BUTTON
<label class="neu-toggle-btn">
  <input type="checkbox"/>
  Bold
</label>
04 — Inputs

Text Field

Inputs go the other way — they're recessed. Starting from the raised button and moving both shadows inside gives a pocket-like indent. On focus, add an accent ring.

inset shadows = pocket / recessed look INPUT
<input class="neu-input" placeholder="Your name"/>
06 — Inputs

Slider

Track is a recessed pill, fill is a gradient, and the thumb is a raised circle. The contrast between inset track and raised thumb is what gives the slider its "real" feel.

inset track + gradient fill + raised thumb INPUT
<div class="neu-slider">
  <div class="fill"></div>
  <div class="thumb"></div>
</div>
07 — Toggles

Switch

Track is recessed. Thumb is raised, slides right, and tints to the accent color when checked. Same underlying formula as the slider — this time the "thumb" does all the work.

inset track + raised thumb + :checked TOGGLE
<label class="neu-switch">
  <input type="checkbox"/>
  <span class="track"></span>
  <span class="thumb"></span>
</label>
08 — Toggles

Checkbox

Recessed square. When checked, an SVG tick draws itself in using stroke-dashoffset. Keeps the minimal neumorphic silhouette even when active.

inset box + SVG tick draw TOGGLE
<label class="neu-check">
  <input type="checkbox"/>
  <span class="box">
    <svg class="tick" viewBox="0 0 14 14">
      <polyline points="1.5 7 6 11 13 3"/>
    </svg>
  </span>
  Remember me
</label>
09 — Toggles

Radio

An inset circle with a small raised dot inside when selected. The dot pops in with a spring scale for feedback.

inset circle + raised dot + scale pop TOGGLE
<label class="neu-radio">
  <input type="radio" name="plan"/>
  <span class="outer"><span class="dot"></span></span>
  Pro
</label>
10 — Containers

Card

A soft container — the button pattern scaled up. Use generous padding + larger border-radius and slightly deeper shadows so the card reads as a distinct elevated surface.

raised box-shadow on a padded div CARD

Weekly Summary

Your productivity is up 12% this week. Keep the streak going.

<div class="neu-card">
  <h4>Weekly Summary</h4>
  <p>Your productivity is up 12%...</p>
  <div class="card-row">
    <button class="neu-btn">View report</button>
    <label class="neu-switch">...</label>
  </div>
</div>
11 — Containers

Stat Tile

Classic dashboard tile: the outer shell is raised, the ring (circular "bezel") inside is recessed. A little like a pressed-in badge — useful for KPIs or rankings.

nested raised + inset circles CARD
A+
92%
Credit Score
42
$1,280
Saved This Month
7d
18.4 km
Weekly Run
<div class="neu-stat">
  <div class="ring">A+</div>
  <div class="val">92%</div>
  <div class="lbl">Credit Score</div>
</div>
12 — Containers

Mini Player

A composite that uses most of the patterns in this lab — raised card, raised cover, inset progress bar, raised icon buttons. Shows how neumorphic pieces combine into a real-looking UI.

card + cover + progress + icon buttons COMPOSITE
Golden Hour
The Morning Light
<div class="neu-player">
  <div class="cover"></div>
  <div class="title">Golden Hour</div>
  <div class="artist">The Morning Light</div>
  <div class="progress"><div class="progress-fill"></div></div>
  <div class="controls">
    <button class="neu-icon"><i class="ph-fill ph-skip-back"></i></button>
    <button class="neu-icon main"><i class="ph-fill ph-play"></i></button>
    <button class="neu-icon"><i class="ph-fill ph-skip-forward"></i></button>
  </div>
</div>