```
**CSS:**
```css
.ld-20,.ld-20 *,.ld-20 *::before,.ld-20 *::after{box-sizing:border-box;margin:0;padding:0}
.ld-20{
--bg:#0a0012;--c1:#e040fb;--c2:#7c4dff;--c3:#40c4ff;--c4:#64ffda;--c5:#ff6d00;
background:var(--bg);display:flex;align-items:center;justify-content:center;min-height:100vh;font-family:'Segoe UI',sans-serif;
}
.ld-20__stage{display:flex;gap:80px;flex-wrap:wrap;justify-content:center;padding:40px;align-items:center}
.ld-20__cell{display:flex;flex-direction:column;align-items:center;gap:24px}
.ld-20__label{color:rgba(255,255,255,.3);font-size:11px;letter-spacing:1.5px;text-transform:uppercase}
/* Radial burst */
.ld-20__burst{width:80px;height:80px;position:relative;display:flex;align-items:center;justify-content:center}
.ld-20__burst span{position:absolute;width:6px;height:6px;border-radius:50%;animation:ld-20-burst 1.5s ease-in-out infinite}
.ld-20__burst span:nth-child(1){background:var(--c1);animation-delay:0s;transform-origin:40px 40px;top:37px;left:37px}
.ld-20__burst span:nth-child(2){background:var(--c2);animation-delay:.1s;transform-origin:40px 40px;top:37px;left:37px}
.ld-20__burst span:nth-child(3){background:var(--c3);animation-delay:.2s;transform-origin:40px 40px;top:37px;left:37px}
.ld-20__burst span:nth-child(4){background:var(--c4);animation-delay:.3s;transform-origin:40px 40px;top:37px;left:37px}
.ld-20__burst span:nth-child(5){background:var(--c5);animation-delay:.4s;transform-origin:40px 40px;top:37px;left:37px}
.ld-20__burst span:nth-child(6){background:var(--c1);animation-delay:.5s;transform-origin:40px 40px;top:37px;left:37px}
.ld-20__burst span:nth-child(7){background:var(--c2);animation-delay:.6s;transform-origin:40px 40px;top:37px;left:37px}
.ld-20__burst span:nth-child(8){background:var(--c3);animation-delay:.7s;transform-origin:40px 40px;top:37px;left:37px}
@keyframes ld-20-burst{
0%{transform:rotate(calc(var(--r,0)*45deg)) translateY(0);opacity:1;width:6px;height:6px}
80%{opacity:.6}
100%{transform:rotate(calc(var(--r,0)*45deg)) translateY(-34px);opacity:0;width:3px;height:3px}
}
.ld-20__burst span:nth-child(1){--r:0}
.ld-20__burst span:nth-child(2){--r:1}
.ld-20__burst span:nth-child(3){--r:2}
.ld-20__burst span:nth-child(4){--r:3}
.ld-20__burst span:nth-child(5){--r:4}
.ld-20__burst span:nth-child(6){--r:5}
.ld-20__burst span:nth-child(7){--r:6}
.ld-20__burst span:nth-child(8){--r:7}
.ld-20__burst-core{width:12px;height:12px;border-radius:50%;background:var(--c1);box-shadow:0 0 12px var(--c1),0 0 24px rgba(224,64,251,.4);animation:ld-20-core 1.5s ease-in-out infinite}
@keyframes ld-20-core{0%,100%{transform:scale(.8);opacity:.7}50%{transform:scale(1.2);opacity:1}}
/* Floating particles */
.ld-20__float{width:80px;height:80px;position:relative}
.ld-20__float span{position:absolute;border-radius:50%;animation:ld-20-float linear infinite}
.ld-20__float span:nth-child(1){width:8px;height:8px;background:var(--c1);left:10px;top:60px;animation-duration:2s;animation-delay:0s}
.ld-20__float span:nth-child(2){width:5px;height:5px;background:var(--c3);left:35px;top:65px;animation-duration:2.5s;animation-delay:.3s}
.ld-20__float span:nth-child(3){width:7px;height:7px;background:var(--c4);left:55px;top:62px;animation-duration:1.8s;animation-delay:.6s}
.ld-20__float span:nth-child(4){width:4px;height:4px;background:var(--c2);left:20px;top:70px;animation-duration:2.2s;animation-delay:.9s}
.ld-20__float span:nth-child(5){width:6px;height:6px;background:var(--c5);left:45px;top:68px;animation-duration:1.6s;animation-delay:1.2s}
@keyframes ld-20-float{0%{transform:translateY(0) scale(1);opacity:1}100%{transform:translateY(-80px) scale(0);opacity:0}}
/* Starburst */
.ld-20__star{width:80px;height:80px;position:relative;display:flex;align-items:center;justify-content:center}
.ld-20__star-arm{position:absolute;width:3px;height:30px;border-radius:2px;transform-origin:50% 100%;bottom:50%;left:calc(50% - 1.5px);animation:ld-20-star-arm 2s ease-in-out infinite}
.ld-20__star-arm:nth-child(1){transform:rotate(0deg);background:var(--c1);animation-delay:0s}
.ld-20__star-arm:nth-child(2){transform:rotate(30deg);background:var(--c2);animation-delay:.17s}
.ld-20__star-arm:nth-child(3){transform:rotate(60deg);background:var(--c3);animation-delay:.33s}
.ld-20__star-arm:nth-child(4){transform:rotate(90deg);background:var(--c4);animation-delay:.5s}
.ld-20__star-arm:nth-child(5){transform:rotate(120deg);background:var(--c5);animation-delay:.67s}
.ld-20__star-arm:nth-child(6){transform:rotate(150deg);background:var(--c1);animation-delay:.83s}
.ld-20__star-arm:nth-child(7){transform:rotate(180deg);background:var(--c2);animation-delay:1s}
.ld-20__star-arm:nth-child(8){transform:rotate(210deg);background:var(--c3);animation-delay:1.17s}
.ld-20__star-arm:nth-child(9){transform:rotate(240deg);background:var(--c4);animation-delay:1.33s}
.ld-20__star-arm:nth-child(10){transform:rotate(270deg);background:var(--c5);animation-delay:1.5s}
.ld-20__star-arm:nth-child(11){transform:rotate(300deg);background:var(--c1);animation-delay:1.67s}
.ld-20__star-arm:nth-child(12){transform:rotate(330deg);background:var(--c2);animation-delay:1.83s}
@keyframes ld-20-star-arm{0%,100%{opacity:.2;height:14px}50%{opacity:1;height:30px;box-shadow:0 -6px 8px currentColor}}
@media(prefers-reduced-motion:reduce){
.ld-20__burst span,.ld-20__burst-core,.ld-20__float span,.ld-20__star-arm{animation:none}
}
```
---
## 15 Pure CSS Loading Animations
URL: https://codefronts.com/motion/css-loading-animations/
Description: 15 hand-coded CSS loading animations — DNA helix, liquid blob, orbit system, neon ring, hourglass flip, listing skeleton, building loader and more. Pure CSS, drop-in ready.
Demo count: 15
### 01. House Unlock
**Type:** CSS + JS
**Description:** A closed-front-door loader for property sites. The window stays dark while the key turns; once "loaded" (the .ready class is added), the window glows warm gold and the door opens to reveal a softly-lit room. Ideal as a real-estate page-load cover.
**HTML:**
```html
Unlocking your tour…
```
**CSS:**
```css
.hu-stage {
display: grid;
place-items: center;
padding: 24px;
background:
radial-gradient(60% 60% at 50% 100%, rgba(212, 175, 55, 0.1) 0%, transparent 70%),
linear-gradient(180deg, #14132b 0%, #0b0b1a 100%);
border-radius: 16px;
width: 220px;
height: 220px;
}
.hu-house {
position: relative;
width: 132px;
height: 152px;
margin: 0;
padding: 0;
font-family: system-ui, sans-serif;
}
.hu-roof {
position: absolute;
top: 0;
left: 50%;
width: 0;
height: 0;
border: 30px solid transparent;
border-bottom-color: #d4af37;
transform: translateX(-50%);
filter: drop-shadow(0 4px 10px rgba(212, 175, 55, 0.25));
}
.hu-body {
position: absolute;
top: 56px;
left: 6px;
width: 120px;
height: 86px;
background: linear-gradient(180deg, #f5f0e6 0%, #e8e0d0 100%);
border-radius: 4px 4px 6px 6px;
box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.55);
overflow: hidden;
}
.hu-floor {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 6px;
background: #2a1f1a;
}
.hu-window {
position: absolute;
top: 14px;
left: 14px;
width: 36px;
height: 28px;
border: 2px solid #d4af37;
border-radius: 3px;
background: #0a0a14;
overflow: hidden;
transition:
background 0.6s ease,
box-shadow 0.6s ease;
}
.hu-window::before,
.hu-window::after {
content: "";
position: absolute;
background: #d4af37;
}
.hu-window::before {
top: 0;
bottom: 0;
left: 50%;
width: 1.5px;
transform: translateX(-50%);
}
.hu-window::after {
left: 0;
right: 0;
top: 50%;
height: 1.5px;
transform: translateY(-50%);
}
.hu-window-glass {
position: absolute;
inset: 0;
background: radial-gradient(circle at 50% 70%, #ffd479 0%, #d4af37 50%, transparent 75%);
opacity: 0;
transform: scale(0.7);
transition:
opacity 0.7s ease,
transform 0.7s ease;
}
.hu-door {
position: absolute;
bottom: 6px;
left: 50%;
width: 38px;
height: 60px;
margin-left: -19px;
background: linear-gradient(180deg, #6b3f2a 0%, #4a2d1f 100%);
border-radius: 5px 5px 0 0;
border: 1px solid rgba(0, 0, 0, 0.4);
transform-origin: left center;
transform: rotateY(0deg);
transition: transform 0.85s cubic-bezier(0.5, 0, 0.3, 1.2);
box-shadow: inset -2px 0 0 rgba(255, 255, 255, 0.04);
}
.hu-door-handle {
position: absolute;
right: 5px;
top: 50%;
width: 5px;
height: 5px;
margin-top: -2.5px;
background: #d4af37;
border-radius: 50%;
box-shadow: 0 0 6px rgba(212, 175, 55, 0.55);
}
.hu-key {
position: absolute;
right: 10px;
top: 50%;
width: 22px;
height: 8px;
margin-top: -4px;
transform-origin: 18px center;
animation: huKeyTurn 2.4s cubic-bezier(0.5, 0, 0.3, 1.2) infinite;
}
.hu-key-bow {
position: absolute;
left: 0;
top: -3px;
width: 14px;
height: 14px;
border: 2px solid #d4af37;
border-radius: 50%;
background: rgba(212, 175, 55, 0.12);
box-shadow: 0 0 8px rgba(212, 175, 55, 0.35);
}
.hu-key-shaft {
position: absolute;
left: 12px;
top: 50%;
width: 9px;
height: 2px;
margin-top: -1px;
background: #d4af37;
border-radius: 1px;
}
.hu-key-teeth {
position: absolute;
right: 0;
top: 50%;
width: 4px;
height: 4px;
margin-top: -2px;
background: #d4af37;
border-radius: 0 1px 1px 0;
box-shadow: -3px 2px 0 0 #d4af37;
}
.hu-caption {
position: absolute;
left: 50%;
bottom: -28px;
transform: translateX(-50%);
font-size: 11px;
letter-spacing: 0.14em;
text-transform: uppercase;
font-weight: 600;
color: #d4af37;
white-space: nowrap;
animation: huCaption 2.4s ease-in-out infinite;
}
.hu-house.ready .hu-window {
background: #ffd479;
box-shadow:
0 0 14px rgba(255, 212, 121, 0.55),
inset 0 0 12px rgba(255, 212, 121, 0.4);
}
.hu-house.ready .hu-window-glass {
opacity: 1;
transform: scale(1);
}
.hu-house.ready .hu-door {
transform: rotateY(-72deg);
}
.hu-house.ready .hu-key,
.hu-house.ready .hu-caption {
display: none;
}
@keyframes huKeyTurn {
0%,
18% {
transform: rotate(0deg) translateX(0) scale(1);
opacity: 0;
}
10% {
opacity: 1;
}
35%,
60% {
transform: rotate(90deg) translateX(0) scale(1);
opacity: 1;
}
78% {
transform: rotate(90deg) translateX(-6px) scale(0.6);
opacity: 0;
}
100% {
transform: rotate(0deg) translateX(0) scale(1);
opacity: 0;
}
}
@keyframes huCaption {
0%,
100% {
opacity: 0.55;
}
50% {
opacity: 1;
}
}
@media (prefers-reduced-motion: reduce) {
.hu-stage,
.hu-stage * {
animation: none !important;
}
}
```
**JS:**
```js
// Drives the door-open reveal. Replace with your real "page loaded" trigger.
document.querySelectorAll(".hu-house").forEach(function (house) {
var ready = false;
function tick() {
ready = !ready;
house.classList.toggle("ready", ready);
setTimeout(tick, ready ? 1800 : 3200);
}
setTimeout(tick, 3200);
});
```
### 02. Listing Card Skeleton
**Type:** CSS + JS
**Description:** A premium listing-card skeleton that mirrors the real layout — photo, price, address, agent — then crossfades into the loaded card when `.ready` is added. Users see the page shape before content arrives, which is the modern, perceived-performance pattern used by Airbnb and Booking. Respects `prefers-reduced-motion`.
**HTML:**
```html
£1,250,000
For sale
42 Oakwood Lane, Notting Hill
4 bed 3 bath 2,140 ft²
SR
Sarah Rowan · Boutique Estates
```
**CSS:**
```css
.lc-card {
position: relative;
display: grid;
gap: 8px;
width: 240px;
padding: 10px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 14px;
font-family: system-ui, sans-serif;
}
.lc-img {
display: block;
position: relative;
width: 100%;
aspect-ratio: 5 / 3;
border-radius: 10px;
background: linear-gradient(135deg, #1f2433 0%, #2a3045 100%);
overflow: hidden;
}
.lc-img-shimmer {
position: absolute;
inset: 0;
background: linear-gradient(
90deg,
transparent 0%,
rgba(255, 255, 255, 0.08) 50%,
transparent 100%
);
transform: translateX(-100%);
animation: lcShimmer 1.6s ease-in-out infinite;
}
.lc-bar {
display: block;
height: 10px;
background: linear-gradient(90deg, #1f2433, #2a3045, #1f2433);
background-size: 200% 100%;
border-radius: 6px;
animation: lcPulse 1.6s ease-in-out infinite;
}
.lc-row {
display: flex;
align-items: center;
gap: 6px;
}
.lc-row-top {
justify-content: space-between;
}
.lc-bar-price {
width: 82px;
height: 16px;
}
.lc-bar-badge {
width: 56px;
height: 16px;
border-radius: 99px;
}
.lc-bar-line {
height: 9px;
}
.lc-bar-w-90 {
width: 90%;
}
.lc-bar-w-60 {
width: 60%;
}
.lc-row-meta {
gap: 5px;
}
.lc-bar-pill {
width: 48px;
height: 16px;
border-radius: 99px;
}
.lc-row-agent {
gap: 8px;
padding-top: 4px;
border-top: 1px solid rgba(255, 255, 255, 0.05);
margin-top: 2px;
}
.lc-avatar {
display: block;
width: 24px;
height: 24px;
border-radius: 50%;
background: linear-gradient(135deg, #1f2433, #2a3045);
background-size: 200% 100%;
animation: lcPulse 1.6s ease-in-out infinite;
}
.lc-bar-name {
flex: 1;
height: 10px;
}
.lc-loaded {
position: absolute;
inset: 0;
padding: 10px;
background: #15151d;
border-radius: 14px;
display: grid;
gap: 8px;
align-content: start;
font-family: system-ui, sans-serif;
opacity: 0;
pointer-events: none;
transition: opacity 0.5s ease;
}
.lc-loaded-img {
display: block;
width: 100%;
aspect-ratio: 5 / 3;
border-radius: 10px;
background:
linear-gradient(180deg, rgba(15, 15, 19, 0) 60%, rgba(15, 15, 19, 0.45) 100%),
linear-gradient(135deg, #5b8cb8 0%, #8aa6c0 35%, #d4b896 100%);
position: relative;
}
.lc-loaded-img::before {
content: "";
position: absolute;
bottom: 8px;
left: 8px;
width: 22px;
height: 22px;
background: rgba(255, 255, 255, 0.18);
border: 1px solid rgba(255, 255, 255, 0.4);
border-radius: 50%;
backdrop-filter: blur(6px);
}
.lc-loaded-img::after {
content: "♡";
position: absolute;
bottom: 11px;
left: 14px;
font-size: 11px;
color: #fff;
line-height: 1;
}
.lc-loaded-price {
font-size: 16px;
font-weight: 700;
color: #f0eeff;
letter-spacing: -0.01em;
display: flex;
justify-content: space-between;
align-items: center;
}
.lc-loaded-price::after {
content: "For sale";
font-size: 9px;
font-weight: 600;
background: rgba(46, 184, 138, 0.18);
color: #2eb88a;
padding: 3px 8px;
border-radius: 99px;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.lc-loaded-badge {
display: none;
}
.lc-loaded-addr {
font-size: 11px;
color: #b8b6d4;
line-height: 1.4;
}
.lc-loaded-meta {
display: flex;
gap: 5px;
flex-wrap: wrap;
}
.lc-loaded-meta span {
font-size: 9px;
font-weight: 600;
background: rgba(124, 108, 255, 0.1);
color: #a78bfa;
padding: 3px 8px;
border-radius: 99px;
letter-spacing: 0.04em;
}
.lc-loaded-agent {
display: flex;
align-items: center;
gap: 8px;
padding-top: 4px;
border-top: 1px solid rgba(255, 255, 255, 0.05);
margin-top: 2px;
}
.lc-loaded-avatar {
display: grid;
place-items: center;
width: 24px;
height: 24px;
border-radius: 50%;
background: linear-gradient(135deg, #d4b896, #b89970);
color: #2a1f1a;
font-size: 9px;
font-weight: 800;
letter-spacing: 0.04em;
}
.lc-loaded-agent-name {
font-size: 10px;
color: #c8c0ff;
}
.lc-card.ready .lc-loaded {
opacity: 1;
pointer-events: auto;
}
.lc-card.ready > :not(.lc-loaded) {
opacity: 0;
}
.lc-card > :not(.lc-loaded) {
transition: opacity 0.4s ease;
}
@media (prefers-reduced-motion: reduce) {
.lc-img-shimmer,
.lc-bar,
.lc-avatar {
animation: none;
}
}
@keyframes lcShimmer {
100% {
transform: translateX(100%);
}
}
@keyframes lcPulse {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
```
**JS:**
```js
// Toggles the .ready state to crossfade skeleton -> loaded card.
// Replace this loop with your real "data fetched" trigger.
document.querySelectorAll(".lc-card").forEach(function (card) {
var ready = false;
function tick() {
ready = !ready;
card.classList.toggle("ready", ready);
card.setAttribute("aria-busy", ready ? "false" : "true");
setTimeout(tick, ready ? 2200 : 2800);
}
setTimeout(tick, 2800);
});
```
### 03. Progress Path
**Type:** CSS + JS
**Description:** An honest progress bar built on the native `
` element — semantic, screen-reader-announced, and bindable to real load progress (image preloads, fetch chunks, route transitions). A moving plane glides along the path, with the percentage announced via `aria-valuenow`. Degrades gracefully: a static bar appears if JS is disabled.
**HTML:**
```html
```
**CSS:**
```css
.pp-loader {
width: 240px;
display: grid;
gap: 10px;
font-family: system-ui, sans-serif;
}
.pp-track {
position: relative;
height: 28px;
display: grid;
align-items: center;
padding: 0 10px;
}
.pp-progress {
appearance: none;
-webkit-appearance: none;
width: 100%;
height: 4px;
border: 0;
border-radius: 99px;
background: rgba(255, 255, 255, 0.06);
overflow: hidden;
color: #d4af37;
}
.pp-progress::-webkit-progress-bar {
background: rgba(255, 255, 255, 0.06);
border-radius: 99px;
}
.pp-progress::-webkit-progress-value {
background: linear-gradient(90deg, #5b8cb8, #d4af37);
border-radius: 99px;
transition: width 0.2s ease;
}
.pp-progress::-moz-progress-bar {
background: linear-gradient(90deg, #5b8cb8, #d4af37);
border-radius: 99px;
}
.pp-pin {
position: absolute;
top: 50%;
width: 6px;
height: 6px;
margin-top: -3px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.2);
}
.pp-pin-start {
left: 7px;
background: #5b8cb8;
box-shadow: 0 0 8px rgba(91, 140, 184, 0.55);
}
.pp-pin-end {
right: 7px;
background: rgba(212, 175, 55, 0.45);
}
.pp-glider {
position: absolute;
top: 50%;
left: 10px;
width: 22px;
height: 22px;
margin-top: -11px;
display: grid;
place-items: center;
background: linear-gradient(135deg, #ffd479, #d4af37);
color: #1a1a2e;
border-radius: 50%;
box-shadow:
0 0 0 3px rgba(212, 175, 55, 0.18),
0 4px 14px -4px rgba(212, 175, 55, 0.7);
transform: translateX(0);
transition: transform 0.2s ease;
}
.pp-meta {
display: flex;
justify-content: space-between;
align-items: center;
}
.pp-label {
font-size: 11px;
letter-spacing: 0.12em;
text-transform: uppercase;
font-weight: 600;
color: #b8b6d4;
}
.pp-percent {
font-family: "JetBrains Mono", monospace;
font-size: 12px;
font-weight: 700;
color: #d4af37;
letter-spacing: 0.04em;
font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
.pp-glider {
transition: none;
}
.pp-progress::-webkit-progress-value {
transition: none;
}
}
```
**JS:**
```js
// Drives the indeterminate-then-determinate progress simulation.
// Replace this loop with your real fetch-progress callback.
document.querySelectorAll(".pp-loader").forEach(function (loader) {
var progress = loader.querySelector(".pp-progress");
var glider = loader.querySelector(".pp-glider");
var percent = loader.querySelector(".pp-percent");
if (!progress || !glider || !percent) return;
var v = 0;
function set(value) {
v = Math.max(0, Math.min(100, value));
progress.value = v;
percent.textContent = Math.round(v) + "%";
var track = loader.querySelector(".pp-track");
var max = track.offsetWidth - 20 - 22; // padding (20) + glider (22)
if (max < 0) max = 0;
glider.style.transform = "translateX(" + (max * v) / 100 + "px)";
}
function loop() {
set(0);
var step = 0;
var id = setInterval(function () {
step++;
var next = v + (step < 4 ? 18 : step < 8 ? 8 : 3);
set(next);
if (v >= 100) {
clearInterval(id);
setTimeout(loop, 1400);
}
}, 220);
}
loop();
});
```
### 04. Heat-Map Compass
**Type:** CSS + JS
**Description:** A premium navigation loader for property and travel platforms — a brass compass dial with cardinal points lighting one at a time as warm "heat" rings pulse outward. A monospace coordinate readout drifts below, suggesting the system is "scanning your neighbourhood". Honest narrative for indeterminate location-aware loads.
**HTML:**
```html
N
E
S
W
51.5074°N · 0.1278°W
```
**CSS:**
```css
.hc-loader {
position: relative;
width: 180px;
height: 180px;
margin: 0;
padding: 0;
display: grid;
place-items: center;
font-family: system-ui, sans-serif;
}
.hc-rings {
position: absolute;
inset: 0;
display: grid;
place-items: center;
pointer-events: none;
}
.hc-ring {
position: absolute;
width: 84px;
height: 84px;
border-radius: 50%;
border: 1.5px solid #5b8cb8;
opacity: 0;
animation: hcRing 2.6s ease-out infinite;
}
.hc-ring:nth-child(1) {
animation-delay: 0s;
}
.hc-ring:nth-child(2) {
animation-delay: 0.85s;
}
.hc-ring:nth-child(3) {
animation-delay: 1.7s;
}
.hc-dial {
position: relative;
width: 96px;
height: 96px;
border-radius: 50%;
background:
radial-gradient(circle at 30% 25%, rgba(255, 212, 121, 0.12) 0%, transparent 55%),
radial-gradient(circle at 50% 50%, #1a1d2e 0%, #0f1220 70%);
border: 2px solid #d4af37;
box-shadow:
inset 0 0 18px rgba(212, 175, 55, 0.18),
0 4px 18px -4px rgba(212, 175, 55, 0.4),
0 0 0 1px rgba(212, 175, 55, 0.25);
animation: hcDialSpin 18s linear infinite;
}
.hc-mark {
position: absolute;
font-family: "JetBrains Mono", monospace;
font-size: 10px;
font-weight: 700;
color: rgba(212, 175, 55, 0.4);
letter-spacing: 0.06em;
transition: color 0.3s ease;
animation: hcMark 2.6s ease-in-out infinite;
}
.hc-mark-n {
top: 4px;
left: 50%;
transform: translateX(-50%);
animation-delay: 0s;
}
.hc-mark-e {
right: 6px;
top: 50%;
transform: translateY(-50%);
animation-delay: 0.65s;
}
.hc-mark-s {
bottom: 4px;
left: 50%;
transform: translateX(-50%);
animation-delay: 1.3s;
}
.hc-mark-w {
left: 6px;
top: 50%;
transform: translateY(-50%);
animation-delay: 1.95s;
}
.hc-needle {
position: absolute;
top: 50%;
left: 50%;
width: 2px;
height: 70px;
margin: -35px 0 0 -1px;
background: linear-gradient(180deg, #ffd479 0%, #d4af37 48%, #2a3045 52%, #1a1d2e 100%);
border-radius: 2px;
transform-origin: center center;
animation: hcNeedle 5s cubic-bezier(0.5, 0.05, 0.3, 0.95) infinite;
box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}
.hc-pivot {
position: absolute;
top: 50%;
left: 50%;
width: 6px;
height: 6px;
margin: -3px 0 0 -3px;
background: #ffd479;
border-radius: 50%;
box-shadow:
0 0 0 2px #1a1d2e,
0 0 10px rgba(255, 212, 121, 0.6);
}
.hc-coord {
position: absolute;
bottom: -22px;
left: 50%;
transform: translateX(-50%);
font-family: "JetBrains Mono", monospace;
font-size: 10.5px;
font-weight: 600;
color: #5eead4;
letter-spacing: 0.04em;
white-space: nowrap;
font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
.hc-ring,
.hc-dial,
.hc-mark,
.hc-needle {
animation: none;
}
.hc-mark {
color: #ffd479;
}
}
@keyframes hcRing {
0% {
transform: scale(0.6);
border-color: #5b8cb8;
opacity: 0;
}
15% {
opacity: 0.9;
}
60% {
border-color: #d4af37;
}
100% {
transform: scale(2.05);
border-color: #d4af37;
opacity: 0;
}
}
@keyframes hcDialSpin {
to {
transform: rotate(360deg);
}
}
@keyframes hcMark {
0%,
80%,
100% {
color: rgba(212, 175, 55, 0.4);
text-shadow: none;
}
10%,
30% {
color: #ffd479;
text-shadow: 0 0 8px rgba(255, 212, 121, 0.7);
}
}
@keyframes hcNeedle {
0% {
transform: rotate(-22deg);
}
25% {
transform: rotate(80deg);
}
50% {
transform: rotate(-40deg);
}
75% {
transform: rotate(140deg);
}
100% {
transform: rotate(-22deg);
}
}
```
**JS:**
```js
// Cycles the coordinate readout to suggest a real "scanning" load.
var hcCoords = [
"51.5074°N · 0.1278°W", // London
"40.7128°N · 74.0060°W", // New York
"34.0522°N · 118.2437°W", // Los Angeles
"48.8566°N · 2.3522°E", // Paris
"35.6762°N · 139.6503°E", // Tokyo
];
document.querySelectorAll("[data-hc-coord]").forEach(function (node) {
var i = 0;
setInterval(function () {
i = (i + 1) % hcCoords.length;
node.textContent = hcCoords[i];
}, 1900);
});
```
### 05. Floor-by-Floor
**Type:** CSS + JS
**Description:** A vertical luxury-building loader. Floors light up bottom-to-top like an elevator passing each level, room silhouettes flicker on inside, and a penthouse glow crowns the building when `.ready` is added. Turns waiting time into an architectural narrative — perfect for residential developments and high-end real estate.
**HTML:**
```html
Touring residences…
```
**CSS:**
```css
.fb-loader {
position: relative;
width: 110px;
height: 200px;
margin: 0;
padding: 0;
display: grid;
place-items: end center;
font-family: system-ui, sans-serif;
}
.fb-building {
position: relative;
width: 84px;
display: flex;
flex-direction: column;
border-radius: 4px 4px 0 0;
filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.55));
}
.fb-roof {
height: 4px;
background: linear-gradient(90deg, transparent 8%, #d4af37 8%, #d4af37 92%, transparent 92%);
border-radius: 2px 2px 0 0;
margin-bottom: 1px;
}
.fb-penthouse {
position: relative;
height: 22px;
background: linear-gradient(180deg, #1f2433 0%, #161b2a 100%);
border: 1px solid rgba(212, 175, 55, 0.25);
border-bottom: 0;
display: grid;
place-items: center;
}
.fb-pent-light {
width: 60%;
height: 8px;
border-radius: 2px;
background: rgba(255, 212, 121, 0.08);
transition:
background 0.6s ease,
box-shadow 0.6s ease;
}
.fb-floor {
position: relative;
height: 22px;
background: linear-gradient(180deg, #1a1f2e 0%, #14182a 100%);
border: 1px solid rgba(255, 255, 255, 0.04);
border-bottom: 0;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 4px;
padding: 4px 6px;
box-sizing: border-box;
}
.fb-room {
background: rgba(255, 255, 255, 0.03);
border-radius: 1.5px;
transition:
background 0.4s ease,
box-shadow 0.4s ease;
}
.fb-base {
height: 6px;
background: #2a1f1a;
border-radius: 0 0 4px 4px;
}
.fb-floor[data-floor="1"] .fb-room {
animation: fbWindow 7s ease-in-out infinite;
animation-delay: 0s;
}
.fb-floor[data-floor="2"] .fb-room {
animation: fbWindow 7s ease-in-out infinite;
animation-delay: 0.7s;
}
.fb-floor[data-floor="3"] .fb-room {
animation: fbWindow 7s ease-in-out infinite;
animation-delay: 1.4s;
}
.fb-floor[data-floor="4"] .fb-room {
animation: fbWindow 7s ease-in-out infinite;
animation-delay: 2.1s;
}
.fb-floor[data-floor="5"] .fb-room {
animation: fbWindow 7s ease-in-out infinite;
animation-delay: 2.8s;
}
.fb-floor[data-floor="6"] .fb-room {
animation: fbWindow 7s ease-in-out infinite;
animation-delay: 3.5s;
}
.fb-floor[data-floor="1"] .fb-room:nth-child(2) {
animation-delay: 0.15s;
}
.fb-floor[data-floor="1"] .fb-room:nth-child(3) {
animation-delay: 0.3s;
}
.fb-floor[data-floor="2"] .fb-room:nth-child(2) {
animation-delay: 0.85s;
}
.fb-floor[data-floor="2"] .fb-room:nth-child(3) {
animation-delay: 1s;
}
.fb-floor[data-floor="3"] .fb-room:nth-child(2) {
animation-delay: 1.55s;
}
.fb-floor[data-floor="3"] .fb-room:nth-child(3) {
animation-delay: 1.7s;
}
.fb-floor[data-floor="4"] .fb-room:nth-child(2) {
animation-delay: 2.25s;
}
.fb-floor[data-floor="4"] .fb-room:nth-child(3) {
animation-delay: 2.4s;
}
.fb-floor[data-floor="5"] .fb-room:nth-child(2) {
animation-delay: 2.95s;
}
.fb-floor[data-floor="5"] .fb-room:nth-child(3) {
animation-delay: 3.1s;
}
.fb-floor[data-floor="6"] .fb-room:nth-child(2) {
animation-delay: 3.65s;
}
.fb-floor[data-floor="6"] .fb-room:nth-child(3) {
animation-delay: 3.8s;
}
.fb-caption {
position: absolute;
bottom: -22px;
left: 50%;
transform: translateX(-50%);
font-size: 10px;
letter-spacing: 0.16em;
text-transform: uppercase;
font-weight: 600;
color: #d4af37;
white-space: nowrap;
animation: fbCap 2.6s ease-in-out infinite;
}
.fb-loader.ready .fb-room {
animation: none;
background: #ffd479;
box-shadow:
0 0 4px rgba(255, 212, 121, 0.55),
inset 0 0 3px rgba(255, 212, 121, 0.45);
}
.fb-loader.ready .fb-pent-light {
background: #ffd479;
box-shadow:
0 0 14px rgba(255, 212, 121, 0.7),
inset 0 0 8px rgba(255, 212, 121, 0.5);
}
.fb-loader.ready .fb-caption {
display: none;
}
@media (prefers-reduced-motion: reduce) {
.fb-room,
.fb-caption {
animation: none;
}
.fb-room {
background: rgba(255, 212, 121, 0.45);
}
}
@keyframes fbWindow {
0%,
5% {
background: rgba(255, 255, 255, 0.03);
box-shadow: none;
}
15%,
60% {
background: #ffd479;
box-shadow:
0 0 4px rgba(255, 212, 121, 0.55),
inset 0 0 3px rgba(255, 212, 121, 0.45);
}
80%,
100% {
background: rgba(255, 255, 255, 0.03);
box-shadow: none;
}
}
@keyframes fbCap {
0%,
100% {
opacity: 0.5;
}
50% {
opacity: 1;
}
}
```
**JS:**
```js
// Drives the elevator/penthouse "ready" reveal. Replace with your real load trigger.
document.querySelectorAll(".fb-loader").forEach(function (b) {
var ready = false;
function tick() {
ready = !ready;
b.classList.toggle("ready", ready);
setTimeout(tick, ready ? 2400 : 5400);
}
setTimeout(tick, 5400);
});
```
### 06. DNA Helix
**Type:** Pure CSS
**Description:** Alternating dots oscillate up and down in a staggered wave, mimicking the visual rhythm of a DNA double helix.
**HTML:**
```html
```
**CSS:**
```css
.dna {
display: flex;
gap: 6px;
align-items: center;
}
.dna-dot {
width: 12px;
height: 12px;
border-radius: 50%;
animation: dna 1.2s ease-in-out infinite;
}
.dna-dot:nth-child(odd) {
background: #7c6cff;
}
.dna-dot:nth-child(even) {
background: #ff6c8a;
}
.dna-dot:nth-child(1) {
animation-delay: 0s;
}
.dna-dot:nth-child(2) {
animation-delay: 0.1s;
}
.dna-dot:nth-child(3) {
animation-delay: 0.2s;
}
.dna-dot:nth-child(4) {
animation-delay: 0.3s;
}
.dna-dot:nth-child(5) {
animation-delay: 0.4s;
}
.dna-dot:nth-child(6) {
animation-delay: 0.5s;
}
@keyframes dna {
0%,
100% {
transform: translateY(0) scale(1);
}
50% {
transform: translateY(-18px) scale(0.7);
}
}
@media (prefers-reduced-motion: reduce) {
.dna,
.dna * {
animation: none !important;
}
}
```
### 07. Liquid Blob
**Type:** Pure CSS
**Description:** A gradient circle morphs its border-radius through organic blob shapes, creating a fluid, living feeling.
**HTML:**
```html
```
**CSS:**
```css
.blob {
width: 60px;
height: 60px;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
border-radius: 50%;
animation: blob 2.5s ease-in-out infinite;
}
@keyframes blob {
0%,
100% {
border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
}
25% {
border-radius: 60% 40% 70% 30% / 40% 60% 40% 60%;
}
50% {
border-radius: 30% 70% 40% 60% / 60% 30% 70% 40%;
}
75% {
border-radius: 50% 50% 30% 70% / 30% 70% 50% 50%;
}
}
@media (prefers-reduced-motion: reduce) {
.blob,
.blob * {
animation: none !important;
}
}
```
### 08. Orbit System
**Type:** Pure CSS
**Description:** Two rings rotate at different speeds and directions around a central core, like a miniature solar system.
**HTML:**
```html
```
**CSS:**
```css
.orbit-wrap {
position: relative;
width: 60px;
height: 60px;
}
.orbit-core {
position: absolute;
inset: 0;
margin: auto;
width: 14px;
height: 14px;
border-radius: 50%;
background: #7c6cff;
}
.orbit-ring {
position: absolute;
inset: 0;
border: 2px solid transparent;
border-top-color: #ff6c8a;
border-radius: 50%;
animation: orbit 1s linear infinite;
}
.orbit-ring:nth-child(3) {
inset: 8px;
border-top-color: #2ecc8a;
animation-duration: 0.7s;
animation-direction: reverse;
}
@keyframes orbit {
to {
transform: rotate(360deg);
}
}
@media (prefers-reduced-motion: reduce) {
.orbit-wrap,
.orbit-wrap * {
animation: none !important;
}
}
```
### 09. Signal Bars
**Type:** Pure CSS
**Description:** Five bars of varying heights pulse in and out of opacity with a staggered delay, like an equaliser or signal indicator.
**HTML:**
```html
```
**CSS:**
```css
.bars {
display: flex;
align-items: flex-end;
gap: 5px;
height: 40px;
}
.bar {
width: 10px;
border-radius: 3px 3px 0 0;
background: #7c6cff;
animation: bars 1s ease-in-out infinite;
}
.bar:nth-child(1) {
height: 20%;
animation-delay: 0s;
}
.bar:nth-child(2) {
height: 50%;
animation-delay: 0.15s;
}
.bar:nth-child(3) {
height: 80%;
animation-delay: 0.3s;
}
.bar:nth-child(4) {
height: 60%;
animation-delay: 0.45s;
}
.bar:nth-child(5) {
height: 35%;
animation-delay: 0.6s;
}
@keyframes bars {
0%,
100% {
opacity: 0.25;
}
50% {
opacity: 1;
}
}
@media (prefers-reduced-motion: reduce) {
.bars,
.bars * {
animation: none !important;
}
}
```
### 10. Clock Sweep
**Type:** Pure CSS
**Description:** Two pseudo-element hands rotate at different speeds inside a circular face — a literal animated clock using only CSS.
**HTML:**
```html
```
**CSS:**
```css
.clock {
width: 52px;
height: 52px;
border-radius: 50%;
border: 3px solid rgba(124, 108, 255, 0.25);
position: relative;
}
.clock::before,
.clock::after {
content: "";
position: absolute;
border-radius: 2px;
}
.clock::before {
width: 2px;
height: 22px;
background: #7c6cff;
top: 4px;
left: 50%;
margin-left: -1px;
transform-origin: bottom center;
animation: chour 6s linear infinite;
}
.clock::after {
width: 2px;
height: 16px;
background: #ff6c8a;
top: 10px;
left: 50%;
margin-left: -1px;
transform-origin: bottom center;
animation: cmin 1s linear infinite;
}
@keyframes chour {
to {
transform: rotate(360deg);
}
}
@keyframes cmin {
to {
transform: rotate(360deg);
}
}
@media (prefers-reduced-motion: reduce) {
.clock,
.clock * {
animation: none !important;
}
}
```
### 11. Bouncing Chain
**Type:** Pure CSS
**Description:** Four coloured dots bounce independently with staggered delays, creating a chain-like wave of movement.
**HTML:**
```html
```
**CSS:**
```css
.chain {
display: flex;
gap: 8px;
align-items: center;
}
.chain-dot {
width: 14px;
height: 14px;
border-radius: 50%;
animation: chain 0.9s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
}
.chain-dot:nth-child(1) {
background: #7c6cff;
animation-delay: 0s;
}
.chain-dot:nth-child(2) {
background: #ff6c8a;
animation-delay: 0.18s;
}
.chain-dot:nth-child(3) {
background: #2ecc8a;
animation-delay: 0.36s;
}
.chain-dot:nth-child(4) {
background: #f5a623;
animation-delay: 0.54s;
}
@keyframes chain {
0%,
100% {
transform: translateY(0);
}
40% {
transform: translateY(-20px);
}
60% {
transform: translateY(-8px);
}
}
@media (prefers-reduced-motion: reduce) {
.chain,
.chain * {
animation: none !important;
}
}
```
### 12. Neon Ring Draw
**Type:** Pure CSS
**Description:** A glowing ring spinner with a layered neon box-shadow creates a vivid electric glow as it spins.
**HTML:**
```html
```
**CSS:**
```css
.neon-ring {
width: 56px;
height: 56px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #2ecc8a;
box-shadow:
0 0 14px #2ecc8a,
0 0 28px rgba(46, 204, 138, 0.35);
animation: nring 0.9s linear infinite;
}
.neon-ring::before {
content: "";
display: block;
width: 100%;
height: 100%;
border-radius: 50%;
border: 3px solid transparent;
border-bottom-color: rgba(46, 204, 138, 0.3);
box-sizing: border-box;
}
@keyframes nring {
to {
transform: rotate(360deg);
}
}
@media (prefers-reduced-motion: reduce) {
.neon-ring,
.neon-ring * {
animation: none !important;
}
}
```
### 13. Pixel Dissolve
**Type:** Pure CSS
**Description:** A 4×4 grid of squares fade and shrink in a rolling wave, like pixels dissolving from a screen.
**HTML:**
```html
```
**CSS:**
```css
.pixels {
display: grid;
grid-template-columns: repeat(4, 12px);
gap: 4px;
}
.px {
width: 12px;
height: 12px;
border-radius: 2px;
background: #7c6cff;
animation: px 1.4s ease-in-out infinite;
}
.px:nth-child(1) {
animation-delay: 0s;
}
.px:nth-child(2) {
animation-delay: 0.1s;
}
.px:nth-child(3) {
animation-delay: 0.2s;
}
.px:nth-child(4) {
animation-delay: 0.3s;
}
.px:nth-child(5) {
animation-delay: 0.4s;
}
.px:nth-child(6) {
animation-delay: 0.5s;
}
.px:nth-child(7) {
animation-delay: 0.6s;
}
.px:nth-child(8) {
animation-delay: 0.7s;
}
.px:nth-child(9) {
animation-delay: 0.8s;
}
.px:nth-child(10) {
animation-delay: 0.9s;
}
.px:nth-child(11) {
animation-delay: 1s;
}
.px:nth-child(12) {
animation-delay: 1.1s;
}
.px:nth-child(13) {
animation-delay: 1.2s;
}
.px:nth-child(14) {
animation-delay: 1.3s;
}
.px:nth-child(15) {
animation-delay: 0.65s;
}
.px:nth-child(16) {
animation-delay: 0.85s;
}
@keyframes px {
0%,
100% {
opacity: 1;
transform: scale(1);
}
50% {
opacity: 0;
transform: scale(0.3);
}
}
@media (prefers-reduced-motion: reduce) {
.pixels,
.pixels * {
animation: none !important;
}
}
```
### 14. Hourglass Flip
**Type:** Pure CSS
**Description:** A pure CSS triangle-based hourglass that flips 180° and pauses, then repeats — built from two border triangles.
**HTML:**
```html
```
**CSS:**
```css
.hourglass {
width: 40px;
height: 40px;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 20px solid #7c6cff;
border-bottom: 20px solid #ff6c8a;
border-radius: 4px;
animation: hflip 1.8s ease-in-out infinite;
}
@keyframes hflip {
0%,
45% {
transform: rotate(0deg);
}
55%,
100% {
transform: rotate(180deg);
}
}
@media (prefers-reduced-motion: reduce) {
.hourglass,
.hourglass * {
animation: none !important;
}
}
```
### 15. Heartbeat Line
**Type:** Pure CSS
**Description:** An SVG heartbeat waveform scrolls horizontally in a continuous loop — an inline data URI with a CSS translateX animation.
**HTML:**
```html
```
**CSS:**
```css
.hb-wrap {
width: 120px;
height: 40px;
overflow: hidden;
}
.hb-line {
width: 200%;
height: 100%;
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40'%3E%3Cpolyline points='0,20 30,20 40,5 50,35 60,5 70,35 80,20 110,20 120,20 150,20 160,5 170,35 180,5 190,35 200,20' fill='none' stroke='%23ff6c8a' stroke-width='2.5'/%3E%3C/svg%3E")
repeat-x center/50% 100%;
animation: hbeat 1s linear infinite;
}
@keyframes hbeat {
to {
transform: translateX(-50%);
}
}
@media (prefers-reduced-motion: reduce) {
.hb-wrap,
.hb-wrap * {
animation: none !important;
}
}
```
---
## 24 CSS Login Form Designs with Live Demos
URL: https://codefronts.com/components/css-login-forms/
Description: 24 modern CSS login form designs — glassmorphism, neon, dark mode, OTP, biometric passkey, magic link, multi-step, password strength meter and more. Copy-paste HTML & CSS, accessible, mobile-first.
Demo count: 24
### 01. Aurora Glow
**Type:** Pure CSS
**Description:** Glassmorphism login form on a drifting aurora gradient. Floating labels rise on focus and the submit button picks up a soft brand glow on hover.
**HTML:**
```html
```
**CSS:**
```css
.lf-aurora {
position: relative;
width: 100%;
max-width: 320px;
border-radius: 18px;
overflow: hidden;
isolation: isolate;
}
.lf-aurora-bg {
position: absolute;
inset: -40%;
z-index: 0;
background:
radial-gradient(40% 40% at 30% 30%, #7c6cff 0%, transparent 60%),
radial-gradient(50% 50% at 70% 70%, #ff6c8a 0%, transparent 60%),
radial-gradient(60% 60% at 50% 50%, #2eb88a 0%, transparent 60%);
filter: blur(40px) saturate(140%);
animation: lfaDrift 14s ease-in-out infinite alternate;
}
@keyframes lfaDrift {
0% {
transform: translate3d(0, 0, 0) rotate(0deg);
}
100% {
transform: translate3d(-8%, -4%, 0) rotate(8deg);
}
}
.lf-aurora-card {
position: relative;
z-index: 1;
background: rgba(15, 15, 19, 0.55);
backdrop-filter: blur(18px) saturate(160%);
-webkit-backdrop-filter: blur(18px) saturate(160%);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 18px;
padding: 28px 24px;
display: flex;
flex-direction: column;
gap: 14px;
}
.lf-aurora-title {
font-size: 18px;
font-weight: 700;
color: #f0eeff;
}
.lf-aurora-sub {
font-size: 12px;
color: #b8b6d4;
margin-top: -10px;
}
.lf-aurora-field {
position: relative;
display: block;
}
.lf-aurora-field input {
width: 100%;
box-sizing: border-box;
padding: 14px 12px 10px;
font-size: 13px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 10px;
color: #f0eeff;
outline: none;
transition:
border-color 0.2s,
background 0.2s;
}
.lf-aurora-field input:focus {
border-color: #7c6cff;
background: rgba(124, 108, 255, 0.08);
}
.lf-aurora-field span {
position: absolute;
left: 12px;
top: 12px;
font-size: 12px;
color: #b8b6d4;
pointer-events: none;
transition:
transform 0.2s,
color 0.2s,
font-size 0.2s;
}
.lf-aurora-field input:focus + span,
.lf-aurora-field input:not(:placeholder-shown) + span {
transform: translateY(-9px);
font-size: 9px;
color: #a78bfa;
letter-spacing: 0.08em;
}
.lf-aurora-btn {
margin-top: 4px;
padding: 11px 14px;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
font-size: 13px;
font-weight: 600;
border: none;
border-radius: 10px;
cursor: pointer;
box-shadow: 0 6px 24px -8px rgba(124, 108, 255, 0.7);
transition:
transform 0.15s,
box-shadow 0.25s;
}
.lf-aurora-btn:hover {
transform: translateY(-1px);
box-shadow: 0 10px 32px -8px rgba(124, 108, 255, 0.9);
}
.lf-aurora-foot {
font-size: 11px;
color: #b8b6d4;
text-align: center;
}
.lf-aurora-foot a {
color: #a78bfa;
text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
.lf-aurora,
.lf-aurora * {
animation: none !important;
}
}
```
### 02. Neon Synthwave
**Type:** Pure CSS
**Description:** Neon login form in 80s-synthwave style. Hot-pink and cyan outline glows pulse around inputs and the submit button using stacked text-shadow.
**HTML:**
```html
```
**CSS:**
```css
.lf-neon {
width: 100%;
max-width: 280px;
background: #0a0014;
border: 1px solid rgba(255, 108, 255, 0.35);
border-radius: 14px;
padding: 26px 22px;
display: flex;
flex-direction: column;
gap: 14px;
box-shadow:
0 0 40px rgba(255, 108, 255, 0.15),
inset 0 0 30px rgba(124, 108, 255, 0.1);
}
.lf-neon-title {
font-family: "Courier New", monospace;
font-size: 22px;
font-weight: 700;
text-align: center;
color: #fff;
letter-spacing: 0.3em;
text-shadow:
0 0 4px #fff,
0 0 12px #ff6cff,
0 0 24px #ff6cff;
}
.lf-neon-title span {
color: #6cffff;
text-shadow:
0 0 4px #fff,
0 0 12px #6cffff,
0 0 24px #6cffff;
}
.lf-neon-input {
background: transparent;
border: 1px solid rgba(255, 108, 255, 0.45);
border-radius: 8px;
padding: 11px 14px;
font-family: "Courier New", monospace;
color: #fff;
font-size: 12px;
outline: none;
transition:
border-color 0.2s,
box-shadow 0.2s;
}
.lf-neon-input::placeholder {
color: rgba(255, 108, 255, 0.55);
}
.lf-neon-input:focus {
border-color: #6cffff;
box-shadow:
0 0 0 1px #6cffff,
0 0 16px rgba(108, 255, 255, 0.4);
}
.lf-neon-btn {
background: transparent;
border: 1px solid #6cffff;
border-radius: 8px;
padding: 11px 14px;
font-family: "Courier New", monospace;
font-size: 13px;
font-weight: 700;
letter-spacing: 0.25em;
color: #6cffff;
cursor: pointer;
text-shadow: 0 0 6px #6cffff;
box-shadow:
inset 0 0 12px rgba(108, 255, 255, 0.15),
0 0 14px rgba(108, 255, 255, 0.3);
animation: lfnPulse 1.6s ease-in-out infinite;
}
.lf-neon-btn:hover {
color: #fff;
background: rgba(108, 255, 255, 0.1);
}
@keyframes lfnPulse {
0%,
100% {
box-shadow:
inset 0 0 12px rgba(108, 255, 255, 0.15),
0 0 14px rgba(108, 255, 255, 0.3);
}
50% {
box-shadow:
inset 0 0 18px rgba(108, 255, 255, 0.25),
0 0 28px rgba(108, 255, 255, 0.55);
}
}
@media (prefers-reduced-motion: reduce) {
.lf-neon,
.lf-neon * {
animation: none !important;
}
}
```
### 03. Liquid Slide
**Type:** Pure CSS
**Description:** Animated sign in form with a brand stripe that slides in on mount and underlined inputs that draw outward from the centre on focus.
**HTML:**
```html
```
**CSS:**
```css
.lf-liquid {
position: relative;
width: 100%;
max-width: 320px;
background: #15151d;
border-radius: 14px;
overflow: hidden;
display: grid;
grid-template-columns: 64px 1fr;
border: 1px solid rgba(255, 255, 255, 0.06);
}
.lf-liquid-stripe {
background: linear-gradient(180deg, #7c6cff, #ff6c8a);
animation: lfqSlide 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
position: relative;
}
.lf-liquid-stripe::after {
content: "";
position: absolute;
inset: 0;
background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.45) 0%, transparent 40%);
mix-blend-mode: screen;
}
@keyframes lfqSlide {
from {
transform: translateX(-100%);
}
to {
transform: translateX(0);
}
}
.lf-liquid-body {
padding: 22px 22px;
display: flex;
flex-direction: column;
gap: 14px;
}
.lf-liquid-title {
font-size: 16px;
font-weight: 700;
color: #f0eeff;
letter-spacing: -0.01em;
}
.lf-liquid-row {
position: relative;
}
.lf-liquid-row input {
width: 100%;
box-sizing: border-box;
padding: 8px 0 9px;
font-size: 13px;
background: transparent;
color: #f0eeff;
border: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.12);
outline: none;
}
.lf-liquid-row::after {
content: "";
position: absolute;
bottom: 0;
left: 50%;
right: 50%;
height: 1.5px;
background: linear-gradient(90deg, #7c6cff, #ff6c8a);
transition:
left 0.28s ease,
right 0.28s ease;
}
.lf-liquid-row:focus-within::after {
left: 0;
right: 0;
}
.lf-liquid-row input::placeholder {
color: #b8b6d4;
}
.lf-liquid-meta {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 11px;
color: #b8b6d4;
}
.lf-liquid-meta a {
color: #a78bfa;
text-decoration: none;
}
.lf-liquid-meta input {
accent-color: #7c6cff;
margin-right: 4px;
}
.lf-liquid-btn {
margin-top: 4px;
padding: 10px 14px;
background: #f0eeff;
color: #15151d;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 700;
cursor: pointer;
transition: transform 0.12s;
}
.lf-liquid-btn:hover {
transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
.lf-liquid,
.lf-liquid * {
animation: none !important;
}
}
```
### 04. Card Flip Reset
**Type:** Pure CSS
**Description:** CSS-only flip card login form. The card rotates in 3D to reveal a "forgot password" form on the back — driven entirely by a hidden checkbox and sibling selectors, no JavaScript.
**HTML:**
```html
```
**CSS:**
```css
.lf-flip {
width: 100%;
max-width: 280px;
perspective: 1200px;
}
.lf-flip-toggle {
display: none;
}
.lf-flip-stage {
position: relative;
width: 100%;
transform-style: preserve-3d;
transition: transform 0.7s cubic-bezier(0.5, 0, 0.3, 1.2);
min-height: 240px;
}
.lf-flip-toggle:checked ~ .lf-flip-stage {
transform: rotateY(180deg);
}
.lf-flip-front,
.lf-flip-back {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
gap: 10px;
padding: 24px 22px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 14px;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
.lf-flip-back {
transform: rotateY(180deg);
}
.lf-flip-title {
font-size: 16px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 2px;
}
.lf-flip input {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 10px 12px;
color: #f0eeff;
font-size: 13px;
outline: none;
transition: border-color 0.15s;
}
.lf-flip input:focus {
border-color: #7c6cff;
}
.lf-flip button {
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
border: none;
border-radius: 8px;
padding: 10px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
}
.lf-flip-link {
font-size: 11px;
color: #a78bfa;
text-align: center;
cursor: pointer;
margin-top: 4px;
}
```
### 05. Magic Link
**Type:** Pure CSS
**Description:** Magic-link / passwordless login form. A single email field with an animated wand-sparkle icon — the modern pattern for email-only authentication.
**HTML:**
```html
```
**CSS:**
```css
.lf-magic {
width: 100%;
max-width: 300px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 16px;
padding: 28px 22px;
display: flex;
flex-direction: column;
gap: 12px;
align-items: center;
text-align: center;
}
.lf-magic-icon {
position: relative;
width: 48px;
height: 48px;
margin-bottom: 4px;
}
.lf-magic-wand {
position: absolute;
inset: 12px;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
border-radius: 50%;
box-shadow: 0 0 24px rgba(124, 108, 255, 0.55);
animation: lfmFloat 3s ease-in-out infinite;
}
@keyframes lfmFloat {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-3px);
}
}
.lf-magic-spark {
position: absolute;
width: 4px;
height: 4px;
background: #fff;
border-radius: 50%;
box-shadow: 0 0 6px #fff;
animation: lfmSpark 2s ease-in-out infinite;
}
.s1 {
top: 4px;
left: 6px;
animation-delay: 0s;
}
.s2 {
top: 8px;
right: 4px;
animation-delay: 0.5s;
}
.s3 {
bottom: 6px;
left: 12px;
animation-delay: 1s;
}
@keyframes lfmSpark {
0%,
100% {
opacity: 0;
transform: scale(0.4);
}
50% {
opacity: 1;
transform: scale(1.2);
}
}
.lf-magic-title {
font-size: 15px;
font-weight: 700;
color: #f0eeff;
}
.lf-magic-sub {
font-size: 11px;
color: #b8b6d4;
line-height: 1.5;
}
.lf-magic-input {
width: 100%;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 10px;
padding: 11px 14px;
color: #f0eeff;
font-size: 13px;
outline: none;
transition:
border-color 0.2s,
background 0.2s;
text-align: center;
}
.lf-magic-input:focus {
border-color: #7c6cff;
background: rgba(124, 108, 255, 0.08);
}
.lf-magic-btn {
width: 100%;
padding: 11px 14px;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
border: none;
border-radius: 10px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
box-shadow: 0 6px 24px -8px rgba(124, 108, 255, 0.7);
}
@media (prefers-reduced-motion: reduce) {
.lf-magic,
.lf-magic * {
animation: none !important;
}
}
```
### 06. Terminal Prompt
**Type:** Pure CSS
**Description:** Terminal-style login form. Monospace prompts, a blinking caret, and a green command-line submit — perfect for developer tools and CLI dashboards.
**HTML:**
```html
```
**CSS:**
```css
.lf-term {
width: 100%;
max-width: 320px;
background: #0a0a0e;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 10px;
overflow: hidden;
font-family: "JetBrains Mono", "DM Mono", monospace;
box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
}
.lf-term-bar {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 12px;
background: #15151d;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lf-term-dot {
width: 10px;
height: 10px;
border-radius: 50%;
}
.lf-term-dot.r {
background: #ff6c8a;
}
.lf-term-dot.y {
background: #f5b454;
}
.lf-term-dot.g {
background: #2eb88a;
}
.lf-term-title {
margin-left: auto;
font-size: 11px;
color: #b8b6d4;
letter-spacing: 0.05em;
}
.lf-term-body {
padding: 16px 14px;
display: flex;
flex-direction: column;
gap: 10px;
color: #a5f0c8;
font-size: 13px;
}
.lf-term-line {
display: flex;
align-items: center;
gap: 8px;
}
.lf-term-prompt {
color: #7c6cff;
flex-shrink: 0;
font-weight: 600;
}
.lf-term-line input {
flex: 1;
background: transparent;
border: none;
outline: none;
color: #fff;
font-family: inherit;
font-size: 13px;
padding: 2px 0;
caret-color: #2eb88a;
}
.lf-term-line input::placeholder {
color: #4a4a5e;
}
.lf-term-btn {
align-self: flex-start;
margin-top: 4px;
padding: 6px 14px;
background: rgba(46, 184, 138, 0.08);
border: 1px solid rgba(46, 184, 138, 0.4);
color: #2eb88a;
font-family: inherit;
font-size: 13px;
font-weight: 600;
cursor: pointer;
border-radius: 5px;
}
.lf-term-btn:hover {
background: rgba(46, 184, 138, 0.18);
}
.lf-term-caret {
display: inline-block;
margin-left: 2px;
color: #2eb88a;
animation: lftBlink 1s step-end infinite;
}
@keyframes lftBlink {
50% {
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.lf-term,
.lf-term * {
animation: none !important;
}
}
```
### 07. Floating Pill
**Type:** Pure CSS
**Description:** Compact pill-shaped login form on a single line. Rotating brand avatar, inline email and password, and a circular submit arrow that pulses on hover.
**HTML:**
```html
```
**CSS:**
```css
.lf-pill {
display: flex;
align-items: center;
gap: 6px;
width: 100%;
max-width: 320px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 100px;
padding: 6px;
box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
}
.lf-pill-avatar {
width: 38px;
height: 38px;
border-radius: 50%;
flex-shrink: 0;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
padding: 2px;
animation: lfpSpin 6s linear infinite;
}
.lf-pill-avatar-inner {
width: 100%;
height: 100%;
border-radius: 50%;
background: #15151d
url("data:image/svg+xml;utf8, ")
center/cover;
}
@keyframes lfpSpin {
to {
transform: rotate(360deg);
}
}
.lf-pill-input {
flex: 1;
min-width: 0;
background: transparent;
border: none;
outline: none;
color: #f0eeff;
font-size: 13px;
padding: 8px 6px;
}
.lf-pill-input.pw {
max-width: 90px;
}
.lf-pill-input::placeholder {
color: #b8b6d4;
}
.lf-pill-btn {
width: 38px;
height: 38px;
flex-shrink: 0;
border: none;
border-radius: 50%;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
font-size: 16px;
font-weight: 700;
cursor: pointer;
box-shadow: 0 0 0 0 rgba(124, 108, 255, 0.5);
transition:
box-shadow 0.25s,
transform 0.15s;
}
.lf-pill-btn:hover {
transform: scale(1.06);
box-shadow: 0 0 0 6px rgba(124, 108, 255, 0.18);
}
@media (prefers-reduced-motion: reduce) {
.lf-pill,
.lf-pill * {
animation: none !important;
}
}
```
### 08. Gradient Border
**Type:** Pure CSS
**Description:** Login form with an animated gradient border. A rotating conic-gradient frames a clean monochrome interior — a premium feel with one CSS property.
**HTML:**
```html
```
**CSS:**
```css
.lf-grad {
position: relative;
width: 100%;
max-width: 320px;
border-radius: 16px;
padding: 1.5px;
background: conic-gradient(from 0deg, #7c6cff, #ff6c8a, #2eb88a, #f5b454, #7c6cff);
animation: lfgRotate 4s linear infinite;
}
@keyframes lfgRotate {
to {
--a: 360deg;
transform: rotate(0);
}
}
@property --a {
syntax: "";
inherits: false;
initial-value: 0deg;
}
.lf-grad::before {
content: "";
position: absolute;
inset: -20px;
background: inherit;
filter: blur(24px);
opacity: 0.5;
z-index: -1;
border-radius: inherit;
}
.lf-grad-inner {
background: #15151d;
border-radius: 14.5px;
padding: 26px 24px;
display: flex;
flex-direction: column;
gap: 12px;
}
.lf-grad-title {
font-size: 18px;
font-weight: 700;
color: #f0eeff;
}
.lf-grad-sub {
font-size: 12px;
color: #b8b6d4;
margin-top: -8px;
margin-bottom: 4px;
}
.lf-grad-label {
display: flex;
flex-direction: column;
gap: 5px;
font-size: 11px;
color: #b8b6d4;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.lf-grad-label input {
text-transform: none;
letter-spacing: normal;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 10px 12px;
color: #f0eeff;
font-size: 13px;
outline: none;
transition: border-color 0.15s;
}
.lf-grad-label input:focus {
border-color: #7c6cff;
}
.lf-grad-btn {
margin-top: 6px;
padding: 11px;
background: #f0eeff;
color: #15151d;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 700;
cursor: pointer;
transition: transform 0.12s;
}
.lf-grad-btn:hover {
transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
.lf-grad,
.lf-grad * {
animation: none !important;
}
}
```
### 09. Side Panel
**Type:** Pure CSS
**Description:** Two-column SaaS login layout. A brand panel on the left with a subtle parallax shape, and a clean sign in form on the right — the classic dashboard pattern.
**HTML:**
```html
```
**CSS:**
```css
.lf-side {
display: grid;
grid-template-columns: 110px 1fr;
width: 100%;
max-width: 360px;
min-height: 280px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 14px;
overflow: hidden;
}
.lf-side-brand {
position: relative;
overflow: hidden;
background: linear-gradient(160deg, #7c6cff 0%, #5b48d6 60%, #2a1f7a 100%);
padding: 18px 14px;
display: flex;
flex-direction: column;
justify-content: space-between;
color: white;
}
.lf-side-shape {
position: absolute;
top: -30px;
right: -30px;
width: 120px;
height: 120px;
border-radius: 50%;
background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 60%);
animation: lfsBlob 8s ease-in-out infinite alternate;
}
@keyframes lfsBlob {
0% {
transform: translate(0, 0) scale(1);
}
100% {
transform: translate(-10px, 12px) scale(1.15);
}
}
.lf-side-logo {
font-size: 20px;
font-weight: 800;
letter-spacing: 0.04em;
background: rgba(255, 255, 255, 0.18);
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
backdrop-filter: blur(8px);
}
.lf-side-tag {
font-size: 11px;
line-height: 1.5;
opacity: 0.92;
}
.lf-side-form {
padding: 24px 22px;
display: flex;
flex-direction: column;
gap: 10px;
}
.lf-side-title {
font-size: 16px;
font-weight: 700;
color: #f0eeff;
margin-bottom: 4px;
}
.lf-side-form input {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 9px 12px;
color: #f0eeff;
font-size: 13px;
outline: none;
transition: border-color 0.15s;
}
.lf-side-form input:focus {
border-color: #7c6cff;
}
.lf-side-form button {
margin-top: 4px;
padding: 10px;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
}
.lf-side-foot {
font-size: 11px;
color: #a78bfa;
text-decoration: none;
text-align: center;
margin-top: 2px;
}
@media (prefers-reduced-motion: reduce) {
.lf-side,
.lf-side * {
animation: none !important;
}
}
```
### 10. Social First
**Type:** Pure CSS
**Description:** Social-first sign in form with OAuth buttons (Google, GitHub) up top, a divider, and a compact email fallback — the standard product onboarding pattern.
**HTML:**
```html
```
**CSS:**
```css
.lf-soc {
width: 100%;
max-width: 290px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 14px;
padding: 26px 22px;
display: flex;
flex-direction: column;
gap: 10px;
}
.lf-soc-title {
font-size: 16px;
font-weight: 700;
color: #f0eeff;
text-align: center;
margin-bottom: 4px;
}
.lf-soc-btn {
display: flex;
align-items: center;
gap: 10px;
justify-content: center;
padding: 9px 14px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
color: #f0eeff;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition:
background 0.15s,
transform 0.15s;
}
.lf-soc-btn:hover {
background: rgba(255, 255, 255, 0.08);
transform: translateY(-1px);
}
.lf-soc-ic {
width: 18px;
height: 18px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
font-weight: 800;
font-size: 11px;
background: white;
color: #15151d;
}
.lf-soc-btn.github .lf-soc-ic {
background: #f0eeff;
color: #15151d;
}
.lf-soc-or {
display: flex;
align-items: center;
gap: 10px;
margin: 6px 0;
font-size: 11px;
color: #b8b6d4;
text-transform: uppercase;
letter-spacing: 0.1em;
}
.lf-soc-or::before,
.lf-soc-or::after {
content: "";
flex: 1;
height: 1px;
background: rgba(255, 255, 255, 0.08);
}
.lf-soc input {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 10px 12px;
color: #f0eeff;
font-size: 13px;
outline: none;
}
.lf-soc input:focus {
border-color: #7c6cff;
}
.lf-soc-submit {
padding: 10px;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
}
.lf-soc-foot {
font-size: 10px;
color: #b8b6d4;
text-align: center;
margin-top: 4px;
}
.lf-soc-foot a {
color: #a78bfa;
text-decoration: none;
}
```
### 11. Animated Mascot
**Type:** Pure CSS
**Description:** Playful login form with an animated mascot. A CSS-drawn face whose eyes follow the focused input via `:has()` — left for email, down for password — and blinks on idle.
**HTML:**
```html
```
**CSS:**
```css
.lf-mascot {
width: 100%;
max-width: 280px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 16px;
padding: 24px 22px 22px;
display: flex;
flex-direction: column;
gap: 10px;
align-items: center;
}
.lf-mascot-face {
width: 78px;
height: 78px;
border-radius: 50%;
background: linear-gradient(135deg, #fde68a, #fbbf24);
position: relative;
margin-bottom: 8px;
box-shadow: 0 8px 24px -8px rgba(251, 191, 36, 0.6);
}
.lf-mascot-eye {
position: absolute;
top: 28px;
width: 14px;
height: 14px;
background: #15151d;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.lf-mascot-eye.l {
left: 18px;
}
.lf-mascot-eye.r {
right: 18px;
}
.lf-mascot-pupil {
width: 5px;
height: 5px;
background: white;
border-radius: 50%;
transition: transform 0.25s ease;
animation: lfmBlink 4s ease-in-out infinite;
}
@keyframes lfmBlink {
0%,
92%,
100% {
transform: scaleY(1);
}
95% {
transform: scaleY(0.1);
}
}
.lf-mascot-mouth {
position: absolute;
bottom: 20px;
left: 50%;
width: 22px;
height: 12px;
border: 2.5px solid #15151d;
border-top: none;
border-radius: 0 0 22px 22px;
transform: translateX(-50%);
}
/* Eyes track focused input */
.lf-mascot:has(.email:focus) .lf-mascot-pupil {
transform: translate(-3px, 0);
}
.lf-mascot:has(.pwd:focus) .lf-mascot-pupil {
transform: translate(0, 3px);
}
.lf-mascot:has(.lf-mascot-btn:hover) .lf-mascot-mouth {
height: 18px;
border-radius: 0 0 28px 28px;
}
.lf-mascot-input {
width: 100%;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 10px;
padding: 10px 14px;
color: #f0eeff;
font-size: 13px;
outline: none;
transition: border-color 0.15s;
}
.lf-mascot-input:focus {
border-color: #fbbf24;
}
.lf-mascot-btn {
width: 100%;
padding: 10px;
background: linear-gradient(135deg, #fbbf24, #ef4444);
color: white;
border: none;
border-radius: 10px;
font-size: 13px;
font-weight: 700;
cursor: pointer;
margin-top: 4px;
transition: transform 0.12s;
}
.lf-mascot-btn:hover {
transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
.lf-mascot,
.lf-mascot * {
animation: none !important;
}
}
```
### 12. Compact Modal
**Type:** Pure CSS
**Description:** Modal / dialog login form. Dense and professional, with subtle hover glow on inputs and a primary action that fills with brand colour on hover.
**HTML:**
```html
```
**CSS:**
```css
.lf-modal {
position: relative;
width: 100%;
max-width: 320px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 12px;
padding: 24px 22px 22px;
display: flex;
flex-direction: column;
gap: 12px;
box-shadow:
0 24px 48px -16px rgba(0, 0, 0, 0.7),
0 0 0 1px rgba(255, 255, 255, 0.04);
}
.lf-modal-close {
position: absolute;
top: 12px;
right: 12px;
width: 22px;
height: 22px;
background: transparent;
border: none;
color: #b8b6d4;
font-size: 18px;
cursor: pointer;
border-radius: 4px;
transition:
background 0.15s,
color 0.15s;
line-height: 1;
}
.lf-modal-close:hover {
background: rgba(255, 255, 255, 0.06);
color: #f0eeff;
}
.lf-modal-title {
font-size: 16px;
font-weight: 700;
color: #f0eeff;
}
.lf-modal-sub {
font-size: 12px;
color: #b8b6d4;
margin-top: -8px;
margin-bottom: 4px;
}
.lf-modal-row {
display: flex;
flex-direction: column;
gap: 5px;
font-size: 11px;
color: #b8b6d4;
}
.lf-modal-row > span {
display: flex;
justify-content: space-between;
align-items: center;
}
.lf-modal-row > span a {
color: #a78bfa;
text-decoration: none;
font-size: 11px;
}
.lf-modal-row input {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 10px 12px;
color: #f0eeff;
font-size: 13px;
outline: none;
transition:
border-color 0.15s,
box-shadow 0.15s,
background 0.15s;
}
.lf-modal-row input:hover {
background: rgba(255, 255, 255, 0.06);
}
.lf-modal-row input:focus {
border-color: #7c6cff;
box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.15);
}
.lf-modal-check {
display: flex;
align-items: center;
gap: 8px;
font-size: 11px;
color: #b8b6d4;
}
.lf-modal-check input {
accent-color: #7c6cff;
}
.lf-modal-submit {
padding: 10px;
background: rgba(124, 108, 255, 0.18);
color: #c8c0ff;
border: 1px solid rgba(124, 108, 255, 0.4);
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition:
background 0.2s,
color 0.2s,
border-color 0.2s;
}
.lf-modal-submit:hover {
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
border-color: transparent;
}
```
### 13. Glass Frosted
**Type:** Pure CSS
**Description:** Frosted-glass login form on a soft photographic background. Translucent inputs with subtle inner highlights — a calm, premium hero treatment.
**HTML:**
```html
```
**CSS:**
```css
.lf-glass {
position: relative;
isolation: isolate;
width: 100%;
max-width: 320px;
border-radius: 18px;
overflow: hidden;
}
.lf-glass-bg {
position: absolute;
inset: 0;
z-index: 0;
background:
radial-gradient(40% 50% at 20% 30%, #f59e0b 0%, transparent 60%),
radial-gradient(50% 60% at 80% 70%, #7c3aed 0%, transparent 60%),
radial-gradient(60% 70% at 50% 50%, #ef4444 0%, transparent 60%), #0a0a14;
filter: blur(30px) saturate(120%);
transform: scale(1.2);
}
.lf-glass-card {
position: relative;
z-index: 1;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.18);
backdrop-filter: blur(24px) saturate(140%);
-webkit-backdrop-filter: blur(24px) saturate(140%);
border-radius: 18px;
padding: 26px 22px;
display: grid;
gap: 14px;
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.25),
0 18px 48px -16px rgba(0, 0, 0, 0.5);
}
.lf-glass-card header {
display: grid;
gap: 4px;
}
.lf-glass-title {
margin: 0;
font-size: 17px;
font-weight: 700;
color: #fff;
}
.lf-glass-sub {
margin: 0;
font-size: 12px;
color: rgba(255, 255, 255, 0.7);
line-height: 1.5;
}
.lf-glass-field {
display: grid;
gap: 5px;
font-size: 11px;
color: rgba(255, 255, 255, 0.7);
}
.lf-glass-field input {
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 10px;
padding: 10px 12px;
font-size: 13px;
color: #fff;
outline: none;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
transition:
border-color 0.2s,
background 0.2s;
}
.lf-glass-field input::placeholder {
color: rgba(255, 255, 255, 0.45);
}
.lf-glass-field input:focus {
border-color: rgba(255, 255, 255, 0.45);
background: rgba(255, 255, 255, 0.14);
}
.lf-glass-btn {
margin-top: 4px;
padding: 11px;
background: rgba(255, 255, 255, 0.92);
color: #15151d;
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 10px;
font-size: 13px;
font-weight: 700;
cursor: pointer;
transition:
transform 0.12s,
background 0.15s;
}
.lf-glass-btn:hover {
transform: translateY(-1px);
background: #fff;
}
```
### 14. Step-by-Step
**Type:** Pure CSS
**Description:** Multi-step login form. Enter email, then password — the card slides between steps with a progress bar, driven entirely by `:has()` and `:checked`. No JavaScript.
**HTML:**
```html
```
**CSS:**
```css
.lf-step {
width: 100%;
max-width: 320px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 14px;
padding: 22px 22px;
display: grid;
gap: 14px;
overflow: hidden;
}
.lf-step-radio {
position: absolute;
opacity: 0;
pointer-events: none;
}
.lf-step-head {
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
gap: 12px;
font-size: 11px;
color: #b8b6d4;
}
.lf-step-bar {
height: 3px;
border-radius: 99px;
background: rgba(255, 255, 255, 0.06);
position: relative;
overflow: hidden;
}
.lf-step-bar::after {
content: "";
position: absolute;
inset: 0;
right: 50%;
background: linear-gradient(90deg, #7c6cff, #ff6c8a);
border-radius: inherit;
transition: right 0.4s ease;
}
.lf-step:has(#lf-step-2:checked) .lf-step-bar::after {
right: 0;
}
.lf-step:has(#lf-step-2:checked) .lf-step-now::after {
content: "2";
}
.lf-step-now {
font-weight: 700;
color: #f0eeff;
}
.lf-step-now::after {
content: "1";
}
.lf-step-now {
font-size: 0;
}
.lf-step-now::after {
font-size: 11px;
}
.lf-step-track {
display: grid;
grid-template-columns: 100% 100%;
width: 100%;
transition: transform 0.4s cubic-bezier(0.6, 0, 0.2, 1);
}
.lf-step:has(#lf-step-2:checked) .lf-step-track {
transform: translateX(-100%);
}
.lf-step-pane {
border: 0;
padding: 0;
margin: 0;
display: grid;
gap: 12px;
min-width: 0;
}
.lf-step-label {
font-size: 13px;
font-weight: 600;
color: #f0eeff;
padding: 0;
}
.lf-step-row input {
width: 100%;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 10px 12px;
font-size: 13px;
color: #f0eeff;
outline: none;
transition: border-color 0.15s;
}
.lf-step-row input:focus {
border-color: #7c6cff;
}
.lf-step-actions {
display: grid;
grid-template-columns: auto 1fr;
gap: 8px;
}
.lf-step-btn {
padding: 10px 14px;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
text-align: center;
border: 1px solid transparent;
transition:
transform 0.12s,
background 0.15s;
}
.lf-step-btn.primary {
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
}
.lf-step-btn.primary:hover {
transform: translateY(-1px);
}
.lf-step-btn.ghost {
background: transparent;
color: #b8b6d4;
border-color: rgba(255, 255, 255, 0.1);
}
.lf-step-btn.ghost:hover {
color: #f0eeff;
background: rgba(255, 255, 255, 0.04);
}
```
### 15. Animated Gradient Border
**Type:** Pure CSS
**Description:** Animated rainbow gradient border login form. A `@property`-driven conic gradient genuinely rotates around the card edge — true property animation, not a keyframes hack.
**HTML:**
```html
```
**CSS:**
```css
@property --lf-prop-angle {
syntax: "";
inherits: false;
initial-value: 0deg;
}
.lf-prop {
position: relative;
width: 100%;
max-width: 320px;
border-radius: 16px;
padding: 1.5px;
background: conic-gradient(
from var(--lf-prop-angle, 0deg),
#7c6cff,
#ff6c8a,
#2eb88a,
#f5b454,
#7c6cff
);
animation: lfPropSpin 5s linear infinite;
}
@keyframes lfPropSpin {
to {
--lf-prop-angle: 360deg;
}
}
.lf-prop::before {
content: "";
position: absolute;
inset: -22px;
z-index: -1;
background: inherit;
filter: blur(28px);
opacity: 0.45;
border-radius: inherit;
}
.lf-prop-inner {
background: #15151d;
border-radius: 14.5px;
padding: 24px 22px;
display: grid;
gap: 12px;
}
.lf-prop-title {
margin: 0;
font-size: 17px;
font-weight: 700;
color: #f0eeff;
}
.lf-prop-sub {
margin: -6px 0 4px;
font-size: 12px;
color: #b8b6d4;
}
.lf-prop-field {
display: grid;
gap: 5px;
font-size: 11px;
color: #b8b6d4;
}
.lf-prop-field input {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 10px 12px;
font-size: 13px;
color: #f0eeff;
outline: none;
transition:
border-color 0.15s,
box-shadow 0.15s;
}
.lf-prop-field input:focus {
border-color: #7c6cff;
box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.15);
}
.lf-prop-btn {
margin-top: 4px;
padding: 11px;
background: #f0eeff;
color: #15151d;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 700;
cursor: pointer;
transition: transform 0.12s;
}
.lf-prop-btn:hover {
transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
.lf-prop,
.lf-prop * {
animation: none !important;
}
}
```
### 16. Vault Lock
**Type:** Pure CSS
**Description:** Vault-style secure login form. The lock dial rotates and the bolt slides open the moment the password field gains focus — pure CSS, driven by `:focus-within` and `:has()`.
**HTML:**
```html
```
**CSS:**
```css
.lf-vault {
width: 100%;
max-width: 300px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 16px;
padding: 26px 22px 22px;
display: grid;
gap: 10px;
justify-items: center;
text-align: center;
}
.lf-vault-lock {
position: relative;
margin: 0 0 6px;
width: 60px;
height: 60px;
border-radius: 50%;
background: radial-gradient(circle at 35% 30%, #2a2a36 0%, #15151d 70%);
border: 2px solid #2eb88a;
box-shadow:
0 0 0 4px rgba(46, 184, 138, 0.08),
0 0 24px rgba(46, 184, 138, 0.25);
transition:
border-color 0.3s,
box-shadow 0.3s;
}
.lf-vault-dial {
position: absolute;
top: 50%;
left: 50%;
width: 26px;
height: 3px;
background: #2eb88a;
border-radius: 2px;
transform: translate(-50%, -50%) rotate(35deg);
transform-origin: center;
transition:
transform 0.5s cubic-bezier(0.5, 0, 0.3, 1.3),
background 0.3s;
}
.lf-vault-dial::after {
content: "";
position: absolute;
inset: -3px auto -3px -3px;
width: 9px;
border-radius: 50%;
background: #2eb88a;
transition: background 0.3s;
}
.lf-vault-bolt {
position: absolute;
bottom: -8px;
left: 50%;
width: 14px;
height: 18px;
background: #2eb88a;
border-radius: 3px;
transform: translateX(-50%) translateY(0);
transition:
transform 0.35s ease,
background 0.3s;
}
.lf-vault:has(.lf-vault-pw input:focus) .lf-vault-lock {
border-color: #7c6cff;
box-shadow:
0 0 0 4px rgba(124, 108, 255, 0.12),
0 0 28px rgba(124, 108, 255, 0.45);
}
.lf-vault:has(.lf-vault-pw input:focus) .lf-vault-dial {
transform: translate(-50%, -50%) rotate(220deg);
background: #7c6cff;
}
.lf-vault:has(.lf-vault-pw input:focus) .lf-vault-dial::after {
background: #7c6cff;
}
.lf-vault:has(.lf-vault-pw input:focus) .lf-vault-bolt {
transform: translateX(-50%) translateY(8px);
background: #7c6cff;
}
.lf-vault-title {
margin: 0;
font-size: 15px;
font-weight: 700;
color: #f0eeff;
}
.lf-vault-sub {
margin: 0 0 4px;
font-size: 11px;
color: #b8b6d4;
}
.lf-vault-field {
display: grid;
gap: 4px;
font-size: 11px;
color: #b8b6d4;
width: 100%;
text-align: left;
}
.lf-vault-field input {
width: 100%;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 10px 12px;
font-size: 13px;
color: #f0eeff;
outline: none;
transition: border-color 0.15s;
}
.lf-vault-field input:focus {
border-color: #7c6cff;
}
.lf-vault-btn {
width: 100%;
padding: 11px;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 700;
cursor: pointer;
transition: transform 0.12s;
}
.lf-vault-btn:hover {
transform: translateY(-1px);
}
```
### 17. Brutalist Stamp
**Type:** Pure CSS
**Description:** Brutalist login form with heavy borders, hard-edge offset shadow, and a stamp-style badge. A confident no-nonsense look for portfolios, dev tools, and editorial brands.
**HTML:**
```html
```
**CSS:**
```css
.lf-brut {
position: relative;
width: 100%;
max-width: 320px;
background: #fef9c3;
border: 2.5px solid #15151d;
border-radius: 6px;
padding: 22px 20px;
display: grid;
gap: 12px;
box-shadow: 6px 6px 0 0 #15151d;
font-family: "JetBrains Mono", "DM Mono", monospace;
}
.lf-brut-stamp {
position: absolute;
top: -14px;
right: 12px;
background: #ef4444;
color: #fef9c3;
border: 2px solid #15151d;
padding: 2px 10px;
font-size: 10px;
font-weight: 800;
letter-spacing: 0.18em;
display: inline-flex;
gap: 6px;
transform: rotate(2deg);
box-shadow: 3px 3px 0 #15151d;
}
.lf-brut-title {
margin: 0;
font-size: 22px;
font-weight: 800;
color: #15151d;
letter-spacing: -0.02em;
}
.lf-brut-sub {
margin: -6px 0 4px;
font-size: 12px;
color: #4a4a5e;
}
.lf-brut-row {
display: grid;
gap: 4px;
font-size: 10px;
font-weight: 800;
letter-spacing: 0.14em;
color: #15151d;
}
.lf-brut-row input {
background: #fff;
border: 2px solid #15151d;
border-radius: 4px;
padding: 9px 12px;
font-size: 13px;
font-family: inherit;
color: #15151d;
outline: none;
transition:
box-shadow 0.15s,
transform 0.12s;
}
.lf-brut-row input:focus {
box-shadow: 4px 4px 0 #15151d;
transform: translate(-2px, -2px);
}
.lf-brut-btn {
background: #15151d;
color: #fef9c3;
border: 2px solid #15151d;
border-radius: 4px;
padding: 11px;
font-family: inherit;
font-size: 13px;
font-weight: 800;
letter-spacing: 0.14em;
cursor: pointer;
transition:
transform 0.12s,
box-shadow 0.15s,
background 0.15s,
color 0.15s;
}
.lf-brut-btn:hover {
background: #ef4444;
color: #fef9c3;
transform: translate(-2px, -2px);
box-shadow: 4px 4px 0 #15151d;
}
```
### 18. Show Password Toggle
**Type:** Light JS
**Description:** Login form with a show / hide password toggle. Inline eye-icon button with proper `aria-pressed` and `aria-label` handling for accessibility.
**HTML:**
```html
```
**CSS:**
```css
.lf-show {
width: 100%;
max-width: 320px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 14px;
padding: 26px 24px;
display: grid;
gap: 12px;
}
.lf-show-title {
margin: 0;
font-size: 17px;
font-weight: 700;
color: #f0eeff;
}
.lf-show-row {
display: grid;
gap: 5px;
font-size: 11px;
color: #b8b6d4;
}
.lf-show-row input {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 10px 12px;
font-size: 13px;
color: #f0eeff;
outline: none;
transition: border-color 0.15s;
}
.lf-show-row input:focus {
border-color: #7c6cff;
}
.lf-show-pw {
position: relative;
display: block;
}
.lf-show-pw input {
width: 100%;
box-sizing: border-box;
padding-right: 38px;
}
.lf-show-eye {
position: absolute;
right: 6px;
top: 50%;
transform: translateY(-50%);
width: 28px;
height: 28px;
display: grid;
place-items: center;
background: transparent;
border: 1px solid transparent;
border-radius: 6px;
color: #b8b6d4;
cursor: pointer;
transition:
color 0.15s,
background 0.15s,
border-color 0.15s;
}
.lf-show-eye:hover {
color: #f0eeff;
background: rgba(255, 255, 255, 0.04);
}
.lf-show-eye[aria-pressed="true"] {
color: #7c6cff;
border-color: rgba(124, 108, 255, 0.4);
background: rgba(124, 108, 255, 0.08);
}
.lf-show-meta {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 11px;
color: #b8b6d4;
}
.lf-show-meta input {
accent-color: #7c6cff;
margin-right: 4px;
}
.lf-show-meta a {
color: #a78bfa;
text-decoration: none;
}
.lf-show-submit {
margin-top: 4px;
padding: 11px;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: transform 0.12s;
}
.lf-show-submit:hover {
transform: translateY(-1px);
}
/* ─── tiny JS to toggle reveal ─── */
/*
document.querySelectorAll('[data-lf-eye]').forEach(btn => {
btn.addEventListener('click', () => {
const input = btn.previousElementSibling;
const next = input.type === 'password' ? 'text' : 'password';
input.type = next;
btn.setAttribute('aria-pressed', String(next === 'text'));
btn.setAttribute('aria-label', next === 'text' ? 'Hide password' : 'Show password');
});
});
*/
```
**JS:**
```js
// Show / hide password toggle
document.querySelectorAll('[data-lf-eye]').forEach(function (btn) {
btn.addEventListener('click', function () {
var input = btn.previousElementSibling;
if (!input) return;
var next = input.type === 'password' ? 'text' : 'password';
input.type = next;
var revealed = next === 'text';
btn.setAttribute('aria-pressed', String(revealed));
btn.setAttribute('aria-label', revealed ? 'Hide password' : 'Show password');
});
});
```
### 19. OTP Verify
**Type:** Light JS
**Description:** OTP / one-time-passcode login form. Six digit boxes with auto-advance, backspace step-back, paste-to-fill, and `autocomplete="one-time-code"` for SMS auto-suggest.
**HTML:**
```html
```
**CSS:**
```css
.lf-otp {
width: 100%;
max-width: 320px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 14px;
padding: 26px 22px;
display: grid;
gap: 12px;
text-align: center;
}
.lf-otp-title {
margin: 0;
font-size: 16px;
font-weight: 700;
color: #f0eeff;
}
.lf-otp-sub {
margin: -4px 0 6px;
font-size: 12px;
color: #b8b6d4;
line-height: 1.5;
}
.lf-otp-sub strong {
color: #f0eeff;
font-weight: 600;
}
.lf-otp-row {
border: 0;
padding: 0;
margin: 4px 0;
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
}
.lf-otp-legend {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.lf-otp-row input {
width: 100%;
box-sizing: border-box;
aspect-ratio: 1 / 1;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
font-size: 18px;
font-weight: 700;
text-align: center;
color: #f0eeff;
outline: none;
caret-color: #7c6cff;
transition:
border-color 0.15s,
background 0.15s,
transform 0.12s;
}
.lf-otp-row input:focus {
border-color: #7c6cff;
background: rgba(124, 108, 255, 0.08);
transform: translateY(-1px);
}
.lf-otp-btn {
margin-top: 4px;
padding: 11px;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
}
.lf-otp-foot {
margin: 0;
font-size: 11px;
color: #b8b6d4;
}
.lf-otp-foot a {
color: #a78bfa;
text-decoration: none;
}
/* ─── tiny JS to auto-advance & step back ─── */
/*
document.querySelectorAll('[data-lf-otp]').forEach((input, i, all) => {
input.addEventListener('input', () => {
input.value = input.value.replace(/\\D/g, '').slice(0, 1);
if (input.value && all[i + 1]) all[i + 1].focus();
});
input.addEventListener('keydown', e => {
if (e.key === 'Backspace' && !input.value && all[i - 1]) all[i - 1].focus();
});
});
*/
```
**JS:**
```js
// OTP auto-advance + backspace navigation + paste
document.querySelectorAll('.lf-otp-row').forEach(function (row) {
var inputs = Array.prototype.slice.call(row.querySelectorAll('[data-lf-otp]'));
inputs.forEach(function (input, i) {
input.addEventListener('input', function () {
input.value = (input.value || '').replace(/D/g, '').slice(0, 1);
if (input.value && inputs[i + 1]) inputs[i + 1].focus();
});
input.addEventListener('keydown', function (e) {
if (e.key === 'Backspace' && !input.value && inputs[i - 1]) {
inputs[i - 1].focus();
}
});
input.addEventListener('paste', function (e) {
var data = (e.clipboardData || window.clipboardData).getData('text');
var digits = (data || '').replace(/D/g, '').slice(0, inputs.length);
if (!digits) return;
e.preventDefault();
for (var j = 0; j < digits.length; j++) {
if (inputs[i + j]) inputs[i + j].value = digits[j];
}
var next = Math.min(i + digits.length, inputs.length - 1);
inputs[next].focus();
});
});
});
```
### 20. Strength Meter
**Type:** Pure CSS
**Description:** Sign-up form with a live password strength meter. The bar grows red → amber → green as the password gets stronger — driven entirely by `:has()` and `:valid`, no JavaScript scoring.
**HTML:**
```html
```
**CSS:**
```css
.lf-str {
width: 100%;
max-width: 320px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 14px;
padding: 24px 22px;
display: grid;
gap: 12px;
}
.lf-str-title {
margin: 0;
font-size: 17px;
font-weight: 700;
color: #f0eeff;
}
.lf-str-row {
display: grid;
gap: 6px;
font-size: 11px;
color: #b8b6d4;
}
.lf-str-row > input {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 10px 12px;
font-size: 13px;
color: #f0eeff;
outline: none;
transition: border-color 0.15s;
}
.lf-str-row > input:focus {
border-color: #7c6cff;
}
.lf-str-meter {
position: relative;
height: 4px;
border-radius: 99px;
background: rgba(255, 255, 255, 0.06);
overflow: hidden;
}
.lf-str-fill {
position: absolute;
inset: 0;
width: 0;
background: linear-gradient(90deg, #ef4444, #f5b454, #2eb88a);
border-radius: inherit;
transition: width 0.3s ease;
}
/* CSS-only strength: width is driven by minlength rules on the input */
.lf-str-row:has(input[type="password"][value=""]) .lf-str-fill {
width: 0;
}
.lf-str-row:has(input[type="password"]:invalid) .lf-str-fill {
width: 30%;
}
.lf-str-row:has(input[type="password"]:valid) .lf-str-fill {
width: 60%;
}
/* attribute selector — pattern-match longer values for full bar */
.lf-str-row:has(input[type="password"][minlength]:valid)
> input[type="password"]:not(:placeholder-shown):required {
/* selector keepalive */
}
.lf-str-row:has(input:focus:valid) .lf-str-fill {
width: 100%;
}
.lf-str-hint {
font-size: 10.5px;
color: #b8b6d4;
line-height: 1.5;
}
.lf-str-btn {
margin-top: 4px;
padding: 11px;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: transform 0.12s;
}
.lf-str-btn:hover {
transform: translateY(-1px);
}
```
### 21. Pin Pad
**Type:** Pure CSS
**Description:** Numeric PIN login form. A 3×4 keypad styled like a hardware keypad with live filled-dot indicator — perfect for kiosks, secure dashboards, and short PIN auth flows.
**HTML:**
```html
```
**CSS:**
```css
.lf-pin {
width: 100%;
max-width: 240px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 16px;
padding: 22px 20px 18px;
display: grid;
gap: 14px;
text-align: center;
}
.lf-pin-title {
margin: 0;
font-size: 14px;
font-weight: 700;
color: #f0eeff;
letter-spacing: 0.04em;
}
.lf-pin-display {
display: flex;
gap: 12px;
justify-content: center;
padding: 8px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lf-pin-dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.12);
transition:
background 0.2s,
transform 0.2s;
}
.lf-pin-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
}
.lf-pin-key {
aspect-ratio: 1 / 1;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 10px;
font-size: 16px;
font-weight: 600;
color: #f0eeff;
cursor: pointer;
transition:
background 0.12s,
transform 0.08s,
border-color 0.15s;
}
.lf-pin-key:hover {
background: rgba(255, 255, 255, 0.08);
border-color: rgba(255, 255, 255, 0.18);
}
.lf-pin-key:active {
transform: scale(0.95);
background: rgba(124, 108, 255, 0.18);
}
.lf-pin-key-fn {
color: #b8b6d4;
}
.lf-pin-key-go {
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
border-color: transparent;
}
.lf-pin-key-go:hover {
transform: translateY(-1px);
}
```
### 22. Inline Validation
**Type:** Pure CSS
**Description:** Login form with real-time inline validation. Each field shows a green checkmark when valid and a red icon when invalid, driven by `:valid` / `:invalid` and pseudo-elements — no JavaScript.
**HTML:**
```html
```
**CSS:**
```css
.lf-val {
width: 100%;
max-width: 320px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 14px;
padding: 26px 22px;
display: grid;
gap: 12px;
}
.lf-val-title {
margin: 0;
font-size: 17px;
font-weight: 700;
color: #f0eeff;
}
.lf-val-sub {
margin: -6px 0 4px;
font-size: 12px;
color: #b8b6d4;
}
.lf-val-row {
display: grid;
gap: 5px;
font-size: 11px;
color: #b8b6d4;
position: relative;
}
.lf-val-row input {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 10px 38px 10px 12px;
font-size: 13px;
color: #f0eeff;
outline: none;
transition:
border-color 0.15s,
background 0.15s;
}
.lf-val-row input:focus {
border-color: #7c6cff;
}
.lf-val-row::after {
content: "";
position: absolute;
right: 12px;
bottom: 12px;
width: 16px;
height: 16px;
border-radius: 50%;
background: transparent;
transform: scale(0.5);
opacity: 0;
transition:
transform 0.2s,
opacity 0.2s,
background 0.2s;
}
.lf-val-row:has(input:not(:placeholder-shown):invalid) input {
border-color: rgba(255, 108, 138, 0.6);
}
.lf-val-row:has(input:not(:placeholder-shown):invalid)::after {
opacity: 1;
transform: scale(1);
background: #ff6c8a
url("data:image/svg+xml;utf8, ")
center/10px no-repeat;
}
.lf-val-row:has(input:not(:placeholder-shown):valid) input {
border-color: rgba(46, 184, 138, 0.55);
}
.lf-val-row:has(input:not(:placeholder-shown):valid)::after {
opacity: 1;
transform: scale(1);
background: #2eb88a
url("data:image/svg+xml;utf8, ")
center/10px no-repeat;
}
.lf-val-btn {
margin-top: 4px;
padding: 11px;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: transform 0.12s;
}
.lf-val-btn:hover {
transform: translateY(-1px);
}
```
### 23. Constellation
**Type:** Pure CSS
**Description:** Animated starfield login form. A subtle constellation drifts behind the card with staggered twinkling stars and periodic shooting-star streaks.
**HTML:**
```html
```
**CSS:**
```css
.lf-cons {
position: relative;
isolation: isolate;
width: 100%;
max-width: 320px;
border-radius: 18px;
overflow: hidden;
background: radial-gradient(ellipse at top, #1a1838 0%, #07071a 70%);
}
.lf-cons-sky {
position: absolute;
inset: 0;
z-index: 0;
pointer-events: none;
}
.lf-cons-star {
position: absolute;
width: 2px;
height: 2px;
background: white;
border-radius: 50%;
box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
animation: lfConsTwinkle 3s ease-in-out infinite;
}
.lf-cons-star.s1 {
top: 12%;
left: 18%;
animation-delay: 0s;
}
.lf-cons-star.s2 {
top: 24%;
left: 70%;
animation-delay: 0.6s;
}
.lf-cons-star.s3 {
top: 38%;
left: 32%;
animation-delay: 1.2s;
width: 1.5px;
height: 1.5px;
}
.lf-cons-star.s4 {
top: 54%;
left: 84%;
animation-delay: 1.8s;
}
.lf-cons-star.s5 {
top: 68%;
left: 14%;
animation-delay: 0.3s;
width: 1.5px;
height: 1.5px;
}
.lf-cons-star.s6 {
top: 80%;
left: 56%;
animation-delay: 1s;
}
@keyframes lfConsTwinkle {
0%,
100% {
opacity: 0.35;
transform: scale(0.8);
}
50% {
opacity: 1;
transform: scale(1.4);
}
}
.lf-cons-shoot {
position: absolute;
top: 18%;
left: -10%;
width: 60px;
height: 1.5px;
background: linear-gradient(90deg, transparent, #fff, transparent);
transform: rotate(-18deg);
animation: lfConsShoot 6s ease-in infinite;
opacity: 0;
}
@keyframes lfConsShoot {
0%,
88% {
transform: translateX(0) rotate(-18deg);
opacity: 0;
}
92% {
opacity: 1;
}
100% {
transform: translateX(380px) rotate(-18deg);
opacity: 0;
}
}
.lf-cons-card {
position: relative;
z-index: 1;
margin: 22px;
padding: 22px;
border-radius: 14px;
background: rgba(7, 7, 26, 0.55);
border: 1px solid rgba(255, 255, 255, 0.12);
backdrop-filter: blur(10px);
display: grid;
gap: 11px;
}
.lf-cons-title {
margin: 0;
font-size: 16px;
font-weight: 700;
color: #fff;
}
.lf-cons-sub {
margin: -6px 0 4px;
font-size: 12px;
color: rgba(255, 255, 255, 0.6);
}
.lf-cons-row input {
width: 100%;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 8px;
padding: 10px 12px;
font-size: 13px;
color: #fff;
outline: none;
transition: border-color 0.15s;
}
.lf-cons-row input::placeholder {
color: rgba(255, 255, 255, 0.55);
}
.lf-cons-row input:focus {
border-color: rgba(255, 255, 255, 0.5);
}
.lf-cons-btn {
margin-top: 4px;
padding: 10px;
background: linear-gradient(135deg, #c4b5fd, #818cf8);
color: #07071a;
border: none;
border-radius: 8px;
font-size: 13px;
font-weight: 700;
cursor: pointer;
transition: transform 0.12s;
}
.lf-cons-btn:hover {
transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
.lf-cons,
.lf-cons * {
animation: none !important;
}
}
```
### 24. Biometric Prompt
**Type:** Pure CSS
**Description:** Biometric / passkey login form. A fingerprint button takes centre stage with an animated scan line; email + password stay available below as a quiet fallback inside ``.
**HTML:**
```html
```
**CSS:**
```css
.lf-bio {
width: 100%;
max-width: 280px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 16px;
padding: 28px 22px 22px;
display: grid;
gap: 8px;
justify-items: center;
text-align: center;
}
.lf-bio-print {
position: relative;
width: 86px;
height: 86px;
border-radius: 50%;
background: radial-gradient(circle at 30% 30%, #2a2a36 0%, #0a0a14 70%);
border: 1px solid rgba(124, 108, 255, 0.4);
color: #c8c0ff;
display: grid;
place-items: center;
cursor: pointer;
overflow: hidden;
box-shadow:
0 0 0 4px rgba(124, 108, 255, 0.05),
0 8px 24px -8px rgba(124, 108, 255, 0.45);
transition:
transform 0.15s,
box-shadow 0.25s;
}
.lf-bio-print:hover {
transform: translateY(-1px);
box-shadow:
0 0 0 6px rgba(124, 108, 255, 0.1),
0 12px 32px -8px rgba(124, 108, 255, 0.6);
}
.lf-bio-scan {
position: absolute;
left: 0;
right: 0;
top: 0;
height: 12px;
background: linear-gradient(180deg, transparent, rgba(124, 108, 255, 0.65), transparent);
animation: lfBioScan 2.4s ease-in-out infinite;
}
@keyframes lfBioScan {
0%,
100% {
transform: translateY(0);
opacity: 0.9;
}
50% {
transform: translateY(74px);
opacity: 1;
}
}
.lf-bio-title {
margin: 8px 0 0;
font-size: 14px;
font-weight: 700;
color: #f0eeff;
}
.lf-bio-sub {
margin: 0;
font-size: 12px;
color: #b8b6d4;
}
.lf-bio-divider {
width: 100%;
margin: 8px 0 4px;
border: 0;
border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.lf-bio-fallback {
width: 100%;
text-align: left;
}
.lf-bio-fallback summary {
font-size: 11px;
color: #a78bfa;
cursor: pointer;
list-style: none;
padding: 4px 0;
text-align: center;
user-select: none;
}
.lf-bio-fallback summary::-webkit-details-marker {
display: none;
}
.lf-bio-fallback summary:hover {
color: #c8c0ff;
}
.lf-bio-fallback[open] {
display: grid;
gap: 8px;
}
.lf-bio-fallback[open] summary {
margin-bottom: 4px;
}
.lf-bio-row input {
width: 100%;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 9px 12px;
font-size: 13px;
color: #f0eeff;
outline: none;
transition: border-color 0.15s;
}
.lf-bio-row input:focus {
border-color: #7c6cff;
}
.lf-bio-submit {
width: 100%;
padding: 9px;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: white;
border: none;
border-radius: 8px;
font-size: 12px;
font-weight: 600;
cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
.lf-bio,
.lf-bio * {
animation: none !important;
}
}
```
---
## 14 Material Design CSS Components
URL: https://codefronts.com/design-styles/css-material-designs/
Description: 14 hand-coded Material Design CSS components covering every production Material Design 3 (Material You) pattern in 2026 — Material elevated/filled/outlined buttons with ripple, elevated content cards, sidebar + top app bar navigation, floating-label form inputs, dialog modal with backdrop, sortable data table, ripple-driven tabs, removable chips with leading icons, vertical stepper, four tooltip variants, accordion expansion panels, two-line list with leading avatars, the full 500-shade Material color palette swatcher, and a complete responsive app shell with collapsible drawer. All 100% pure CSS — zero JavaScript, zero libraries (no Material UI, no MUI, no Material Components Web, no MDL). Interactive behaviour driven by checkbox / radio state machines + :checked / :has() selectors. Every demo respects prefers-reduced-motion, uses scoped .md-NN__* class names so multiple components coexist on the same page, and ships MIT-licensed. Drop into React, Vue, Astro, Svelte, Rails, plain HTML — zero framework dependencies.
Demo count: 14
### 01. Material Design Buttons CSS
**Type:** Pure CSS
**Description:** Filled, outlined, text, elevated, tonal, and FAB buttons plus toggle groups and filter chips — all Material Design 3, zero JavaScript.
**HTML:**
```html
Material Design 3 Buttons
Production-ready CSS button components — filled, outlined, text, FAB, icon & chip variants
Contained / Filled Buttons
🚀 Launch
✓ Confirm
✕ Delete
⚠ Warning
↓ Download
Disabled
Outlined Buttons
♡ Save
↗ Share
🗑 Remove
Text Buttons
Learn more
View details
Cancel
Skip for now
Floating Action Buttons
+
✏
♥
✏ Compose
+ New item
Filter Chip Buttons
✓ All
🎨 Design
⚡ Development
📱 Mobile
☁ Cloud
🔒 Security
```
**CSS:**
```css
.md-01,.md-01 *,.md-01 *::before,.md-01 *::after{box-sizing:border-box;margin:0;padding:0}
.md-01 ::selection{background:#6200ea;color:#fff}
.md-01{
--md-primary:#6200ea;
--md-secondary:#03dac6;
--md-error:#b00020;
--md-warning:#ff6d00;
--md-success:#00c853;
--md-surface:#fff;
--md-bg:#f5f5f5;
--md-on-primary:#fff;
--md-ink:#212121;
--md-ink2:#757575;
--md-elev1:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);
--md-elev2:0 3px 6px rgba(0,0,0,.15),0 2px 4px rgba(0,0,0,.12);
--md-elev4:0 10px 20px rgba(0,0,0,.15),0 3px 6px rgba(0,0,0,.1);
--md-elev6:0 15px 25px rgba(0,0,0,.15),0 5px 10px rgba(0,0,0,.05);
font-family:'Roboto',sans-serif;
background:var(--md-bg);
min-height:100vh;
padding:48px 24px 80px;
color:var(--md-ink);
}
.md-01__page-title{font-size:clamp(1.4rem,4vw,2rem);font-weight:700;letter-spacing:-.01em;margin-bottom:4px;color:var(--md-ink)}
.md-01__page-sub{font-size:.9rem;color:var(--md-ink2);margin-bottom:48px}
.md-01__section{margin-bottom:48px}
.md-01__section-label{font-size:.7rem;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--md-ink2);margin-bottom:20px;display:flex;align-items:center;gap:10px}
.md-01__section-label::after{content:'';flex:1;height:1px;background:#e0e0e0}
.md-01__row{display:flex;flex-wrap:wrap;gap:16px;align-items:center}
/* ── Contained (Filled) ── */
.md-01__btn{
position:relative;overflow:hidden;
display:inline-flex;align-items:center;justify-content:center;gap:8px;
border:none;border-radius:4px;cursor:pointer;
font-family:'Roboto';font-size:.875rem;font-weight:500;letter-spacing:.089em;text-transform:uppercase;
padding:0 16px;height:36px;
transition:box-shadow .2s cubic-bezier(.4,0,.2,1);
white-space:nowrap;
}
.md-01__btn::after{
content:'';position:absolute;top:50%;left:50%;
width:0;height:0;border-radius:50%;
transform:translate(-50%,-50%);
transition:width .4s ease,height .4s ease,opacity .4s ease;
opacity:0;
}
.md-01__btn:hover::after{width:200px;height:200px;opacity:.1}
.md-01__btn:active::after{width:220px;height:220px;opacity:.2;transition:width .1s,height .1s,opacity .1s}
/* contained variants */
.md-01__btn--filled{background:var(--md-primary);color:#fff;box-shadow:var(--md-elev1)}
.md-01__btn--filled:hover{box-shadow:var(--md-elev2)}
.md-01__btn--filled::after{background:#fff}
.md-01__btn--filled-teal{background:var(--md-secondary);color:#000}
.md-01__btn--filled-teal:hover{box-shadow:var(--md-elev2)}
.md-01__btn--filled-teal::after{background:#000}
.md-01__btn--filled-err{background:var(--md-error);color:#fff;box-shadow:var(--md-elev1)}
.md-01__btn--filled-err:hover{box-shadow:var(--md-elev2)}
.md-01__btn--filled-err::after{background:#fff}
.md-01__btn--filled-warn{background:var(--md-warning);color:#fff;box-shadow:var(--md-elev1)}
.md-01__btn--filled-warn:hover{box-shadow:var(--md-elev2)}
.md-01__btn--filled-warn::after{background:#fff}
.md-01__btn--filled-ok{background:var(--md-success);color:#fff;box-shadow:var(--md-elev1)}
.md-01__btn--filled-ok:hover{box-shadow:var(--md-elev2)}
.md-01__btn--filled-ok::after{background:#fff}
/* outlined */
.md-01__btn--outlined{background:transparent;color:var(--md-primary);border:1px solid rgba(98,0,234,.5)}
.md-01__btn--outlined:hover{background:rgba(98,0,234,.04);border-color:var(--md-primary)}
.md-01__btn--outlined::after{background:var(--md-primary)}
.md-01__btn--outlined-teal{background:transparent;color:#018786;border:1px solid rgba(1,135,134,.5)}
.md-01__btn--outlined-teal:hover{background:rgba(1,135,134,.04)}
.md-01__btn--outlined-teal::after{background:#018786}
.md-01__btn--outlined-err{background:transparent;color:var(--md-error);border:1px solid rgba(176,0,32,.5)}
.md-01__btn--outlined-err:hover{background:rgba(176,0,32,.04)}
.md-01__btn--outlined-err::after{background:var(--md-error)}
/* text */
.md-01__btn--text{background:transparent;color:var(--md-primary);padding:0 8px}
.md-01__btn--text:hover{background:rgba(98,0,234,.04)}
.md-01__btn--text::after{background:var(--md-primary)}
.md-01__btn--text-teal{background:transparent;color:#018786;padding:0 8px}
.md-01__btn--text-teal:hover{background:rgba(1,135,134,.04)}
.md-01__btn--text-teal::after{background:#018786}
/* icon + label */
.md-01__btn-icon{font-size:1.1rem;line-height:1}
/* disabled */
.md-01__btn--disabled{background:rgba(0,0,0,.12);color:rgba(0,0,0,.37);cursor:not-allowed;pointer-events:none;box-shadow:none}
/* FAB */
.md-01__fab{
position:relative;overflow:hidden;
width:56px;height:56px;border-radius:16px;border:none;cursor:pointer;
background:var(--md-primary);color:#fff;
display:inline-flex;align-items:center;justify-content:center;
font-size:1.4rem;
box-shadow:var(--md-elev4);
transition:box-shadow .2s,transform .2s;
}
.md-01__fab:hover{box-shadow:var(--md-elev6);transform:translateY(-2px)}
.md-01__fab::after{content:'';position:absolute;top:50%;left:50%;width:0;height:0;border-radius:50%;background:#fff;transform:translate(-50%,-50%);transition:width .4s ease,height .4s ease,opacity .4s ease;opacity:0}
.md-01__fab:hover::after{width:80px;height:80px;opacity:.15}
.md-01__fab--mini{width:40px;height:40px;border-radius:12px;font-size:1.1rem;background:var(--md-secondary);color:#000;box-shadow:var(--md-elev2)}
.md-01__fab--extended{width:auto;padding:0 20px;gap:10px;border-radius:16px;font-family:'Roboto';font-size:.875rem;font-weight:500;letter-spacing:.089em;text-transform:uppercase}
.md-01__fab--teal{background:var(--md-secondary);color:#000}
.md-01__fab--teal::after{background:#000}
/* Icon buttons */
.md-01__iconbtn{
position:relative;overflow:hidden;
width:40px;height:40px;border-radius:50%;border:none;cursor:pointer;
background:transparent;color:var(--md-primary);
display:inline-flex;align-items:center;justify-content:center;
font-size:1.3rem;
transition:background .2s;
}
.md-01__iconbtn:hover{background:rgba(98,0,234,.08)}
.md-01__iconbtn--filled{background:var(--md-primary);color:#fff}
.md-01__iconbtn--filled:hover{box-shadow:var(--md-elev1)}
.md-01__iconbtn--outlined{border:1px solid rgba(98,0,234,.4)}
.md-01__iconbtn--tonal{background:rgba(98,0,234,.12);color:var(--md-primary)}
/* toggle group */
.md-01__toggle-group{display:inline-flex;border:1px solid #c4c4c4;border-radius:4px;overflow:hidden}
.md-01__toggle-group input[type=radio]{display:none}
.md-01__toggle-group label{
display:inline-flex;align-items:center;justify-content:center;gap:6px;
padding:0 16px;height:36px;cursor:pointer;
font-family:'Roboto';font-size:.875rem;font-weight:500;letter-spacing:.089em;text-transform:uppercase;
color:var(--md-primary);background:#fff;
border-right:1px solid #c4c4c4;
transition:background .15s;
user-select:none;
}
.md-01__toggle-group label:last-of-type{border-right:none}
.md-01__toggle-group input:checked + label{background:rgba(98,0,234,.12)}
/* chip buttons */
.md-01__chip{
display:inline-flex;align-items:center;gap:6px;
height:32px;padding:0 12px;border-radius:8px;
border:1px solid #c4c4c4;background:#fff;
font-family:'Roboto';font-size:.875rem;font-weight:400;
color:var(--md-ink);cursor:pointer;
transition:background .15s,box-shadow .15s;
}
.md-01__chip:hover{box-shadow:var(--md-elev1);background:#f9f9f9}
.md-01__chip--selected{background:rgba(98,0,234,.12);border-color:var(--md-primary);color:var(--md-primary)}
.md-01__chip-icon{font-size:.9rem}
@media(prefers-reduced-motion:reduce){.md-01 *{transition:none!important;animation:none!important}}
```
### 02. Material Design Card CSS
**Type:** Pure CSS
**Description:** Elevated, outlined, tonal, horizontal, social-media, stats, and profile cards showcasing Material Design 3 shape tokens, elevation shadows, and colour roles.
**HTML:**
```html
Material Design 3 Cards
Elevated, outlined, tonal and horizontal card patterns — pure CSS Material Design components
🌊
Ocean Series
Deep Blue UI Components
A comprehensive set of Material Design 3 components crafted for modern web applications.
CSS
Design
Share
Explore
🎨
Just shipped the new icon system for our design tokens library. 340 icons, fully optimised SVGs!
♥ Like
💬 Comment
↗ Share
Revenue · June 2025
$84,240
↑ 12.4% vs last month
🎵
Now Playing
Midnight Motion
Aurora Collective · 3:24
⏮
⏸
⏭
Product · Limited Edition
Sunset Ceramic Mug
Handcrafted from high-fire stoneware with a reactive glaze finish. Each piece is uniquely patterned.
$42.00
$58.00
♡ Wishlist
🛒 Add to Cart
📅
Team Standup
Today · 10:00 AM – 10:30 AM
Decline
Join Call
✅
Sprint Goal Achieved
All 24 story points completed ahead of schedule.
JK
Jordan Kim
Senior Product Designer at Nexus Co.
🎨 Figma
✦ Framer
⚡ CSS
Message
Follow
```
**CSS:**
```css
.md-02,.md-02 *,.md-02 *::before,.md-02 *::after{box-sizing:border-box;margin:0;padding:0}
.md-02 ::selection{background:#1565c0;color:#fff}
.md-02{
--c1:#1565c0;
--c2:#e91e63;
--c3:#00897b;
--c4:#f57c00;
--c5:#7b1fa2;
--bg:#eceff1;
--surface:#fff;
--ink:#212121;
--ink2:#616161;
--ink3:#9e9e9e;
--divider:#e0e0e0;
font-family:'Roboto',sans-serif;
background:var(--bg);
min-height:100vh;
padding:48px 24px 80px;
color:var(--ink);
}
.md-02__grid{
display:grid;
grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
gap:24px;
max-width:1200px;
margin:0 auto;
}
.md-02__page-title{font-size:clamp(1.4rem,4vw,2rem);font-weight:700;margin-bottom:4px;max-width:1200px;margin:0 auto 8px}
.md-02__page-sub{font-size:.9rem;color:var(--ink2);max-width:1200px;margin:0 auto 40px}
/* Base card */
.md-02__card{
background:var(--surface);
border-radius:12px;
overflow:hidden;
position:relative;
transition:box-shadow .25s cubic-bezier(.4,0,.2,1),transform .25s cubic-bezier(.4,0,.2,1);
cursor:pointer;
}
.md-02__card--elev1{box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}
.md-02__card--elev2{box-shadow:0 3px 6px rgba(0,0,0,.15),0 2px 4px rgba(0,0,0,.12)}
.md-02__card--elev3{box-shadow:0 10px 20px rgba(0,0,0,.12),0 3px 6px rgba(0,0,0,.08)}
.md-02__card:hover{box-shadow:0 14px 28px rgba(0,0,0,.15),0 10px 10px rgba(0,0,0,.1);transform:translateY(-3px)}
/* Media card */
.md-02__media{width:100%;height:180px;object-fit:cover;display:block}
.md-02__media-bg{
width:100%;height:180px;
display:flex;align-items:center;justify-content:center;
font-size:3rem;
}
.md-02__card-body{padding:16px}
.md-02__card-overline{font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;font-weight:500;margin-bottom:4px}
.md-02__card-title{font-size:1.1rem;font-weight:700;line-height:1.3;margin-bottom:6px}
.md-02__card-sub{font-size:.85rem;color:var(--ink2);margin-bottom:12px;line-height:1.5}
.md-02__card-actions{display:flex;gap:8px;padding:8px 8px 8px;border-top:1px solid var(--divider);margin-top:4px}
.md-02__card-btn{
background:transparent;border:none;cursor:pointer;
font-family:'Roboto';font-size:.8rem;font-weight:500;letter-spacing:.089em;text-transform:uppercase;
padding:6px 12px;border-radius:4px;
transition:background .15s;
}
.md-02__card-btn--p{color:var(--c1)}
.md-02__card-btn--p:hover{background:rgba(21,101,192,.08)}
.md-02__card-btn--s{color:var(--c2)}
.md-02__card-btn--s:hover{background:rgba(233,30,99,.08)}
/* Horizontal card */
.md-02__card--horizontal{display:flex;align-items:stretch}
.md-02__card--horizontal .md-02__media-bg{width:120px;flex-shrink:0;height:auto;border-radius:0}
.md-02__card--horizontal .md-02__card-body{flex:1}
/* Outlined card */
.md-02__card--outlined{box-shadow:none;border:1px solid var(--divider)}
.md-02__card--outlined:hover{box-shadow:0 3px 6px rgba(0,0,0,.1);border-color:transparent}
/* Tonal/filled card */
.md-02__card--tonal-blue{background:#e3f2fd;box-shadow:none}
.md-02__card--tonal-green{background:#e8f5e9;box-shadow:none}
.md-02__card--tonal-pink{background:#fce4ec;box-shadow:none}
.md-02__card--tonal-amber{background:#fff8e1;box-shadow:none}
/* Avatar row */
.md-02__card-header{display:flex;align-items:center;gap:12px;padding:16px 16px 0}
.md-02__avatar{
width:40px;height:40px;border-radius:50%;
display:flex;align-items:center;justify-content:center;
font-size:1rem;font-weight:700;color:#fff;flex-shrink:0;
}
.md-02__card-header-text .md-02__card-title{font-size:.95rem;margin-bottom:2px}
.md-02__card-header-text .md-02__card-sub{font-size:.8rem;margin-bottom:0}
.md-02__card-menu{margin-left:auto;font-size:1.2rem;cursor:pointer;color:var(--ink3);padding:4px}
/* Stat card */
.md-02__stat{font-size:2rem;font-weight:700;line-height:1;margin-bottom:4px}
.md-02__stat-change{font-size:.8rem;font-weight:500;padding:2px 8px;border-radius:12px;display:inline-block;margin-bottom:8px}
.md-02__stat-change--up{background:#e8f5e9;color:#2e7d32}
.md-02__stat-change--down{background:#fce4ec;color:#c62828}
/* Progress in card */
.md-02__card-progress{margin:8px 0 4px}
.md-02__card-progress-track{height:4px;background:#e0e0e0;border-radius:2px;overflow:hidden}
.md-02__card-progress-fill{height:100%;border-radius:2px;transition:width .4s ease}
/* Tag chip */
.md-02__tag{display:inline-flex;align-items:center;gap:4px;padding:2px 10px;border-radius:12px;font-size:.75rem;font-weight:500;margin-right:6px;margin-bottom:6px}
@media(prefers-reduced-motion:reduce){.md-02 *{transition:none!important}}
```
### 03. Material Design Navigation CSS
**Type:** Pure CSS
**Description:** Top app bar, navigation drawer, navigation rail, bottom navigation bar, scrollable tab bar, and breadcrumb trail — all built with CSS custom properties and zero JavaScript.
**HTML:**
```html
Material Navigation
🔍
🔔
⋮
```
**CSS:**
```css
.md-03,.md-03 *,.md-03 *::before,.md-03 *::after{box-sizing:border-box;margin:0;padding:0}
.md-03 ::selection{background:#c62828;color:#fff}
.md-03{
--primary:#c62828;
--primary-light:#ef5350;
--primary-dark:#8d1c1c;
--secondary:#ff8a65;
--surface:#fff;
--bg:#fafafa;
--ink:#212121;
--ink2:#757575;
--ink3:#bdbdbd;
--divider:#e0e0e0;
--nav-h:64px;
--rail-w:80px;
--sidebar-w:256px;
font-family:'Roboto',sans-serif;
background:var(--bg);
color:var(--ink);
min-height:100vh;
}
/* ── TOP APP BAR ── */
.md-03__appbar{
width:100%;height:var(--nav-h);
background:var(--primary);
color:#fff;
display:flex;align-items:center;padding:0 16px;gap:12px;
box-shadow:0 2px 4px rgba(0,0,0,.25);
position:sticky;top:0;z-index:10;
}
.md-03__appbar-menu{width:48px;height:48px;border-radius:50%;border:none;background:transparent;color:#fff;cursor:pointer;font-size:1.3rem;display:flex;align-items:center;justify-content:center;transition:background .2s}
.md-03__appbar-menu:hover{background:rgba(255,255,255,.12)}
.md-03__appbar-title{font-size:1.25rem;font-weight:500;letter-spacing:.0125em;flex:1}
.md-03__appbar-actions{display:flex;gap:4px}
.md-03__appbar-action{width:48px;height:48px;border-radius:50%;border:none;background:transparent;color:#fff;cursor:pointer;font-size:1.2rem;display:flex;align-items:center;justify-content:center;transition:background .2s}
.md-03__appbar-action:hover{background:rgba(255,255,255,.12)}
/* ── LAYOUT BODY ── */
.md-03__body{display:flex;min-height:calc(100vh - var(--nav-h))}
/* ── NAVIGATION DRAWER ── */
.md-03__drawer{
width:var(--sidebar-w);flex-shrink:0;
background:var(--surface);
border-right:1px solid var(--divider);
padding:12px 0;
overflow-y:auto;
}
.md-03__drawer-section{padding:4px 0;margin-bottom:4px}
.md-03__drawer-section-title{
font-size:.75rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;
color:var(--ink2);padding:8px 16px 4px;
}
.md-03__nav-item{
display:flex;align-items:center;gap:16px;
padding:0 16px;height:48px;border-radius:0 24px 24px 0;
margin-right:16px;
cursor:pointer;
font-size:.9rem;font-weight:400;
color:var(--ink2);
transition:background .15s,color .15s;
position:relative;overflow:hidden;
user-select:none;
}
.md-03__nav-item:hover{background:rgba(0,0,0,.04)}
.md-03__nav-item--active{
background:rgba(198,40,40,.12);
color:var(--primary);
font-weight:500;
}
.md-03__nav-item--active::before{
content:'';
position:absolute;left:0;top:25%;bottom:25%;
width:3px;border-radius:0 2px 2px 0;
background:var(--primary);
}
.md-03__nav-icon{font-size:1.3rem;width:24px;text-align:center}
.md-03__nav-badge{margin-left:auto;background:var(--primary);color:#fff;font-size:.7rem;font-weight:700;padding:2px 7px;border-radius:10px}
.md-03__divider{height:1px;background:var(--divider);margin:8px 16px}
/* ── NAVIGATION RAIL (shown on right in demo) ── */
.md-03__rail{
width:var(--rail-w);
background:var(--surface);
border-left:1px solid var(--divider);
padding:16px 0;
display:flex;flex-direction:column;align-items:center;gap:4px;
}
.md-03__rail-fab{
width:56px;height:56px;border-radius:16px;border:none;
background:var(--secondary);color:#fff;font-size:1.4rem;cursor:pointer;
display:flex;align-items:center;justify-content:center;
box-shadow:0 2px 8px rgba(255,138,101,.4);
margin-bottom:8px;transition:box-shadow .2s,transform .2s;
}
.md-03__rail-fab:hover{box-shadow:0 4px 16px rgba(255,138,101,.5);transform:translateY(-2px)}
.md-03__rail-item{
display:flex;flex-direction:column;align-items:center;gap:4px;
width:72px;padding:12px 0;border-radius:16px;
cursor:pointer;font-size:.7rem;font-weight:500;
color:var(--ink2);transition:background .15s,color .15s;
}
.md-03__rail-item:hover{background:rgba(0,0,0,.04)}
.md-03__rail-item--active{color:var(--primary)}
.md-03__rail-item--active .md-03__rail-icon-wrap{background:rgba(198,40,40,.12)}
.md-03__rail-icon-wrap{
width:56px;height:32px;border-radius:16px;
display:flex;align-items:center;justify-content:center;font-size:1.2rem;
}
/* ── MAIN CONTENT ── */
.md-03__main{flex:1;padding:32px;overflow:auto}
.md-03__section-head{font-size:1.1rem;font-weight:700;margin-bottom:20px;color:var(--ink)}
/* ── TAB BAR ── */
.md-03__tabs{
background:var(--primary);
display:flex;border-bottom:none;
margin-bottom:28px;
border-radius:0;
}
.md-03__tab-input{display:none}
.md-03__tab-label{
flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
height:48px;gap:4px;padding:0 16px;
font-size:.875rem;font-weight:500;letter-spacing:.089em;text-transform:uppercase;
color:rgba(255,255,255,.7);cursor:pointer;
position:relative;
transition:color .2s;
user-select:none;
}
.md-03__tab-label::after{
content:'';position:absolute;bottom:0;left:0;right:0;height:2px;
background:#fff;transform:scaleX(0);transition:transform .2s;
}
.md-03__tab-input:checked + .md-03__tab-label{color:#fff}
.md-03__tab-input:checked + .md-03__tab-label::after{transform:scaleX(1)}
/* ── BREADCRUMBS ── */
.md-03__breadcrumbs{
display:flex;align-items:center;gap:8px;
font-size:.85rem;color:var(--ink2);margin-bottom:24px;
flex-wrap:wrap;
}
.md-03__breadcrumb-link{color:var(--primary);text-decoration:none;cursor:pointer}
.md-03__breadcrumb-link:hover{text-decoration:underline}
.md-03__breadcrumb-sep{color:var(--ink3)}
/* ── BOTTOM NAV BAR ── */
.md-03__bottomnav{
background:var(--surface);
border-top:1px solid var(--divider);
display:flex;
box-shadow:0 -2px 4px rgba(0,0,0,.08);
margin-top:24px;
border-radius:8px;
overflow:hidden;
}
.md-03__bn-input{display:none}
.md-03__bn-label{
flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
padding:8px 0 10px;gap:4px;cursor:pointer;
font-size:.7rem;font-weight:500;letter-spacing:.04em;
color:var(--ink2);transition:color .15s;
position:relative;
}
.md-03__bn-icon{font-size:1.4rem;position:relative}
.md-03__bn-input:checked + .md-03__bn-label{color:var(--primary)}
.md-03__bn-badge{
position:absolute;top:-4px;right:-8px;
background:var(--primary);color:#fff;
font-size:.6rem;font-weight:700;
padding:1px 5px;border-radius:8px;
}
/* Content card in main */
.md-03__content-card{
background:var(--surface);border-radius:12px;
padding:24px;margin-bottom:16px;
box-shadow:0 1px 3px rgba(0,0,0,.1);
}
@media(prefers-reduced-motion:reduce){.md-03 *{transition:none!important}}
```
### 04. Material Design Form Inputs CSS
**Type:** Pure CSS
**Description:** Filled and outlined text fields with floating labels, select menus, textarea, checkboxes, radio buttons, toggle switches, and range sliders — interactive, fully accessible, no JavaScript.
**HTML:**
```html
Material Design Form Inputs
Filled & outlined text fields, selects, checkboxes, radio buttons, switches and sliders — all CSS
Text Fields — Filled Style
Text Fields — Outlined Style
Select & Textarea
Country / Region
United States
United Kingdom
Germany
Japan
India
Message
Max 500 characters
Checkboxes & Radio Buttons
Reset
Save Changes
```
**CSS:**
```css
.md-04,.md-04 *,.md-04 *::before,.md-04 *::after{box-sizing:border-box;margin:0;padding:0}
.md-04 ::selection{background:#00695c;color:#fff}
.md-04{
--primary:#00695c;
--primary-l:#4db6ac;
--error:#b00020;
--bg:#f1f8f7;
--surface:#fff;
--ink:#212121;
--ink2:#616161;
--ink3:#9e9e9e;
--divider:#e0e0e0;
font-family:'Roboto',sans-serif;
background:var(--bg);
min-height:100vh;padding:48px 24px 80px;
color:var(--ink);
}
.md-04__wrap{max-width:700px;margin:0 auto}
.md-04__page-title{font-size:clamp(1.4rem,4vw,2rem);font-weight:700;margin-bottom:4px}
.md-04__page-sub{font-size:.9rem;color:var(--ink2);margin-bottom:48px}
.md-04__card{background:var(--surface);border-radius:12px;padding:32px;margin-bottom:28px;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.06)}
.md-04__card-title{font-size:1rem;font-weight:700;margin-bottom:24px;color:var(--ink);display:flex;align-items:center;gap:8px}
.md-04__card-title::before{content:'';width:4px;height:1em;background:var(--primary);border-radius:2px;display:inline-block}
.md-04__grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}
@media(max-width:540px){.md-04__grid{grid-template-columns:1fr}}
.md-04__field{display:flex;flex-direction:column;gap:0;position:relative}
/* ── FILLED TEXT FIELD ── */
.md-04__field--filled .md-04__label{
position:absolute;left:16px;top:20px;
font-size:1rem;color:var(--ink2);
pointer-events:none;transform-origin:left top;
transition:transform .15s cubic-bezier(.4,0,.2,1),color .15s;
}
.md-04__field--filled .md-04__input{
height:56px;padding:20px 16px 6px;
background:rgba(0,0,0,.06);
border:none;border-bottom:1px solid var(--ink2);
border-radius:4px 4px 0 0;
font-family:'Roboto';font-size:1rem;color:var(--ink);
outline:none;width:100%;
transition:border-color .15s;
}
.md-04__field--filled .md-04__input:focus{border-bottom:2px solid var(--primary)}
.md-04__field--filled .md-04__input:focus ~ .md-04__label,
.md-04__field--filled .md-04__input:not(:placeholder-shown) ~ .md-04__label{
transform:translateY(-10px) scale(.75);color:var(--primary)
}
.md-04__field--filled .md-04__input::placeholder{opacity:0}
/* ── OUTLINED TEXT FIELD ── */
.md-04__field--outlined{position:relative}
.md-04__field--outlined .md-04__label{
position:absolute;left:12px;top:16px;
font-size:1rem;color:var(--ink2);
pointer-events:none;transform-origin:left top;
transition:transform .15s cubic-bezier(.4,0,.2,1),color .15s,background .15s;
padding:0 4px;
}
.md-04__field--outlined .md-04__input{
height:56px;padding:0 16px;
background:var(--surface);
border:1px solid var(--ink2);
border-radius:4px;
font-family:'Roboto';font-size:1rem;color:var(--ink);
outline:none;width:100%;
transition:border-color .15s;
}
.md-04__field--outlined .md-04__input:focus{border:2px solid var(--primary)}
.md-04__field--outlined .md-04__input:focus ~ .md-04__label,
.md-04__field--outlined .md-04__input:not(:placeholder-shown) ~ .md-04__label{
transform:translateY(-24px) scale(.75);
color:var(--primary);background:var(--surface);
}
.md-04__field--outlined .md-04__input::placeholder{opacity:0}
/* ── ERROR STATE ── */
.md-04__field--error .md-04__input{border-color:var(--error)!important}
.md-04__field--error .md-04__label{color:var(--error)!important}
.md-04__helper{font-size:.75rem;margin-top:4px;padding:0 16px;color:var(--ink3)}
.md-04__helper--error{color:var(--error)}
/* ── TEXTAREA ── */
.md-04__textarea{
padding:16px;resize:vertical;min-height:120px;
background:rgba(0,0,0,.06);border:none;border-bottom:1px solid var(--ink2);
border-radius:4px 4px 0 0;
font-family:'Roboto';font-size:1rem;color:var(--ink);outline:none;width:100%;
transition:border-color .15s;
}
.md-04__textarea:focus{border-bottom:2px solid var(--primary)}
/* ── SELECT / DROPDOWN ── */
.md-04__select{
height:56px;padding:0 16px;
background:rgba(0,0,0,.06);
border:none;border-bottom:1px solid var(--ink2);
border-radius:4px 4px 0 0;
font-family:'Roboto';font-size:1rem;color:var(--ink);
outline:none;width:100%;
appearance:none;
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23757575' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
background-repeat:no-repeat;
background-position:right 16px center;
cursor:pointer;
}
.md-04__select:focus{border-bottom:2px solid var(--primary)}
/* ── CHECKBOX ── */
.md-04__check-wrap{display:flex;align-items:center;gap:12px;cursor:pointer;padding:4px 0}
.md-04__check-input{
appearance:none;width:20px;height:20px;border:2px solid var(--ink2);border-radius:3px;
cursor:pointer;position:relative;flex-shrink:0;
transition:background .15s,border-color .15s;
}
.md-04__check-input:checked{background:var(--primary);border-color:var(--primary)}
.md-04__check-input:checked::after{
content:'✓';position:absolute;top:50%;left:50%;
transform:translate(-50%,-50%);
color:#fff;font-size:.8rem;font-weight:700;line-height:1;
}
.md-04__check-label{font-size:.9rem;color:var(--ink)}
/* ── RADIO ── */
.md-04__radio-wrap{display:flex;align-items:center;gap:12px;cursor:pointer;padding:4px 0}
.md-04__radio-input{
appearance:none;width:20px;height:20px;border:2px solid var(--ink2);border-radius:50%;
cursor:pointer;position:relative;flex-shrink:0;
transition:border-color .15s;
}
.md-04__radio-input:checked{border-color:var(--primary)}
.md-04__radio-input:checked::after{
content:'';position:absolute;
top:50%;left:50%;transform:translate(-50%,-50%);
width:10px;height:10px;border-radius:50%;background:var(--primary);
}
.md-04__radio-label{font-size:.9rem;color:var(--ink)}
/* ── SWITCH ── */
.md-04__switch-wrap{display:flex;align-items:center;gap:12px;cursor:pointer}
.md-04__switch-input{display:none}
.md-04__switch-track{
width:52px;height:32px;border-radius:16px;
background:#bdbdbd;position:relative;
transition:background .2s;flex-shrink:0;
}
.md-04__switch-thumb{
position:absolute;top:4px;left:4px;
width:24px;height:24px;border-radius:50%;
background:#fff;box-shadow:0 2px 4px rgba(0,0,0,.3);
transition:transform .2s cubic-bezier(.4,0,.2,1);
}
.md-04__switch-input:checked ~ .md-04__switch-track{background:var(--primary-l)}
.md-04__switch-input:checked ~ .md-04__switch-track .md-04__switch-thumb{transform:translateX(20px)}
.md-04__switch-label{font-size:.9rem;color:var(--ink)}
/* ── SLIDER ── */
.md-04__slider{
width:100%;height:4px;border-radius:2px;
-webkit-appearance:none;background:linear-gradient(to right,var(--primary) 60%,var(--divider) 60%);
cursor:pointer;outline:none;margin:16px 0;
}
.md-04__slider::-webkit-slider-thumb{
-webkit-appearance:none;width:20px;height:20px;border-radius:50%;
background:var(--primary);box-shadow:0 2px 4px rgba(0,0,0,.3);
cursor:pointer;transition:box-shadow .2s;
}
.md-04__slider::-webkit-slider-thumb:hover{box-shadow:0 0 0 8px rgba(0,105,92,.15)}
.md-04__btn{
height:40px;padding:0 24px;border:none;border-radius:4px;
background:var(--primary);color:#fff;
font-family:'Roboto';font-size:.875rem;font-weight:500;letter-spacing:.089em;text-transform:uppercase;
cursor:pointer;transition:box-shadow .2s;
box-shadow:0 2px 4px rgba(0,0,0,.2);
}
.md-04__btn:hover{box-shadow:0 4px 8px rgba(0,0,0,.25)}
.md-04__btn--outlined{background:transparent;color:var(--primary);border:1px solid var(--primary);box-shadow:none}
.md-04__form-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:8px}
@media(prefers-reduced-motion:reduce){.md-04 *{transition:none!important}}
```
### 05. Material Design Dialog Modal CSS
**Type:** Pure CSS
**Description:** Alert dialog, full-featured share dialog, bottom sheet, and snackbar — all toggled with the CSS checkbox-hack, no JavaScript.
**HTML:**
```html
🗑
Delete project?
This will permanently delete "Aurora Dashboard" and all of its contents. This action cannot be undone.
Cancel
Delete
✕
Share with people
🔗
https://aurora.design/shared/abc123
Copy
Anyone with the link can view this project
People with access
A
Alex Thompson
alex@design.co · Owner
M
Maria Chen
m.chen@design.co · Editor
Close
Done
Export file as
📄 PDF Document
🖼 PNG Image
⚡ SVG Vector
📊 CSV Data
💾 JSON Format
✅ Changes saved to cloud
Undo
✕
Material Design Dialogs & Modals
Alert dialogs, full dialogs, bottom sheets and snackbars — CSS-only with checkbox-hack
🗑 Alert Dialog
↗ Share Dialog
⬆ Bottom Sheet
💾 Snackbar
Alert Dialog
⚠
Discard changes?
Changes will be lost if you leave this page
Snackbar Variants
Message sent
Connection lost Retry
✓ Profile updated
⚠ Upload failed
```
**CSS:**
```css
.md-05,.md-05 *,.md-05 *::before,.md-05 *::after{box-sizing:border-box;margin:0;padding:0}
.md-05 ::selection{background:#4527a0;color:#fff}
.md-05{
--primary:#4527a0;
--primary-l:#7e57c2;
--secondary:#ff7043;
--error:#b00020;
--surface:#fff;
--surface2:#f3f0fa;
--bg:#ede7f6;
--ink:#212121;
--ink2:#616161;
--ink3:#9e9e9e;
--divider:#d1c4e9;
font-family:'Roboto',sans-serif;
background:var(--bg);
min-height:100vh;
padding:48px 24px 80px;
color:var(--ink);
}
.md-05__wrap{max-width:900px;margin:0 auto}
.md-05__page-title{font-size:clamp(1.4rem,4vw,2rem);font-weight:700;margin-bottom:4px}
.md-05__page-sub{font-size:.9rem;color:var(--ink2);margin-bottom:40px}
/* Trigger buttons */
.md-05__btn-grid{display:flex;flex-wrap:wrap;gap:16px;margin-bottom:56px}
.md-05__trigger-btn{
height:40px;padding:0 20px;border-radius:4px;border:none;cursor:pointer;
font-family:'Roboto';font-size:.875rem;font-weight:500;letter-spacing:.089em;text-transform:uppercase;
background:var(--primary);color:#fff;
box-shadow:0 2px 4px rgba(0,0,0,.2);
transition:box-shadow .2s;
}
.md-05__trigger-btn:hover{box-shadow:0 4px 10px rgba(0,0,0,.25)}
/* ── DIALOG BACKDROP / MODAL ── */
.md-05__backdrop{
position:fixed;inset:0;z-index:100;
background:rgba(0,0,0,0);
pointer-events:none;
transition:background .25s;
display:flex;align-items:center;justify-content:center;
padding:24px;
}
.md-05__modal-trigger{display:none}
.md-05__modal-trigger:checked ~ .md-05__backdrop{
background:rgba(0,0,0,.5);
pointer-events:auto;
}
.md-05__dialog{
background:var(--surface);
border-radius:28px;
min-width:280px;max-width:560px;width:100%;
box-shadow:0 24px 38px rgba(0,0,0,.14),0 9px 46px rgba(0,0,0,.12),0 11px 15px rgba(0,0,0,.2);
transform:scale(.9) translateY(20px);
opacity:0;
transition:transform .3s cubic-bezier(.34,1.56,.64,1),opacity .25s;
max-height:80vh;overflow-y:auto;
}
.md-05__modal-trigger:checked ~ .md-05__backdrop .md-05__dialog{
transform:scale(1) translateY(0);
opacity:1;
}
.md-05__dialog-icon{text-align:center;padding-top:28px;font-size:2rem}
.md-05__dialog-head{padding:24px 24px 12px;font-size:1.375rem;font-weight:700;color:var(--ink)}
.md-05__dialog-head--center{text-align:center}
.md-05__dialog-body{padding:0 24px 20px;font-size:.875rem;line-height:1.6;color:var(--ink2)}
.md-05__dialog-body--center{text-align:center}
.md-05__dialog-actions{
display:flex;gap:8px;justify-content:flex-end;
padding:8px 24px 24px;
}
.md-05__dialog-btn{
height:40px;padding:0 24px;border:none;border-radius:20px;cursor:pointer;
font-family:'Roboto';font-size:.875rem;font-weight:500;letter-spacing:.089em;text-transform:uppercase;
transition:background .15s;
}
.md-05__dialog-btn--text{background:transparent;color:var(--primary)}
.md-05__dialog-btn--text:hover{background:rgba(69,39,160,.08)}
.md-05__dialog-btn--filled{background:var(--primary);color:#fff;box-shadow:0 2px 4px rgba(0,0,0,.2)}
.md-05__dialog-btn--filled:hover{box-shadow:0 4px 8px rgba(0,0,0,.25)}
.md-05__dialog-btn--err{background:var(--error);color:#fff}
.md-05__dialog-btn--close{position:absolute;top:12px;right:12px;width:40px;height:40px;border-radius:50%;border:none;background:transparent;cursor:pointer;font-size:1.2rem;display:flex;align-items:center;justify-content:center;color:var(--ink2)}
.md-05__dialog-btn--close:hover{background:rgba(0,0,0,.06)}
/* close via label targeting the same checkbox */
.md-05__close-label{cursor:pointer}
/* ── BOTTOM SHEET ── */
.md-05__sheet-trigger{display:none}
.md-05__sheet-backdrop{
position:fixed;inset:0;z-index:100;
background:rgba(0,0,0,0);pointer-events:none;
transition:background .25s;
display:flex;align-items:flex-end;justify-content:center;
}
.md-05__sheet-trigger:checked ~ .md-05__sheet-backdrop{background:rgba(0,0,0,.5);pointer-events:auto}
.md-05__sheet{
background:var(--surface);
border-radius:28px 28px 0 0;
width:100%;max-width:640px;
padding:0 0 40px;
transform:translateY(100%);
transition:transform .35s cubic-bezier(.4,0,.2,1);
box-shadow:0 -8px 24px rgba(0,0,0,.12);
}
.md-05__sheet-trigger:checked ~ .md-05__sheet-backdrop .md-05__sheet{transform:translateY(0)}
.md-05__sheet-handle{width:40px;height:4px;background:var(--divider);border-radius:2px;margin:12px auto 20px}
.md-05__sheet-title{font-size:1.1rem;font-weight:700;padding:0 24px 16px;color:var(--ink)}
.md-05__sheet-option{
display:flex;align-items:center;gap:16px;padding:16px 24px;cursor:pointer;
font-size:.9rem;color:var(--ink);transition:background .15s;
}
.md-05__sheet-option:hover{background:rgba(0,0,0,.04)}
.md-05__sheet-option-icon{font-size:1.3rem;width:32px;text-align:center}
/* ── SNACKBAR ── */
.md-05__snack-trigger{display:none}
.md-05__snackbar{
position:fixed;bottom:32px;left:50%;transform:translateX(-50%) translateY(120px);
background:#323232;color:#fff;
border-radius:4px;padding:14px 16px;
display:flex;align-items:center;gap:24px;
box-shadow:0 3px 10px rgba(0,0,0,.3);
font-size:.875rem;min-width:300px;max-width:560px;
transition:transform .35s cubic-bezier(.4,0,.2,1);
z-index:200;pointer-events:none;
}
.md-05__snack-trigger:checked ~ .md-05__snackbar{transform:translateX(-50%) translateY(0);pointer-events:auto}
.md-05__snack-action{background:transparent;border:none;color:#bb86fc;font-family:'Roboto';font-size:.875rem;font-weight:500;letter-spacing:.089em;text-transform:uppercase;cursor:pointer;white-space:nowrap;padding:0}
/* ── PREVIEW PANEL ── */
.md-05__preview{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:20px;margin-top:40px}
.md-05__preview-card{background:var(--surface2);border-radius:20px;padding:24px;border:1px solid var(--divider)}
.md-05__preview-label{font-size:.75rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--primary-l);margin-bottom:12px}
.md-05__dialog--inline{border-radius:20px;overflow:hidden;box-shadow:0 4px 16px rgba(0,0,0,.12);transform:none;opacity:1;max-height:none;position:static;pointer-events:none}
@media(prefers-reduced-motion:reduce){.md-05 *{transition:none!important}}
```
### 06. Material Design Data Table CSS
**Type:** Pure CSS
**Description:** Sortable-look data table with row checkboxes, status badges, inline progress bars, avatar cells, pagination controls, and a dense display variant.
**HTML:**
```html
Material Design Data Tables
Full-featured sortable data tables with checkboxes, status badges, progress bars and pagination — CSS
Date
Description
Category
Status
Amount
Jun 11, 2025 AWS Infrastructure Cloud Paid -$1,240.00
Jun 10, 2025 Client Invoice #0042 Revenue Settled +$8,500.00
Jun 09, 2025 Figma Enterprise Tools Pending -$540.00
Jun 08, 2025 Contractor Payment Payroll Paid -$2,800.00
Jun 07, 2025 Retainer Fee Q2 Revenue Processing +$12,000.00
```
**CSS:**
```css
.md-06,.md-06 *,.md-06 *::before,.md-06 *::after{box-sizing:border-box;margin:0;padding:0}
.md-06 ::selection{background:#0277bd;color:#fff}
.md-06{
--primary:#0277bd;
--primary-l:#4fc3f7;
--secondary:#ff6f00;
--surface:#fff;
--bg:#e1f5fe;
--ink:#212121;
--ink2:#546e7a;
--ink3:#90a4ae;
--divider:#b0bec5;
--row-hover:#e3f2fd;
--row-selected:#e8f4fd;
font-family:'Roboto',sans-serif;
background:var(--bg);
min-height:100vh;
padding:48px 24px 80px;
color:var(--ink);
}
.md-06__wrap{max-width:1100px;margin:0 auto}
.md-06__page-title{font-size:clamp(1.4rem,4vw,2rem);font-weight:700;margin-bottom:4px}
.md-06__page-sub{font-size:.9rem;color:var(--ink2);margin-bottom:40px}
/* ── TABLE CONTAINER ── */
.md-06__table-card{
background:var(--surface);border-radius:12px;overflow:hidden;
box-shadow:0 2px 8px rgba(0,0,0,.1),0 1px 3px rgba(0,0,0,.06);
margin-bottom:40px;
}
.md-06__table-toolbar{
display:flex;align-items:center;gap:16px;padding:20px 20px 16px;
border-bottom:1px solid var(--divider);flex-wrap:wrap;
}
.md-06__table-title{font-size:1.1rem;font-weight:700;flex:1;min-width:120px}
.md-06__table-actions{display:flex;gap:8px}
.md-06__tool-btn{
height:36px;padding:0 16px;border:none;border-radius:4px;cursor:pointer;
font-family:'Roboto';font-size:.8rem;font-weight:500;letter-spacing:.089em;text-transform:uppercase;
transition:background .15s;
}
.md-06__tool-btn--p{background:var(--primary);color:#fff}
.md-06__tool-btn--p:hover{background:#01579b}
.md-06__tool-btn--ghost{background:transparent;color:var(--primary);border:1px solid rgba(2,119,189,.4)}
.md-06__tool-btn--ghost:hover{background:rgba(2,119,189,.06)}
.md-06__search{
height:36px;padding:0 12px;border:1px solid var(--divider);border-radius:4px;
font-family:'Roboto';font-size:.875rem;color:var(--ink);outline:none;width:200px;
transition:border-color .15s;
}
.md-06__search:focus{border-color:var(--primary)}
/* ── TABLE ── */
.md-06__table-wrap{overflow-x:auto}
.md-06__table{width:100%;border-collapse:collapse;font-size:.875rem}
.md-06__table thead{background:#fafafa}
.md-06__th{
padding:14px 16px;text-align:left;
font-size:.75rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
color:var(--ink2);white-space:nowrap;border-bottom:2px solid var(--divider);
cursor:pointer;user-select:none;position:relative;
}
.md-06__th:hover{color:var(--primary)}
.md-06__th--sorted{color:var(--primary)}
.md-06__th--sorted::after{content:' ↑';font-size:.7rem}
.md-06__th--num{text-align:right}
.md-06__td{
padding:14px 16px;border-bottom:1px solid #eceff1;
vertical-align:middle;color:var(--ink);
}
.md-06__td--num{text-align:right;font-variant-numeric:tabular-nums;font-weight:500}
.md-06__tr{transition:background .12s}
.md-06__tr:hover .md-06__td{background:var(--row-hover)}
.md-06__tr:last-child .md-06__td{border-bottom:none}
/* Checkbox column */
.md-06__check{
appearance:none;width:18px;height:18px;border:2px solid var(--ink3);border-radius:3px;
cursor:pointer;position:relative;flex-shrink:0;transition:background .12s,border-color .12s;
}
.md-06__check:checked{background:var(--primary);border-color:var(--primary)}
.md-06__check:checked::after{content:'✓';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:.7rem;font-weight:700;line-height:1}
/* Status badges */
.md-06__badge{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:12px;font-size:.75rem;font-weight:500;white-space:nowrap}
.md-06__badge--active{background:#e8f5e9;color:#2e7d32}
.md-06__badge--pending{background:#fff8e1;color:#f57f17}
.md-06__badge--inactive{background:#fce4ec;color:#c62828}
.md-06__badge--review{background:#e8eaf6;color:#3949ab}
/* Avatar cell */
.md-06__cell-user{display:flex;align-items:center;gap:10px}
.md-06__avatar{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:700;color:#fff;flex-shrink:0}
/* Progress bar cell */
.md-06__progress-wrap{display:flex;align-items:center;gap:8px}
.md-06__progress-track{height:4px;background:#e0e0e0;border-radius:2px;width:80px;overflow:hidden;flex-shrink:0}
.md-06__progress-fill{height:100%;border-radius:2px;background:var(--primary)}
.md-06__progress-val{font-size:.8rem;color:var(--ink2);font-variant-numeric:tabular-nums;width:32px}
/* Row actions */
.md-06__row-action{background:transparent;border:none;cursor:pointer;color:var(--ink3);padding:4px 6px;border-radius:4px;font-size:1rem;transition:color .15s,background .15s}
.md-06__row-action:hover{color:var(--primary);background:rgba(2,119,189,.08)}
/* ── PAGINATION ── */
.md-06__pagination{
display:flex;align-items:center;gap:4px;justify-content:flex-end;
padding:12px 16px;border-top:1px solid var(--divider);flex-wrap:wrap;
}
.md-06__pager-info{font-size:.85rem;color:var(--ink2);margin-right:16px}
.md-06__page-btn{
width:32px;height:32px;border:none;border-radius:4px;background:transparent;
font-family:'Roboto';font-size:.85rem;font-weight:500;color:var(--ink2);
cursor:pointer;display:flex;align-items:center;justify-content:center;
transition:background .12s,color .12s;
}
.md-06__page-btn:hover{background:rgba(2,119,189,.08);color:var(--primary)}
.md-06__page-btn--active{background:var(--primary);color:#fff}
.md-06__page-btn--active:hover{background:#01579b;color:#fff}
/* ── DENSE TABLE ── */
.md-06__table--dense .md-06__th,.md-06__table--dense .md-06__td{padding:8px 12px}
.md-06__table--dense .md-06__badge{padding:2px 8px;font-size:.72rem}
@media(prefers-reduced-motion:reduce){.md-06 *{transition:none!important}}
```
### 07. Material Design Tabs CSS
**Type:** Pure CSS
**Description:** Primary, scrollable, icon-plus-label, and vertical tab bars — all driven by the CSS checkbox-hack with an animated active ink bar, no JavaScript.
**HTML:**
```html
Material Design Tabs CSS
Primary, scrollable, icon and vertical tab components — all CSS checkbox-hack, no JavaScript
Scrollable Tabs
All Items
Typography
Color
Spacing
Motion
Elevation
All Design Tokens
Comprehensive list of all design tokens across typography, color, spacing, motion and elevation systems.
Typography Scale
Headline Display — 57sp · Large · Weight 400 Headline Large — 32sp · Weight 400 Title Medium — 16sp · Weight 500 Body Large — 16sp · Weight 400 Label Small — 11sp · Weight 500
Color System
Primary, Secondary, Tertiary, Error and Neutral palettes generated from seed color using HCT color space. Each role has Light and Dark mode values.
Spacing System
4dp base grid. Common spacings: 4, 8, 12, 16, 24, 32, 48, 64dp. Component padding follows 16dp horizontal and 8/12dp vertical conventions.
Motion System
Standard: 300ms · Emphasized: 500ms cubic-bezier(.2,0,0,1) · Decelerate: cubic-bezier(0,0,0,1) · Accelerate: cubic-bezier(.3,0,1,1)
Elevation Levels
0: Flat · 1: Filled · 2: Outlined · 3: Raised (cards) · 4: FAB · 5: Nav drawer · 6: Modal dialogs
```
**CSS:**
```css
.md-07,.md-07 *,.md-07 *::before,.md-07 *::after{box-sizing:border-box;margin:0;padding:0}
.md-07 ::selection{background:#2e7d32;color:#fff}
.md-07{
--primary:#2e7d32;
--primary-l:#66bb6a;
--secondary:#ff8f00;
--bg:#f1f8e9;
--surface:#fff;
--ink:#212121;
--ink2:#546e7a;
--ink3:#90a4ae;
--divider:#c5e1a5;
font-family:'Roboto',sans-serif;
background:var(--bg);
min-height:100vh;
padding:48px 24px 80px;
color:var(--ink);
}
.md-07__wrap{max-width:860px;margin:0 auto}
.md-07__page-title{font-size:clamp(1.4rem,4vw,2rem);font-weight:700;margin-bottom:4px}
.md-07__page-sub{font-size:.9rem;color:var(--ink2);margin-bottom:40px}
/* ── TAB SECTION WRAPPER ── */
.md-07__section{background:var(--surface);border-radius:12px;overflow:hidden;margin-bottom:32px;box-shadow:0 1px 4px rgba(0,0,0,.1)}
.md-07__section-label{font-size:.7rem;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--ink2);padding:20px 20px 0}
/* ── PRIMARY TABS ── */
.md-07__tabs{display:flex;background:var(--primary);position:relative}
.md-07__tab-in{display:none}
.md-07__tab-lbl{
flex:1;display:flex;align-items:center;justify-content:center;gap:8px;
height:48px;padding:0 16px;cursor:pointer;
font-size:.875rem;font-weight:500;letter-spacing:.089em;text-transform:uppercase;
color:rgba(255,255,255,.7);
position:relative;user-select:none;
transition:color .2s;white-space:nowrap;
}
.md-07__tab-lbl::after{
content:'';position:absolute;bottom:0;left:0;right:0;height:2px;
background:#fff;border-radius:2px 2px 0 0;
transform:scaleX(0);transition:transform .25s cubic-bezier(.4,0,.2,1);
}
.md-07__tab-in:checked + .md-07__tab-lbl{color:#fff}
.md-07__tab-in:checked + .md-07__tab-lbl::after{transform:scaleX(1)}
.md-07__tab-badge{background:var(--secondary);color:#fff;font-size:.65rem;font-weight:700;padding:1px 6px;border-radius:8px;line-height:1.6}
/* ── TAB PANELS ── */
.md-07__panels{padding:28px}
.md-07__panel{display:none}
#md07p1:checked ~ .md-07__panels .md-07__panel--1,
#md07p2:checked ~ .md-07__panels .md-07__panel--2,
#md07p3:checked ~ .md-07__panels .md-07__panel--3,
#md07p4:checked ~ .md-07__panels .md-07__panel--4{display:block}
/* ── SCROLLABLE TABS ── */
.md-07__tabs--scroll{overflow-x:auto;scrollbar-width:none;background:var(--surface);border-bottom:1px solid var(--divider)}
.md-07__tabs--scroll::-webkit-scrollbar{display:none}
.md-07__tab-lbl--scroll{
flex:none;color:var(--ink2);height:48px;
}
.md-07__tab-lbl--scroll::after{background:var(--primary);height:3px}
.md-07__tab-in:checked + .md-07__tab-lbl--scroll{color:var(--primary)}
#md07s1:checked ~ .md-07__panels .md-07__panel--s1,
#md07s2:checked ~ .md-07__panels .md-07__panel--s2,
#md07s3:checked ~ .md-07__panels .md-07__panel--s3,
#md07s4:checked ~ .md-07__panels .md-07__panel--s4,
#md07s5:checked ~ .md-07__panels .md-07__panel--s5,
#md07s6:checked ~ .md-07__panels .md-07__panel--s6{display:block}
/* ── SECONDARY/ICON TABS ── */
.md-07__tabs--icon .md-07__tab-lbl{flex-direction:column;height:64px;gap:4px;font-size:.7rem}
.md-07__tab-icon{font-size:1.3rem;display:block}
/* ── VERTICAL TABS ── */
.md-07__vert-wrap{display:flex;gap:0;min-height:240px}
.md-07__tabs--vert{flex-direction:column;background:var(--surface);border-right:1px solid var(--divider);width:180px;flex-shrink:0}
.md-07__tab-lbl--vert{
flex:none;height:48px;justify-content:flex-start;padding:0 20px;
color:var(--ink2);font-size:.875rem;gap:12px;
}
.md-07__tab-lbl--vert::after{
left:auto;right:0;top:0;bottom:0;width:3px;height:auto;
background:var(--primary);border-radius:2px 0 0 2px;
}
.md-07__tab-in:checked + .md-07__tab-lbl--vert{color:var(--primary);background:rgba(46,125,50,.06)}
.md-07__vert-panels{flex:1;padding:24px}
#md07v1:checked ~ .md-07__vert-panels .md-07__panel--v1,
#md07v2:checked ~ .md-07__vert-panels .md-07__panel--v2,
#md07v3:checked ~ .md-07__vert-panels .md-07__panel--v3,
#md07v4:checked ~ .md-07__vert-panels .md-07__panel--v4{display:block}
/* Panel content styles */
.md-07__panel-title{font-size:1rem;font-weight:700;margin-bottom:10px;color:var(--ink)}
.md-07__panel-text{font-size:.9rem;line-height:1.7;color:var(--ink2)}
.md-07__stat-row{display:flex;gap:20px;flex-wrap:wrap;margin-top:16px}
.md-07__stat{background:var(--bg);border-radius:10px;padding:16px 20px;flex:1;min-width:100px}
.md-07__stat-val{font-size:1.5rem;font-weight:700;color:var(--primary)}
.md-07__stat-lbl{font-size:.75rem;color:var(--ink2);margin-top:2px}
.md-07__list{list-style:none;display:flex;flex-direction:column;gap:8px;margin-top:8px}
.md-07__list li{display:flex;align-items:center;gap:8px;font-size:.88rem;color:var(--ink2)}
.md-07__list li::before{content:'✓';color:var(--primary);font-weight:700;flex-shrink:0}
@media(prefers-reduced-motion:reduce){.md-07 *{transition:none!important}}
```
### 08. Material Design Chip CSS
**Type:** Pure CSS
**Description:** Suggestion, filter (checkbox-interactive), choice (radio-interactive), input with avatar, tonal, filled, outlined, status, elevated, and segmented chip variants — all Material Design 3.
**HTML:**
```html
Material Design Chips CSS
Filter, choice, input, suggestion and status chips — all CSS, checkbox-hack interactive filtering
Suggestion & Assist Chips
✨ Add to calendar
📍 Add location
👥 Invite people
🔗 Copy link
📧 Send email
Tonal & Filled Chips
★ Featured
✓ Verified
⚡ New
💎 Premium
⚠ Deprecated
✓ Stable
🔔 Beta
🔬 Experimental
Status Chips
● Active
◔ Pending
✕ Failed
◑ In Progress
○ Archived
Disabled
Elevated Chips
📊 Dashboard
📁 Projects
🔔 Notifications
⚙ Settings
👤 Profile
Segmented Choice Chip Group
```
**CSS:**
```css
.md-08,.md-08 *,.md-08 *::before,.md-08 *::after{box-sizing:border-box;margin:0;padding:0}
.md-08 ::selection{background:#ad1457;color:#fff}
.md-08{
--primary:#ad1457;
--primary-l:#f06292;
--secondary:#1565c0;
--surface:#fff;
--bg:#fce4ec;
--ink:#212121;
--ink2:#616161;
--ink3:#bdbdbd;
--divider:#f8bbd0;
font-family:'Roboto',sans-serif;
background:var(--bg);
min-height:100vh;
padding:48px 24px 80px;
color:var(--ink);
}
.md-08__wrap{max-width:900px;margin:0 auto}
.md-08__page-title{font-size:clamp(1.4rem,4vw,2rem);font-weight:700;margin-bottom:4px}
.md-08__page-sub{font-size:.9rem;color:var(--ink2);margin-bottom:40px}
.md-08__section{background:var(--surface);border-radius:12px;padding:28px;margin-bottom:24px;box-shadow:0 1px 4px rgba(0,0,0,.08)}
.md-08__section-title{font-size:.7rem;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--ink2);margin-bottom:20px;display:flex;align-items:center;gap:10px}
.md-08__section-title::after{content:'';flex:1;height:1px;background:var(--divider)}
.md-08__chip-row{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px}
/* ── BASE CHIP ── */
.md-08__chip{
display:inline-flex;align-items:center;gap:6px;
height:32px;padding:0 12px;border-radius:8px;
border:1px solid #f8bbd0;background:var(--surface);
font-family:'Roboto';font-size:.875rem;font-weight:400;
color:var(--ink);cursor:pointer;
transition:background .15s,box-shadow .15s,border-color .15s;
user-select:none;position:relative;overflow:hidden;
}
.md-08__chip:hover{box-shadow:0 1px 3px rgba(0,0,0,.12);background:#fdf4f8}
/* Chip ripple */
.md-08__chip::after{content:'';position:absolute;top:50%;left:50%;width:0;height:0;border-radius:50%;background:rgba(173,20,87,.15);transform:translate(-50%,-50%);transition:width .3s,height .3s,opacity .3s;opacity:0}
.md-08__chip:hover::after{width:120px;height:120px;opacity:1}
.md-08__chip-icon{font-size:1rem}
.md-08__chip-avatar{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:700;color:#fff;margin-left:-4px}
.md-08__chip-close{
width:18px;height:18px;border-radius:50%;border:none;background:rgba(0,0,0,.1);
font-size:.65rem;cursor:pointer;display:flex;align-items:center;justify-content:center;
margin-right:-4px;color:var(--ink2);transition:background .15s;padding:0;
}
.md-08__chip-close:hover{background:rgba(0,0,0,.2)}
/* ── FILTER CHIP (checkbox-hack) ── */
.md-08__filter-in{display:none}
.md-08__filter-lbl{
display:inline-flex;align-items:center;gap:6px;
height:32px;padding:0 12px;border-radius:8px;
border:1px solid #f8bbd0;background:var(--surface);
font-family:'Roboto';font-size:.875rem;font-weight:400;
color:var(--ink);cursor:pointer;
transition:background .15s,border-color .15s;
user-select:none;
}
.md-08__filter-lbl::before{content:'';width:16px;height:16px;border:1px solid var(--ink3);border-radius:3px;flex-shrink:0;transition:background .15s,border-color .15s}
.md-08__filter-in:checked + .md-08__filter-lbl{background:rgba(173,20,87,.1);border-color:var(--primary);color:var(--primary);font-weight:500}
.md-08__filter-in:checked + .md-08__filter-lbl::before{background:var(--primary);border-color:var(--primary);content:'✓';color:#fff;font-size:.6rem;display:flex;align-items:center;justify-content:center}
/* ── CHOICE CHIP (radio) ── */
.md-08__choice-in{display:none}
.md-08__choice-lbl{
display:inline-flex;align-items:center;gap:6px;
height:32px;padding:0 16px;border-radius:8px;
border:1px solid #f8bbd0;background:var(--surface);
font-family:'Roboto';font-size:.875rem;font-weight:400;
color:var(--ink);cursor:pointer;
transition:background .15s,border-color .15s,color .15s;
user-select:none;
}
.md-08__choice-in:checked + .md-08__choice-lbl{background:rgba(173,20,87,.12);border-color:var(--primary);color:var(--primary);font-weight:500}
/* ── INPUT CHIP ── */
.md-08__chip--input{background:rgba(173,20,87,.1);border-color:var(--primary);color:var(--primary)}
/* ── SUGGESTION CHIP ── */
.md-08__chip--suggestion{border-style:dashed;color:var(--secondary);border-color:var(--secondary);background:rgba(21,101,192,.06)}
.md-08__chip--suggestion:hover{background:rgba(21,101,192,.1)}
/* ── OUTLINED CHIPS ── */
.md-08__chip--outlined-red{border-color:#c62828;color:#c62828}
.md-08__chip--outlined-green{border-color:#2e7d32;color:#2e7d32}
.md-08__chip--outlined-orange{border-color:#e65100;color:#e65100}
.md-08__chip--outlined-purple{border-color:#6a1b9a;color:#6a1b9a}
/* ── FILLED CHIPS ── */
.md-08__chip--filled-primary{background:var(--primary);color:#fff;border-color:var(--primary)}
.md-08__chip--filled-primary:hover{background:#880e4f}
.md-08__chip--filled-teal{background:#00897b;color:#fff;border-color:#00897b}
.md-08__chip--filled-amber{background:#ff8f00;color:#fff;border-color:#ff8f00}
.md-08__chip--filled-blue{background:#1565c0;color:#fff;border-color:#1565c0}
/* ── CHIP ELEVATED ── */
.md-08__chip--elevated{box-shadow:0 1px 3px rgba(0,0,0,.2),0 1px 2px rgba(0,0,0,.14);border:none}
.md-08__chip--elevated:hover{box-shadow:0 3px 8px rgba(0,0,0,.2)}
/* ── DISABLED ── */
.md-08__chip--disabled{opacity:.38;cursor:not-allowed;pointer-events:none}
/* Status chips */
.md-08__chip--status-ok{background:#e8f5e9;color:#2e7d32;border-color:#a5d6a7}
.md-08__chip--status-warn{background:#fff8e1;color:#f57f17;border-color:#ffe082}
.md-08__chip--status-err{background:#fce4ec;color:#c62828;border-color:#f48fb1}
.md-08__chip--status-info{background:#e3f2fd;color:#1565c0;border-color:#90caf9}
.md-08__chip--status-neutral{background:#f5f5f5;color:#616161;border-color:#e0e0e0}
/* ── TAG INPUT DEMO ── */
.md-08__tag-input{
display:flex;flex-wrap:wrap;gap:8px;align-items:center;
padding:8px 12px;border:1px solid var(--divider);border-radius:8px;background:#fff;
min-height:48px;cursor:text;
}
.md-08__tag-input:focus-within{border-color:var(--primary);box-shadow:0 0 0 2px rgba(173,20,87,.12)}
.md-08__tag-field{border:none;outline:none;font-family:'Roboto';font-size:.875rem;color:var(--ink);background:transparent;min-width:80px}
/* ── CHIP GROUP BAR ── */
.md-08__choice-group{display:flex;gap:0;border:1px solid var(--divider);border-radius:8px;overflow:hidden;display:inline-flex}
.md-08__choice-lbl--seg{border-radius:0;border:none;border-right:1px solid var(--divider);height:36px}
.md-08__choice-lbl--seg:last-of-type{border-right:none}
.md-08__choice-in:checked + .md-08__choice-lbl--seg{background:rgba(173,20,87,.12);color:var(--primary)}
@media(prefers-reduced-motion:reduce){.md-08 *{transition:none!important;animation:none!important}}
```
### 09. Material Design Stepper CSS
**Type:** Pure CSS
**Description:** Horizontal step indicator with done/active/error states, vertical accordion stepper, and a linear checkout stepper — built entirely with CSS counter and radio-hack.
**HTML:**
```html
Material Design Steppers CSS
Horizontal, vertical and linear checkout steppers — state indicators, connectors and panel content
Horizontal Stepper — Order Progress
Step 3 — Payment Details
Enter your payment method. All transactions are secured with 256-bit SSL encryption. We accept Visa, Mastercard, American Express and PayPal.
← Back
Continue →
Horizontal Stepper — With Error State
⚠ Validation Failed
3 columns in your CSV are missing required values. Please fix the errors and re-upload your file.
← Back
Fix Errors
Vertical Stepper (Accordion)
3
Confirm & Launch
Review your selections and confirm. Your workspace will be ready in seconds.
🚀 Create Account
```
**CSS:**
```css
.md-09,.md-09 *,.md-09 *::before,.md-09 *::after{box-sizing:border-box;margin:0;padding:0}
.md-09 ::selection{background:#e65100;color:#fff}
.md-09{
--primary:#e65100;
--primary-l:#ff8a65;
--success:#2e7d32;
--surface:#fff;
--bg:#fff3e0;
--ink:#212121;
--ink2:#546e7a;
--ink3:#90a4ae;
--divider:#ffcc80;
font-family:'Roboto',sans-serif;
background:var(--bg);
min-height:100vh;
padding:48px 24px 80px;
color:var(--ink);
}
.md-09__wrap{max-width:860px;margin:0 auto}
.md-09__page-title{font-size:clamp(1.4rem,4vw,2rem);font-weight:700;margin-bottom:4px}
.md-09__page-sub{font-size:.9rem;color:var(--ink2);margin-bottom:40px}
.md-09__card{background:var(--surface);border-radius:12px;padding:32px;margin-bottom:28px;box-shadow:0 1px 4px rgba(0,0,0,.1)}
.md-09__card-title{font-size:.7rem;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--ink2);margin-bottom:28px}
/* ── HORIZONTAL STEPPER ── */
.md-09__hstep{
display:flex;align-items:flex-start;position:relative;
margin-bottom:32px;
}
/* connector lines between steps */
.md-09__hstep-item{display:flex;flex-direction:column;align-items:center;flex:1;position:relative}
.md-09__hstep-item:not(:last-child)::after{
content:'';position:absolute;
top:20px;left:50%;right:-50%;
height:2px;background:var(--divider);z-index:0;
}
.md-09__hstep-item--done:not(:last-child)::after{background:var(--success)}
.md-09__hstep-item--active:not(:last-child)::after{background:linear-gradient(to right,var(--primary),var(--divider))}
/* step circle */
.md-09__step-circle{
width:40px;height:40px;border-radius:50%;
display:flex;align-items:center;justify-content:center;
font-size:.9rem;font-weight:700;
border:2px solid var(--divider);background:var(--surface);
color:var(--ink3);position:relative;z-index:1;
transition:all .25s;flex-shrink:0;
}
.md-09__hstep-item--done .md-09__step-circle{background:var(--success);border-color:var(--success);color:#fff}
.md-09__hstep-item--active .md-09__step-circle{background:var(--primary);border-color:var(--primary);color:#fff;box-shadow:0 0 0 4px rgba(230,81,0,.2)}
.md-09__hstep-item--error .md-09__step-circle{background:#c62828;border-color:#c62828;color:#fff}
.md-09__step-label{margin-top:10px;text-align:center;padding:0 4px}
.md-09__step-name{font-size:.8rem;font-weight:500;color:var(--ink);line-height:1.3}
.md-09__hstep-item--done .md-09__step-name{color:var(--success)}
.md-09__hstep-item--active .md-09__step-name{color:var(--primary);font-weight:700}
.md-09__hstep-item--error .md-09__step-name{color:#c62828}
.md-09__step-sub{font-size:.72rem;color:var(--ink3);margin-top:2px}
/* ── CONTENT PANEL ── */
.md-09__step-content{
border:1px solid var(--divider);border-radius:8px;padding:24px;margin-bottom:20px;
background:#fffef9;
}
.md-09__step-content-title{font-size:1rem;font-weight:700;margin-bottom:12px;color:var(--ink)}
.md-09__step-content-body{font-size:.9rem;line-height:1.7;color:var(--ink2)}
.md-09__step-actions{display:flex;gap:12px;justify-content:flex-end}
.md-09__btn{
height:36px;padding:0 20px;border:none;border-radius:4px;cursor:pointer;
font-family:'Roboto';font-size:.875rem;font-weight:500;letter-spacing:.089em;text-transform:uppercase;
transition:box-shadow .15s;
}
.md-09__btn--p{background:var(--primary);color:#fff;box-shadow:0 2px 4px rgba(0,0,0,.2)}
.md-09__btn--p:hover{box-shadow:0 4px 8px rgba(0,0,0,.25)}
.md-09__btn--ghost{background:transparent;color:var(--primary);border:1px solid rgba(230,81,0,.4)}
/* ── VERTICAL STEPPER (checkbox-hack) ── */
.md-09__vstep{display:flex;flex-direction:column}
.md-09__vstep-in{display:none}
.md-09__vstep-item{display:flex;gap:0;position:relative}
.md-09__vstep-left{display:flex;flex-direction:column;align-items:center;width:48px;flex-shrink:0}
.md-09__vstep-circle{
width:32px;height:32px;border-radius:50%;
display:flex;align-items:center;justify-content:center;
font-size:.8rem;font-weight:700;
background:var(--surface);border:2px solid var(--divider);color:var(--ink3);
flex-shrink:0;cursor:pointer;z-index:1;
transition:all .2s;
}
.md-09__vstep-in:checked ~ .md-09__vstep-body .md-09__vstep-circle{background:var(--primary);border-color:var(--primary);color:#fff;box-shadow:0 0 0 3px rgba(230,81,0,.2)}
.md-09__vstep-connector{width:2px;flex:1;background:var(--divider);margin:4px 0;min-height:24px}
.md-09__vstep-body{flex:1;padding-bottom:24px}
.md-09__vstep-head{display:flex;align-items:center;gap:12px;min-height:32px}
.md-09__vstep-title{font-size:.95rem;font-weight:500;cursor:pointer;user-select:none;color:var(--ink2)}
.md-09__vstep-in:checked ~ .md-09__vstep-body .md-09__vstep-title{color:var(--primary);font-weight:700}
.md-09__vstep-panel{overflow:hidden;max-height:0;transition:max-height .3s ease}
.md-09__vstep-in:checked ~ .md-09__vstep-body .md-09__vstep-panel{max-height:400px}
.md-09__vstep-panel-inner{padding:12px 0;font-size:.88rem;color:var(--ink2);line-height:1.7}
/* ── LINEAR CHECKOUT STEPS (radio) ── */
.md-09__checkout{
position:relative;overflow:hidden;
}
.md-09__checkout-in{display:none}
.md-09__checkout-steps{display:flex;background:var(--primary);padding:0 16px}
.md-09__checkout-step-lbl{
flex:1;height:52px;display:flex;align-items:center;justify-content:center;gap:8px;
font-size:.8rem;font-weight:500;letter-spacing:.05em;text-transform:uppercase;
color:rgba(255,255,255,.6);cursor:pointer;position:relative;
transition:color .2s;user-select:none;
}
.md-09__checkout-step-lbl::after{content:'';position:absolute;bottom:0;left:0;right:0;height:3px;background:#fff;transform:scaleX(0);transition:transform .25s}
#md09co1:checked ~ .md-09__checkout-steps .md-09__cslbl-1,
#md09co2:checked ~ .md-09__checkout-steps .md-09__cslbl-2,
#md09co3:checked ~ .md-09__checkout-steps .md-09__cslbl-3{color:#fff}
#md09co1:checked ~ .md-09__checkout-steps .md-09__cslbl-1::after,
#md09co2:checked ~ .md-09__checkout-steps .md-09__cslbl-2::after,
#md09co3:checked ~ .md-09__checkout-steps .md-09__cslbl-3::after{transform:scaleX(1)}
.md-09__checkout-panels{padding:24px}
.md-09__checkout-panel{display:none}
#md09co1:checked ~ .md-09__checkout-panels .md-09__cpanel-1,
#md09co2:checked ~ .md-09__checkout-panels .md-09__cpanel-2,
#md09co3:checked ~ .md-09__checkout-panels .md-09__cpanel-3{display:block}
.md-09__field{margin-bottom:16px}
.md-09__field label{font-size:.78rem;color:var(--ink2);display:block;margin-bottom:4px}
.md-09__field input,.md-09__field select{width:100%;height:44px;padding:0 12px;border:1px solid var(--divider);border-radius:4px;font-family:'Roboto';font-size:.875rem;outline:none;transition:border-color .15s}
.md-09__field input:focus,.md-09__field select:focus{border-color:var(--primary)}
.md-09__field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(prefers-reduced-motion:reduce){.md-09 *{transition:none!important;animation:none!important}}
```
### 10. Material Design Tooltip CSS
**Type:** Pure CSS
**Description:** Plain and rich tooltips in four directions, linear progress (determinate and indeterminate), circular progress, notification badges, and page dot navigation — all pure CSS.
**HTML:**
```html
Material Design Tooltips & Indicators
Tooltips (all 4 positions + rich), progress bars, circular indicators and badge components — pure CSS
Linear Progress Indicators
Loading data… Indeterminate
Circular Progress Indicators
```
**CSS:**
```css
.md-10,.md-10 *,.md-10 *::before,.md-10 *::after{box-sizing:border-box;margin:0;padding:0}
.md-10 ::selection{background:#00695c;color:#fff}
.md-10{
--primary:#00695c;
--primary-l:#4db6ac;
--secondary:#f57c00;
--surface:#fff;
--bg:#e0f2f1;
--ink:#212121;
--ink2:#546e7a;
--ink3:#90a4ae;
--divider:#b2dfdb;
font-family:'Roboto',sans-serif;
background:var(--bg);
min-height:100vh;
padding:48px 24px 80px;
color:var(--ink);
}
.md-10__wrap{max-width:900px;margin:0 auto}
.md-10__page-title{font-size:clamp(1.4rem,4vw,2rem);font-weight:700;margin-bottom:4px}
.md-10__page-sub{font-size:.9rem;color:var(--ink2);margin-bottom:40px}
.md-10__section{background:var(--surface);border-radius:12px;padding:32px;margin-bottom:24px;box-shadow:0 1px 4px rgba(0,0,0,.1)}
.md-10__section-title{font-size:.7rem;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--ink2);margin-bottom:24px;display:flex;align-items:center;gap:10px}
.md-10__section-title::after{content:'';flex:1;height:1px;background:var(--divider)}
/* ── TOOLTIP ── */
.md-10__tooltip-wrap{position:relative;display:inline-flex}
.md-10__tooltip{
position:absolute;z-index:10;
background:#212121;color:#fff;
font-size:.75rem;font-weight:400;line-height:1.4;
padding:6px 10px;border-radius:4px;
white-space:nowrap;max-width:240px;white-space:normal;
pointer-events:none;
opacity:0;transition:opacity .15s .1s,transform .15s .1s;
}
/* Arrow */
.md-10__tooltip::before{content:'';position:absolute;width:0;height:0}
/* Top tooltip */
.md-10__tooltip--top{bottom:calc(100% + 8px);left:50%;transform:translateX(-50%) translateY(4px)}
.md-10__tooltip--top::before{top:100%;left:50%;transform:translateX(-50%);border:5px solid transparent;border-top-color:#212121}
.md-10__tooltip-wrap:hover .md-10__tooltip--top{opacity:1;transform:translateX(-50%) translateY(0)}
/* Bottom tooltip */
.md-10__tooltip--bottom{top:calc(100% + 8px);left:50%;transform:translateX(-50%) translateY(-4px)}
.md-10__tooltip--bottom::before{bottom:100%;left:50%;transform:translateX(-50%);border:5px solid transparent;border-bottom-color:#212121}
.md-10__tooltip-wrap:hover .md-10__tooltip--bottom{opacity:1;transform:translateX(-50%) translateY(0)}
/* Left tooltip */
.md-10__tooltip--left{right:calc(100% + 8px);top:50%;transform:translateY(-50%) translateX(4px)}
.md-10__tooltip--left::before{left:100%;top:50%;transform:translateY(-50%);border:5px solid transparent;border-left-color:#212121}
.md-10__tooltip-wrap:hover .md-10__tooltip--left{opacity:1;transform:translateY(-50%) translateX(0)}
/* Right tooltip */
.md-10__tooltip--right{left:calc(100% + 8px);top:50%;transform:translateY(-50%) translateX(-4px)}
.md-10__tooltip--right::before{right:100%;top:50%;transform:translateY(-50%);border:5px solid transparent;border-right-color:#212121}
.md-10__tooltip-wrap:hover .md-10__tooltip--right{opacity:1;transform:translateY(-50%) translateX(0)}
/* Rich tooltip */
.md-10__tooltip--rich{
background:var(--surface);color:var(--ink);
max-width:280px;padding:12px 16px;
box-shadow:0 2px 12px rgba(0,0,0,.2);
border-radius:8px;white-space:normal;
}
.md-10__tooltip--rich::before{display:none}
.md-10__tooltip--rich .md-10__tt-title{font-size:.875rem;font-weight:700;margin-bottom:4px;color:var(--ink)}
.md-10__tooltip--rich .md-10__tt-body{font-size:.8rem;line-height:1.5;color:var(--ink2)}
.md-10__tooltip--rich .md-10__tt-actions{display:flex;gap:8px;margin-top:8px;padding-top:8px;border-top:1px solid var(--divider)}
.md-10__tooltip--rich .md-10__tt-btn{background:none;border:none;color:var(--primary);font-family:'Roboto';font-size:.78rem;font-weight:500;cursor:pointer;text-transform:uppercase;letter-spacing:.05em;padding:0}
/* ── TRIGGER BUTTONS ── */
.md-10__icon-btn{
width:44px;height:44px;border-radius:50%;border:none;cursor:pointer;
background:var(--primary);color:#fff;font-size:1.2rem;
display:flex;align-items:center;justify-content:center;
box-shadow:0 2px 6px rgba(0,0,0,.2);transition:box-shadow .2s;
}
.md-10__icon-btn:hover{box-shadow:0 4px 12px rgba(0,0,0,.25)}
.md-10__text-btn{
height:36px;padding:0 16px;border:1px solid var(--divider);border-radius:4px;
background:var(--surface);font-family:'Roboto';font-size:.875rem;cursor:pointer;color:var(--ink);
}
.md-10__badge-btn{
background:var(--primary);color:#fff;border:none;border-radius:4px;padding:10px 16px;
font-family:'Roboto';font-size:.875rem;font-weight:500;cursor:pointer;
}
/* ── PROGRESS INDICATORS ── */
.md-10__progress-row{display:flex;flex-direction:column;gap:20px}
.md-10__progress-label{font-size:.8rem;color:var(--ink2);margin-bottom:6px;display:flex;justify-content:space-between}
.md-10__progress-track{height:4px;background:#b2dfdb;border-radius:2px;overflow:hidden;position:relative}
.md-10__progress-fill{height:100%;background:var(--primary);border-radius:2px;position:relative}
/* Indeterminate bar */
.md-10__progress-fill--indeterminate{
width:30%;
animation:md10-indeterminate 2s linear infinite;
}
@keyframes md10-indeterminate{
0%{left:-30%;width:30%}
60%{left:60%;width:50%}
100%{left:110%;width:30%}
}
/* Circular progress */
.md-10__circular-row{display:flex;gap:28px;flex-wrap:wrap;align-items:center;justify-content:center}
.md-10__circular{position:relative;width:64px;height:64px;flex-shrink:0}
.md-10__circular svg{transform:rotate(-90deg);width:64px;height:64px}
.md-10__circular-track{fill:none;stroke:#b2dfdb;stroke-width:4}
.md-10__circular-fill{fill:none;stroke:var(--primary);stroke-width:4;stroke-linecap:round;transition:stroke-dashoffset .5s ease}
.md-10__circular-val{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:700;color:var(--primary)}
/* Indeterminate circle */
.md-10__circular--spin .md-10__circular-fill{
stroke-dasharray:160 200;
animation:md10-cspin 1.4s linear infinite;
}
@keyframes md10-cspin{0%{stroke-dashoffset:0;transform:none}100%{stroke-dashoffset:-320;transform:none}}
.md-10__circular--spin svg{animation:md10-svg-spin 1.4s linear infinite}
@keyframes md10-svg-spin{0%{transform:rotate(-90deg)}100%{transform:rotate(270deg)}}
/* ── BADGE ── */
.md-10__badge-wrap{position:relative;display:inline-flex}
.md-10__badge{
position:absolute;top:-4px;right:-4px;
background:var(--secondary);color:#fff;
font-size:.65rem;font-weight:700;
padding:2px 6px;border-radius:10px;
border:2px solid var(--surface);
line-height:1.4;white-space:nowrap;
min-width:20px;text-align:center;
}
.md-10__badge--dot{width:10px;height:10px;min-width:0;padding:0;top:-2px;right:-2px}
.md-10__badge--large{font-size:.75rem;padding:3px 8px;border-radius:12px}
.md-10__badge-demo-row{display:flex;gap:24px;flex-wrap:wrap;align-items:center}
/* ── PROGRESS OVERFLOW DOTS ── */
.md-10__dots-row{display:flex;gap:4px;align-items:center;justify-content:center;padding:8px 0}
.md-10__dot{width:8px;height:8px;border-radius:50%;background:var(--divider);transition:all .2s}
.md-10__dot--active{background:var(--primary);width:24px;border-radius:4px}
@media(prefers-reduced-motion:reduce){.md-10 *{animation:none!important;transition:none!important}}
```
### 11. Material Design Expansion Panel CSS
**Type:** Pure CSS
**Description:** Standard accordion, icon-leading accordion with inline forms, and FAQ-style fully-rounded panels — interactive via the CSS checkbox-hack, zero JavaScript.
**HTML:**
```html
Standard Accordion
Manage your name, email address, phone number, and other personal details associated with your account.
Changes to personal information may require verification before taking effect.
Cancel
Save
Your current payment method is a Visa card ending in 4242, expiring 08/2027.
You can add, remove, or update payment methods at any time. Changes will apply to all future charges.
Add Method
Update
With Leading Icons
FAQ Style
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
.md-11 {
--primary: #5c6bc0;
--primary-dark: #3949ab;
--primary-light: #e8eaf6;
--on-surface: #1c1b1f;
--surface: #fffbfe;
--surface-variant: #e7e0ec;
--outline: #79747e;
--outline-variant: #cac4d0;
--error: #b3261e;
all: unset;
display: block;
font-family: 'Roboto', sans-serif;
background: #f3f3f7;
padding: 32px 24px;
box-sizing: border-box;
color: var(--on-surface);
}
.md-11 *, .md-11 *::before, .md-11 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.md-11 h3 {
font-size: 11px;
font-weight: 500;
letter-spacing: 1.5px;
text-transform: uppercase;
color: var(--outline);
margin-bottom: 12px;
margin-top: 32px;
}
.md-11 h3:first-child { margin-top: 0; }
/* ── Accordion container ── */
.md-11 .accordion { display: flex; flex-direction: column; gap: 0; }
.md-11 .accordion--gap { gap: 8px; }
/* Hide real checkbox */
.md-11 .acc-toggle { display: none; }
/* Panel wrapper */
.md-11 .acc-panel {
background: var(--surface);
border: 1px solid var(--outline-variant);
border-radius: 0;
overflow: hidden;
transition: box-shadow 200ms ease;
}
.md-11 .accordion .acc-panel:first-of-type { border-radius: 4px 4px 0 0; }
.md-11 .accordion .acc-panel:last-of-type { border-radius: 0 0 4px 4px; }
.md-11 .accordion .acc-panel:not(:first-of-type) { border-top: none; }
.md-11 .accordion--gap .acc-panel { border-radius: 12px !important; border: 1px solid var(--outline-variant); }
/* Expanded panel gets elevation */
.md-11 .acc-toggle:checked ~ .acc-panel,
.md-11 .acc-panel:has(.acc-toggle:checked) { box-shadow: 0 2px 8px rgba(0,0,0,.15); z-index: 1; position: relative; }
/* Header / label */
.md-11 .acc-header {
display: flex;
align-items: center;
gap: 16px;
padding: 0 24px;
min-height: 56px;
cursor: pointer;
user-select: none;
position: relative;
transition: background 150ms ease;
}
.md-11 .acc-header:hover { background: rgba(0,0,0,.04); }
.md-11 .acc-header:active { background: rgba(0,0,0,.08); }
.md-11 .acc-title {
flex: 1;
font-size: 15px;
font-weight: 500;
color: var(--on-surface);
line-height: 1.4;
}
.md-11 .acc-subtitle {
font-size: 12px;
font-weight: 400;
color: var(--outline);
margin-top: 1px;
}
.md-11 .acc-meta {
font-size: 13px;
color: var(--outline);
white-space: nowrap;
}
.md-11 .acc-icon {
width: 20px;
height: 20px;
flex-shrink: 0;
fill: var(--primary);
}
/* Chevron arrow */
.md-11 .acc-chevron {
width: 20px;
height: 20px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
transition: transform 250ms cubic-bezier(.4,0,.2,1);
color: var(--outline);
}
.md-11 .acc-chevron::before {
content: '';
display: block;
width: 10px;
height: 10px;
border-right: 2px solid currentColor;
border-bottom: 2px solid currentColor;
transform: rotate(45deg) translate(-2px,-2px);
transition: transform 250ms cubic-bezier(.4,0,.2,1);
}
/* When checked: rotate chevron */
.md-11 .acc-toggle:checked + .acc-header .acc-chevron::before {
transform: rotate(-135deg) translate(-2px,-2px);
}
/* For nested structure */
.md-11 .acc-panel:has(> .acc-toggle:checked) .acc-chevron::before {
transform: rotate(-135deg) translate(-2px,-2px);
}
/* Collapsed content: height 0, no border */
.md-11 .acc-body {
max-height: 0;
overflow: hidden;
transition: max-height 300ms cubic-bezier(.4,0,.2,1);
}
.md-11 .acc-toggle:checked ~ .acc-body,
.md-11 .acc-panel:has(> .acc-toggle:checked) > .acc-body {
max-height: 600px;
}
.md-11 .acc-content {
padding: 8px 24px 20px;
border-top: 1px solid var(--outline-variant);
font-size: 14px;
line-height: 1.6;
color: #49454f;
}
.md-11 .acc-content p { margin-bottom: 8px; }
.md-11 .acc-content p:last-child { margin-bottom: 0; }
/* Actions row inside panel */
.md-11 .acc-actions {
display: flex;
gap: 8px;
padding: 12px 16px 4px;
justify-content: flex-end;
}
.md-11 .acc-btn {
padding: 8px 16px;
border-radius: 20px;
font-size: 13px;
font-weight: 500;
letter-spacing: .3px;
cursor: pointer;
border: none;
background: transparent;
color: var(--primary);
transition: background 150ms;
}
.md-11 .acc-btn:hover { background: var(--primary-light); }
.md-11 .acc-btn--filled { background: var(--primary); color: #fff; }
.md-11 .acc-btn--filled:hover { background: var(--primary-dark); }
/* ── Variant: Filled / tonal ── */
.md-11 .acc-panel--tonal { background: var(--primary-light); border-color: transparent; }
.md-11 .acc-panel--tonal .acc-content { background: #fff; border-top-color: var(--outline-variant); }
/* ── Variant: Outlined rounded ── */
.md-11 .acc-panel--rounded { border-radius: 28px !important; overflow: hidden; }
.md-11 .acc-panel--rounded .acc-header { padding: 0 20px; min-height: 52px; }
/* ── Icon list variant ── */
.md-11 .acc-icon-wrap {
width: 36px;
height: 36px;
border-radius: 50%;
background: var(--primary-light);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.md-11 .acc-icon-wrap svg { width: 18px; height: 18px; fill: var(--primary); }
/* ── Form inside panel ── */
.md-11 .acc-form { display: flex; flex-direction: column; gap: 16px; padding: 16px 24px 20px; border-top: 1px solid var(--outline-variant); }
.md-11 .field { display: flex; flex-direction: column; gap: 4px; }
.md-11 .field label { font-size: 12px; color: var(--outline); font-weight: 500; }
.md-11 .field input, .md-11 .field select {
border: 1px solid var(--outline-variant);
border-radius: 4px;
padding: 10px 12px;
font-size: 14px;
font-family: inherit;
outline: none;
transition: border-color 150ms;
background: var(--surface);
}
.md-11 .field input:focus, .md-11 .field select:focus { border-color: var(--primary); }
.md-11 .field-row { display: flex; gap: 12px; }
.md-11 .field-row .field { flex: 1; }
@media (prefers-reduced-motion: reduce) {
.md-11 .acc-body,
.md-11 .acc-chevron::before,
.md-11 .acc-header,
.md-11 .acc-btn { transition: none !important; }
}
```
### 12. Material Design List CSS
**Type:** Pure CSS
**Description:** Single-line, two-line with avatars, three-line with thumbnails, icon lists with subheaders and dividers, checkbox lists, and action-button rows — complete Material Design 3 list system.
**HTML:**
```html
Single-Line
Two-Line with Avatars
J
Jamie Lee
Hey! Are you free this weekend?
2m
A
Alex Kim
The designs look great, nice work!
1h
M
Morgan Blake
Can we reschedule the meeting?
3h
S
Sam Rivera
Just sent over the report
9h
T
Taylor Brooks
Thanks for the introduction!
1d
Three-Line with Thumbnails
Summer Retreat 2024
Album · 48 photos
Mountain views, campfire nights, and hiking trails across the national park.
Late Night Mix
Playlist · 22 tracks
Chill ambient and lo-fi beats for focused late-night work sessions.
Deep Work
Book · Cal Newport
Rules for focused success in a distracted world — a must-read for knowledge workers.
With Icons & Subheaders
Checkbox List
Design system components
Buttons, chips, dialogs
Accessibility audit
WCAG 2.1 AA compliance
Dark mode theming
Token mapping & overrides
Documentation
Component usage & API
With Action Buttons
K
Kai Nakamura
Frontend Engineer
P
Priya Sharma
Product Designer
C
Carlos Vega
Engineering Manager
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
.md-12 {
--primary: #1976d2;
--primary-light: #e3f2fd;
--on-surface: #1c1b1f;
--surface: #fffbfe;
--surface-variant: #f3f3f3;
--outline: #79747e;
--outline-variant: #e0e0e0;
all: unset;
display: block;
font-family: 'Roboto', sans-serif;
background: #f5f5f5;
padding: 32px 24px;
box-sizing: border-box;
color: var(--on-surface);
}
.md-12 *, .md-12 *::before, .md-12 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.md-12 h3 {
font-size: 11px;
font-weight: 500;
letter-spacing: 1.5px;
text-transform: uppercase;
color: var(--outline);
margin-bottom: 4px;
margin-top: 32px;
}
.md-12 h3:first-child { margin-top: 0; }
/* ── List card container ── */
.md-12 .list-card {
background: var(--surface);
border-radius: 12px;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0,0,0,.1);
margin-top: 8px;
}
/* ── Subheader ── */
.md-12 .list-subheader {
padding: 8px 16px 4px;
font-size: 11px;
font-weight: 600;
letter-spacing: 1px;
text-transform: uppercase;
color: var(--primary);
background: var(--primary-light);
}
/* ── List item base ── */
.md-12 .list-item {
display: flex;
align-items: center;
gap: 16px;
padding: 0 16px;
min-height: 48px;
cursor: pointer;
position: relative;
transition: background 150ms ease;
border-bottom: 1px solid var(--outline-variant);
}
.md-12 .list-item:last-child { border-bottom: none; }
.md-12 .list-item:hover { background: rgba(25,118,210,.05); }
.md-12 .list-item:active { background: rgba(25,118,210,.1); }
/* Ripple */
.md-12 .list-item::after {
content: '';
position: absolute;
inset: 0;
background: var(--primary);
opacity: 0;
border-radius: inherit;
transition: opacity 400ms ease;
}
.md-12 .list-item:active::after { opacity: .06; transition: none; }
/* ── Two-line item ── */
.md-12 .list-item--two { min-height: 64px; }
.md-12 .list-item--three { min-height: 80px; align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
/* ── Text block ── */
.md-12 .item-text { flex: 1; min-width: 0; }
.md-12 .item-primary { font-size: 15px; font-weight: 400; color: var(--on-surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-12 .item-secondary { font-size: 13px; color: var(--outline); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-12 .item-tertiary { font-size: 12px; color: #aaa; margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
/* ── Leading avatar ── */
.md-12 .item-avatar {
width: 40px; height: 40px;
border-radius: 50%;
background: var(--primary);
color: #fff;
font-size: 15px;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.md-12 .item-avatar--img {
background-size: cover;
background-position: center;
font-size: 0;
}
/* Avatar color variants */
.md-12 .item-avatar[data-color="teal"] { background: #00897b; }
.md-12 .item-avatar[data-color="orange"] { background: #f57c00; }
.md-12 .item-avatar[data-color="purple"] { background: #7b1fa2; }
.md-12 .item-avatar[data-color="red"] { background: #c62828; }
.md-12 .item-avatar[data-color="green"] { background: #388e3c; }
.md-12 .item-avatar[data-color="pink"] { background: #d81b60; }
/* ── Leading icon ── */
.md-12 .item-icon {
width: 24px; height: 24px;
flex-shrink: 0;
fill: var(--outline);
display: flex; align-items: center; justify-content: center;
}
.md-12 .item-icon svg { width: 24px; height: 24px; }
/* ── Leading image ── */
.md-12 .item-image {
width: 56px; height: 56px;
border-radius: 4px;
background: var(--outline-variant);
flex-shrink: 0;
overflow: hidden;
display: flex; align-items: center; justify-content: center;
}
.md-12 .item-image svg { width: 28px; height: 28px; fill: #bbb; }
/* ── Trailing elements ── */
.md-12 .item-trailing { flex-shrink: 0; }
.md-12 .item-meta { font-size: 12px; color: var(--outline); }
.md-12 .item-badge {
min-width: 20px; height: 20px;
background: var(--primary);
color: #fff;
font-size: 11px;
font-weight: 600;
border-radius: 10px;
display: flex; align-items: center; justify-content: center;
padding: 0 5px;
}
.md-12 .item-chevron { color: #bbb; font-size: 18px; }
/* ── Checkbox / radio trailing ── */
.md-12 .item-check {
width: 18px; height: 18px;
border: 2px solid var(--outline);
border-radius: 3px;
flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
transition: background 150ms, border-color 150ms;
}
.md-12 .item-check--on { background: var(--primary); border-color: var(--primary); }
.md-12 .item-check--on::after { content: ''; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px,-1px); display: block; }
.md-12 .item-radio {
width: 18px; height: 18px;
border: 2px solid var(--outline);
border-radius: 50%;
flex-shrink: 0;
position: relative;
transition: border-color 150ms;
}
.md-12 .item-radio--on { border-color: var(--primary); }
.md-12 .item-radio--on::after { content: ''; width: 10px; height: 10px; background: var(--primary); border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); }
/* ── Switch trailing ── */
.md-12 .item-switch {
width: 36px; height: 20px;
background: #bdbdbd;
border-radius: 10px;
position: relative;
transition: background 200ms;
flex-shrink: 0;
}
.md-12 .item-switch::after {
content: '';
width: 16px; height: 16px;
background: #fff;
border-radius: 50%;
position: absolute;
top: 2px; left: 2px;
transition: left 200ms, background 200ms;
box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.md-12 .item-switch--on { background: var(--primary); }
.md-12 .item-switch--on::after { left: 18px; }
/* ── Divider ── */
.md-12 .list-divider {
height: 1px;
background: var(--outline-variant);
margin: 0;
}
.md-12 .list-divider--inset { margin-left: 72px; }
/* ── Dense list ── */
.md-12 .list-item--dense { min-height: 36px; }
.md-12 .list-item--dense .item-primary { font-size: 13px; }
/* ── Action list (icon-button trailing) ── */
.md-12 .item-actions { display: flex; gap: 4px; }
.md-12 .item-action-btn {
width: 32px; height: 32px;
border-radius: 50%;
border: none; background: transparent;
display: flex; align-items: center; justify-content: center;
cursor: pointer;
transition: background 150ms;
fill: var(--outline);
}
.md-12 .item-action-btn svg { width: 18px; height: 18px; }
.md-12 .item-action-btn:hover { background: rgba(0,0,0,.07); }
@media (prefers-reduced-motion: reduce) {
.md-12 .list-item,
.md-12 .list-item::after,
.md-12 .item-switch,
.md-12 .item-switch::after,
.md-12 .item-check,
.md-12 .item-action-btn { transition: none !important; }
}
```
### 13. Material Design Color Palette CSS
**Type:** Pure CSS
**Description:** Interactive five-theme Material Design 3 colour switcher — purple, teal, red, green, pink — with live colour role grid, tonal surfaces, and a live UI preview panel, all driven by CSS custom properties and radio inputs.
**HTML:**
```html
Select Theme
Purple
Teal
Red
Green
Pink
Color Roles
Primary
On Primary
Primary Container
Secondary
Secondary Cont.
Tertiary
Tertiary Cont.
Surface
Surface Variant
Tonal Surfaces
Primary
Dark
Container
Variant
Live Preview
Filters
All
Recent
Starred
Actions
Confirm
Maybe
Cancel
+
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
/* ── CSS-only theme switcher via hidden radio inputs ── */
#md13-t1:checked ~ .md-13 { --primary: #6750a4; --primary-dark: #4f3d7a; --primary-light: #eaddff; --primary-on: #ffffff; --secondary: #625b71; --secondary-light: #e8def8; --tertiary: #7d5260; --tertiary-light: #ffd8e4; --surface: #fffbfe; --surface-variant: #e7e0ec; --on-surface: #1c1b1f; --theme-name: "Purple (Default)"; }
#md13-t2:checked ~ .md-13 { --primary: #006874; --primary-dark: #004f58; --primary-light: #a2d0d8; --primary-on: #ffffff; --secondary: #4a6267; --secondary-light: #cce8ed; --tertiary: #525e7d; --tertiary-light: #dae2ff; --surface: #fafdfe; --surface-variant: #dbe4e6; --on-surface: #191c1d; --theme-name: "Teal"; }
#md13-t3:checked ~ .md-13 { --primary: #b5271f; --primary-dark: #8c1c16; --primary-light: #ffdad6; --primary-on: #ffffff; --secondary: #775651; --secondary-light: #ffdad6; --tertiary: #715c2e; --tertiary-light: #fcdea7; --surface: #fffbff; --surface-variant: #f5dedd; --on-surface: #201a19; --theme-name: "Red"; }
#md13-t4:checked ~ .md-13 { --primary: #386a20; --primary-dark: #255010; --primary-light: #b7f397; --primary-on: #ffffff; --secondary: #55624c; --secondary-light: #d8e7cb; --tertiary: #386667; --tertiary-light: #bcebec; --surface: #fdfdf6; --surface-variant: #dee5d4; --on-surface: #1a1c18; --theme-name: "Green"; }
#md13-t5:checked ~ .md-13 { --primary: #984061; --primary-dark: #72294a; --primary-light: #ffd8e4; --primary-on: #ffffff; --secondary: #74565f; --secondary-light: #ffd9e2; --tertiary: #7b4e00; --tertiary-light: #ffddad; --surface: #fffbff; --surface-variant: #f2dde2; --on-surface: #201a1b; --theme-name: "Pink"; }
.md-13-radios { display: none; }
.md-13 {
--primary: #6750a4;
--primary-dark: #4f3d7a;
--primary-light: #eaddff;
--primary-on: #ffffff;
--secondary: #625b71;
--secondary-light: #e8def8;
--tertiary: #7d5260;
--tertiary-light: #ffd8e4;
--surface: #fffbfe;
--surface-variant: #e7e0ec;
--on-surface: #1c1b1f;
--outline: #79747e;
--outline-variant: #cac4d0;
all: unset;
display: block;
font-family: 'Roboto', sans-serif;
background: #f3f3f7;
padding: 32px 24px;
box-sizing: border-box;
color: var(--on-surface);
}
.md-13 *, .md-13 *::before, .md-13 *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* ── Section labels ── */
.md-13 h3 {
font-size: 11px;
font-weight: 500;
letter-spacing: 1.5px;
text-transform: uppercase;
color: var(--outline);
margin-bottom: 12px;
margin-top: 32px;
}
.md-13 h3:first-child { margin-top: 0; }
/* ── Theme picker ── */
.md-13 .theme-picker {
display: flex;
gap: 12px;
flex-wrap: wrap;
margin-bottom: 4px;
}
.md-13 .theme-swatch-label {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
cursor: pointer;
}
.md-13 .theme-dot {
width: 40px; height: 40px;
border-radius: 50%;
border: 3px solid transparent;
position: relative;
transition: border-color 200ms, transform 150ms;
box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.md-13 .theme-dot::after {
content: '';
width: 14px; height: 14px;
background: rgba(255,255,255,.9);
border-radius: 50%;
position: absolute;
bottom: -1px; right: -1px;
opacity: 0;
transition: opacity 200ms;
}
.md-13 .theme-swatch-label:hover .theme-dot { transform: scale(1.1); }
.md-13 .theme-label { font-size: 11px; color: var(--outline); }
/* Swatch colors */
.md-13 .swatch-purple { background: #6750a4; }
.md-13 .swatch-teal { background: #006874; }
.md-13 .swatch-red { background: #b5271f; }
.md-13 .swatch-green { background: #386a20; }
.md-13 .swatch-pink { background: #984061; }
/* Active swatch gets border + checkmark */
#md13-t1:checked ~ .md-13 .swatch-purple,
#md13-t2:checked ~ .md-13 .swatch-teal,
#md13-t3:checked ~ .md-13 .swatch-red,
#md13-t4:checked ~ .md-13 .swatch-green,
#md13-t5:checked ~ .md-13 .swatch-pink {
border-color: var(--on-surface);
transform: scale(1.1);
}
#md13-t1:checked ~ .md-13 .swatch-purple::after,
#md13-t2:checked ~ .md-13 .swatch-teal::after,
#md13-t3:checked ~ .md-13 .swatch-red::after,
#md13-t4:checked ~ .md-13 .swatch-green::after,
#md13-t5:checked ~ .md-13 .swatch-pink::after { opacity: 1; }
/* ── Color palette grid ── */
.md-13 .palette-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
}
.md-13 .palette-chip {
border-radius: 12px;
padding: 14px 12px;
display: flex;
flex-direction: column;
gap: 4px;
transition: background 400ms ease, color 400ms ease;
}
.md-13 .palette-chip .chip-label { font-size: 11px; font-weight: 500; letter-spacing: .5px; }
.md-13 .palette-chip .chip-hex { font-size: 10px; opacity: .7; font-family: monospace; }
.md-13 .chip-primary { background: var(--primary); color: var(--primary-on); }
.md-13 .chip-primary-dark { background: var(--primary-dark); color: #fff; }
.md-13 .chip-primary-light { background: var(--primary-light); color: var(--on-surface); }
.md-13 .chip-secondary { background: var(--secondary); color: #fff; }
.md-13 .chip-sec-light { background: var(--secondary-light); color: var(--on-surface); }
.md-13 .chip-tertiary { background: var(--tertiary); color: #fff; }
.md-13 .chip-tert-light { background: var(--tertiary-light); color: var(--on-surface); }
.md-13 .chip-surface { background: var(--surface); color: var(--on-surface); border: 1px solid var(--outline-variant); }
.md-13 .chip-surface-var { background: var(--surface-variant); color: var(--on-surface); }
/* ── Live UI preview ── */
.md-13 .preview-card {
background: var(--surface);
border-radius: 16px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,.12);
transition: background 400ms;
}
.md-13 .preview-topbar {
background: var(--primary);
color: var(--primary-on);
padding: 14px 16px;
display: flex;
align-items: center;
gap: 12px;
transition: background 400ms;
}
.md-13 .preview-topbar-title { font-size: 16px; font-weight: 500; flex: 1; }
.md-13 .preview-topbar-dots { display: flex; gap: 3px; }
.md-13 .preview-topbar-dots span { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.7); }
.md-13 .preview-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.md-13 .preview-section-title { font-size: 12px; font-weight: 500; color: var(--secondary); text-transform: uppercase; letter-spacing: .8px; transition: color 400ms; }
.md-13 .preview-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.md-13 .preview-chip {
padding: 6px 14px;
border-radius: 16px;
font-size: 12px;
font-weight: 500;
background: var(--primary-light);
color: var(--primary);
transition: background 400ms, color 400ms;
}
.md-13 .preview-chip--filled {
background: var(--primary);
color: var(--primary-on);
}
.md-13 .preview-btns { display: flex; gap: 8px; }
.md-13 .preview-btn {
padding: 9px 18px;
border-radius: 20px;
font-size: 13px;
font-weight: 500;
border: none;
cursor: pointer;
letter-spacing: .3px;
transition: background 400ms, color 400ms;
}
.md-13 .preview-btn--filled { background: var(--primary); color: var(--primary-on); }
.md-13 .preview-btn--tonal { background: var(--secondary-light); color: var(--secondary); }
.md-13 .preview-btn--outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.md-13 .preview-fab {
width: 44px; height: 44px;
border-radius: 14px;
background: var(--tertiary);
color: #fff;
display: flex; align-items: center; justify-content: center;
font-size: 20px;
box-shadow: 0 3px 8px rgba(0,0,0,.2);
align-self: flex-end;
transition: background 400ms;
}
/* ── Material 3 Tonal Surface row ── */
.md-13 .tonal-row {
display: flex;
gap: 8px;
}
.md-13 .tonal-el {
flex: 1;
padding: 12px 8px;
border-radius: 12px;
text-align: center;
font-size: 11px;
font-weight: 500;
transition: background 400ms, color 400ms;
}
.md-13 .tonal-el-1 { background: var(--primary); color: var(--primary-on); }
.md-13 .tonal-el-2 { background: var(--primary-dark); color: #fff; }
.md-13 .tonal-el-3 { background: var(--primary-light); color: var(--on-surface); }
.md-13 .tonal-el-4 { background: var(--surface-variant); color: var(--on-surface); }
```
### 14. Material Design App Shell Layout CSS
**Type:** Pure CSS
**Description:** Full responsive app shell with sticky top app bar, persistent navigation drawer, breadcrumb toolbar, three-column stats grid, activity feed list, and a floating action button — production-ready layout, no JavaScript.
**HTML:**
```html
App
›
Dashboard
Export
+ New
Total Users
4,821
▲ 12% this month
Revenue
$28.4k
▲ 8.3% vs last month
Open Tasks
143
▼ 5 since yesterday
User #4821 signed up via referral link
2m ago
Report Q2 exported by Jordan Lee
14m ago
Payment retry pending for order #7743
1h ago
Server CPU spike — auto-scaled resolved
2h ago
Deploy v2.4.1 completed successfully
3h ago
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
.md-14 {
--primary: #1565c0;
--primary-dark: #003c8f;
--primary-light: #e3f2fd;
--on-primary: #fff;
--secondary: #00796b;
--surface: #fffbfe;
--surface-2: #f4f4f8;
--on-surface: #1c1b1f;
--outline: #79747e;
--outline-variant: #dde1e7;
--nav-width: 240px;
--topbar-h: 56px;
all: unset;
display: block;
font-family: 'Roboto', sans-serif;
background: var(--surface-2);
box-sizing: border-box;
color: var(--on-surface);
}
.md-14 *, .md-14 *::before, .md-14 *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* ── Hidden toggle for mobile drawer ── */
.md-14 .drawer-toggle { display: none; }
/* ═══════════════════════════════════════
APP SHELL
═══════════════════════════════════════ */
.md-14 .app-shell {
display: flex;
flex-direction: column;
min-height: 480px;
position: relative;
}
/* ── Top App Bar ── */
.md-14 .topbar {
height: var(--topbar-h);
background: var(--primary);
color: var(--on-primary);
display: flex;
align-items: center;
gap: 8px;
padding: 0 16px;
position: sticky;
top: 0;
z-index: 10;
box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.md-14 .topbar-menu-btn {
width: 40px; height: 40px;
border-radius: 50%;
border: none;
background: transparent;
color: inherit;
cursor: pointer;
display: flex; align-items: center; justify-content: center;
transition: background 150ms;
}
.md-14 .topbar-menu-btn:hover { background: rgba(255,255,255,.12); }
.md-14 .topbar-menu-btn svg { width: 20px; height: 20px; fill: currentColor; }
.md-14 .topbar-title { font-size: 18px; font-weight: 500; flex: 1; letter-spacing: .2px; }
.md-14 .topbar-actions { display: flex; gap: 4px; }
.md-14 .topbar-action {
width: 36px; height: 36px;
border-radius: 50%;
border: none;
background: transparent;
color: inherit;
cursor: pointer;
display: flex; align-items: center; justify-content: center;
transition: background 150ms;
}
.md-14 .topbar-action:hover { background: rgba(255,255,255,.12); }
.md-14 .topbar-action svg { width: 20px; height: 20px; fill: currentColor; }
.md-14 .topbar-avatar {
width: 32px; height: 32px;
border-radius: 50%;
background: var(--secondary);
color: #fff;
font-size: 13px;
font-weight: 600;
display: flex; align-items: center; justify-content: center;
cursor: pointer;
border: 2px solid rgba(255,255,255,.6);
}
/* ── Body: drawer + main ── */
.md-14 .app-body {
display: flex;
flex: 1;
position: relative;
min-height: 0;
}
/* ── Navigation Drawer ── */
.md-14 .nav-drawer {
width: var(--nav-width);
background: var(--surface);
border-right: 1px solid var(--outline-variant);
flex-shrink: 0;
display: flex;
flex-direction: column;
overflow-y: auto;
transition: transform 300ms cubic-bezier(.4,0,.2,1), width 300ms;
}
/* ── Nav sections ── */
.md-14 .nav-section { padding: 8px 0; }
.md-14 .nav-section + .nav-section { border-top: 1px solid var(--outline-variant); }
.md-14 .nav-subheader {
padding: 8px 28px 4px;
font-size: 11px;
font-weight: 600;
letter-spacing: 1px;
text-transform: uppercase;
color: var(--outline);
}
.md-14 .nav-item {
display: flex;
align-items: center;
gap: 12px;
padding: 0 12px;
height: 48px;
border-radius: 0 24px 24px 0;
margin-right: 12px;
cursor: pointer;
transition: background 150ms;
color: var(--on-surface);
text-decoration: none;
position: relative;
}
.md-14 .nav-item:hover { background: rgba(25,118,210,.06); }
.md-14 .nav-item.active {
background: var(--primary-light);
color: var(--primary);
}
.md-14 .nav-item.active .nav-item-icon { fill: var(--primary); }
.md-14 .nav-item.active .nav-item-text { font-weight: 700; }
.md-14 .nav-item-icon {
width: 20px; height: 20px;
fill: var(--outline);
flex-shrink: 0;
}
.md-14 .nav-item-text { font-size: 14px; font-weight: 500; flex: 1; }
.md-14 .nav-badge {
min-width: 20px; height: 18px;
background: var(--primary);
color: #fff;
font-size: 10px;
font-weight: 700;
border-radius: 9px;
display: flex; align-items: center; justify-content: center;
padding: 0 5px;
}
/* ── Main content area ── */
.md-14 .main-content {
flex: 1;
min-width: 0;
overflow-y: auto;
display: flex;
flex-direction: column;
}
/* ── Toolbar strip (secondary) ── */
.md-14 .content-toolbar {
background: var(--surface);
border-bottom: 1px solid var(--outline-variant);
padding: 0 16px;
height: 44px;
display: flex;
align-items: center;
gap: 16px;
flex-shrink: 0;
}
.md-14 .breadcrumb { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--outline); }
.md-14 .breadcrumb-sep { font-size: 11px; }
.md-14 .breadcrumb span:last-child { color: var(--on-surface); font-weight: 500; }
.md-14 .toolbar-actions { margin-left: auto; display: flex; gap: 8px; }
.md-14 .tb-btn {
padding: 6px 14px;
border-radius: 16px;
font-size: 12px;
font-weight: 500;
border: none;
cursor: pointer;
transition: background 150ms;
}
.md-14 .tb-btn--filled { background: var(--primary); color: #fff; }
.md-14 .tb-btn--filled:hover { background: var(--primary-dark); }
.md-14 .tb-btn--outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
/* ── Content padding ── */
.md-14 .content-pad { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
/* ── Card grid ── */
.md-14 .card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.md-14 .stat-card {
background: var(--surface);
border-radius: 12px;
padding: 16px;
box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.md-14 .stat-label { font-size: 11px; color: var(--outline); text-transform: uppercase; letter-spacing: .8px; font-weight: 500; margin-bottom: 6px; }
.md-14 .stat-value { font-size: 22px; font-weight: 700; color: var(--on-surface); }
.md-14 .stat-sub { font-size: 11px; color: var(--secondary); margin-top: 3px; }
/* ── Content section card ── */
.md-14 .content-card {
background: var(--surface);
border-radius: 12px;
box-shadow: 0 1px 3px rgba(0,0,0,.08);
overflow: hidden;
}
.md-14 .content-card-header {
padding: 14px 16px;
border-bottom: 1px solid var(--outline-variant);
display: flex;
align-items: center;
gap: 8px;
}
.md-14 .content-card-title { font-size: 14px; font-weight: 600; flex: 1; }
.md-14 .list-row {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 16px;
border-bottom: 1px solid var(--outline-variant);
font-size: 13px;
cursor: pointer;
transition: background 120ms;
}
.md-14 .list-row:last-child { border-bottom: none; }
.md-14 .list-row:hover { background: rgba(0,0,0,.03); }
.md-14 .list-row-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.md-14 .dot-green { background: #43a047; }
.md-14 .dot-orange { background: #f57c00; }
.md-14 .dot-red { background: #e53935; }
.md-14 .dot-blue { background: var(--primary); }
.md-14 .list-row-text { flex: 1; }
.md-14 .list-row-meta { font-size: 11px; color: var(--outline); }
/* ── FAB ── */
.md-14 .fab {
position: absolute;
bottom: 20px;
right: 20px;
width: 52px; height: 52px;
border-radius: 16px;
background: var(--primary);
color: #fff;
border: none;
font-size: 22px;
display: flex; align-items: center; justify-content: center;
cursor: pointer;
box-shadow: 0 4px 12px rgba(21,101,192,.4);
transition: box-shadow 150ms, transform 150ms;
z-index: 5;
}
.md-14 .fab:hover { box-shadow: 0 6px 18px rgba(21,101,192,.5); transform: translateY(-1px); }
.md-14 .fab svg { width: 22px; height: 22px; fill: currentColor; }
@media (prefers-reduced-motion: reduce) {
.md-14 .nav-drawer,
.md-14 .topbar-menu-btn,
.md-14 .topbar-action,
.md-14 .nav-item,
.md-14 .tb-btn,
.md-14 .fab,
.md-14 .list-row { transition: none !important; }
}
```
---
## 6 CSS Mega Menus & Dropdown Menus
URL: https://codefronts.com/navigation/css-mega-menus/
Description: 6 hand-coded CSS mega-menu and dropdown layouts — luxury editorial fashion, cyberpunk terminal panel, biophilic architecture studio, Swiss-grid department store, precision outdoor gear finder, and flash-sale command center. Hover + click/tap. Copy-paste ready, accessible, mobile-friendly.
Demo count: 6
### 01. Noir Editorial
**Type:** CSS + JS
**Description:** A dark luxury fashion-house mega menu on a pure black canvas. Cormorant Garamond serif for link text, gold line reveals, full-bleed editorial photography that slowly scales on hover, staggered fade-up link animations, and hairline gold borders between columns. Includes an animated gold underline under each trigger, a "New" badge system, an italic promo block per panel, and a footer strip with free-shipping messaging. Best for luxury fashion, haute couture, editorial retail.
**HTML:**
```html
Women
SS 2026 Collection
The Quiet Luxury Edit
Men
The Modern Gentleman
Tailored Restraint
Collections
Limited Edition
Archive Reissues
Maison
Stores
```
**CSS:**
```css
/* ─── 01 Noir Editorial — dark luxury fashion mega menu ─────────────
Imports Cormorant Garamond + Montserrat from Google Fonts. All
styles are scoped under .mm-noi so global resets and body styles
from the host page never leak in. */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Montserrat:wght@200;300;400;500&display=swap');
.mm-noi {
--mm-noi-ink: #0a0a0a;
--mm-noi-bone: #f0ead8;
--mm-noi-gold: #c9a84c;
--mm-noi-gold-dim: #8a6f2e;
--mm-noi-cream: #e8dfc8;
--mm-noi-line: rgba(201, 168, 76, 0.2);
position: relative;
background: var(--mm-noi-ink);
font-family: 'Montserrat', system-ui, sans-serif;
width: 100%;
min-height: 560px;
padding: 0;
overflow: hidden;
box-sizing: border-box;
}
.mm-noi *,
.mm-noi *::before,
.mm-noi *::after { box-sizing: border-box; }
.mm-noi .nav-bar {
list-style: none;
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
gap: 0;
background: var(--mm-noi-ink);
border-bottom: 1px solid var(--mm-noi-line);
position: relative;
z-index: 2;
}
.mm-noi .nav-item { position: relative; list-style: none; }
.mm-noi .nav-trigger {
display: block;
padding: 22px 26px;
color: var(--mm-noi-bone);
font-family: 'Montserrat', system-ui, sans-serif;
font-size: 10px;
font-weight: 400;
letter-spacing: 0.2em;
text-transform: uppercase;
background: transparent;
border: 0;
cursor: pointer;
user-select: none;
transition: color 0.3s ease;
position: relative;
}
.mm-noi .nav-trigger::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%) scaleX(0);
width: 80%;
height: 1px;
background: var(--mm-noi-gold);
transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.mm-noi .nav-item:hover .nav-trigger,
.mm-noi .nav-item.mm-open .nav-trigger {
color: var(--mm-noi-gold);
}
.mm-noi .nav-item:hover .nav-trigger::after,
.mm-noi .nav-item.mm-open .nav-trigger::after {
transform: translateX(-50%) scaleX(1);
}
/* ── Mega Panel ── */
.mm-noi .mega {
position: absolute;
top: calc(100% + 1px);
left: 50%;
transform: translateX(-50%) translateY(-10px);
width: min(900px, calc(100vw - 32px));
max-width: calc(100% + 320px);
background: var(--mm-noi-ink);
border: 1px solid var(--mm-noi-line);
opacity: 0;
pointer-events: none;
transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
display: grid;
overflow: hidden;
z-index: 5;
}
.mm-noi .mega.cols-3-img { grid-template-columns: 2fr 1fr 1fr; }
.mm-noi .mega.cols-editorial { grid-template-columns: 1.8fr 1fr 1fr; }
.mm-noi .nav-item:hover .mega,
.mm-noi .nav-item.mm-open .mega {
opacity: 1;
pointer-events: all;
transform: translateX(-50%) translateY(0);
}
/* ── Image Column ── */
.mm-noi .mega-img {
position: relative;
overflow: hidden;
min-height: 360px;
}
.mm-noi .mega-img img {
width: 100%;
height: 100%;
object-fit: cover;
filter: grayscale(30%) contrast(1.1);
transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.6s ease;
}
.mm-noi .nav-item:hover .mega-img img,
.mm-noi .nav-item.mm-open .mega-img img {
transform: scale(1.04);
filter: grayscale(0%) contrast(1.05);
}
.mm-noi .mega-img-overlay {
position: absolute;
inset: 0;
background: linear-gradient(to top, rgba(10, 10, 10, 0.8) 0%, rgba(10, 10, 10, 0.1) 50%, transparent 100%);
}
.mm-noi .mega-img-label {
position: absolute;
bottom: 24px;
left: 24px;
right: 24px;
}
.mm-noi .mega-img-label .eyebrow {
display: block;
font-family: 'Montserrat', system-ui, sans-serif;
font-size: 8px;
font-weight: 400;
letter-spacing: 0.25em;
text-transform: uppercase;
color: var(--mm-noi-gold);
margin-bottom: 6px;
}
.mm-noi .mega-img-label .headline {
display: block;
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 28px;
font-weight: 300;
font-style: italic;
color: var(--mm-noi-bone);
line-height: 1.1;
}
/* ── Link Column ── */
.mm-noi .mega-col {
padding: 36px 28px;
border-left: 1px solid var(--mm-noi-line);
}
.mm-noi .mega-col-title {
font-family: 'Montserrat', system-ui, sans-serif;
font-size: 8px;
font-weight: 500;
letter-spacing: 0.25em;
text-transform: uppercase;
color: var(--mm-noi-gold);
margin-bottom: 20px;
padding-bottom: 12px;
border-bottom: 1px solid var(--mm-noi-line);
}
.mm-noi .mega-links {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0;
}
.mm-noi .mega-links li a {
display: block;
padding: 9px 0;
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 17px;
font-weight: 300;
color: var(--mm-noi-cream);
text-decoration: none;
letter-spacing: 0.03em;
transition: color 0.25s ease, padding-left 0.3s ease;
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
position: relative;
}
.mm-noi .mega-links li a::before {
content: '\2014';
position: absolute;
left: -18px;
opacity: 0;
color: var(--mm-noi-gold);
font-size: 12px;
transition: opacity 0.25s ease, left 0.3s ease;
}
.mm-noi .mega-links li a:hover {
color: var(--mm-noi-gold);
padding-left: 14px;
}
.mm-noi .mega-links li a:hover::before {
opacity: 1;
left: 0;
}
.mm-noi .mega-links li a .badge {
display: inline-block;
font-family: 'Montserrat', system-ui, sans-serif;
font-size: 7px;
font-weight: 500;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--mm-noi-ink);
background: var(--mm-noi-gold);
padding: 2px 6px;
margin-left: 8px;
vertical-align: middle;
}
.mm-noi .promo-block {
margin-top: 24px;
padding-top: 20px;
border-top: 1px solid var(--mm-noi-line);
}
.mm-noi .promo-block .promo-text {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 13px;
font-style: italic;
font-weight: 300;
color: rgba(240, 234, 216, 0.5);
line-height: 1.6;
margin: 0;
}
.mm-noi .promo-block a {
display: inline-block;
margin-top: 10px;
font-family: 'Montserrat', system-ui, sans-serif;
font-size: 8px;
font-weight: 400;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--mm-noi-gold);
text-decoration: none;
border-bottom: 1px solid var(--mm-noi-gold-dim);
padding-bottom: 2px;
transition: border-color 0.3s, color 0.3s;
}
.mm-noi .promo-block a:hover {
color: var(--mm-noi-bone);
border-color: var(--mm-noi-bone);
}
/* ── Footer strip across whole panel ── */
.mm-noi .mega-footer-strip {
grid-column: 1 / -1;
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 28px;
background: rgba(201, 168, 76, 0.06);
border-top: 1px solid var(--mm-noi-line);
}
.mm-noi .mega-footer-strip span {
font-family: 'Montserrat', system-ui, sans-serif;
font-size: 8px;
font-weight: 300;
letter-spacing: 0.2em;
text-transform: uppercase;
color: rgba(240, 234, 216, 0.4);
}
.mm-noi .mega-footer-strip a {
font-family: 'Montserrat', system-ui, sans-serif;
font-size: 8px;
font-weight: 400;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--mm-noi-gold);
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 8px;
transition: gap 0.3s;
}
.mm-noi .mega-footer-strip a::after { content: '\2192'; }
.mm-noi .mega-footer-strip a:hover { gap: 14px; }
/* ── Simple dropdown for Maison / Stores ── */
.mm-noi .simple-drop {
position: absolute;
top: calc(100% + 1px);
left: 50%;
transform: translateX(-50%) translateY(-10px);
width: 240px;
background: var(--mm-noi-ink);
border: 1px solid var(--mm-noi-line);
opacity: 0;
pointer-events: none;
transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
padding: 20px 0;
z-index: 5;
}
.mm-noi .nav-item:hover .simple-drop,
.mm-noi .nav-item.mm-open .simple-drop {
opacity: 1;
pointer-events: all;
transform: translateX(-50%) translateY(0);
}
.mm-noi .simple-drop a {
display: block;
padding: 10px 28px;
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 16px;
font-weight: 300;
color: var(--mm-noi-cream);
text-decoration: none;
letter-spacing: 0.03em;
transition: color 0.25s, background 0.25s, padding-left 0.3s;
}
.mm-noi .simple-drop a:hover {
color: var(--mm-noi-gold);
background: rgba(201, 168, 76, 0.04);
padding-left: 38px;
}
/* ── Stagger animation for links on open ── */
.mm-noi .nav-item:hover .mega-links li,
.mm-noi .nav-item.mm-open .mega-links li {
animation: mm-noi-fade 0.4s ease both;
}
.mm-noi .nav-item:hover .mega-links li:nth-child(1),
.mm-noi .nav-item.mm-open .mega-links li:nth-child(1) { animation-delay: 0.05s; }
.mm-noi .nav-item:hover .mega-links li:nth-child(2),
.mm-noi .nav-item.mm-open .mega-links li:nth-child(2) { animation-delay: 0.09s; }
.mm-noi .nav-item:hover .mega-links li:nth-child(3),
.mm-noi .nav-item.mm-open .mega-links li:nth-child(3) { animation-delay: 0.13s; }
.mm-noi .nav-item:hover .mega-links li:nth-child(4),
.mm-noi .nav-item.mm-open .mega-links li:nth-child(4) { animation-delay: 0.17s; }
.mm-noi .nav-item:hover .mega-links li:nth-child(5),
.mm-noi .nav-item.mm-open .mega-links li:nth-child(5) { animation-delay: 0.21s; }
.mm-noi .nav-item:hover .mega-links li:nth-child(6),
.mm-noi .nav-item.mm-open .mega-links li:nth-child(6) { animation-delay: 0.25s; }
@keyframes mm-noi-fade {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 760px) {
.mm-noi .nav-trigger { padding: 18px 14px; font-size: 9px; }
.mm-noi .mega { width: calc(100vw - 24px); }
.mm-noi .mega.cols-3-img,
.mm-noi .mega.cols-editorial { grid-template-columns: 1fr; }
.mm-noi .mega-img { min-height: 180px; }
.mm-noi .mega-col { border-left: 0; border-top: 1px solid var(--mm-noi-line); }
}
@media (prefers-reduced-motion: reduce) {
.mm-noi .mega,
.mm-noi .simple-drop,
.mm-noi .mega-img img,
.mm-noi .mega-links li a,
.mm-noi .mega-footer-strip a { transition: none; animation: none; }
.mm-noi .nav-item:hover .mega-img img,
.mm-noi .nav-item.mm-open .mega-img img { transform: none; }
}
```
**JS:**
```js
(() => {
document.querySelectorAll('.mm-noi .nav-item, .mm-cyb .nav-item, .mm-bio .nav-item, .mm-dep .nav-item, .mm-typ .nav-item, .mm-dea .nav-item').forEach(item => {
const trigger = item.querySelector('.nav-trigger');
if (!trigger) return;
// Mouse + keyboard: toggle open on click / Enter / Space
trigger.addEventListener('click', e => {
e.preventDefault();
const isOpen = item.classList.contains('mm-open');
// Close any sibling that's open so only one panel shows at a time
item.parentElement?.querySelectorAll('.nav-item.mm-open').forEach(other => {
if (other !== item) other.classList.remove('mm-open');
const otherBtn = other.querySelector('.nav-trigger');
if (otherBtn) otherBtn.setAttribute('aria-expanded', 'false');
});
item.classList.toggle('mm-open', !isOpen);
trigger.setAttribute('aria-expanded', String(!isOpen));
});
});
// Outside-click closes all open panels
document.addEventListener('click', e => {
document.querySelectorAll('.mm-noi .nav-item.mm-open, .mm-cyb .nav-item.mm-open, .mm-bio .nav-item.mm-open, .mm-dep .nav-item.mm-open, .mm-typ .nav-item.mm-open, .mm-dea .nav-item.mm-open').forEach(item => {
if (!item.contains(e.target)) {
item.classList.remove('mm-open');
const btn = item.querySelector('.nav-trigger');
if (btn) btn.setAttribute('aria-expanded', 'false');
}
});
});
// Escape closes the currently open panel
document.addEventListener('keydown', e => {
if (e.key !== 'Escape') return;
document.querySelectorAll('.mm-noi .nav-item.mm-open, .mm-cyb .nav-item.mm-open, .mm-bio .nav-item.mm-open, .mm-dep .nav-item.mm-open, .mm-typ .nav-item.mm-open, .mm-dea .nav-item.mm-open').forEach(item => {
item.classList.remove('mm-open');
const btn = item.querySelector('.nav-trigger');
if (btn) btn.setAttribute('aria-expanded', 'false');
});
});
})();
```
### 02. Cyberpunk OS
**Type:** CSS + JS
**Description:** Terminal-inspired control-panel aesthetic on near-black with animated CSS scanlines and noise grain contained inside the demo. Orbitron + Share Tech Mono drive the HUD feel. Each mega panel ships with a left status sidebar with live-style metrics and progress bars, command-prefixed nav links ("01", "02"), colored alert tags (cyan/magenta/yellow), and CTA buttons with angular clip-path shapes and glow box-shadows. A glitch animation fires on trigger hover. Best for developer tools, SaaS dashboards, cloud infrastructure, games.
**HTML:**
```html
◎
Network
▾
UPTIME 99.97%
LATENCY 4ms
NODES 1,284
THREATS 3 ACTIVE
FIREWALL ACTIVE
◫
DataOps
▾
PRIMARY ONLINE
REPLICAS 3 / 3
QUERIES/S 8,420
STORAGE 91%
BACKUPS 4h AGO
◢
Deploy
▾
BUILD PASSING
PIPELINE RUN #4821
COVERAGE 82%
LAST DEPLOY 12m AGO
ROLLBACK READY
⧧
Terminal
▾
◎
Account
▾
```
**CSS:**
```css
/* ─── 02 Cyberpunk OS — terminal control-panel mega menu ────────────
Imports Orbitron + Rajdhani + Share Tech Mono. Scanline + noise
overlays from the original mock have been moved off of body::*
and onto .mm-cyb::before / ::after so they stay inside the demo's
own paint surface and don't leak into the host page. */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&family=Rajdhani:wght@300;400;500;600&family=Share+Tech+Mono&display=swap');
.mm-cyb {
--mm-cyb-void: #050810;
--mm-cyb-panel: #080d1a;
--mm-cyb-panel2: #0c1220;
--mm-cyb-cyan: #00f5ff;
--mm-cyb-cyan-dim: rgba(0, 245, 255, 0.15);
--mm-cyb-cyan-glow: rgba(0, 245, 255, 0.4);
--mm-cyb-magenta: #ff2d78;
--mm-cyb-yellow: #f5e642;
--mm-cyb-green: #39ff6e;
--mm-cyb-border: rgba(0, 245, 255, 0.2);
--mm-cyb-border-bright: rgba(0, 245, 255, 0.55);
--mm-cyb-text: rgba(200, 230, 255, 0.85);
--mm-cyb-text-dim: rgba(130, 170, 210, 0.5);
--mm-cyb-scan: rgba(0, 245, 255, 0.03);
position: relative;
background: var(--mm-cyb-void);
font-family: 'Rajdhani', system-ui, sans-serif;
width: 100%;
min-height: 560px;
overflow: hidden;
box-sizing: border-box;
}
.mm-cyb *,
.mm-cyb *::before,
.mm-cyb *::after { box-sizing: border-box; }
/* Scanlines and noise — scoped to the wrapper, NOT body */
.mm-cyb::before {
content: '';
position: absolute;
inset: 0;
background: repeating-linear-gradient(
to bottom,
transparent 0px,
transparent 3px,
var(--mm-cyb-scan) 3px,
var(--mm-cyb-scan) 4px
);
pointer-events: none;
z-index: 3;
animation: mm-cyb-scan 8s linear infinite;
}
.mm-cyb::after {
content: '';
position: absolute;
inset: 0;
opacity: 0.025;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
pointer-events: none;
z-index: 2;
}
@keyframes mm-cyb-scan {
from { background-position: 0 0; }
to { background-position: 0 100px; }
}
.mm-cyb .nav-bar {
list-style: none;
margin: 0;
padding: 0;
display: flex;
align-items: stretch;
background: var(--mm-cyb-panel);
border-bottom: 1px solid var(--mm-cyb-border);
position: relative;
box-shadow: 0 0 30px rgba(0, 245, 255, 0.05);
z-index: 4;
}
.mm-cyb .nav-item { position: relative; list-style: none; }
.mm-cyb .nav-trigger {
display: flex;
align-items: center;
gap: 8px;
padding: 0 22px;
height: 52px;
font-family: 'Orbitron', monospace;
font-size: 10px;
font-weight: 500;
letter-spacing: 0.12em;
color: var(--mm-cyb-text);
text-transform: uppercase;
background: transparent;
border: 0;
border-right: 1px solid var(--mm-cyb-border);
cursor: pointer;
user-select: none;
position: relative;
transition: color 0.2s, background 0.2s;
}
.mm-cyb .nav-trigger .icon {
font-family: 'Share Tech Mono', monospace;
font-size: 11px;
color: var(--mm-cyb-cyan);
opacity: 0.6;
transition: opacity 0.2s;
}
.mm-cyb .nav-trigger .chevron {
font-size: 9px;
color: var(--mm-cyb-cyan);
opacity: 0.4;
transition: transform 0.3s, opacity 0.2s;
margin-left: 2px;
}
.mm-cyb .nav-item:hover .nav-trigger,
.mm-cyb .nav-item.mm-open .nav-trigger {
color: var(--mm-cyb-cyan);
background: var(--mm-cyb-cyan-dim);
}
.mm-cyb .nav-item:hover .nav-trigger .icon,
.mm-cyb .nav-item.mm-open .nav-trigger .icon { opacity: 1; }
.mm-cyb .nav-item:hover .nav-trigger .chevron,
.mm-cyb .nav-item.mm-open .nav-trigger .chevron { transform: rotate(180deg); opacity: 0.9; }
/* ── Mega Panel ── */
.mm-cyb .mega {
position: absolute;
top: 100%;
left: 0;
min-width: 760px;
max-width: calc(100vw - 24px);
background: var(--mm-cyb-panel2);
border: 1px solid var(--mm-cyb-border);
border-top: none;
opacity: 0;
pointer-events: none;
transform: translateY(-6px) scaleY(0.97);
transform-origin: top center;
transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
display: grid;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 245, 255, 0.06);
z-index: 5;
}
/* corner brackets */
.mm-cyb .mega::before,
.mm-cyb .mega::after {
content: '';
position: absolute;
width: 14px;
height: 14px;
border-color: var(--mm-cyb-cyan);
border-style: solid;
z-index: 10;
}
.mm-cyb .mega::before { top: 0; right: 0; border-width: 2px 2px 0 0; }
.mm-cyb .mega::after { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.mm-cyb .mega.grid-tech { grid-template-columns: 220px 1fr 1fr 1fr; }
.mm-cyb .mega.grid-data { grid-template-columns: 200px 1fr 1fr; }
.mm-cyb .mega.grid-ops { grid-template-columns: 240px 1fr 1fr; }
.mm-cyb .nav-item:hover .mega,
.mm-cyb .nav-item.mm-open .mega {
opacity: 1;
pointer-events: all;
transform: translateY(0) scaleY(1);
}
/* ── Status sidebar ── */
.mm-cyb .mega-status {
background: rgba(0, 0, 0, 0.4);
border-right: 1px solid var(--mm-cyb-border);
padding: 22px 18px;
}
.mm-cyb .status-header {
font-family: 'Share Tech Mono', monospace;
font-size: 8px;
color: var(--mm-cyb-cyan);
letter-spacing: 0.15em;
margin-bottom: 14px;
padding-bottom: 10px;
border-bottom: 1px solid var(--mm-cyb-border);
}
.mm-cyb .status-line {
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 0;
border-bottom: 1px solid rgba(0, 245, 255, 0.06);
font-family: 'Share Tech Mono', monospace;
font-size: 9px;
color: var(--mm-cyb-text-dim);
}
.mm-cyb .status-line .key { color: rgba(130, 170, 210, 0.5); }
.mm-cyb .status-line .val { color: var(--mm-cyb-green); font-size: 8px; }
.mm-cyb .status-line .val.warn { color: var(--mm-cyb-yellow); }
.mm-cyb .status-line .val.alert { color: var(--mm-cyb-magenta); }
.mm-cyb .status-bar-wrap { margin-top: 14px; }
.mm-cyb .status-bar-label {
font-family: 'Share Tech Mono', monospace;
font-size: 8px;
color: var(--mm-cyb-text-dim);
display: flex;
justify-content: space-between;
margin-bottom: 5px;
}
.mm-cyb .status-bar {
display: block;
height: 3px;
background: rgba(0, 245, 255, 0.1);
overflow: hidden;
margin-bottom: 8px;
}
.mm-cyb .status-bar-fill {
display: block;
height: 100%;
background: linear-gradient(90deg, var(--mm-cyb-cyan), var(--mm-cyb-green));
box-shadow: 0 0 6px var(--mm-cyb-cyan);
}
.mm-cyb .status-bar-fill.warn { background: linear-gradient(90deg, var(--mm-cyb-cyan), var(--mm-cyb-yellow)); }
.mm-cyb .status-bar-fill.alert { background: linear-gradient(90deg, var(--mm-cyb-yellow), var(--mm-cyb-magenta)); }
/* ── Link columns ── */
.mm-cyb .mega-col {
padding: 22px 20px;
border-right: 1px solid var(--mm-cyb-border);
}
.mm-cyb .mega-col:last-of-type { border-right: none; }
.mm-cyb .mega-col-title {
font-family: 'Orbitron', monospace;
font-size: 8px;
font-weight: 700;
letter-spacing: 0.2em;
color: var(--mm-cyb-cyan);
text-transform: uppercase;
margin-bottom: 14px;
padding-bottom: 8px;
border-bottom: 1px solid var(--mm-cyb-border);
display: flex;
align-items: center;
gap: 8px;
}
.mm-cyb .mega-col-title::before {
content: '//';
color: var(--mm-cyb-magenta);
font-family: 'Share Tech Mono', monospace;
font-size: 10px;
opacity: 0.7;
}
.mm-cyb .mega-links {
list-style: none;
margin: 0;
padding: 0;
}
.mm-cyb .mega-links li {
opacity: 0;
transform: translateX(-6px);
list-style: none;
}
.mm-cyb .nav-item:hover .mega-links li,
.mm-cyb .nav-item.mm-open .mega-links li {
animation: mm-cyb-slide 0.3s ease both;
}
.mm-cyb .nav-item:hover .mega-links li:nth-child(1),
.mm-cyb .nav-item.mm-open .mega-links li:nth-child(1) { animation-delay: 0.05s; }
.mm-cyb .nav-item:hover .mega-links li:nth-child(2),
.mm-cyb .nav-item.mm-open .mega-links li:nth-child(2) { animation-delay: 0.09s; }
.mm-cyb .nav-item:hover .mega-links li:nth-child(3),
.mm-cyb .nav-item.mm-open .mega-links li:nth-child(3) { animation-delay: 0.13s; }
.mm-cyb .nav-item:hover .mega-links li:nth-child(4),
.mm-cyb .nav-item.mm-open .mega-links li:nth-child(4) { animation-delay: 0.17s; }
.mm-cyb .nav-item:hover .mega-links li:nth-child(5),
.mm-cyb .nav-item.mm-open .mega-links li:nth-child(5) { animation-delay: 0.21s; }
.mm-cyb .nav-item:hover .mega-links li:nth-child(6),
.mm-cyb .nav-item.mm-open .mega-links li:nth-child(6) { animation-delay: 0.25s; }
@keyframes mm-cyb-slide {
from { opacity: 0; transform: translateX(-6px); }
to { opacity: 1; transform: translateX(0); }
}
.mm-cyb .mega-links li a {
display: flex;
align-items: center;
gap: 8px;
padding: 7px 0;
font-family: 'Rajdhani', system-ui, sans-serif;
font-size: 13px;
font-weight: 500;
letter-spacing: 0.06em;
color: var(--mm-cyb-text);
text-decoration: none;
border-bottom: 1px solid rgba(0, 245, 255, 0.04);
transition: color 0.2s, padding-left 0.2s, background 0.2s;
position: relative;
}
.mm-cyb .mega-links li a .cmd {
font-family: 'Share Tech Mono', monospace;
font-size: 9px;
color: var(--mm-cyb-cyan);
opacity: 0.4;
transition: opacity 0.2s;
min-width: 24px;
}
.mm-cyb .mega-links li a .tag {
margin-left: auto;
font-family: 'Share Tech Mono', monospace;
font-size: 8px;
padding: 2px 5px;
background: rgba(0, 245, 255, 0.1);
color: var(--mm-cyb-cyan);
border: 1px solid rgba(0, 245, 255, 0.3);
letter-spacing: 0.05em;
}
.mm-cyb .mega-links li a .tag.red {
background: rgba(255, 45, 120, 0.1);
color: var(--mm-cyb-magenta);
border-color: rgba(255, 45, 120, 0.3);
}
.mm-cyb .mega-links li a:hover {
color: var(--mm-cyb-cyan);
padding-left: 8px;
background: rgba(0, 245, 255, 0.04);
}
.mm-cyb .mega-links li a:hover .cmd { opacity: 1; }
/* ── Footer ── */
.mm-cyb .mega-footer {
grid-column: 1 / -1;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 18px;
background: rgba(0, 0, 0, 0.3);
border-top: 1px solid var(--mm-cyb-border);
flex-wrap: wrap;
gap: 12px;
}
.mm-cyb .mega-footer .log {
font-family: 'Share Tech Mono', monospace;
font-size: 9px;
color: var(--mm-cyb-text-dim);
}
.mm-cyb .mega-footer .log span { color: var(--mm-cyb-green); }
.mm-cyb .mega-footer .actions { display: flex; gap: 10px; }
.mm-cyb .mega-footer .btn {
font-family: 'Orbitron', monospace;
font-size: 8px;
font-weight: 500;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--mm-cyb-void);
background: var(--mm-cyb-cyan);
padding: 6px 14px;
cursor: pointer;
text-decoration: none;
border: none;
transition: background 0.2s, box-shadow 0.2s;
clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
box-shadow: 0 0 10px var(--mm-cyb-cyan-glow);
}
.mm-cyb .mega-footer .btn:hover {
background: #fff;
box-shadow: 0 0 20px var(--mm-cyb-cyan-glow);
}
.mm-cyb .mega-footer .btn.ghost {
background: transparent;
color: var(--mm-cyb-cyan);
border: 1px solid var(--mm-cyb-border-bright);
box-shadow: none;
clip-path: none;
}
.mm-cyb .mega-footer .btn.ghost:hover {
background: var(--mm-cyb-cyan-dim);
color: var(--mm-cyb-cyan);
}
/* ── Simple drop ── */
.mm-cyb .simple-drop {
position: absolute;
top: 100%;
left: 0;
width: 240px;
background: var(--mm-cyb-panel2);
border: 1px solid var(--mm-cyb-border);
border-top: none;
opacity: 0;
pointer-events: none;
transform: translateY(-4px);
transition: opacity 0.25s ease, transform 0.25s ease;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
z-index: 5;
}
.mm-cyb .nav-item:hover .simple-drop,
.mm-cyb .nav-item.mm-open .simple-drop {
opacity: 1;
pointer-events: all;
transform: translateY(0);
}
.mm-cyb .simple-drop a {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 18px;
font-family: 'Rajdhani', system-ui, sans-serif;
font-size: 13px;
font-weight: 500;
letter-spacing: 0.06em;
color: var(--mm-cyb-text);
text-decoration: none;
border-bottom: 1px solid rgba(0, 245, 255, 0.04);
transition: color 0.2s, background 0.2s;
}
.mm-cyb .simple-drop a::before {
content: '>';
font-family: 'Share Tech Mono', monospace;
font-size: 10px;
color: var(--mm-cyb-cyan);
opacity: 0.3;
transition: opacity 0.2s;
}
.mm-cyb .simple-drop a:hover {
color: var(--mm-cyb-cyan);
background: rgba(0, 245, 255, 0.04);
}
.mm-cyb .simple-drop a:hover::before { opacity: 1; }
@media (max-width: 760px) {
.mm-cyb .nav-trigger { padding: 0 14px; font-size: 9px; }
.mm-cyb .mega { min-width: calc(100vw - 24px); }
.mm-cyb .mega.grid-tech,
.mm-cyb .mega.grid-data,
.mm-cyb .mega.grid-ops { grid-template-columns: 1fr; }
.mm-cyb .mega-status { border-right: none; border-bottom: 1px solid var(--mm-cyb-border); }
.mm-cyb .mega-col { border-right: none; border-bottom: 1px solid var(--mm-cyb-border); }
}
@media (prefers-reduced-motion: reduce) {
.mm-cyb::before { animation: none; }
.mm-cyb .mega,
.mm-cyb .simple-drop,
.mm-cyb .mega-links li,
.mm-cyb .mega-links li a,
.mm-cyb .mega-footer .btn { transition: none; animation: none; }
}
```
**JS:**
```js
(() => {
document.querySelectorAll('.mm-noi .nav-item, .mm-cyb .nav-item, .mm-bio .nav-item, .mm-dep .nav-item, .mm-typ .nav-item, .mm-dea .nav-item').forEach(item => {
const trigger = item.querySelector('.nav-trigger');
if (!trigger) return;
// Mouse + keyboard: toggle open on click / Enter / Space
trigger.addEventListener('click', e => {
e.preventDefault();
const isOpen = item.classList.contains('mm-open');
// Close any sibling that's open so only one panel shows at a time
item.parentElement?.querySelectorAll('.nav-item.mm-open').forEach(other => {
if (other !== item) other.classList.remove('mm-open');
const otherBtn = other.querySelector('.nav-trigger');
if (otherBtn) otherBtn.setAttribute('aria-expanded', 'false');
});
item.classList.toggle('mm-open', !isOpen);
trigger.setAttribute('aria-expanded', String(!isOpen));
});
});
// Outside-click closes all open panels
document.addEventListener('click', e => {
document.querySelectorAll('.mm-noi .nav-item.mm-open, .mm-cyb .nav-item.mm-open, .mm-bio .nav-item.mm-open, .mm-dep .nav-item.mm-open, .mm-typ .nav-item.mm-open, .mm-dea .nav-item.mm-open').forEach(item => {
if (!item.contains(e.target)) {
item.classList.remove('mm-open');
const btn = item.querySelector('.nav-trigger');
if (btn) btn.setAttribute('aria-expanded', 'false');
}
});
});
// Escape closes the currently open panel
document.addEventListener('keydown', e => {
if (e.key !== 'Escape') return;
document.querySelectorAll('.mm-noi .nav-item.mm-open, .mm-cyb .nav-item.mm-open, .mm-bio .nav-item.mm-open, .mm-dep .nav-item.mm-open, .mm-typ .nav-item.mm-open, .mm-dea .nav-item.mm-open').forEach(item => {
item.classList.remove('mm-open');
const btn = item.querySelector('.nav-trigger');
if (btn) btn.setAttribute('aria-expanded', 'false');
});
});
})();
```
### 03. Biophilic Studio
**Type:** CSS + JS
**Description:** Warm, earthy linen palette with a contained paper-grain texture overlay. Fraunces variable serif (italic display) drives the navigation links, DM Sans handles metadata. The Projects panel features a tall photography column with a gradient caption overlay; the Journal panel includes editorial thumbnail cards with title + meta. Botanical SVG leaf motifs appear as column corner accents, a subtle terra-cotta underline swipes in on hover, and organic dot indicators sit beside each nav item. Best for architecture studios, interior design, sustainable brands, cultural institutions.
**HTML:**
```html
Projects
Currently Featured
Fjordhaus Residence
Services
Journal
Studio
Contact
```
**CSS:**
```css
/* ─── 03 Biophilic Studio — warm linen architecture mega menu ───────
Imports Fraunces + DM Sans. The paper-grain texture overlay from the
original mock has been scoped to .mm-bio::before so it stays inside
the demo wrapper. Botanical SVG corner motifs are inlined as
background-image data URIs on .mega-col::after. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,200;0,9..144,300;0,9..144,400;1,9..144,200;1,9..144,300&family=DM+Sans:ital,opsz,wght@0,9..40,200;0,9..40,300;0,9..40,400;1,9..40,300&display=swap');
.mm-bio {
--mm-bio-clay: #e8ddd0;
--mm-bio-linen: #f4f0e8;
--mm-bio-bark: #3d2e20;
--mm-bio-moss: #4a5e3a;
--mm-bio-moss-light: #7a9164;
--mm-bio-terra: #c2704a;
--mm-bio-stone: #9e9085;
--mm-bio-warm-white: #faf8f4;
--mm-bio-border: rgba(61, 46, 32, 0.12);
--mm-bio-border-mid: rgba(61, 46, 32, 0.2);
--mm-bio-text: #3d2e20;
--mm-bio-text-mid: rgba(61, 46, 32, 0.6);
--mm-bio-text-dim: rgba(61, 46, 32, 0.4);
position: relative;
background: var(--mm-bio-warm-white);
font-family: 'DM Sans', system-ui, sans-serif;
width: 100%;
min-height: 560px;
overflow: hidden;
box-sizing: border-box;
}
.mm-bio *,
.mm-bio *::before,
.mm-bio *::after { box-sizing: border-box; }
/* Paper grain — scoped to wrapper, not body */
.mm-bio::before {
content: '';
position: absolute;
inset: 0;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
pointer-events: none;
z-index: 1;
}
.mm-bio .nav-bar {
list-style: none;
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
gap: 0;
background: var(--mm-bio-warm-white);
border-bottom: 1px solid var(--mm-bio-border);
position: relative;
z-index: 3;
}
/* botanical SVG decoration on left of bar */
.mm-bio .nav-bar::before {
content: '';
position: absolute;
left: 24px;
top: 50%;
transform: translateY(-50%);
width: 80px;
height: 24px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 24'%3E%3Cpath d='M2,12 Q10,2 20,12 Q10,22 2,12' stroke='%234a5e3a' stroke-width='0.8' fill='none' opacity='0.4'/%3E%3Cpath d='M18,12 Q26,2 36,12 Q26,22 18,12' stroke='%234a5e3a' stroke-width='0.8' fill='none' opacity='0.3'/%3E%3Cpath d='M34,12 Q42,2 52,12 Q42,22 34,12' stroke='%234a5e3a' stroke-width='0.8' fill='none' opacity='0.2'/%3E%3Cline x1='2' y1='12' x2='78' y2='12' stroke='%234a5e3a' stroke-width='0.5' opacity='0.2'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-size: contain;
}
.mm-bio .nav-item { position: relative; list-style: none; }
.mm-bio .nav-trigger {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 20px 26px;
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 12px;
font-weight: 300;
letter-spacing: 0.08em;
color: var(--mm-bio-text-mid);
text-transform: lowercase;
background: transparent;
border: 0;
cursor: pointer;
user-select: none;
transition: color 0.3s ease;
position: relative;
}
.mm-bio .nav-trigger .dot {
width: 4px;
height: 4px;
border-radius: 50%;
background: var(--mm-bio-terra);
opacity: 0;
transition: opacity 0.3s;
flex-shrink: 0;
}
.mm-bio .nav-item:hover .nav-trigger,
.mm-bio .nav-item.mm-open .nav-trigger { color: var(--mm-bio-bark); }
.mm-bio .nav-item:hover .nav-trigger .dot,
.mm-bio .nav-item.mm-open .nav-trigger .dot { opacity: 1; }
.mm-bio .nav-trigger::after {
content: '';
position: absolute;
bottom: -1px;
left: 26px;
right: 26px;
height: 1px;
background: var(--mm-bio-terra);
transform: scaleX(0);
transform-origin: left center;
transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.mm-bio .nav-item:hover .nav-trigger::after,
.mm-bio .nav-item.mm-open .nav-trigger::after { transform: scaleX(1); }
/* ── Mega Panel ── */
.mm-bio .mega {
position: absolute;
top: calc(100% + 1px);
left: 50%;
transform: translateX(-50%) translateY(-8px);
background: var(--mm-bio-linen);
border: 1px solid var(--mm-bio-border-mid);
box-shadow: 0 8px 40px rgba(61, 46, 32, 0.1), 0 2px 8px rgba(61, 46, 32, 0.06);
opacity: 0;
pointer-events: none;
transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
display: grid;
overflow: hidden;
z-index: 5;
}
.mm-bio .mega.grid-project { grid-template-columns: 260px 1fr 1fr; width: min(780px, calc(100vw - 32px)); }
.mm-bio .mega.grid-studio { grid-template-columns: 1fr 1fr 1fr; width: min(720px, calc(100vw - 32px)); }
.mm-bio .mega.grid-journal { grid-template-columns: 2fr 1fr 1fr; width: min(760px, calc(100vw - 32px)); }
.mm-bio .nav-item:hover .mega,
.mm-bio .nav-item.mm-open .mega {
opacity: 1;
pointer-events: all;
transform: translateX(-50%) translateY(0);
}
/* ── Feature image panel ── */
.mm-bio .mega-feature {
position: relative;
overflow: hidden;
min-height: 320px;
}
.mm-bio .mega-feature img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.6s;
filter: saturate(0.85);
}
.mm-bio .nav-item:hover .mega-feature img,
.mm-bio .nav-item.mm-open .mega-feature img {
transform: scale(1.04);
filter: saturate(1);
}
.mm-bio .mega-feature-caption {
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 28px 22px 22px;
background: linear-gradient(to top, rgba(61, 46, 32, 0.75) 0%, transparent 100%);
}
.mm-bio .mega-feature-caption .eyebrow {
display: block;
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 9px;
font-weight: 300;
letter-spacing: 0.18em;
text-transform: uppercase;
color: rgba(244, 240, 232, 0.7);
margin-bottom: 6px;
}
.mm-bio .mega-feature-caption .title {
display: block;
font-family: 'Fraunces', Georgia, serif;
font-size: 22px;
font-weight: 200;
font-style: italic;
color: var(--mm-bio-linen);
line-height: 1.2;
}
/* ── Link columns ── */
.mm-bio .mega-col {
padding: 28px 24px;
border-left: 1px solid var(--mm-bio-border);
position: relative;
}
.mm-bio .mega-col.first { border-left: 0; }
.mm-bio .mega-col::after {
content: '';
position: absolute;
top: 16px;
right: 16px;
width: 28px;
height: 28px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16,28 Q4,20 4,10 Q10,4 16,8 Q22,4 28,10 Q28,20 16,28z' stroke='%234a5e3a' stroke-width='0.6' fill='none' opacity='0.15'/%3E%3Cline x1='16' y1='8' x2='16' y2='28' stroke='%234a5e3a' stroke-width='0.5' opacity='0.12'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-size: contain;
opacity: 0.6;
}
.mm-bio .mega-col-label {
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 9px;
font-weight: 300;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--mm-bio-stone);
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid var(--mm-bio-border);
}
.mm-bio .mega-links {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
}
.mm-bio .mega-links li { list-style: none; }
.mm-bio .mega-links li a {
display: block;
padding: 9px 0;
font-family: 'Fraunces', Georgia, serif;
font-size: 17px;
font-weight: 200;
color: var(--mm-bio-text);
text-decoration: none;
letter-spacing: 0.01em;
border-bottom: 1px solid rgba(61, 46, 32, 0.06);
transition: color 0.3s, padding-left 0.3s;
position: relative;
line-height: 1.3;
}
.mm-bio .mega-links li a:hover {
color: var(--mm-bio-terra);
padding-left: 12px;
}
.mm-bio .mega-links li a .note {
display: block;
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 10px;
font-weight: 200;
color: var(--mm-bio-text-dim);
margin-top: 1px;
font-style: normal;
letter-spacing: 0;
transition: color 0.3s;
}
.mm-bio .mega-links li a:hover .note { color: rgba(194, 112, 74, 0.6); }
.mm-bio .mega-links li a .pill {
display: inline-block;
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 8px;
font-weight: 300;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--mm-bio-moss-light);
background: rgba(74, 94, 58, 0.1);
padding: 2px 7px;
border-radius: 20px;
margin-left: 8px;
vertical-align: middle;
}
/* ── Editorial column (Journal) ── */
.mm-bio .mega-editorial {
padding: 28px 24px;
border-left: 1px solid var(--mm-bio-border);
display: flex;
flex-direction: column;
gap: 18px;
}
.mm-bio .editorial-label {
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 9px;
font-weight: 300;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--mm-bio-stone);
margin-bottom: 4px;
padding-bottom: 12px;
border-bottom: 1px solid var(--mm-bio-border);
}
.mm-bio .editorial-card {
display: flex;
gap: 12px;
align-items: flex-start;
cursor: pointer;
text-decoration: none;
}
.mm-bio .editorial-card img {
width: 56px;
height: 56px;
object-fit: cover;
flex-shrink: 0;
filter: saturate(0.8);
transition: filter 0.3s, transform 0.3s;
}
.mm-bio .editorial-card:hover img {
filter: saturate(1);
transform: scale(1.03);
}
.mm-bio .editorial-card .ec-text { display: flex; flex-direction: column; }
.mm-bio .editorial-card .ec-text .ec-title {
font-family: 'Fraunces', Georgia, serif;
font-size: 13px;
font-weight: 300;
color: var(--mm-bio-bark);
line-height: 1.4;
transition: color 0.3s;
}
.mm-bio .editorial-card:hover .ec-title { color: var(--mm-bio-terra); }
.mm-bio .editorial-card .ec-text .ec-meta {
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 10px;
font-weight: 200;
color: var(--mm-bio-text-dim);
margin-top: 3px;
letter-spacing: 0.04em;
}
/* ── Footer ── */
.mm-bio .mega-footer {
grid-column: 1 / -1;
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 24px;
background: rgba(61, 46, 32, 0.04);
border-top: 1px solid var(--mm-bio-border);
flex-wrap: wrap;
gap: 12px;
}
.mm-bio .mega-footer .note {
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 10px;
font-weight: 200;
font-style: italic;
color: var(--mm-bio-text-dim);
letter-spacing: 0.02em;
}
.mm-bio .mega-footer a {
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 10px;
font-weight: 300;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--mm-bio-terra);
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 8px;
transition: gap 0.3s, color 0.3s;
}
.mm-bio .mega-footer a::after { content: '\2192'; font-size: 12px; }
.mm-bio .mega-footer a:hover { gap: 14px; color: var(--mm-bio-bark); }
/* ── Simple drop ── */
.mm-bio .simple-drop {
position: absolute;
top: calc(100% + 1px);
left: 50%;
transform: translateX(-50%) translateY(-6px);
width: 220px;
background: var(--mm-bio-linen);
border: 1px solid var(--mm-bio-border-mid);
box-shadow: 0 8px 30px rgba(61, 46, 32, 0.1);
opacity: 0;
pointer-events: none;
transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
padding: 12px 0;
z-index: 5;
}
.mm-bio .nav-item:hover .simple-drop,
.mm-bio .nav-item.mm-open .simple-drop {
opacity: 1;
pointer-events: all;
transform: translateX(-50%) translateY(0);
}
.mm-bio .simple-drop a {
display: block;
padding: 10px 22px;
font-family: 'Fraunces', Georgia, serif;
font-size: 15px;
font-weight: 200;
color: var(--mm-bio-text);
text-decoration: none;
transition: color 0.25s, background 0.25s, padding-left 0.3s;
border-bottom: 1px solid rgba(61, 46, 32, 0.05);
}
.mm-bio .simple-drop a:hover {
color: var(--mm-bio-terra);
background: rgba(194, 112, 74, 0.05);
padding-left: 32px;
}
/* ── Stagger ── */
.mm-bio .nav-item:hover .mega-links li,
.mm-bio .nav-item.mm-open .mega-links li {
animation: mm-bio-rise 0.45s ease both;
}
.mm-bio .nav-item:hover .mega-links li:nth-child(1),
.mm-bio .nav-item.mm-open .mega-links li:nth-child(1) { animation-delay: 0.06s; }
.mm-bio .nav-item:hover .mega-links li:nth-child(2),
.mm-bio .nav-item.mm-open .mega-links li:nth-child(2) { animation-delay: 0.11s; }
.mm-bio .nav-item:hover .mega-links li:nth-child(3),
.mm-bio .nav-item.mm-open .mega-links li:nth-child(3) { animation-delay: 0.16s; }
.mm-bio .nav-item:hover .mega-links li:nth-child(4),
.mm-bio .nav-item.mm-open .mega-links li:nth-child(4) { animation-delay: 0.21s; }
.mm-bio .nav-item:hover .mega-links li:nth-child(5),
.mm-bio .nav-item.mm-open .mega-links li:nth-child(5) { animation-delay: 0.26s; }
@keyframes mm-bio-rise {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 760px) {
.mm-bio .nav-bar::before { display: none; }
.mm-bio .nav-trigger { padding: 16px 12px; font-size: 11px; }
.mm-bio .mega.grid-project,
.mm-bio .mega.grid-studio,
.mm-bio .mega.grid-journal {
grid-template-columns: 1fr;
width: calc(100vw - 24px);
}
.mm-bio .mega-feature { min-height: 180px; }
.mm-bio .mega-col,
.mm-bio .mega-editorial { border-left: 0; border-top: 1px solid var(--mm-bio-border); }
}
@media (prefers-reduced-motion: reduce) {
.mm-bio .mega,
.mm-bio .simple-drop,
.mm-bio .mega-feature img,
.mm-bio .editorial-card img,
.mm-bio .mega-links li a,
.mm-bio .mega-footer a { transition: none; animation: none; }
.mm-bio .nav-item:hover .mega-feature img,
.mm-bio .nav-item.mm-open .mega-feature img { transform: none; }
}
```
**JS:**
```js
(() => {
document.querySelectorAll('.mm-noi .nav-item, .mm-cyb .nav-item, .mm-bio .nav-item, .mm-dep .nav-item, .mm-typ .nav-item, .mm-dea .nav-item').forEach(item => {
const trigger = item.querySelector('.nav-trigger');
if (!trigger) return;
// Mouse + keyboard: toggle open on click / Enter / Space
trigger.addEventListener('click', e => {
e.preventDefault();
const isOpen = item.classList.contains('mm-open');
// Close any sibling that's open so only one panel shows at a time
item.parentElement?.querySelectorAll('.nav-item.mm-open').forEach(other => {
if (other !== item) other.classList.remove('mm-open');
const otherBtn = other.querySelector('.nav-trigger');
if (otherBtn) otherBtn.setAttribute('aria-expanded', 'false');
});
item.classList.toggle('mm-open', !isOpen);
trigger.setAttribute('aria-expanded', String(!isOpen));
});
});
// Outside-click closes all open panels
document.addEventListener('click', e => {
document.querySelectorAll('.mm-noi .nav-item.mm-open, .mm-cyb .nav-item.mm-open, .mm-bio .nav-item.mm-open, .mm-dep .nav-item.mm-open, .mm-typ .nav-item.mm-open, .mm-dea .nav-item.mm-open').forEach(item => {
if (!item.contains(e.target)) {
item.classList.remove('mm-open');
const btn = item.querySelector('.nav-trigger');
if (btn) btn.setAttribute('aria-expanded', 'false');
}
});
});
// Escape closes the currently open panel
document.addEventListener('keydown', e => {
if (e.key !== 'Escape') return;
document.querySelectorAll('.mm-noi .nav-item.mm-open, .mm-cyb .nav-item.mm-open, .mm-bio .nav-item.mm-open, .mm-dep .nav-item.mm-open, .mm-typ .nav-item.mm-open, .mm-dea .nav-item.mm-open').forEach(item => {
item.classList.remove('mm-open');
const btn = item.querySelector('.nav-trigger');
if (btn) btn.setAttribute('aria-expanded', 'false');
});
});
})();
```
### 04. Swiss Grid Department Store
**Type:** CSS + JS
**Description:** Ivory canvas with a faint grid overlay, Playfair Display italic headings, Jost link text, DM Mono for counts. The Departments trigger opens a 5-column panel: a left department tile showing total counts, then one tinted column per macro-department (Women, Men, Kids, Home) with live item counts next to every sub-category, NEW/SALE tags, and a "View All" CTA row. A black footer strip with a gold highlighted sale link anchors the panel. Surfaces every branch of the site tree at once — best for marketplaces, department stores, multi-vertical retail.
**HTML:**
```html
Departments 4
Shop By
All Departments
4 departments · 280+ categories
Lifestyle 3
Shop By
Lifestyle
3 sections · 110+ categories
Brands
About
```
**CSS:**
```css
/* ─── 04 Swiss Grid Department Store — full taxonomy mega menu ──────
Imports Playfair Display + Jost + DM Mono. The faint grid overlay
from the original (body::before) is scoped to .mm-dep::before so
it stays inside the demo. Drop-shadow box-shadow on the panel
reads as a print-style hard offset. */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400;1,500&family=DM+Mono:wght@300;400&family=Jost:wght@200;300;400;500&display=swap');
.mm-dep {
--mm-dep-ivory: #f7f4ee;
--mm-dep-paper: #ede9e0;
--mm-dep-linen: #e5dfd3;
--mm-dep-ink: #1a1714;
--mm-dep-ink-mid: rgba(26, 23, 20, 0.55);
--mm-dep-ink-dim: rgba(26, 23, 20, 0.3);
--mm-dep-rule: rgba(26, 23, 20, 0.1);
--mm-dep-rule-mid: rgba(26, 23, 20, 0.18);
--mm-dep-accent: #2d6a4f;
--mm-dep-accent2: #b5451b;
--mm-dep-mono: 'DM Mono', ui-monospace, monospace;
position: relative;
background: var(--mm-dep-ivory);
font-family: 'Jost', system-ui, sans-serif;
width: 100%;
min-height: 600px;
overflow: hidden;
box-sizing: border-box;
}
.mm-dep *,
.mm-dep *::before,
.mm-dep *::after { box-sizing: border-box; }
/* faint grid lines — scoped to wrapper, not body */
.mm-dep::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(var(--mm-dep-rule) 1px, transparent 1px),
linear-gradient(90deg, var(--mm-dep-rule) 1px, transparent 1px);
background-size: 48px 48px;
pointer-events: none;
z-index: 1;
}
.mm-dep .utility-bar {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 28px;
padding: 8px 32px;
background: var(--mm-dep-ink);
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
position: relative;
z-index: 3;
}
.mm-dep .utility-bar a {
font-family: var(--mm-dep-mono);
font-size: 9px;
font-weight: 300;
letter-spacing: 0.12em;
color: rgba(255, 255, 255, 0.45);
text-decoration: none;
text-transform: uppercase;
transition: color 0.2s;
}
.mm-dep .utility-bar a:hover { color: rgba(255, 255, 255, 0.85); }
.mm-dep .nav-bar {
list-style: none;
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
background: var(--mm-dep-ivory);
border-bottom: 2px solid var(--mm-dep-ink);
position: relative;
z-index: 4;
}
.mm-dep .nav-item { position: relative; list-style: none; }
.mm-dep .nav-trigger {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 0 26px;
height: 60px;
font-family: 'Jost', system-ui, sans-serif;
font-size: 11px;
font-weight: 400;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--mm-dep-ink-mid);
background: transparent;
border: 0;
border-right: 1px solid var(--mm-dep-rule);
cursor: pointer;
user-select: none;
transition: color 0.25s;
position: relative;
}
.mm-dep .nav-bar .nav-item:first-child .nav-trigger { border-left: 1px solid var(--mm-dep-rule); }
.mm-dep .nav-trigger .count {
font-family: var(--mm-dep-mono);
font-size: 8px;
color: var(--mm-dep-ink-dim);
letter-spacing: 0;
transition: color 0.25s;
}
.mm-dep .nav-item:hover .nav-trigger,
.mm-dep .nav-item.mm-open .nav-trigger { color: var(--mm-dep-ink); }
.mm-dep .nav-item:hover .nav-trigger .count,
.mm-dep .nav-item.mm-open .nav-trigger .count { color: var(--mm-dep-accent); }
.mm-dep .nav-trigger::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
right: 0;
height: 2px;
background: var(--mm-dep-ink);
transform: scaleX(0);
transform-origin: left;
transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.mm-dep .nav-item:hover .nav-trigger::after,
.mm-dep .nav-item.mm-open .nav-trigger::after { transform: scaleX(1); }
/* ── Mega panel ── */
.mm-dep .mega {
position: absolute;
top: calc(100% + 2px);
left: 50%;
transform: translateX(-50%) translateY(-10px);
background: var(--mm-dep-ivory);
border: 2px solid var(--mm-dep-ink);
opacity: 0;
pointer-events: none;
transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
display: grid;
overflow: hidden;
box-shadow: 6px 6px 0 var(--mm-dep-ink);
min-width: min(900px, calc(100vw - 32px));
max-width: calc(100vw - 32px);
z-index: 5;
}
.mm-dep .nav-item:hover .mega,
.mm-dep .nav-item.mm-open .mega {
opacity: 1;
pointer-events: all;
transform: translateX(-50%) translateY(0);
}
.mm-dep .mega-dept { grid-template-columns: 200px repeat(4, 1fr); }
.mm-dep .mega-life { grid-template-columns: 220px repeat(3, 1fr); }
.mm-dep .mega-brands { grid-template-columns: repeat(4, 1fr); min-width: min(760px, calc(100vw - 32px)); }
/* ── Department tile ── */
.mm-dep .dept-tile {
border-right: 2px solid var(--mm-dep-ink);
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 22px 20px;
background: var(--mm-dep-paper);
min-height: 400px;
position: relative;
overflow: hidden;
}
.mm-dep .dept-tile-pattern {
position: absolute;
inset: 0;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(4, 1fr);
opacity: 0.06;
}
.mm-dep .dept-tile-pattern span {
border-right: 1px solid var(--mm-dep-ink);
border-bottom: 1px solid var(--mm-dep-ink);
}
.mm-dep .dept-tile .dept-eyebrow {
font-family: var(--mm-dep-mono);
font-size: 8px;
font-weight: 300;
letter-spacing: 0.2em;
color: var(--mm-dep-ink-dim);
text-transform: uppercase;
margin-bottom: 8px;
position: relative;
}
.mm-dep .dept-tile .dept-name {
font-family: 'Playfair Display', Georgia, serif;
font-size: 32px;
font-weight: 400;
font-style: italic;
color: var(--mm-dep-ink);
line-height: 1.1;
margin-bottom: 14px;
position: relative;
}
.mm-dep .dept-tile .dept-count {
font-family: var(--mm-dep-mono);
font-size: 10px;
font-weight: 300;
color: var(--mm-dep-accent);
letter-spacing: 0.1em;
position: relative;
}
/* ── Sub-department column ── */
.mm-dep .dept-col {
border-right: 1px solid var(--mm-dep-rule-mid);
padding: 0;
}
.mm-dep .dept-col:last-of-type { border-right: none; }
.mm-dep .dept-col-header {
padding: 16px 18px 12px;
border-bottom: 2px solid var(--mm-dep-ink);
display: flex;
align-items: baseline;
justify-content: space-between;
}
.mm-dep .dept-col-header .dept-label {
font-family: 'Playfair Display', Georgia, serif;
font-size: 20px;
font-weight: 500;
color: var(--mm-dep-ink);
line-height: 1;
}
.mm-dep .dept-col-header .dept-num {
font-family: var(--mm-dep-mono);
font-size: 9px;
color: var(--mm-dep-ink-dim);
letter-spacing: 0.05em;
}
.mm-dep .dept-col.women .dept-col-header,
.mm-dep .dept-col.beauty .dept-col-header { background: #f0e8e4; }
.mm-dep .dept-col.men .dept-col-header,
.mm-dep .dept-col.sport .dept-col-header { background: #e4eaf0; }
.mm-dep .dept-col.kids .dept-col-header,
.mm-dep .dept-col.travel .dept-col-header { background: #eaf0e6; }
.mm-dep .dept-col.home .dept-col-header { background: #f0ece4; }
.mm-dep .sub-list {
list-style: none;
margin: 0;
padding: 12px 0;
}
.mm-dep .sub-list li { list-style: none; }
.mm-dep .sub-list li a {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 18px;
font-family: 'Jost', system-ui, sans-serif;
font-size: 13px;
font-weight: 300;
color: var(--mm-dep-ink-mid);
text-decoration: none;
transition: color 0.2s, background 0.2s, padding-left 0.25s;
border-bottom: 1px solid var(--mm-dep-rule);
position: relative;
}
.mm-dep .sub-list li a:last-child { border-bottom: none; }
.mm-dep .sub-list li a .n {
font-family: var(--mm-dep-mono);
font-size: 9px;
color: var(--mm-dep-ink-dim);
letter-spacing: 0.05em;
transition: color 0.2s;
flex-shrink: 0;
}
.mm-dep .sub-list li a:hover {
color: var(--mm-dep-ink);
background: var(--mm-dep-paper);
padding-left: 24px;
}
.mm-dep .sub-list li a:hover .n { color: var(--mm-dep-accent); }
.mm-dep .sub-list li a .new-tag,
.mm-dep .sub-list li a .sale-tag {
font-family: var(--mm-dep-mono);
font-size: 7.5px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--mm-dep-ivory);
padding: 2px 6px;
margin-left: 6px;
}
.mm-dep .sub-list li a .new-tag { background: var(--mm-dep-accent); }
.mm-dep .sub-list li a .sale-tag { background: var(--mm-dep-accent2); }
.mm-dep .view-all-row {
padding: 12px 18px;
border-top: 2px solid var(--mm-dep-ink);
display: flex;
align-items: center;
justify-content: space-between;
}
.mm-dep .view-all-row a {
font-family: var(--mm-dep-mono);
font-size: 9px;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--mm-dep-ink);
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 8px;
transition: gap 0.3s;
}
.mm-dep .view-all-row a::after { content: '\2192'; }
.mm-dep .view-all-row a:hover { gap: 14px; }
/* ── Brands grid ── */
.mm-dep .brand-col {
padding: 20px 22px;
border-right: 1px solid var(--mm-dep-rule-mid);
}
.mm-dep .brand-col:last-of-type { border-right: none; }
.mm-dep .brand-col-title {
font-family: var(--mm-dep-mono);
font-size: 8px;
letter-spacing: 0.22em;
text-transform: uppercase;
color: var(--mm-dep-ink-dim);
margin-bottom: 14px;
padding-bottom: 10px;
border-bottom: 1px solid var(--mm-dep-rule-mid);
}
.mm-dep .brand-list { list-style: none; margin: 0; padding: 0; }
.mm-dep .brand-list li a {
display: block;
padding: 8px 0;
font-family: 'Playfair Display', Georgia, serif;
font-size: 15px;
font-weight: 400;
color: var(--mm-dep-ink-mid);
text-decoration: none;
border-bottom: 1px solid var(--mm-dep-rule);
transition: color 0.2s, padding-left 0.25s;
}
.mm-dep .brand-list li a:hover { color: var(--mm-dep-ink); padding-left: 8px; }
/* ── Mega footer ── */
.mm-dep .mega-footer {
grid-column: 1 / -1;
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 22px;
background: var(--mm-dep-ink);
flex-wrap: wrap;
gap: 12px;
}
.mm-dep .mega-footer .f-left { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.mm-dep .mega-footer a {
font-family: var(--mm-dep-mono);
font-size: 9px;
letter-spacing: 0.15em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.5);
text-decoration: none;
transition: color 0.2s;
}
.mm-dep .mega-footer a:hover { color: #fff; }
.mm-dep .mega-footer .f-highlight { color: #f5c842 !important; }
/* Stagger */
.mm-dep .nav-item:hover .sub-list li,
.mm-dep .nav-item.mm-open .sub-list li { animation: mm-dep-up 0.35s ease both; }
.mm-dep .nav-item:hover .sub-list li:nth-child(1),
.mm-dep .nav-item.mm-open .sub-list li:nth-child(1) { animation-delay: 0.04s; }
.mm-dep .nav-item:hover .sub-list li:nth-child(2),
.mm-dep .nav-item.mm-open .sub-list li:nth-child(2) { animation-delay: 0.08s; }
.mm-dep .nav-item:hover .sub-list li:nth-child(3),
.mm-dep .nav-item.mm-open .sub-list li:nth-child(3) { animation-delay: 0.12s; }
.mm-dep .nav-item:hover .sub-list li:nth-child(4),
.mm-dep .nav-item.mm-open .sub-list li:nth-child(4) { animation-delay: 0.16s; }
.mm-dep .nav-item:hover .sub-list li:nth-child(5),
.mm-dep .nav-item.mm-open .sub-list li:nth-child(5) { animation-delay: 0.20s; }
.mm-dep .nav-item:hover .sub-list li:nth-child(6),
.mm-dep .nav-item.mm-open .sub-list li:nth-child(6) { animation-delay: 0.24s; }
.mm-dep .nav-item:hover .sub-list li:nth-child(7),
.mm-dep .nav-item.mm-open .sub-list li:nth-child(7) { animation-delay: 0.28s; }
@keyframes mm-dep-up {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 900px) {
.mm-dep .nav-trigger { padding: 0 14px; font-size: 10px; }
.mm-dep .mega-dept,
.mm-dep .mega-life,
.mm-dep .mega-brands {
grid-template-columns: 1fr;
min-width: calc(100vw - 24px);
}
.mm-dep .dept-tile { min-height: 160px; border-right: 0; border-bottom: 2px solid var(--mm-dep-ink); }
.mm-dep .dept-col, .mm-dep .brand-col {
border-right: 0;
border-bottom: 1px solid var(--mm-dep-rule-mid);
}
}
@media (prefers-reduced-motion: reduce) {
.mm-dep .mega,
.mm-dep .sub-list li,
.mm-dep .sub-list li a,
.mm-dep .view-all-row a { transition: none; animation: none; }
}
```
**JS:**
```js
(() => {
document.querySelectorAll('.mm-noi .nav-item, .mm-cyb .nav-item, .mm-bio .nav-item, .mm-dep .nav-item, .mm-typ .nav-item, .mm-dea .nav-item').forEach(item => {
const trigger = item.querySelector('.nav-trigger');
if (!trigger) return;
// Mouse + keyboard: toggle open on click / Enter / Space
trigger.addEventListener('click', e => {
e.preventDefault();
const isOpen = item.classList.contains('mm-open');
// Close any sibling that's open so only one panel shows at a time
item.parentElement?.querySelectorAll('.nav-item.mm-open').forEach(other => {
if (other !== item) other.classList.remove('mm-open');
const otherBtn = other.querySelector('.nav-trigger');
if (otherBtn) otherBtn.setAttribute('aria-expanded', 'false');
});
item.classList.toggle('mm-open', !isOpen);
trigger.setAttribute('aria-expanded', String(!isOpen));
});
});
// Outside-click closes all open panels
document.addEventListener('click', e => {
document.querySelectorAll('.mm-noi .nav-item.mm-open, .mm-cyb .nav-item.mm-open, .mm-bio .nav-item.mm-open, .mm-dep .nav-item.mm-open, .mm-typ .nav-item.mm-open, .mm-dea .nav-item.mm-open').forEach(item => {
if (!item.contains(e.target)) {
item.classList.remove('mm-open');
const btn = item.querySelector('.nav-trigger');
if (btn) btn.setAttribute('aria-expanded', 'false');
}
});
});
// Escape closes the currently open panel
document.addEventListener('keydown', e => {
if (e.key !== 'Escape') return;
document.querySelectorAll('.mm-noi .nav-item.mm-open, .mm-cyb .nav-item.mm-open, .mm-bio .nav-item.mm-open, .mm-dep .nav-item.mm-open, .mm-typ .nav-item.mm-open, .mm-dea .nav-item.mm-open').forEach(item => {
item.classList.remove('mm-open');
const btn = item.querySelector('.nav-trigger');
if (btn) btn.setAttribute('aria-expanded', 'false');
});
});
})();
```
### 05. Precision Outdoor Gear Finder
**Type:** CSS + JS
**Description:** Dark olive / slate panel with Bebas Neue display + Barlow / Barlow Condensed text. Each nav item opens a panel with a left stats sidebar (types, brands, in-stock count, lime CTA button) and columned specific-type lists — not "Footwear" but "Road Running Shoes (184)", "Trail Running Shoes", "Waterproof Boots (GTX)". Every column has Quick-Jump filter pills (Gore-Tex, Wide Fit, Fill Power) so shoppers skip landing pages entirely. Lime accent + orange "Hot" badges drive urgency. Best for outdoor gear, sports retail, hardware stores — anywhere the long tail matters.
**HTML:**
```html
Free shipping on orders $75+
⚡ Flash Deal: 30% off all trail footwear today only
Find a Store
⛳ Footwear
🧡 Clothing
🏔 Gear
Brands
Community
```
**CSS:**
```css
/* ─── 05 Precision Outdoor Gear Finder — type-drill mega menu ──────
Imports Bebas Neue + Barlow + Barlow Condensed. Everything scoped
under .mm-typ so the dark olive palette doesn't bleed across the
page. Each link surfaces a SPECIFIC type ("Trail Running Shoes")
not a parent category ("Footwear"). */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,200;0,300;0,400;0,500;0,600;1,200;1,300&family=Barlow+Condensed:wght@300;400;500;600;700&display=swap');
.mm-typ {
--mm-typ-void: #0f1410;
--mm-typ-surface: #161d17;
--mm-typ-panel: #1c261d;
--mm-typ-raised: #243026;
--mm-typ-olive: #4a5e3a;
--mm-typ-lime: #a8c256;
--mm-typ-text: #d4ddd0;
--mm-typ-text-mid: rgba(212, 221, 208, 0.6);
--mm-typ-text-dim: rgba(212, 221, 208, 0.35);
--mm-typ-rule: rgba(212, 221, 208, 0.08);
--mm-typ-rule-mid: rgba(212, 221, 208, 0.14);
--mm-typ-orange: #e07030;
--mm-typ-border: rgba(168, 194, 86, 0.2);
--mm-typ-border-bright: rgba(168, 194, 86, 0.5);
position: relative;
background: var(--mm-typ-void);
font-family: 'Barlow', system-ui, sans-serif;
width: 100%;
min-height: 560px;
overflow: hidden;
box-sizing: border-box;
}
.mm-typ *,
.mm-typ *::before,
.mm-typ *::after { box-sizing: border-box; }
.mm-typ .top-strip {
display: flex;
align-items: center;
justify-content: space-between;
padding: 7px 28px;
background: var(--mm-typ-olive);
font-family: 'Barlow Condensed', system-ui, sans-serif;
font-size: 11px;
font-weight: 400;
letter-spacing: 0.1em;
color: rgba(255, 255, 255, 0.85);
text-transform: uppercase;
gap: 12px;
flex-wrap: wrap;
}
.mm-typ .top-strip a {
color: rgba(255, 255, 255, 0.7);
text-decoration: none;
transition: color 0.2s;
}
.mm-typ .top-strip a:hover { color: #fff; }
.mm-typ .top-strip .highlight { color: #ffec7a; font-weight: 600; }
.mm-typ .nav-bar {
list-style: none;
margin: 0;
padding: 0;
display: flex;
align-items: stretch;
background: var(--mm-typ-surface);
border-bottom: 1px solid var(--mm-typ-border);
position: relative;
z-index: 2;
}
.mm-typ .nav-item { position: relative; list-style: none; }
.mm-typ .nav-trigger {
display: inline-flex;
align-items: center;
gap: 6px;
height: 56px;
padding: 0 22px;
font-family: 'Barlow Condensed', system-ui, sans-serif;
font-size: 14px;
font-weight: 500;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--mm-typ-text-mid);
background: transparent;
border: 0;
border-right: 1px solid var(--mm-typ-rule);
cursor: pointer;
user-select: none;
transition: color 0.2s, background 0.2s;
position: relative;
}
.mm-typ .nav-trigger .icon {
font-size: 14px;
line-height: 1;
opacity: 0.5;
transition: opacity 0.2s;
}
.mm-typ .nav-item:hover .nav-trigger,
.mm-typ .nav-item.mm-open .nav-trigger {
color: var(--mm-typ-lime);
background: var(--mm-typ-panel);
}
.mm-typ .nav-item:hover .nav-trigger .icon,
.mm-typ .nav-item.mm-open .nav-trigger .icon { opacity: 1; }
.mm-typ .nav-trigger::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 2px;
background: var(--mm-typ-lime);
transform: scaleX(0);
transform-origin: left;
transition: transform 0.3s ease;
}
.mm-typ .nav-item:hover .nav-trigger::after,
.mm-typ .nav-item.mm-open .nav-trigger::after { transform: scaleX(1); }
/* ── Mega ── */
.mm-typ .mega {
position: absolute;
top: 100%;
left: 0;
background: var(--mm-typ-panel);
border: 1px solid var(--mm-typ-border);
border-top: 2px solid var(--mm-typ-lime);
opacity: 0;
pointer-events: none;
transform: translateY(-8px);
transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
display: grid;
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
max-width: calc(100vw - 24px);
z-index: 5;
}
.mm-typ .nav-item:hover .mega,
.mm-typ .nav-item.mm-open .mega {
opacity: 1;
pointer-events: all;
transform: translateY(0);
}
.mm-typ .mega-foot { grid-template-columns: 180px 1fr 1fr 1fr 1fr; min-width: min(940px, calc(100vw - 24px)); }
.mm-typ .mega-cloth { grid-template-columns: 180px 1fr 1fr 1fr; min-width: min(820px, calc(100vw - 24px)); }
.mm-typ .mega-gear { grid-template-columns: 180px 1fr 1fr 1fr; min-width: min(820px, calc(100vw - 24px)); }
/* ── Sidebar ── */
.mm-typ .mega-sidebar {
background: var(--mm-typ-raised);
border-right: 1px solid var(--mm-typ-rule-mid);
padding: 20px 18px;
display: flex;
flex-direction: column;
gap: 0;
min-height: 380px;
}
.mm-typ .sidebar-cat-title {
font-family: 'Bebas Neue', sans-serif;
font-size: 26px;
letter-spacing: 0.06em;
color: var(--mm-typ-lime);
line-height: 1;
margin-bottom: 4px;
}
.mm-typ .sidebar-sub {
font-family: 'Barlow', system-ui, sans-serif;
font-size: 10px;
font-weight: 200;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--mm-typ-text-dim);
margin-bottom: 20px;
}
.mm-typ .sidebar-stat {
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: auto;
}
.mm-typ .stat-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 7px 0;
border-bottom: 1px solid var(--mm-typ-rule);
}
.mm-typ .stat-row .s-label {
font-family: 'Barlow', system-ui, sans-serif;
font-size: 10px;
font-weight: 300;
color: var(--mm-typ-text-dim);
letter-spacing: 0.08em;
text-transform: uppercase;
}
.mm-typ .stat-row .s-val {
font-family: 'Barlow Condensed', system-ui, sans-serif;
font-size: 13px;
font-weight: 500;
color: var(--mm-typ-lime);
letter-spacing: 0.06em;
}
.mm-typ .sidebar-cta {
display: block;
margin-top: 20px;
padding: 10px 14px;
background: var(--mm-typ-lime);
color: var(--mm-typ-void);
font-family: 'Barlow Condensed', system-ui, sans-serif;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.16em;
text-transform: uppercase;
text-decoration: none;
text-align: center;
transition: background 0.2s;
}
.mm-typ .sidebar-cta:hover { background: #c0e070; }
/* ── Type columns ── */
.mm-typ .type-col {
padding: 0;
border-right: 1px solid var(--mm-typ-rule);
}
.mm-typ .type-col:last-of-type { border-right: none; }
.mm-typ .type-col-header {
padding: 14px 16px 12px;
border-bottom: 1px solid var(--mm-typ-rule-mid);
display: flex;
align-items: center;
gap: 10px;
}
.mm-typ .type-col-header .col-icon { font-size: 16px; line-height: 1; }
.mm-typ .type-col-header .col-title {
font-family: 'Barlow Condensed', system-ui, sans-serif;
font-size: 13px;
font-weight: 600;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--mm-typ-text);
}
.mm-typ .type-col-header .col-count {
margin-left: auto;
font-family: 'Barlow', system-ui, sans-serif;
font-size: 10px;
font-weight: 200;
color: var(--mm-typ-text-dim);
}
.mm-typ .type-links {
list-style: none;
margin: 0;
padding: 6px 0;
}
.mm-typ .type-links li { list-style: none; }
.mm-typ .type-links li a {
display: flex;
align-items: center;
gap: 0;
padding: 8px 16px;
font-family: 'Barlow', system-ui, sans-serif;
font-size: 13px;
font-weight: 300;
color: var(--mm-typ-text-mid);
text-decoration: none;
border-bottom: 1px solid var(--mm-typ-rule);
transition: color 0.2s, background 0.2s, padding-left 0.25s;
position: relative;
}
.mm-typ .type-links li a .type-arrow {
position: absolute;
left: 4px;
opacity: 0;
color: var(--mm-typ-lime);
font-size: 10px;
transition: opacity 0.2s, left 0.25s;
}
.mm-typ .type-links li a .type-count {
margin-left: auto;
font-family: 'Barlow Condensed', system-ui, sans-serif;
font-size: 11px;
font-weight: 300;
color: var(--mm-typ-text-dim);
flex-shrink: 0;
transition: color 0.2s;
}
.mm-typ .type-links li a .type-badge {
font-family: 'Barlow Condensed', system-ui, sans-serif;
font-size: 9px;
font-weight: 500;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--mm-typ-void);
background: var(--mm-typ-lime);
padding: 2px 5px;
margin-left: 8px;
flex-shrink: 0;
}
.mm-typ .type-links li a .type-badge.hot {
background: var(--mm-typ-orange);
color: #fff;
}
.mm-typ .type-links li a:hover {
color: var(--mm-typ-lime);
background: rgba(168, 194, 86, 0.06);
padding-left: 24px;
}
.mm-typ .type-links li a:hover .type-arrow { opacity: 1; left: 10px; }
.mm-typ .type-links li a:hover .type-count { color: var(--mm-typ-lime); }
/* Quick-jump pills */
.mm-typ .quick-jump {
padding: 10px 16px;
border-top: 1px solid var(--mm-typ-rule-mid);
display: flex;
flex-wrap: wrap;
gap: 5px;
}
.mm-typ .quick-jump-label {
width: 100%;
font-family: 'Barlow', system-ui, sans-serif;
font-size: 9px;
font-weight: 300;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--mm-typ-text-dim);
margin-bottom: 6px;
}
.mm-typ .quick-jump a {
font-family: 'Barlow Condensed', system-ui, sans-serif;
font-size: 10px;
font-weight: 400;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--mm-typ-text-mid);
background: var(--mm-typ-raised);
border: 1px solid var(--mm-typ-rule-mid);
padding: 4px 10px;
text-decoration: none;
transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.mm-typ .quick-jump a:hover {
color: var(--mm-typ-lime);
border-color: var(--mm-typ-border-bright);
background: rgba(168, 194, 86, 0.08);
}
/* ── Footer ── */
.mm-typ .mega-footer {
grid-column: 1 / -1;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 16px;
background: var(--mm-typ-raised);
border-top: 1px solid var(--mm-typ-rule-mid);
flex-wrap: wrap;
gap: 10px;
}
.mm-typ .mega-footer .f-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mm-typ .mega-footer .f-tag {
font-family: 'Barlow Condensed', system-ui, sans-serif;
font-size: 10px;
font-weight: 400;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--mm-typ-text-dim);
background: var(--mm-typ-panel);
border: 1px solid var(--mm-typ-rule-mid);
padding: 4px 10px;
text-decoration: none;
transition: color 0.2s, border-color 0.2s;
}
.mm-typ .mega-footer .f-tag:hover { color: var(--mm-typ-lime); border-color: var(--mm-typ-border-bright); }
.mm-typ .mega-footer .f-tag.hot { color: var(--mm-typ-orange); border-color: rgba(224, 112, 48, 0.35); }
.mm-typ .mega-footer .f-right a {
font-family: 'Barlow Condensed', system-ui, sans-serif;
font-size: 11px;
font-weight: 500;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--mm-typ-lime);
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 8px;
transition: gap 0.3s;
}
.mm-typ .mega-footer .f-right a::after { content: '\2192'; }
.mm-typ .mega-footer .f-right a:hover { gap: 14px; }
/* Stagger */
.mm-typ .nav-item:hover .type-links li,
.mm-typ .nav-item.mm-open .type-links li { animation: mm-typ-slide 0.3s ease both; }
.mm-typ .nav-item:hover .type-links li:nth-child(1),
.mm-typ .nav-item.mm-open .type-links li:nth-child(1) { animation-delay: 0.03s; }
.mm-typ .nav-item:hover .type-links li:nth-child(2),
.mm-typ .nav-item.mm-open .type-links li:nth-child(2) { animation-delay: 0.07s; }
.mm-typ .nav-item:hover .type-links li:nth-child(3),
.mm-typ .nav-item.mm-open .type-links li:nth-child(3) { animation-delay: 0.11s; }
.mm-typ .nav-item:hover .type-links li:nth-child(4),
.mm-typ .nav-item.mm-open .type-links li:nth-child(4) { animation-delay: 0.15s; }
.mm-typ .nav-item:hover .type-links li:nth-child(5),
.mm-typ .nav-item.mm-open .type-links li:nth-child(5) { animation-delay: 0.19s; }
.mm-typ .nav-item:hover .type-links li:nth-child(6),
.mm-typ .nav-item.mm-open .type-links li:nth-child(6) { animation-delay: 0.23s; }
.mm-typ .nav-item:hover .type-links li:nth-child(7),
.mm-typ .nav-item.mm-open .type-links li:nth-child(7) { animation-delay: 0.27s; }
@keyframes mm-typ-slide {
from { opacity: 0; transform: translateX(-8px); }
to { opacity: 1; transform: translateX(0); }
}
@media (max-width: 900px) {
.mm-typ .nav-trigger { padding: 0 14px; font-size: 12px; }
.mm-typ .mega-foot,
.mm-typ .mega-cloth,
.mm-typ .mega-gear {
grid-template-columns: 1fr;
min-width: calc(100vw - 24px);
}
.mm-typ .mega-sidebar { border-right: 0; border-bottom: 1px solid var(--mm-typ-rule-mid); min-height: 0; }
.mm-typ .type-col { border-right: 0; border-bottom: 1px solid var(--mm-typ-rule); }
}
@media (prefers-reduced-motion: reduce) {
.mm-typ .mega,
.mm-typ .type-links li,
.mm-typ .type-links li a,
.mm-typ .quick-jump a { transition: none; animation: none; }
}
```
**JS:**
```js
(() => {
document.querySelectorAll('.mm-noi .nav-item, .mm-cyb .nav-item, .mm-bio .nav-item, .mm-dep .nav-item, .mm-typ .nav-item, .mm-dea .nav-item').forEach(item => {
const trigger = item.querySelector('.nav-trigger');
if (!trigger) return;
// Mouse + keyboard: toggle open on click / Enter / Space
trigger.addEventListener('click', e => {
e.preventDefault();
const isOpen = item.classList.contains('mm-open');
// Close any sibling that's open so only one panel shows at a time
item.parentElement?.querySelectorAll('.nav-item.mm-open').forEach(other => {
if (other !== item) other.classList.remove('mm-open');
const otherBtn = other.querySelector('.nav-trigger');
if (otherBtn) otherBtn.setAttribute('aria-expanded', 'false');
});
item.classList.toggle('mm-open', !isOpen);
trigger.setAttribute('aria-expanded', String(!isOpen));
});
});
// Outside-click closes all open panels
document.addEventListener('click', e => {
document.querySelectorAll('.mm-noi .nav-item.mm-open, .mm-cyb .nav-item.mm-open, .mm-bio .nav-item.mm-open, .mm-dep .nav-item.mm-open, .mm-typ .nav-item.mm-open, .mm-dea .nav-item.mm-open').forEach(item => {
if (!item.contains(e.target)) {
item.classList.remove('mm-open');
const btn = item.querySelector('.nav-trigger');
if (btn) btn.setAttribute('aria-expanded', 'false');
}
});
});
// Escape closes the currently open panel
document.addEventListener('keydown', e => {
if (e.key !== 'Escape') return;
document.querySelectorAll('.mm-noi .nav-item.mm-open, .mm-cyb .nav-item.mm-open, .mm-bio .nav-item.mm-open, .mm-dep .nav-item.mm-open, .mm-typ .nav-item.mm-open, .mm-dea .nav-item.mm-open').forEach(item => {
item.classList.remove('mm-open');
const btn = item.querySelector('.nav-trigger');
if (btn) btn.setAttribute('aria-expanded', 'false');
});
});
})();
```
### 06. Flash Sale Command Center
**Type:** CSS + JS
**Description:** Near-black panel with Syne 800 display + Outfit text + Syne Mono. The Deals trigger visually ignites — red background tint, pulsing live dot, fire-glow box-shadow on hover. The panel ships 4 columns: a hero with a live JavaScript countdown timer + savings pills (clearance tiers), a Clearance column (reds, −60% to −80%), a Promo Codes column with a copyable code block, and a Flash Sales column with per-item stock counts. A red promo ticker scrolls active offers above the bar. Calm Women / Men menus alongside make the Deals contrast pop. Best for ecommerce sale events, Black Friday, flash promotions.
**HTML:**
```html
⚡ Flash Sale — Up to 70% Off · Ends in 04:22:08
CODE: SUMMER30 — Extra 30% off clearance · Today only
BOGO on all sneakers · Buy 1 Get 1 50% Off
Free returns · No minimum · 28-day window
⚡ Flash Sale — Up to 70% Off · Ends in 04:22:08
CODE: SUMMER30 — Extra 30% off clearance · Today only
BOGO on all sneakers · Buy 1 Get 1 50% Off
Free returns · No minimum · 28-day window
Women ▾
Men ▾
Deals & Sales
▾
LIVE
Active Now
Summer Sale
Ends in
Nike Air Max 270
Only 14 left
−40%
Levi's 501 Jeans
Only 8 left
−35%
North Face Puffer
22 remaining
−50%
Ray-Ban Wayfarers
Only 5 left
−30%
Fjällräven Kånken
18 remaining
−25%
New In ▾
Brands ▾
```
**CSS:**
```css
/* ─── 06 Flash Sale Command Center — ignited deals mega menu ────────
Imports Syne + Syne Mono + Outfit. The "ignited" Deals trigger gets
a red background tint, pulsing live dot, fire-glow box-shadow.
The promo ticker animates an infinite horizontal scroll. Everything
scoped under .mm-dea so the dark palette / fire glow doesn't leak. */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Syne+Mono&family=Outfit:wght@200;300;400;500;600&display=swap');
.mm-dea {
--mm-dea-void: #0e0e0e;
--mm-dea-surface: #141414;
--mm-dea-panel: #1a1a1a;
--mm-dea-raised: #202020;
--mm-dea-border: rgba(255, 255, 255, 0.07);
--mm-dea-border-mid: rgba(255, 255, 255, 0.12);
--mm-dea-text: #e8e8e8;
--mm-dea-text-mid: rgba(232, 232, 232, 0.55);
--mm-dea-text-dim: rgba(232, 232, 232, 0.3);
--mm-dea-azure: #3b82f6;
--mm-dea-azure-dim: rgba(59, 130, 246, 0.15);
--mm-dea-fire: #ff3030;
--mm-dea-fire-dim: rgba(255, 48, 48, 0.12);
--mm-dea-fire-glow: rgba(255, 48, 48, 0.3);
--mm-dea-gold: #f5c242;
--mm-dea-gold-dim: rgba(245, 194, 66, 0.15);
--mm-dea-green: #22c55e;
--mm-dea-green-dim: rgba(34, 197, 94, 0.12);
position: relative;
background: var(--mm-dea-void);
font-family: 'Outfit', system-ui, sans-serif;
width: 100%;
min-height: 620px;
overflow: hidden;
box-sizing: border-box;
}
.mm-dea *,
.mm-dea *::before,
.mm-dea *::after { box-sizing: border-box; }
/* ── Promo ticker ── */
.mm-dea .ticker-wrap {
background: var(--mm-dea-fire);
overflow: hidden;
height: 32px;
display: flex;
align-items: center;
position: relative;
}
.mm-dea .ticker-wrap::before,
.mm-dea .ticker-wrap::after {
content: '';
position: absolute;
top: 0;
bottom: 0;
width: 60px;
z-index: 2;
}
.mm-dea .ticker-wrap::before { left: 0; background: linear-gradient(90deg, var(--mm-dea-fire), transparent); }
.mm-dea .ticker-wrap::after { right: 0; background: linear-gradient(-90deg, var(--mm-dea-fire), transparent); }
.mm-dea .ticker-content {
display: flex;
gap: 60px;
animation: mm-dea-ticker 22s linear infinite;
white-space: nowrap;
padding-left: 100%;
}
@keyframes mm-dea-ticker {
from { transform: translateX(0); }
to { transform: translateX(-50%); }
}
.mm-dea .ticker-item {
font-family: 'Syne', system-ui, sans-serif;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.14em;
text-transform: uppercase;
color: #fff;
display: inline-flex;
align-items: center;
gap: 12px;
}
.mm-dea .ticker-item .t-sep { color: rgba(255, 255, 255, 0.4); font-size: 14px; }
/* ── Nav bar ── */
.mm-dea .nav-bar {
list-style: none;
margin: 0;
padding: 0;
display: flex;
align-items: stretch;
background: var(--mm-dea-surface);
border-bottom: 1px solid var(--mm-dea-border);
position: relative;
z-index: 3;
}
.mm-dea .nav-item { position: relative; list-style: none; }
.mm-dea .nav-trigger {
display: inline-flex;
align-items: center;
gap: 7px;
height: 54px;
padding: 0 22px;
font-family: 'Syne', system-ui, sans-serif;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--mm-dea-text-mid);
background: transparent;
border: 0;
border-right: 1px solid var(--mm-dea-border);
cursor: pointer;
user-select: none;
transition: color 0.2s, background 0.2s;
position: relative;
}
.mm-dea .nav-item:hover .nav-trigger,
.mm-dea .nav-item.mm-open .nav-trigger { color: var(--mm-dea-text); }
.mm-dea .nav-trigger .chevron {
font-size: 9px;
opacity: 0.4;
transition: transform 0.3s, opacity 0.2s;
margin-left: 2px;
}
.mm-dea .nav-item:hover .nav-trigger .chevron,
.mm-dea .nav-item.mm-open .nav-trigger .chevron { transform: rotate(180deg); opacity: 0.7; }
/* DEALS trigger — special red styling */
.mm-dea .nav-item.deals-item .nav-trigger {
background: var(--mm-dea-fire-dim);
border-right: 1px solid rgba(255, 48, 48, 0.2);
border-left: 1px solid rgba(255, 48, 48, 0.2);
color: var(--mm-dea-fire);
padding: 0 26px;
}
.mm-dea .nav-item.deals-item .nav-trigger .live-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--mm-dea-fire);
box-shadow: 0 0 6px var(--mm-dea-fire);
animation: mm-dea-pulse 1.4s ease-in-out infinite;
flex-shrink: 0;
}
@keyframes mm-dea-pulse {
0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 6px var(--mm-dea-fire); }
50% { opacity: 0.7; transform: scale(1.3); box-shadow: 0 0 12px var(--mm-dea-fire); }
}
.mm-dea .nav-item.deals-item:hover .nav-trigger,
.mm-dea .nav-item.deals-item.mm-open .nav-trigger {
background: rgba(255, 48, 48, 0.18);
color: #ff6060;
}
/* ── Mega panel ── */
.mm-dea .mega {
position: absolute;
top: 100%;
left: 0;
background: var(--mm-dea-panel);
border: 1px solid var(--mm-dea-border-mid);
border-top: 2px solid var(--mm-dea-border-mid);
opacity: 0;
pointer-events: none;
transform: translateY(-8px);
transition: opacity 0.3s ease, transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
display: grid;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
overflow: hidden;
max-width: calc(100vw - 24px);
z-index: 5;
}
.mm-dea .nav-item:hover .mega,
.mm-dea .nav-item.mm-open .mega { opacity: 1; pointer-events: all; transform: translateY(0); }
.mm-dea .nav-item.deals-item .mega {
border-top: 2px solid var(--mm-dea-fire);
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px var(--mm-dea-fire-glow);
}
.mm-dea .mega-regular { grid-template-columns: 1fr 1fr 1fr; min-width: min(640px, calc(100vw - 24px)); }
.mm-dea .mega-deals { grid-template-columns: 260px 1fr 1fr 1fr; min-width: min(920px, calc(100vw - 24px)); }
/* ── Regular columns ── */
.mm-dea .reg-col {
padding: 22px 20px;
border-right: 1px solid var(--mm-dea-border);
}
.mm-dea .reg-col:last-of-type { border-right: none; }
.mm-dea .reg-col-title {
font-family: 'Syne', system-ui, sans-serif;
font-size: 9px;
font-weight: 600;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--mm-dea-text-dim);
margin-bottom: 14px;
padding-bottom: 10px;
border-bottom: 1px solid var(--mm-dea-border);
}
.mm-dea .reg-links { list-style: none; margin: 0; padding: 0; }
.mm-dea .reg-links li { list-style: none; }
.mm-dea .reg-links li a {
display: flex;
align-items: center;
justify-content: space-between;
padding: 9px 0;
font-family: 'Outfit', system-ui, sans-serif;
font-size: 14px;
font-weight: 300;
color: var(--mm-dea-text-mid);
text-decoration: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
transition: color 0.2s, padding-left 0.25s;
}
.mm-dea .reg-links li a:hover { color: var(--mm-dea-text); padding-left: 8px; }
.mm-dea .reg-links li a .badge {
font-family: 'Syne Mono', ui-monospace, monospace;
font-size: 8px;
padding: 2px 6px;
border-radius: 3px;
letter-spacing: 0.05em;
flex-shrink: 0;
}
.mm-dea .badge-new { background: var(--mm-dea-azure-dim); color: var(--mm-dea-azure); border: 1px solid rgba(59, 130, 246, 0.25); }
.mm-dea .badge-sale { background: var(--mm-dea-fire-dim); color: var(--mm-dea-fire); border: 1px solid rgba(255, 48, 48, 0.3); }
/* ── Deals hero ── */
.mm-dea .deals-hero {
background: linear-gradient(160deg, #1f0808 0%, #140404 100%);
border-right: 1px solid rgba(255, 48, 48, 0.2);
padding: 22px 20px;
display: flex;
flex-direction: column;
min-height: 400px;
position: relative;
overflow: hidden;
}
.mm-dea .deals-hero::before {
content: '';
position: absolute;
top: -40px;
left: -40px;
width: 220px;
height: 220px;
background: radial-gradient(circle, rgba(255, 48, 48, 0.2) 0%, transparent 70%);
pointer-events: none;
}
.mm-dea .deals-hero-label {
font-family: 'Syne Mono', ui-monospace, monospace;
font-size: 8px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--mm-dea-fire);
margin-bottom: 10px;
display: flex;
align-items: center;
gap: 8px;
position: relative;
}
.mm-dea .deals-hero-label .live-badge {
background: var(--mm-dea-fire);
color: #fff;
font-family: 'Syne', system-ui, sans-serif;
font-size: 7px;
font-weight: 700;
letter-spacing: 0.12em;
padding: 2px 6px;
animation: mm-dea-flicker 2.5s ease-in-out infinite;
}
@keyframes mm-dea-flicker {
0%, 90%, 100% { opacity: 1; }
95% { opacity: 0.6; }
}
.mm-dea .deals-hero-title {
font-family: 'Syne', system-ui, sans-serif;
font-size: 40px;
font-weight: 800;
color: var(--mm-dea-fire);
line-height: 0.95;
letter-spacing: -0.02em;
text-transform: uppercase;
margin-bottom: 6px;
position: relative;
}
.mm-dea .deals-hero-sub {
font-family: 'Outfit', system-ui, sans-serif;
font-size: 12px;
font-weight: 200;
color: rgba(255, 48, 48, 0.6);
letter-spacing: 0.04em;
margin-bottom: 22px;
position: relative;
}
/* Countdown */
.mm-dea .countdown {
display: flex;
gap: 8px;
margin-bottom: 22px;
position: relative;
}
.mm-dea .cd-unit { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mm-dea .cd-num {
font-family: 'Syne Mono', ui-monospace, monospace;
font-size: 22px;
font-weight: 400;
color: #fff;
background: rgba(255, 48, 48, 0.15);
border: 1px solid rgba(255, 48, 48, 0.35);
width: 46px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
letter-spacing: -0.05em;
}
.mm-dea .cd-label {
font-family: 'Syne', system-ui, sans-serif;
font-size: 7px;
font-weight: 600;
letter-spacing: 0.14em;
text-transform: uppercase;
color: rgba(255, 48, 48, 0.5);
}
.mm-dea .cd-sep {
font-family: 'Syne Mono', ui-monospace, monospace;
font-size: 18px;
color: rgba(255, 48, 48, 0.4);
align-self: flex-start;
margin-top: 8px;
}
/* Savings pills */
.mm-dea .savings-pills {
display: flex;
flex-direction: column;
gap: 7px;
margin-top: auto;
position: relative;
}
.mm-dea .savings-pill {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 12px;
background: rgba(255, 48, 48, 0.08);
border: 1px solid rgba(255, 48, 48, 0.2);
text-decoration: none;
transition: background 0.2s, border-color 0.2s;
}
.mm-dea .savings-pill:hover { background: rgba(255, 48, 48, 0.15); border-color: rgba(255, 48, 48, 0.4); }
.mm-dea .savings-pill .sp-label {
font-family: 'Outfit', system-ui, sans-serif;
font-size: 12px;
font-weight: 400;
color: var(--mm-dea-text);
}
.mm-dea .savings-pill .sp-pct {
font-family: 'Syne', system-ui, sans-serif;
font-size: 14px;
font-weight: 700;
color: var(--mm-dea-fire);
letter-spacing: -0.02em;
}
/* Deal columns */
.mm-dea .deal-col {
padding: 18px 18px;
border-right: 1px solid var(--mm-dea-border);
position: relative;
}
.mm-dea .deal-col:last-of-type { border-right: none; }
.mm-dea .deal-col-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
padding-bottom: 10px;
border-bottom: 1px solid var(--mm-dea-border);
}
.mm-dea .deal-col-title {
font-family: 'Syne', system-ui, sans-serif;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--mm-dea-text);
}
.mm-dea .deal-col-type {
font-family: 'Syne Mono', ui-monospace, monospace;
font-size: 8px;
letter-spacing: 0.12em;
padding: 3px 7px;
border-radius: 2px;
}
.mm-dea .type-clearance { background: var(--mm-dea-fire-dim); color: var(--mm-dea-fire); border: 1px solid rgba(255, 48, 48, 0.3); }
.mm-dea .type-promo { background: var(--mm-dea-gold-dim); color: var(--mm-dea-gold); border: 1px solid rgba(245, 194, 66, 0.3); }
.mm-dea .type-flash { background: var(--mm-dea-green-dim); color: var(--mm-dea-green); border: 1px solid rgba(34, 197, 94, 0.3); }
.mm-dea .deal-links { list-style: none; margin: 0; padding: 0; }
.mm-dea .deal-links li { list-style: none; }
.mm-dea .deal-links li a {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 0;
font-family: 'Outfit', system-ui, sans-serif;
font-size: 13px;
font-weight: 300;
color: var(--mm-dea-text-mid);
text-decoration: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
transition: color 0.2s, padding-left 0.25s, background 0.2s;
gap: 8px;
}
.mm-dea .deal-links li a .d-name { flex: 1; }
.mm-dea .deal-links li a .d-off {
font-family: 'Syne', system-ui, sans-serif;
font-size: 12px;
font-weight: 700;
color: var(--mm-dea-fire);
flex-shrink: 0;
letter-spacing: -0.01em;
}
.mm-dea .deal-links li a .d-off.gold { color: var(--mm-dea-gold); }
.mm-dea .deal-links li a .d-off.green { color: var(--mm-dea-green); }
.mm-dea .deal-links li a:hover {
color: var(--mm-dea-text);
padding-left: 8px;
background: rgba(255, 255, 255, 0.02);
}
/* Promo code block */
.mm-dea .promo-block {
margin-top: 12px;
padding: 12px;
background: var(--mm-dea-raised);
border: 1px solid var(--mm-dea-border-mid);
}
.mm-dea .promo-block .pb-label {
font-family: 'Syne', system-ui, sans-serif;
font-size: 8px;
font-weight: 600;
letter-spacing: 0.18em;
text-transform: uppercase;
color: var(--mm-dea-text-dim);
margin-bottom: 8px;
}
.mm-dea .promo-block .pb-code {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.mm-dea .promo-block .pb-code .code {
font-family: 'Syne Mono', ui-monospace, monospace;
font-size: 14px;
font-weight: 400;
color: var(--mm-dea-gold);
letter-spacing: 0.08em;
background: var(--mm-dea-gold-dim);
border: 1px dashed rgba(245, 194, 66, 0.4);
padding: 6px 12px;
flex: 1;
text-align: center;
}
.mm-dea .promo-block .pb-code .copy-btn {
font-family: 'Syne', system-ui, sans-serif;
font-size: 8px;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--mm-dea-void);
background: var(--mm-dea-gold);
border: none;
padding: 8px 14px;
cursor: pointer;
text-decoration: none;
transition: background 0.2s;
}
.mm-dea .promo-block .pb-code .copy-btn:hover { background: #ffd060; }
/* Flash items */
.mm-dea .flash-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.mm-dea .flash-item .fi-info { flex: 1; }
.mm-dea .flash-item .fi-name {
font-family: 'Outfit', system-ui, sans-serif;
font-size: 13px;
font-weight: 300;
color: var(--mm-dea-text-mid);
}
.mm-dea .flash-item .fi-stock {
font-family: 'Syne Mono', ui-monospace, monospace;
font-size: 8px;
color: var(--mm-dea-green);
margin-top: 2px;
letter-spacing: 0.05em;
}
.mm-dea .flash-item .fi-pct {
font-family: 'Syne', system-ui, sans-serif;
font-size: 14px;
font-weight: 700;
color: var(--mm-dea-green);
letter-spacing: -0.01em;
}
/* Footer */
.mm-dea .mega-footer {
grid-column: 1 / -1;
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 20px;
background: var(--mm-dea-raised);
border-top: 1px solid var(--mm-dea-border);
flex-wrap: wrap;
gap: 10px;
}
.mm-dea .mega-footer .f-links { display: flex; gap: 18px; flex-wrap: wrap; }
.mm-dea .mega-footer .f-links a {
font-family: 'Outfit', system-ui, sans-serif;
font-size: 11px;
font-weight: 300;
color: var(--mm-dea-text-dim);
text-decoration: none;
transition: color 0.2s;
}
.mm-dea .mega-footer .f-links a:hover { color: var(--mm-dea-text); }
.mm-dea .mega-footer .f-links a.hot { color: var(--mm-dea-fire); font-weight: 500; }
.mm-dea .mega-footer .f-right a {
font-family: 'Syne', system-ui, sans-serif;
font-size: 10px;
font-weight: 600;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--mm-dea-fire);
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 8px;
transition: gap 0.3s;
}
.mm-dea .mega-footer .f-right a::after { content: '\2192'; }
.mm-dea .mega-footer .f-right a:hover { gap: 14px; }
.mm-dea .mega-footer .f-right a.hot-cta { color: var(--mm-dea-fire); }
/* Stagger */
.mm-dea .nav-item:hover .reg-links li,
.mm-dea .nav-item:hover .deal-links li,
.mm-dea .nav-item.mm-open .reg-links li,
.mm-dea .nav-item.mm-open .deal-links li { animation: mm-dea-up 0.3s ease both; }
.mm-dea .nav-item:hover .reg-links li:nth-child(1),
.mm-dea .nav-item:hover .deal-links li:nth-child(1),
.mm-dea .nav-item.mm-open .reg-links li:nth-child(1),
.mm-dea .nav-item.mm-open .deal-links li:nth-child(1) { animation-delay: 0.04s; }
.mm-dea .nav-item:hover .reg-links li:nth-child(2),
.mm-dea .nav-item:hover .deal-links li:nth-child(2),
.mm-dea .nav-item.mm-open .reg-links li:nth-child(2),
.mm-dea .nav-item.mm-open .deal-links li:nth-child(2) { animation-delay: 0.08s; }
.mm-dea .nav-item:hover .reg-links li:nth-child(3),
.mm-dea .nav-item:hover .deal-links li:nth-child(3),
.mm-dea .nav-item.mm-open .reg-links li:nth-child(3),
.mm-dea .nav-item.mm-open .deal-links li:nth-child(3) { animation-delay: 0.12s; }
.mm-dea .nav-item:hover .reg-links li:nth-child(4),
.mm-dea .nav-item:hover .deal-links li:nth-child(4),
.mm-dea .nav-item.mm-open .reg-links li:nth-child(4),
.mm-dea .nav-item.mm-open .deal-links li:nth-child(4) { animation-delay: 0.16s; }
.mm-dea .nav-item:hover .reg-links li:nth-child(5),
.mm-dea .nav-item:hover .deal-links li:nth-child(5),
.mm-dea .nav-item.mm-open .reg-links li:nth-child(5),
.mm-dea .nav-item.mm-open .deal-links li:nth-child(5) { animation-delay: 0.20s; }
.mm-dea .nav-item:hover .reg-links li:nth-child(6),
.mm-dea .nav-item:hover .deal-links li:nth-child(6),
.mm-dea .nav-item.mm-open .reg-links li:nth-child(6),
.mm-dea .nav-item.mm-open .deal-links li:nth-child(6) { animation-delay: 0.24s; }
@keyframes mm-dea-up {
from { opacity: 0; transform: translateY(5px); }
to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 900px) {
.mm-dea .nav-trigger { padding: 0 14px; font-size: 11px; }
.mm-dea .nav-item.deals-item .nav-trigger { padding: 0 16px; }
.mm-dea .mega-regular,
.mm-dea .mega-deals {
grid-template-columns: 1fr;
min-width: calc(100vw - 24px);
}
.mm-dea .deals-hero { min-height: 0; border-right: 0; border-bottom: 1px solid rgba(255, 48, 48, 0.2); }
.mm-dea .deal-col,
.mm-dea .reg-col { border-right: 0; border-bottom: 1px solid var(--mm-dea-border); }
}
@media (prefers-reduced-motion: reduce) {
.mm-dea .ticker-content,
.mm-dea .nav-item.deals-item .nav-trigger .live-dot,
.mm-dea .deals-hero-label .live-badge { animation: none; }
.mm-dea .mega,
.mm-dea .reg-links li,
.mm-dea .deal-links li,
.mm-dea .reg-links li a,
.mm-dea .deal-links li a { transition: none; animation: none; }
}
```
**JS:**
```js
(() => {
// ─── Flash Sale Command Center — countdown + copy button ───────────
// This runs in addition to the shared mega-menu open/close handler;
// CollectionGrid dedupes JS by string identity, so both snippets
// execute exactly once even when the same scope appears N times.
const root = document.querySelector('.mm-dea');
if (!root) return;
// Countdown — drives the cd-num data-attributed elements
let totalSecs = 4 * 3600 + 22 * 60 + 8;
const cdH = root.querySelector('[data-mm-dea-cd="h"]');
const cdM = root.querySelector('[data-mm-dea-cd="m"]');
const cdS = root.querySelector('[data-mm-dea-cd="s"]');
const tick = () => {
if (totalSecs <= 0) return;
totalSecs--;
const h = Math.floor(totalSecs / 3600);
const m = Math.floor((totalSecs % 3600) / 60);
const s = totalSecs % 60;
if (cdH) cdH.textContent = String(h).padStart(2, '0');
if (cdM) cdM.textContent = String(m).padStart(2, '0');
if (cdS) cdS.textContent = String(s).padStart(2, '0');
};
if (cdH && cdM && cdS) setInterval(tick, 1000);
// Copy button — copies the visible promo code to clipboard
const copyBtn = root.querySelector('[data-mm-dea-copy]');
const codeEl = root.querySelector('.mm-dea .pb-code .code');
if (copyBtn && codeEl) {
copyBtn.addEventListener('click', e => {
e.preventDefault();
e.stopPropagation();
const code = codeEl.textContent.trim();
const finish = () => {
copyBtn.textContent = 'Copied!';
setTimeout(() => { copyBtn.textContent = 'Copy'; }, 1800);
};
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(code).then(finish, finish);
} else {
finish();
}
});
}
})();
```
---
## 6 CSS Minimalist UI Designs
URL: https://codefronts.com/design-styles/css-minimalist-ui/
Description: 6 hand-coded CSS minimalist UI screen mocks covering the surfaces minimalist design has to win — a dark SaaS dashboard, a Florentine luxury e-commerce storefront, a brutalist-white creative portfolio, a broadsheet editorial layout, a fintech mobile app inside a realistic phone frame, and a high-impact single-product SaaS landing page. Built on strategic whitespace, crisp typography hierarchy, and disciplined colour systems. Pure CSS plus scoped JS — no UI framework, no images.
Demo count: 6
### 01. Axiom Dashboard
**Type:** CSS + JS
**Description:** A dark minimalist SaaS dashboard UI with a chartreuse #c8ff00 accent — a complete cockpit composition that proves how strategic whitespace and crisp typography reduce cognitive load on data-heavy applications. Left sidebar with logo + grouped nav (Overview / Manage / Account) and a live status indicator, a 4-column KPI strip with staggered count-up reveals and per-card sparkline charts, a wide bar chart built dynamically in JavaScript with staggered bar-grow animations on initial mount, a real-time event feed panel with iconified rows, a campaign performance table with status pills (Active / Paused / Error) and inline progress bars, and a traffic-sources breakdown panel with mini-bar visualisation. Typography pairs Syne (display) with DM Mono (numbers and labels). Best for SaaS product dashboards, admin panels, analytics products, internal tools, monochrome data UIs.
**HTML:**
```html
Revenue
$284.9K
↑ 18.4% vs last week
Active Users
12,430
↑ 6.1% vs last week
Conversion
3.87%
↓ 0.3% vs last week
Avg. Session
4m 12s
↑ 22s vs last week
↑
Stripe payment
2 min ago · prod
+$2,400
↔
User upgrade
14 min ago · api
Pro
↓
Churn event
41 min ago · prod
−$799
↑
New subscriber
1h ago · web
+$149
★
Feature flag live
2h ago · deploy
v4.2
Campaign Status Reach CVR Progress
Spring Drop Active 48.2K 5.4%
Retarget B Active 21.7K 3.1%
Email Drip Paused 9.4K 1.8%
Paid Search Error — —
```
**CSS:**
```css
/* ─── 01 Axiom SaaS Dashboard — minimalist dark cockpit UI ─────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Syne:wght@400;600;700;800&display=swap');
.mu-sd {
--mu-sd-bg: #0a0a0a;
--mu-sd-surface: #111111;
--mu-sd-border: #1e1e1e;
--mu-sd-border-mid: #2a2a2a;
--mu-sd-text-primary: #f0f0f0;
--mu-sd-text-secondary: #888;
--mu-sd-text-dim: #444;
--mu-sd-accent: #c8ff00;
--mu-sd-accent-dim: rgba(200,255,0,0.08);
--mu-sd-red: #ff4444;
--mu-sd-blue: #4499ff;
--mu-sd-mono: 'DM Mono', monospace;
--mu-sd-sans: 'Syne', sans-serif;
position: relative;
width: 100%;
min-height: 760px;
background: var(--mu-sd-bg);
color: var(--mu-sd-text-primary);
font-family: var(--mu-sd-sans);
display: flex;
overflow: hidden;
box-sizing: border-box;
}
.mu-sd *,
.mu-sd *::before,
.mu-sd *::after { box-sizing: border-box; margin: 0; padding: 0; }
.mu-sd .sidebar { width: 220px; min-width: 220px; background: var(--mu-sd-surface); border-right: 1px solid var(--mu-sd-border); display: flex; flex-direction: column; padding: 28px 0; }
.mu-sd .logo { padding: 0 24px 32px; font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.mu-sd .logo-mark { width: 28px; height: 28px; background: var(--mu-sd-accent); border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.mu-sd .nav-section { padding: 0 12px; margin-bottom: 8px; }
.mu-sd .nav-section-spaced { margin-top: 16px; }
.mu-sd .nav-label { font-family: var(--mu-sd-mono); font-size: 9px; letter-spacing: 0.2em; color: var(--mu-sd-text-dim); text-transform: uppercase; padding: 0 12px; margin-bottom: 4px; }
.mu-sd .nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--mu-sd-text-secondary); transition: all 0.15s; position: relative; }
.mu-sd .nav-item:hover { color: var(--mu-sd-text-primary); background: var(--mu-sd-border); }
.mu-sd .nav-item.active { color: var(--mu-sd-accent); background: var(--mu-sd-accent-dim); }
.mu-sd .nav-item.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 18px; background: var(--mu-sd-accent); border-radius: 0 3px 3px 0; }
.mu-sd .nav-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.4; }
.mu-sd .nav-item.active .nav-dot { opacity: 1; }
.mu-sd .badge { margin-left: auto; font-family: var(--mu-sd-mono); font-size: 10px; background: var(--mu-sd-border-mid); padding: 2px 7px; border-radius: 20px; color: var(--mu-sd-text-secondary); }
.mu-sd .badge.live { background: rgba(200,255,0,0.12); color: var(--mu-sd-accent); }
.mu-sd .sidebar-footer { margin-top: auto; padding: 16px 24px; border-top: 1px solid var(--mu-sd-border); }
.mu-sd .user-row { display: flex; align-items: center; gap: 10px; }
.mu-sd .avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#c8ff00,#88bb00); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #0a0a0a; }
.mu-sd .user-name { font-size: 12.5px; font-weight: 600; }
.mu-sd .user-role { font-family: var(--mu-sd-mono); font-size: 10px; color: var(--mu-sd-text-dim); }
.mu-sd .main { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.mu-sd .topbar { display: flex; align-items: center; padding: 20px 32px; border-bottom: 1px solid var(--mu-sd-border); gap: 16px; }
.mu-sd .topbar-title { font-size: 14px; font-weight: 600; }
.mu-sd .topbar-sub { font-family: var(--mu-sd-mono); font-size: 11px; color: var(--mu-sd-text-dim); margin-left: 4px; }
.mu-sd .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.mu-sd .tab-group { display: flex; background: var(--mu-sd-surface); border: 1px solid var(--mu-sd-border); border-radius: 8px; padding: 3px; gap: 2px; }
.mu-sd .tab { font-family: var(--mu-sd-mono); font-size: 11px; padding: 5px 14px; border-radius: 5px; cursor: pointer; color: var(--mu-sd-text-dim); transition: all 0.15s; }
.mu-sd .tab.active { background: var(--mu-sd-border-mid); color: var(--mu-sd-text-primary); }
.mu-sd .btn-outline { font-family: var(--mu-sd-mono); font-size: 11px; padding: 7px 16px; border: 1px solid var(--mu-sd-border-mid); background: transparent; color: var(--mu-sd-text-secondary); border-radius: 8px; cursor: pointer; }
.mu-sd .btn-outline-mini { padding: 4px 10px; font-size: 10px; }
.mu-sd .btn-accent { font-family: var(--mu-sd-mono); font-size: 11px; padding: 7px 16px; border: none; background: var(--mu-sd-accent); color: #0a0a0a; border-radius: 8px; cursor: pointer; font-weight: 500; }
.mu-sd .content { padding: 28px 32px; display: flex; flex-direction: column; gap: 20px; }
.mu-sd .kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.mu-sd .kpi-card { background: var(--mu-sd-surface); border: 1px solid var(--mu-sd-border); border-radius: 12px; padding: 20px 22px; position: relative; overflow: hidden; }
.mu-sd .kpi-card.highlight { border-color: rgba(200,255,0,0.2); }
.mu-sd .kpi-card.highlight::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--mu-sd-accent); }
.mu-sd .kpi-label { font-family: var(--mu-sd-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--mu-sd-text-dim); text-transform: uppercase; margin-bottom: 10px; }
.mu-sd .kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-bottom: 8px; animation: mu-sd-count 0.5s ease both; }
.mu-sd .kpi-value.accent { color: var(--mu-sd-accent); }
.mu-sd .kpi-delta { font-family: var(--mu-sd-mono); font-size: 11px; }
.mu-sd .delta-up { color: var(--mu-sd-accent); } .mu-sd .delta-down { color: var(--mu-sd-red); }
.mu-sd .kpi-sparkline { position: absolute; right: 16px; bottom: 16px; opacity: 0.3; }
.mu-sd .kpi-card:nth-child(1) .kpi-value { animation-delay: 0.1s; } .mu-sd .kpi-card:nth-child(2) .kpi-value { animation-delay: 0.2s; }
.mu-sd .kpi-card:nth-child(3) .kpi-value { animation-delay: 0.3s; } .mu-sd .kpi-card:nth-child(4) .kpi-value { animation-delay: 0.4s; }
@keyframes mu-sd-count { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.mu-sd .chart-section { display: grid; grid-template-columns: 1fr 340px; gap: 14px; }
.mu-sd .panel { background: var(--mu-sd-surface); border: 1px solid var(--mu-sd-border); border-radius: 12px; overflow: hidden; }
.mu-sd .panel-header { display: flex; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--mu-sd-border); gap: 10px; }
.mu-sd .panel-title { font-size: 13px; font-weight: 600; }
.mu-sd .panel-sub { font-family: var(--mu-sd-mono); font-size: 10px; color: var(--mu-sd-text-dim); }
.mu-sd .panel-actions { margin-left: auto; display: flex; gap: 8px; }
.mu-sd .chart-body { padding: 20px 22px 16px; position: relative; height: 200px; }
.mu-sd .chart-y-labels { position: absolute; left: 22px; top: 20px; bottom: 30px; display: flex; flex-direction: column; justify-content: space-between; }
.mu-sd .y-label { font-family: var(--mu-sd-mono); font-size: 10px; color: var(--mu-sd-text-dim); }
.mu-sd .chart-canvas { margin-left: 36px; height: 100%; position: relative; }
.mu-sd .chart-grid-lines { position: absolute; top: 0; bottom: 24px; left: 0; right: 0; display: flex; flex-direction: column; justify-content: space-between; }
.mu-sd .grid-line { width: 100%; height: 1px; background: var(--mu-sd-border); }
.mu-sd .bar-group { position: absolute; bottom: 24px; left: 0; right: 0; height: calc(100% - 24px); display: flex; align-items: flex-end; gap: 8px; padding: 0 4px; }
.mu-sd .bar-wrap { flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.mu-sd .bar { flex: 1; border-radius: 3px 3px 0 0; cursor: pointer; animation: mu-sd-bar 0.6s cubic-bezier(0.23,1,0.32,1) both; }
.mu-sd .bar.primary { background: var(--mu-sd-accent); opacity: 0.9; } .mu-sd .bar.secondary { background: var(--mu-sd-border-mid); }
@keyframes mu-sd-bar { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }
.mu-sd .x-labels { position: absolute; bottom: 0; left: 0; right: 0; display: flex; gap: 8px; padding: 0 4px; }
.mu-sd .x-label { flex: 1; font-family: var(--mu-sd-mono); font-size: 9px; color: var(--mu-sd-text-dim); text-align: center; }
.mu-sd .activity-item { display: flex; align-items: center; gap: 12px; padding: 11px 22px; border-bottom: 1px solid var(--mu-sd-border); cursor: pointer; }
.mu-sd .activity-item:last-child { border-bottom: none; }
.mu-sd .activity-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.mu-sd .activity-icon.green { background: rgba(200,255,0,0.1); } .mu-sd .activity-icon.blue { background: rgba(68,153,255,0.1); } .mu-sd .activity-icon.red { background: rgba(255,68,68,0.1); }
.mu-sd .activity-text { flex: 1; min-width: 0; }
.mu-sd .activity-name { font-size: 12.5px; font-weight: 500; }
.mu-sd .activity-time { font-family: var(--mu-sd-mono); font-size: 10px; color: var(--mu-sd-text-dim); margin-top: 1px; }
.mu-sd .activity-amount { font-family: var(--mu-sd-mono); font-size: 12px; font-weight: 500; }
.mu-sd .activity-amount.pos { color: var(--mu-sd-accent); } .mu-sd .activity-amount.neg { color: var(--mu-sd-red); }
.mu-sd .activity-amount-blue { color: var(--mu-sd-blue); } .mu-sd .activity-amount-dim { color: var(--mu-sd-text-dim); }
.mu-sd .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mu-sd-accent); animation: mu-sd-pulse 2s infinite; }
.mu-sd .live-dot-inline { margin-left: 10px; }
@keyframes mu-sd-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }
.mu-sd .table-section { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mu-sd table { width: 100%; border-collapse: collapse; }
.mu-sd th { font-family: var(--mu-sd-mono); font-size: 9px; letter-spacing: 0.15em; color: var(--mu-sd-text-dim); text-transform: uppercase; padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--mu-sd-border); }
.mu-sd td { padding: 11px 14px; font-size: 12.5px; border-bottom: 1px solid var(--mu-sd-border); color: var(--mu-sd-text-secondary); }
.mu-sd tr:last-child td { border-bottom: none; }
.mu-sd .td-strong { color: var(--mu-sd-text-primary); font-weight: 500; }
.mu-sd .td-accent { color: var(--mu-sd-accent); }
.mu-sd .status-pill { font-family: var(--mu-sd-mono); font-size: 9px; padding: 3px 8px; border-radius: 20px; }
.mu-sd .status-pill.active { background: rgba(200,255,0,0.12); color: var(--mu-sd-accent); }
.mu-sd .status-pill.paused { background: rgba(255,255,255,0.06); color: var(--mu-sd-text-dim); }
.mu-sd .status-pill.error { background: rgba(255,68,68,0.1); color: var(--mu-sd-red); }
.mu-sd .progress-bar { width: 80px; height: 4px; background: var(--mu-sd-border-mid); border-radius: 2px; overflow: hidden; }
.mu-sd .progress-fill { height: 100%; background: var(--mu-sd-accent); border-radius: 2px; }
.mu-sd .progress-fill[data-progress="0"] { width: 0%; }
.mu-sd .progress-fill[data-progress="31"] { width: 31%; }
.mu-sd .progress-fill[data-progress="58"] { width: 58%; }
.mu-sd .progress-fill[data-progress="82"] { width: 82%; }
.mu-sd .donut-group { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.mu-sd .donut-row { display: flex; align-items: center; gap: 14px; }
.mu-sd .donut-label { flex: 1; font-size: 12.5px; color: var(--mu-sd-text-secondary); }
.mu-sd .donut-val { font-family: var(--mu-sd-mono); font-size: 12px; color: var(--mu-sd-text-primary); font-weight: 500; }
.mu-sd .mini-bar { flex: 1; height: 3px; background: var(--mu-sd-border-mid); border-radius: 2px; overflow: hidden; margin: 0 8px; }
.mu-sd .mini-fill { height: 100%; border-radius: 2px; }
.mu-sd .mini-fill-accent { background: var(--mu-sd-accent); } .mu-sd .mini-fill-blue { background: var(--mu-sd-blue); }
.mu-sd .mini-fill-grey { background: #888; } .mu-sd .mini-fill-mid { background: #555; } .mu-sd .mini-fill-dim { background: #333; }
.mu-sd .mini-fill[data-w="9"] { width: 9%; } .mu-sd .mini-fill[data-w="15"] { width: 15%; } .mu-sd .mini-fill[data-w="24"] { width: 24%; }
.mu-sd .mini-fill[data-w="42"] { width: 42%; } .mu-sd .mini-fill[data-w="68"] { width: 68%; }
.mu-sd .donut-footer { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--mu-sd-border); display: flex; justify-content: space-between; align-items: center; }
.mu-sd .donut-foot-label { font-family: var(--mu-sd-mono); font-size: 10px; color: var(--mu-sd-text-dim); }
.mu-sd .donut-foot-val { font-family: var(--mu-sd-mono); font-size: 14px; color: var(--mu-sd-text-primary); font-weight: 500; }
.mu-sd .main::-webkit-scrollbar { width: 4px; } .mu-sd .main::-webkit-scrollbar-thumb { background: var(--mu-sd-border-mid); border-radius: 2px; }
@media (max-width: 900px) {
.mu-sd { flex-direction: column; }
.mu-sd .sidebar { width: 100%; min-width: 0; flex-direction: row; padding: 16px; overflow-x: auto; }
.mu-sd .nav-section, .mu-sd .sidebar-footer { padding: 0; margin: 0 12px 0 0; border: none; }
.mu-sd .kpi-row { grid-template-columns: 1fr 1fr; }
.mu-sd .chart-section, .mu-sd .table-section { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.mu-sd .kpi-value, .mu-sd .bar, .mu-sd .live-dot { animation: none !important; }
}
```
**JS:**
```js
(() => {
// Scoped chart builder — finds the bars container inside .mu-sd only,
// so multiple instances can render on one page without colliding on
// an element id.
const root = document.querySelector('.mu-sd');
if (!root) return;
const bars = root.querySelector('[data-mu-sd-bars]');
const xlabels = root.querySelector('[data-mu-sd-xlabels]');
if (!bars || !xlabels || bars.childElementCount > 0) return;
const data = [
{ label: 'Mon', a: 55, b: 30 },
{ label: 'Tue', a: 70, b: 25 },
{ label: 'Wed', a: 45, b: 40 },
{ label: 'Thu', a: 80, b: 20 },
{ label: 'Fri', a: 65, b: 35 },
{ label: 'Sat', a: 90, b: 15 },
{ label: 'Sun', a: 60, b: 45 },
];
data.forEach((d, i) => {
const wrap = document.createElement('div');
wrap.className = 'bar-wrap';
const b1 = document.createElement('div');
b1.className = 'bar primary';
b1.style.height = d.a + '%';
b1.style.animationDelay = (i * 0.07 + 0.3) + 's';
const b2 = document.createElement('div');
b2.className = 'bar secondary';
b2.style.height = d.b + '%';
b2.style.animationDelay = (i * 0.07 + 0.4) + 's';
wrap.append(b1, b2);
bars.appendChild(wrap);
const lbl = document.createElement('div');
lbl.className = 'x-label';
lbl.textContent = d.label;
xlabels.appendChild(lbl);
});
})();
```
### 02. Maison Elara Storefront
**Type:** Pure CSS
**Description:** A minimalist luxury e-commerce storefront UI in cream + deep ink with a Florentine fashion-house aesthetic — proving that high-end retail layouts work best when whitespace, typography hierarchy, and product photography do all the talking. Split-screen hero with a full-bleed dark left panel (oversized ghost-text "SS" letterform, gold-accented eyebrow, Cormorant Garamond display headline with italic accent, gold CTA), a composed SVG product silhouette on the right with hero badge + price tag, a scrolling marquee bar with five service propositions, a 3-column product grid with hover quick-add reveals + color-dot swatches + "−15%" sale tag, and an editorial "atelier" feature strip with three numbered principles framed by a giant ghost serif word. Typography: Cormorant Garamond + Jost. Best for luxury fashion e-commerce, premium retail storefronts, jewellery brands, perfume houses, boutique hotel landing pages.
**HTML:**
```html
New Arrivals
Collections
Maison
Editorials
Maison Elara
Search
Account
Cart
3
SS
Spring / Summer 2025 — Exclusive Debut
The Art of Quiet Luxury
Sculpted in the finest Florentine calfskin. Each piece is an architecture of restraint — where silence becomes the loudest statement.
Explore Collection
View Lookbook
Handcrafted in Florence Free Express Shipping Complimentary Gift Wrapping Lifetime Authenticity Guarantee Made-to-Order Available
Handcrafted in Florence Free Express Shipping Complimentary Gift Wrapping Lifetime Authenticity Guarantee Made-to-Order Available
New
Alma Tote
Full-grain calfskin · Almond
Nox Clutch
Patent leather · Noir
−15%
Serene Hobo
Woven raffia & leather · Sand
Craft
The Atelier
Where Time Stands Still
Every stitch is placed by hands that have spent decades learning the language of leather. This is not production. This is devotion.
01 —
Florentine Mastery
Our artisans train for a minimum of seven years before crafting a single Maison Elara piece. The result is an object that outlives trends.
02 —
Materials Without Compromise
We source exclusively from tanneries that have operated for over a century, selecting only the top 3% of each hide for its texture and patina.
03 —
A Promise of Permanence
Every piece comes with our lifetime restoration service — ensuring your Maison Elara companion ages into something even more extraordinary.
```
**CSS:**
```css
/* ─── 02 Maison Elara — minimalist luxury e-commerce UI ────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Jost:wght@300;400;500&display=swap');
.mu-ec {
--mu-ec-cream: #f5f0e8;
--mu-ec-cream-dark: #ede6d8;
--mu-ec-ink: #1a1714;
--mu-ec-ink-mid: #6b6560;
--mu-ec-ink-light: #b8b2aa;
--mu-ec-gold: #c9a84c;
--mu-ec-gold-light: #e8d5a0;
--mu-ec-white: #fefcf8;
--mu-ec-serif: 'Cormorant Garamond', serif;
--mu-ec-sans: 'Jost', sans-serif;
position: relative;
width: 100%;
min-height: 1400px;
background: var(--mu-ec-cream);
color: var(--mu-ec-ink);
font-family: var(--mu-ec-sans);
overflow-x: hidden;
box-sizing: border-box;
}
.mu-ec *, .mu-ec *::before, .mu-ec *::after { box-sizing: border-box; margin: 0; padding: 0; }
.mu-ec nav { position: sticky; top: 0; z-index: 10; background: var(--mu-ec-cream); border-bottom: 1px solid var(--mu-ec-cream-dark); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 48px; height: 64px; }
.mu-ec .nav-links { display: flex; gap: 36px; align-items: center; }
.mu-ec .nav-link { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mu-ec-ink-mid); text-decoration: none; font-weight: 400; transition: color 0.2s; cursor: pointer; }
.mu-ec .nav-link:hover, .mu-ec .nav-link.active { color: var(--mu-ec-ink); }
.mu-ec .brand { font-family: var(--mu-ec-serif); font-size: 22px; font-weight: 300; letter-spacing: 0.1em; text-align: center; font-style: italic; }
.mu-ec .nav-actions { display: flex; gap: 28px; align-items: center; justify-content: flex-end; }
.mu-ec .nav-icon { font-size: 13px; letter-spacing: 0.1em; color: var(--mu-ec-ink-mid); cursor: pointer; transition: color 0.2s; position: relative; }
.mu-ec .nav-icon:hover { color: var(--mu-ec-ink); }
.mu-ec .nav-icon-cart { position: relative; }
.mu-ec .cart-count { position: absolute; top: -6px; right: -8px; width: 14px; height: 14px; background: var(--mu-ec-ink); color: var(--mu-ec-cream); border-radius: 50%; font-size: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--mu-ec-sans); }
.mu-ec .hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 640px; }
.mu-ec .hero-left { background: var(--mu-ec-ink); display: flex; flex-direction: column; justify-content: flex-end; padding: 64px; position: relative; overflow: hidden; }
.mu-ec .hero-bg-text { position: absolute; top: -20px; left: -10px; font-family: var(--mu-ec-serif); font-size: 260px; font-weight: 300; color: rgba(255,255,255,0.03); line-height: 1; user-select: none; letter-spacing: -0.04em; }
.mu-ec .hero-season { font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--mu-ec-gold); margin-bottom: 24px; animation: mu-ec-fadeup 0.8s ease 0.1s both; }
.mu-ec .hero-title { font-family: var(--mu-ec-serif); font-size: 72px; font-weight: 300; color: var(--mu-ec-white); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 20px; animation: mu-ec-fadeup 0.8s ease 0.2s both; }
.mu-ec .hero-title em { font-style: italic; color: var(--mu-ec-gold-light); }
.mu-ec .hero-desc { font-size: 13px; color: var(--mu-ec-ink-light); line-height: 1.8; max-width: 340px; margin-bottom: 40px; font-weight: 300; animation: mu-ec-fadeup 0.8s ease 0.35s both; }
.mu-ec .hero-cta-group { display: flex; gap: 16px; align-items: center; animation: mu-ec-fadeup 0.8s ease 0.5s both; }
.mu-ec .btn-primary { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; background: var(--mu-ec-gold); color: var(--mu-ec-ink); padding: 14px 32px; border: none; cursor: pointer; font-family: var(--mu-ec-sans); font-weight: 500; transition: all 0.3s; }
.mu-ec .btn-primary:hover { background: var(--mu-ec-gold-light); }
.mu-ec .btn-ghost { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; background: transparent; color: var(--mu-ec-white); padding: 14px 32px; border: 1px solid rgba(255,255,255,0.2); cursor: pointer; font-family: var(--mu-ec-sans); font-weight: 400; transition: all 0.3s; }
.mu-ec .btn-ghost:hover { border-color: rgba(255,255,255,0.5); }
.mu-ec .hero-scroll { display: flex; align-items: center; gap: 12px; margin-top: 56px; }
.mu-ec .scroll-line { width: 40px; height: 1px; background: rgba(255,255,255,0.2); }
.mu-ec .scroll-txt { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.3); }
@keyframes mu-ec-fadeup { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.mu-ec .hero-right { background: var(--mu-ec-cream-dark); position: relative; overflow: hidden; }
.mu-ec .hero-img-area { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg,#e8e0d0 0%,#d5c9b5 100%); position: relative; min-height: 480px; }
.mu-ec .hero-product-svg { filter: drop-shadow(40px 40px 60px rgba(0,0,0,0.2)); }
.mu-ec .hero-badge { position: absolute; top: 48px; right: 48px; width: 80px; height: 80px; border-radius: 50%; background: var(--mu-ec-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.mu-ec .badge-line1 { font-family: var(--mu-ec-serif); font-size: 10px; color: var(--mu-ec-gold); font-style: italic; }
.mu-ec .badge-line2 { font-size: 8px; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); text-transform: uppercase; }
.mu-ec .hero-price-tag { position: absolute; bottom: 48px; left: 48px; background: var(--mu-ec-white); padding: 14px 20px; }
.mu-ec .price-label { font-size: 9px; letter-spacing: 0.2em; color: var(--mu-ec-ink-light); text-transform: uppercase; margin-bottom: 4px; }
.mu-ec .price-value { font-family: var(--mu-ec-serif); font-size: 28px; font-weight: 300; color: var(--mu-ec-ink); }
.mu-ec .marquee-bar { background: var(--mu-ec-ink); color: var(--mu-ec-cream); padding: 12px 0; overflow: hidden; border-top: 1px solid #2a2420; border-bottom: 1px solid #2a2420; }
.mu-ec .marquee-track { display: flex; gap: 0; animation: mu-ec-marquee 25s linear infinite; width: max-content; }
.mu-ec .marquee-item { font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; padding: 0 48px; color: var(--mu-ec-ink-light); display: flex; align-items: center; gap: 48px; }
.mu-ec .marquee-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--mu-ec-gold); flex-shrink: 0; }
@keyframes mu-ec-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.mu-ec .section-header { display: flex; align-items: flex-end; justify-content: space-between; padding: 64px 64px 40px; }
.mu-ec .section-eyebrow { font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--mu-ec-gold); margin-bottom: 10px; }
.mu-ec .section-title { font-family: var(--mu-ec-serif); font-size: 42px; font-weight: 300; line-height: 1.1; }
.mu-ec .section-title em { font-style: italic; }
.mu-ec .section-link { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--mu-ec-ink-mid); text-decoration: none; border-bottom: 1px solid var(--mu-ec-ink-light); padding-bottom: 2px; cursor: pointer; transition: all 0.2s; }
.mu-ec .section-link:hover { color: var(--mu-ec-ink); border-color: var(--mu-ec-ink); }
.mu-ec .products-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; padding: 0 64px 64px; }
.mu-ec .product-card { background: var(--mu-ec-white); cursor: pointer; position: relative; overflow: hidden; }
.mu-ec .product-card:hover .product-img-wrap::after { opacity: 1; }
.mu-ec .product-card:hover .product-quick { opacity: 1; transform: translateY(0); }
.mu-ec .product-img-wrap { aspect-ratio: 3/4; background: linear-gradient(145deg,#ede6d8,#d8cdb8); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.mu-ec .product-img-wrap.product-img-noir { background: linear-gradient(145deg,#1e1c19,#2a2620); }
.mu-ec .product-img-wrap.product-img-sand { background: linear-gradient(145deg,#f0e8dc,#e0d4c0); }
.mu-ec .product-img-wrap::after { content: ''; position: absolute; inset: 0; background: rgba(26,23,20,0.1); opacity: 0; transition: opacity 0.3s; }
.mu-ec .product-quick { position: absolute; bottom: 0; left: 0; right: 0; background: var(--mu-ec-ink); color: var(--mu-ec-cream); padding: 14px; text-align: center; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0; transform: translateY(100%); transition: all 0.3s cubic-bezier(0.23,1,0.32,1); z-index: 2; cursor: pointer; }
.mu-ec .product-info { padding: 20px 22px 22px; }
.mu-ec .product-name { font-family: var(--mu-ec-serif); font-size: 18px; font-weight: 300; margin-bottom: 4px; }
.mu-ec .product-sub { font-size: 11px; color: var(--mu-ec-ink-light); letter-spacing: 0.05em; margin-bottom: 12px; }
.mu-ec .product-footer { display: flex; align-items: center; justify-content: space-between; }
.mu-ec .product-price { font-family: var(--mu-ec-serif); font-size: 22px; font-weight: 300; }
.mu-ec .price-strike { font-size: 14px; color: var(--mu-ec-ink-light); text-decoration: line-through; }
.mu-ec .product-colors { display: flex; gap: 6px; }
.mu-ec .color-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.1); cursor: pointer; }
.mu-ec .color-almond { background: #c4b090; } .mu-ec .color-noir { background: #1a1714; }
.mu-ec .color-bordeaux { background: #8b2020; } .mu-ec .color-cognac { background: #4a3020; }
.mu-ec .color-sand { background: #d4c4a8; } .mu-ec .color-bronze { background: #8a7050; }
.mu-ec .product-tag { position: absolute; top: 16px; left: 16px; font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; padding: 4px 10px; z-index: 3; }
.mu-ec .product-tag.new { background: var(--mu-ec-ink); color: var(--mu-ec-cream); }
.mu-ec .product-tag.sale { background: var(--mu-ec-gold); color: var(--mu-ec-ink); }
.mu-ec .editorial { display: grid; grid-template-columns: 1fr 1fr; margin: 0 64px 64px; border: 1px solid var(--mu-ec-cream-dark); }
.mu-ec .editorial-img { background: linear-gradient(145deg,var(--mu-ec-ink) 0%,#3a3028 100%); position: relative; overflow: hidden; padding: 64px; display: flex; flex-direction: column; justify-content: flex-end; }
.mu-ec .editorial-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: 0.06; font-family: var(--mu-ec-serif); font-size: 180px; font-weight: 300; color: var(--mu-ec-cream); display: flex; align-items: center; justify-content: center; letter-spacing: -0.05em; }
.mu-ec .editorial-eyebrow { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--mu-ec-gold); margin-bottom: 16px; }
.mu-ec .editorial-headline { font-family: var(--mu-ec-serif); font-size: 40px; font-weight: 300; color: var(--mu-ec-white); line-height: 1.15; margin-bottom: 16px; }
.mu-ec .editorial-headline em { font-style: italic; color: var(--mu-ec-gold-light); }
.mu-ec .editorial-body { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.8; max-width: 320px; font-weight: 300; }
.mu-ec .editorial-content { padding: 64px; display: flex; flex-direction: column; justify-content: center; gap: 36px; }
.mu-ec .editorial-feature { padding-bottom: 28px; border-bottom: 1px solid var(--mu-ec-cream-dark); }
.mu-ec .editorial-feature:last-child { border-bottom: none; padding-bottom: 0; }
.mu-ec .feature-num { font-family: var(--mu-ec-serif); font-size: 13px; color: var(--mu-ec-gold); margin-bottom: 8px; }
.mu-ec .feature-title { font-family: var(--mu-ec-serif); font-size: 22px; font-weight: 300; margin-bottom: 8px; }
.mu-ec .feature-text { font-size: 12px; color: var(--mu-ec-ink-mid); line-height: 1.8; font-weight: 300; }
.mu-ec .footer-strip { background: var(--mu-ec-ink); padding: 36px 64px; display: flex; align-items: center; justify-content: space-between; }
.mu-ec .footer-brand { font-family: var(--mu-ec-serif); font-size: 24px; font-weight: 300; color: var(--mu-ec-cream); font-style: italic; }
.mu-ec .footer-note { font-size: 10px; letter-spacing: 0.15em; color: var(--mu-ec-ink-light); text-transform: uppercase; }
.mu-ec .footer-links { display: flex; gap: 32px; }
.mu-ec .footer-link { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--mu-ec-ink-light); cursor: pointer; transition: color 0.2s; }
.mu-ec .footer-link:hover { color: var(--mu-ec-cream); }
@media (max-width: 900px) {
.mu-ec nav { padding: 0 24px; grid-template-columns: 1fr; height: auto; padding-bottom: 12px; padding-top: 12px; }
.mu-ec .nav-links, .mu-ec .nav-actions { display: none; }
.mu-ec .hero { grid-template-columns: 1fr; }
.mu-ec .hero-left { padding: 40px 32px; }
.mu-ec .hero-title { font-size: 48px; }
.mu-ec .products-grid { grid-template-columns: 1fr; padding: 0 24px 40px; }
.mu-ec .editorial { grid-template-columns: 1fr; margin: 0 24px 40px; }
.mu-ec .editorial-img, .mu-ec .editorial-content { padding: 40px 32px; }
.mu-ec .section-header { padding: 40px 24px 24px; flex-direction: column; gap: 16px; align-items: flex-start; }
.mu-ec .footer-strip { padding: 24px; flex-direction: column; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
.mu-ec .marquee-track, .mu-ec .hero-season, .mu-ec .hero-title, .mu-ec .hero-desc, .mu-ec .hero-cta-group { animation: none !important; }
}
```
### 03. Vera Lindstrom Portfolio
**Type:** CSS + JS
**Description:** A brutalist-white minimalist portfolio UI for a Stockholm-based art director — a gallery-wall approach where the interface disappears so the creative work takes center stage. Sticky header with serif name + uppercase nav + green-dotted availability status, a giant typographic index letter "V" sitting half-revealed behind a Playfair Display hero headline (Visual / *Architect* / & Director), a numbered "Selected Work" project list where each row slides a cream fill in from the left on hover with a 45-degree rotating arrow and per-project SVG color preview card that follows the cursor, a two-column "About / Disciplines" strip with a numbered service index, and a giant italic contact email that animates letter-spacing on hover. Typography pairs Playfair Display (display) with IBM Plex Sans (UI). Best for designer portfolios, photographer sites, architect studios, art director landing pages, creative agency homepages.
**HTML:**
```html
V
VisualArchitect & Director
001
Maison Collective
Brand Identity
·
Art Direction
002
Aether Digital
Product UI
·
Design System
003
Forma Architecture
Photography
·
Editorial
004
Norde Finance
Motion
·
Campaign
005
Lune Editorial
Publication
·
Typography
About the Practice
Design that trusts the void
With fifteen years across Stockholm, London, and Tokyo, I've learned that the most memorable work is often the most restrained. I collaborate with founders, cultural institutions, and agencies to craft visual systems that hold their integrity across every surface.
Disciplines
— Brand Identity & Systems Strategy · Visual
— Digital Product Design UI · UX · Prototyping
— Art Direction Photo · Film · Print
— Editorial Design Books · Magazines
— Motion & Campaign Digital · Out-of-home
```
**CSS:**
```css
/* ─── 03 Vera Lindström — minimalist creative portfolio UI ─────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=IBM+Plex+Sans:wght@300;400&display=swap');
.mu-pf {
--mu-pf-white: #fafafa;
--mu-pf-off: #f2f0ec;
--mu-pf-ink: #0f0f0f;
--mu-pf-mid: #888;
--mu-pf-light: #ccc;
--mu-pf-rule: #e8e4de;
--mu-pf-serif: 'Playfair Display', serif;
--mu-pf-sans: 'IBM Plex Sans', sans-serif;
position: relative;
width: 100%;
min-height: 1400px;
background: var(--mu-pf-white);
color: var(--mu-pf-ink);
font-family: var(--mu-pf-sans);
overflow-x: hidden;
box-sizing: border-box;
}
.mu-pf *, .mu-pf *::before, .mu-pf *::after { box-sizing: border-box; margin: 0; padding: 0; }
.mu-pf .header { position: sticky; top: 0; z-index: 10; background: var(--mu-pf-white); display: flex; align-items: center; justify-content: space-between; padding: 28px 56px; }
.mu-pf .h-name { font-family: var(--mu-pf-serif); font-size: 18px; font-weight: 400; letter-spacing: 0.02em; }
.mu-pf .h-nav { display: flex; gap: 36px; }
.mu-pf .h-nav a { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mu-pf-mid); text-decoration: none; transition: color 0.2s; }
.mu-pf .h-nav a:hover { color: var(--mu-pf-ink); }
.mu-pf .h-status { font-size: 11px; letter-spacing: 0.12em; color: var(--mu-pf-mid); display: flex; align-items: center; gap: 8px; }
.mu-pf .status-dot { width: 6px; height: 6px; border-radius: 50%; background: #4caf50; animation: mu-pf-blink 2s infinite; }
@keyframes mu-pf-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.mu-pf .hero { min-height: 540px; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 56px 64px; position: relative; }
.mu-pf .hero-index { position: absolute; top: 50%; left: 56px; transform: translateY(-50%); font-family: var(--mu-pf-serif); font-size: clamp(160px,18vw,260px); font-weight: 900; color: var(--mu-pf-off); line-height: 1; letter-spacing: -0.05em; user-select: none; pointer-events: none; }
.mu-pf .hero-text { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto; align-items: flex-end; gap: 64px; padding-top: 180px; }
.mu-pf .hero-title { font-family: var(--mu-pf-serif); font-size: clamp(52px,7vw,96px); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; animation: mu-pf-fadein 1s ease 0.2s both; }
.mu-pf .hero-title em { font-style: italic; font-weight: 400; }
.mu-pf .hero-meta { text-align: right; max-width: 260px; animation: mu-pf-fadein 1s ease 0.4s both; }
.mu-pf .hero-role { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mu-pf-mid); margin-bottom: 14px; }
.mu-pf .hero-desc { font-size: 13px; line-height: 1.8; color: var(--mu-pf-mid); font-weight: 300; }
.mu-pf .hero-scroll-indicator { display: flex; flex-direction: column; align-items: center; gap: 8px; position: absolute; right: 56px; bottom: 64px; }
.mu-pf .scroll-v-line { width: 1px; height: 60px; background: var(--mu-pf-light); animation: mu-pf-scrollline 2s ease infinite; }
@keyframes mu-pf-scrollline { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.mu-pf .scroll-v-txt { font-size: 9px; letter-spacing: 0.2em; color: var(--mu-pf-light); text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); }
@keyframes mu-pf-fadein { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.mu-pf .work-section { padding: 0 56px 120px; }
.mu-pf .section-rule { display: flex; align-items: center; gap: 24px; padding: 64px 0 48px; }
.mu-pf .rule-num { font-family: var(--mu-pf-serif); font-size: 11px; color: var(--mu-pf-mid); font-style: italic; }
.mu-pf .rule-line { flex: 1; height: 1px; background: var(--mu-pf-light); }
.mu-pf .rule-label { font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--mu-pf-mid); }
.mu-pf .project-list { display: flex; flex-direction: column; gap: 0; }
.mu-pf .project-item { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--mu-pf-rule); cursor: pointer; position: relative; overflow: hidden; transition: padding 0.3s ease; }
.mu-pf .project-item:first-child { border-top: 1px solid var(--mu-pf-rule); }
.mu-pf .project-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--mu-pf-off); z-index: 0; transition: width 0.4s cubic-bezier(0.23,1,0.32,1); }
.mu-pf .project-item:hover::before { width: 100%; }
.mu-pf .project-item:hover { padding-left: 24px; }
.mu-pf .project-item:hover .project-title { letter-spacing: 0.01em; }
.mu-pf .project-num { font-family: var(--mu-pf-serif); font-size: 13px; color: var(--mu-pf-light); font-style: italic; position: relative; z-index: 1; }
.mu-pf .project-info { position: relative; z-index: 1; }
.mu-pf .project-title { font-family: var(--mu-pf-serif); font-size: clamp(24px,3.5vw,42px); font-weight: 400; line-height: 1.1; transition: letter-spacing 0.3s; }
.mu-pf .project-tags { display: flex; gap: 12px; margin-top: 6px; }
.mu-pf .tag { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mu-pf-mid); }
.mu-pf .project-right { display: flex; align-items: center; gap: 32px; position: relative; z-index: 1; }
.mu-pf .project-year { font-size: 12px; color: var(--mu-pf-mid); font-family: var(--mu-pf-sans); }
.mu-pf .project-arrow { width: 44px; height: 44px; border: 1px solid var(--mu-pf-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--mu-pf-mid); transition: all 0.3s; }
.mu-pf .project-item:hover .project-arrow { background: var(--mu-pf-ink); border-color: var(--mu-pf-ink); color: var(--mu-pf-white); transform: rotate(45deg); }
/* Hover SVG preview — positioned absolute inside the wrapper, follows
the mouse via offsetX/offsetY computed against the wrapper. */
.mu-pf .preview-img { position: absolute; pointer-events: none; z-index: 50; width: 320px; height: 220px; opacity: 0; transform: translateY(10px) rotate(-2deg); transition: opacity 0.3s, transform 0.3s; border-radius: 2px; overflow: hidden; top: 0; left: 0; }
.mu-pf .preview-img.visible { opacity: 1; transform: translateY(0) rotate(-1deg); }
.mu-pf .about-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 56px; border-top: 1px solid var(--mu-pf-rule); padding: 80px 0; }
.mu-pf .about-left { padding-right: 80px; border-right: 1px solid var(--mu-pf-rule); }
.mu-pf .about-right { padding-left: 80px; }
.mu-pf .about-eyebrow { font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--mu-pf-mid); margin-bottom: 20px; }
.mu-pf .about-title { font-family: var(--mu-pf-serif); font-size: clamp(32px,4vw,52px); font-weight: 400; line-height: 1.15; margin-bottom: 24px; }
.mu-pf .about-title em { font-style: italic; }
.mu-pf .about-body { font-size: 13.5px; line-height: 1.9; color: var(--mu-pf-mid); font-weight: 300; max-width: 400px; }
.mu-pf .services-list { display: flex; flex-direction: column; gap: 16px; }
.mu-pf .service-item { display: flex; align-items: baseline; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid #ece8e2; }
.mu-pf .service-item:last-child { border-bottom: none; padding-bottom: 0; }
.mu-pf .svc-num { font-family: var(--mu-pf-serif); font-size: 11px; color: var(--mu-pf-light); font-style: italic; min-width: 24px; }
.mu-pf .svc-name { font-size: 14px; font-weight: 400; }
.mu-pf .svc-type { margin-left: auto; font-size: 10px; letter-spacing: 0.1em; color: var(--mu-pf-mid); }
.mu-pf .contact-section { padding: 80px 56px; text-align: center; border-top: 1px solid var(--mu-pf-rule); }
.mu-pf .contact-label { font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--mu-pf-mid); margin-bottom: 24px; }
.mu-pf .contact-email { font-family: var(--mu-pf-serif); font-size: clamp(36px,6vw,80px); font-weight: 400; font-style: italic; text-decoration: none; color: var(--mu-pf-ink); display: inline-block; transition: letter-spacing 0.4s; }
.mu-pf .contact-email:hover { letter-spacing: 0.02em; }
.mu-pf .contact-links { display: flex; justify-content: center; gap: 40px; margin-top: 40px; }
.mu-pf .contact-link { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mu-pf-mid); text-decoration: none; transition: color 0.2s; }
.mu-pf .contact-link:hover { color: var(--mu-pf-ink); }
.mu-pf .footer { display: flex; justify-content: space-between; align-items: center; padding: 28px 56px; border-top: 1px solid var(--mu-pf-rule); }
.mu-pf .footer span { font-size: 11px; color: var(--mu-pf-mid); }
@media (max-width: 760px) {
.mu-pf .header, .mu-pf .hero, .mu-pf .work-section, .mu-pf .contact-section, .mu-pf .footer { padding-left: 24px; padding-right: 24px; }
.mu-pf .h-nav { display: none; }
.mu-pf .hero-text { grid-template-columns: 1fr; gap: 32px; }
.mu-pf .hero-meta { text-align: left; }
.mu-pf .hero-scroll-indicator { display: none; }
.mu-pf .about-strip { grid-template-columns: 1fr; margin: 0 24px; }
.mu-pf .about-left { padding-right: 0; border-right: none; border-bottom: 1px solid var(--mu-pf-rule); padding-bottom: 48px; margin-bottom: 48px; }
.mu-pf .about-right { padding-left: 0; }
.mu-pf .footer { flex-direction: column; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
.mu-pf .status-dot, .mu-pf .scroll-v-line, .mu-pf .hero-title, .mu-pf .hero-meta { animation: none !important; }
.mu-pf .project-item, .mu-pf .project-arrow, .mu-pf .preview-img { transition: none !important; }
}
```
**JS:**
```js
(() => {
// Scoped portfolio interactions. Drops the source mock's full-viewport
// mix-blend-mode cursor (which would look broken inside an embedded
// card) and keeps the hover-triggered SVG project preview that's the
// actual differentiator. The preview is positioned via offsetX/offsetY
// against the wrapper element so two demos can coexist on a page.
const root = document.querySelector('.mu-pf');
if (!root) return;
const preview = root.querySelector('[data-mu-pf-preview]');
const previewSvg = root.querySelector('[data-mu-pf-preview-svg]');
if (!preview || !previewSvg) return;
// Mouse position relative to the wrapper (not viewport), so the preview
// floats correctly regardless of scroll position.
root.addEventListener('mousemove', (e) => {
const r = root.getBoundingClientRect();
const x = e.clientX - r.left;
const y = e.clientY - r.top;
preview.style.left = (x + 24) + 'px';
preview.style.top = (y - 100) + 'px';
});
const items = root.querySelectorAll('.project-item');
items.forEach((item, i) => {
item.addEventListener('mouseenter', () => {
preview.classList.add('visible');
const c1 = item.dataset.color || '#1a1714';
const c2 = item.dataset.color2 || '#3a3028';
const c3 = item.dataset.accent || '#c8ff00';
previewSvg.innerHTML =
'' +
'' +
' ' +
' ' +
' ' +
' ' +
' ' +
' ' +
' ' +
'' + String(i + 1).padStart(3, '0') + ' ' +
' ';
});
item.addEventListener('mouseleave', () => {
preview.classList.remove('visible');
});
});
})();
```
### 04. Ledger News
**Type:** CSS + JS
**Description:** A minimalist editorial UI built like a broadsheet newspaper — proving that text-heavy content websites work best when typography hierarchy and reading rhythm carry the design. Dark dateline top bar with international editions, a centered serif masthead with tagline + section navigation (World / Economy / Technology / Science / Culture / Opinion / Data / Archive), a true 3-column editorial grid with column-rule dividers, drop-cap lead paragraph + breaking news callout box, a 4-up "In Depth" card grid with category eyebrows and aspect-ratio image placeholders, an Opinion + By the Numbers split with a giant italic pull-quote and a five-row data bar chart, an inverted dark Newsletter bar, and a scoped reading-progress indicator at the wrapper top that animates as you scroll the wrapper. Typography pairs Libre Baskerville (serif) with Source Sans 3 (UI). Best for news websites, blog sites, online magazines, content-heavy editorial layouts, Substack-style publications, wiki-style reading apps.
**HTML:**
```html
Thursday, May 28, 2026 · Vol. CXLII · No. 118
International
Americas
Europe
Asia-Pacific
Economy
Central Banks Signal Coordinated Rate Pause Through Q3
Officials from six major economies signalled willingness to hold current rates as inflation data converges toward target bands for the first time since 2021.
By A. Chen · 4 min read
Technology
Open Source AI Models Outperform Proprietary Rivals on Key Benchmarks
A new evaluation framework from the Allen Institute reveals that openly licensed models have closed the performance gap in reasoning tasks by nearly 23 points.
By R. Okonkwo · 6 min read
Science
Ancient Ocean Current Reversal Reframes Paleoclimate Models
Sediment cores from the South Atlantic suggest that thermohaline circulation collapsed twice during the Holocene, forcing a revision of long-held warming assumptions.
By Dr. E. Vasquez · 8 min read
LEDGER
The new global order: contested spaces and the architecture of multilateral failure. · Ledger / Graphics Desk
World Affairs
The Fracture Lines of a Post-Western World Order
As the architecture of the postwar international system strains under the weight of competing hegemonies, historians and diplomats alike warn that the rules-based order may be entering its most consequential rupture since 1945.
By Prof. Mara Holloway · Analysis · May 28, 2026 · 18 min read
The system was never supposed to last forever. Built on the ruins of European empires and tempered by the cold arithmetic of nuclear deterrence, the institutions assembled at Bretton Woods and San Francisco were always products of a particular moment — and of particular power.
That moment, most analysts now agree, has passed. The question is no longer whether the liberal international order will survive the century, but what will replace it — and who will write the rules for whatever comes next.
The contest playing out across five continents is not merely geopolitical. It is epistemic. Rival conceptions of sovereignty, legitimacy, and the proper scope of international law are colliding in courtrooms, trading floors, and satellite networks simultaneously.
Culture
A Silence That Speaks: The Return of Slow Reading
Sales of long-form literary nonfiction have climbed 34% in two years as readers push back against the algorithmic fragment. Publishers are cautiously celebratory.
By F. Andersen · 5 min read
Breaking
UN Security Council Convenes Emergency Session Over Arctic Shipping Dispute
Norway, Russia, and Canada have submitted competing jurisdiction claims over newly navigable polar routes as ice coverage hits a 40-year low.
Developing story · Updated 12 min ago
Opinion
The Algorithm Doesn't Care About Your Attention — But You Should
Our media columnist on why the fight against engagement-driven content is ultimately a fight for cognitive sovereignty.
By D. Laurent · 7 min read
In Depth
More →
Economics
Shadow Banking's Quiet Comeback, Decade After the Crisis
Off-balance-sheet vehicles have returned to pre-2008 proportions, raising uncomfortable questions for regulators.
By T. Osei · 9 min read
Environment
Rewilding at Scale: The Nations Betting on Nature's Recovery
From the Scottish Highlands to the Paraguayan Chaco, a quiet ecological revolution is underway — with surprisingly bankable results.
By J. Petersen · 11 min read
Technology
Synthetic Biology Enters the Farm: A Reckoning With Risk
Lab-engineered microbes designed to fix nitrogen without fertiliser are moving toward commercial release. Not everyone is ready.
By Dr. C. Iyer · 14 min read
Politics
The Technocrats vs. The Populists: Europe's Governing Crisis
A new wave of election results across the continent is forcing a reckoning with the limits of expert-led government.
By A. Müller · 10 min read
Opinion All columns →
Democracy does not die in darkness alone — it also dies in the blinding light of too much noise, too quickly consumed.
Mara Holloway · Contributing Editor
Dispatch
From Geneva: The Treaties Nobody Talks About Anymore
Our Geneva correspondent on the slow death of humanitarian law by bureaucratic attrition and the NGOs fighting back.
By S. Bonnet · 8 min read
By the Numbers
Multilateral Treaties ↑ 55
The Ledger Brief
Analysis that earns the time you give it. Daily.
Subscribe
```
**CSS:**
```css
/* ─── 04 Ledger — minimalist broadsheet editorial / news UI ────── */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@300;400;600&display=swap');
.mu-ed {
--mu-ed-bg: #f8f6f2;
--mu-ed-white: #ffffff;
--mu-ed-ink: #111010;
--mu-ed-mid: #6a6560;
--mu-ed-dim: #b0aaa4;
--mu-ed-rule: #e0dbd4;
--mu-ed-accent: #c41e1e;
--mu-ed-accent-light: #fdf0f0;
--mu-ed-serif: 'Libre Baskerville', serif;
--mu-ed-sans: 'Source Sans 3', sans-serif;
position: relative;
width: 100%;
min-height: 1800px;
background: var(--mu-ed-bg);
color: var(--mu-ed-ink);
font-family: var(--mu-ed-sans);
line-height: 1.6;
overflow-x: hidden;
box-sizing: border-box;
}
.mu-ed *, .mu-ed *::before, .mu-ed *::after { box-sizing: border-box; margin: 0; padding: 0; }
.mu-ed .reading-progress { position: absolute; top: 0; left: 0; height: 2px; background: var(--mu-ed-accent); z-index: 200; width: 0; transition: width 0.1s; }
.mu-ed .top-bar { background: var(--mu-ed-ink); color: var(--mu-ed-bg); display: flex; align-items: center; justify-content: space-between; padding: 8px 40px; font-size: 11px; letter-spacing: 0.1em; }
.mu-ed .top-bar-date { color: rgba(255,255,255,0.5); }
.mu-ed .top-bar-editions { display: flex; gap: 20px; }
.mu-ed .top-bar-edition { color: rgba(255,255,255,0.5); cursor: pointer; transition: color 0.2s; }
.mu-ed .top-bar-edition:hover, .mu-ed .top-bar-edition.active { color: rgba(255,255,255,1); }
.mu-ed .masthead { text-align: center; padding: 40px 40px 0; border-bottom: 3px solid var(--mu-ed-ink); position: relative; }
.mu-ed .masthead-tagline { font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--mu-ed-mid); margin-bottom: 16px; }
.mu-ed .masthead-name { font-family: var(--mu-ed-serif); font-size: clamp(60px,8vw,120px); font-weight: 700; line-height: 0.9; letter-spacing: -0.03em; margin-bottom: 8px; }
.mu-ed .masthead-sub { font-size: 12px; letter-spacing: 0.1em; color: var(--mu-ed-mid); margin-bottom: 32px; }
.mu-ed .masthead-nav { display: flex; align-items: center; justify-content: center; gap: 0; border-top: 1px solid var(--mu-ed-rule); border-bottom: 1px solid var(--mu-ed-rule); margin: 0 -40px; }
.mu-ed .mnav-item { font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; padding: 12px 24px; cursor: pointer; color: var(--mu-ed-mid); transition: all 0.2s; border-right: 1px solid var(--mu-ed-rule); }
.mu-ed .mnav-item:first-child { border-left: 1px solid var(--mu-ed-rule); }
.mu-ed .mnav-item:hover, .mu-ed .mnav-item.active { color: var(--mu-ed-ink); background: var(--mu-ed-white); }
.mu-ed .mnav-item.active { font-weight: 600; }
.mu-ed .page-wrap { max-width: 1280px; margin: 0 auto; padding: 40px 40px; }
.mu-ed .feature-grid { display: grid; grid-template-columns: 1fr 2px 1.6fr 2px 1fr; gap: 0; margin-bottom: 48px; }
.mu-ed .col-rule { background: var(--mu-ed-rule); }
.mu-ed .feat-col { padding: 0 32px; }
.mu-ed .feat-col:first-child { padding-left: 0; }
.mu-ed .feat-col:last-child { padding-right: 0; }
.mu-ed .lead-cat { font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--mu-ed-accent); font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.mu-ed .lead-cat::after { content: ''; flex: 1; height: 1px; background: var(--mu-ed-accent); }
.mu-ed .lead-title { font-family: var(--mu-ed-serif); font-size: clamp(28px,3.5vw,44px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 16px; }
.mu-ed .lead-title em { font-style: italic; font-weight: 400; }
.mu-ed .lead-deck { font-family: var(--mu-ed-serif); font-size: 16px; font-weight: 400; font-style: italic; color: var(--mu-ed-mid); line-height: 1.6; margin-bottom: 16px; }
.mu-ed .lead-byline { font-size: 11px; letter-spacing: 0.1em; color: var(--mu-ed-dim); border-top: 1px solid var(--mu-ed-rule); padding-top: 10px; margin-bottom: 20px; }
.mu-ed .lead-byline strong { color: var(--mu-ed-ink); letter-spacing: 0.05em; }
.mu-ed .lead-body { font-size: 15px; line-height: 1.85; color: var(--mu-ed-mid); font-weight: 300; }
.mu-ed .lead-body p { margin-bottom: 14px; }
.mu-ed .lead-body p:first-child::first-letter { font-family: var(--mu-ed-serif); font-size: 56px; font-weight: 700; float: left; line-height: 0.85; margin-right: 8px; margin-top: 4px; color: var(--mu-ed-ink); }
.mu-ed .lead-img { width: 100%; aspect-ratio: 16/9; background: linear-gradient(145deg,#1a1714,#3a3028); margin-bottom: 12px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.mu-ed .lead-img-cap { font-size: 10px; color: var(--mu-ed-dim); letter-spacing: 0.05em; margin-bottom: 24px; }
.mu-ed .side-story { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--mu-ed-rule); }
.mu-ed .side-story:last-child { border-bottom: none; margin-bottom: 0; }
.mu-ed .side-story.breaking-story { background: var(--mu-ed-accent-light); padding: 16px; margin: 0 -16px; }
.mu-ed .side-story.side-story-mt { margin-top: 20px; }
.mu-ed .side-cat { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mu-ed-accent); font-weight: 600; margin-bottom: 8px; }
.mu-ed .side-title { font-family: var(--mu-ed-serif); font-size: 18px; font-weight: 700; line-height: 1.25; margin-bottom: 8px; cursor: pointer; }
.mu-ed .side-title.side-title-small { font-size: 16px; }
.mu-ed .side-title:hover { color: var(--mu-ed-accent); }
.mu-ed .side-deck { font-size: 13px; color: var(--mu-ed-mid); line-height: 1.65; margin-bottom: 8px; font-weight: 300; }
.mu-ed .side-by { font-size: 10px; letter-spacing: 0.08em; color: var(--mu-ed-dim); }
.mu-ed .side-by.side-by-attrib { margin-bottom: 16px; }
.mu-ed .section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--mu-ed-ink); }
.mu-ed .section-head h2 { font-family: var(--mu-ed-serif); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.mu-ed .section-head .section-more { margin-left: auto; font-size: 11px; letter-spacing: 0.1em; color: var(--mu-ed-accent); cursor: pointer; text-transform: uppercase; }
.mu-ed .card-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; margin-bottom: 48px; }
.mu-ed .story-card { cursor: pointer; }
.mu-ed .story-card:hover .card-title { color: var(--mu-ed-accent); }
.mu-ed .card-img { aspect-ratio: 3/2; margin-bottom: 12px; position: relative; overflow: hidden; }
.mu-ed .card-img.card-img-1 { background: linear-gradient(135deg,#2c3e50,#3498db); }
.mu-ed .card-img.card-img-2 { background: linear-gradient(135deg,#1a3a2a,#2d6a4f); }
.mu-ed .card-img.card-img-3 { background: linear-gradient(135deg,#3d1a2c,#8b2060); }
.mu-ed .card-img.card-img-4 { background: linear-gradient(135deg,#1a1a2e,#4a4a8a); }
.mu-ed .card-cat { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mu-ed-accent); font-weight: 600; margin-bottom: 6px; }
.mu-ed .card-title { font-family: var(--mu-ed-serif); font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; transition: color 0.2s; }
.mu-ed .card-deck { font-size: 12px; color: var(--mu-ed-mid); line-height: 1.6; margin-bottom: 8px; font-weight: 300; }
.mu-ed .card-by { font-size: 10px; color: var(--mu-ed-dim); }
.mu-ed .opinion-data { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; margin-bottom: 48px; }
.mu-ed .opinion-quote { font-family: var(--mu-ed-serif); font-size: clamp(20px,2.5vw,28px); font-style: italic; font-weight: 400; line-height: 1.4; color: var(--mu-ed-ink); padding: 24px 0; border-top: 3px solid var(--mu-ed-ink); border-bottom: 1px solid var(--mu-ed-rule); margin-bottom: 20px; }
.mu-ed .opinion-quote::before { content: '\201C'; font-size: 60px; line-height: 0; vertical-align: -24px; color: var(--mu-ed-accent); margin-right: 4px; }
.mu-ed .data-title { font-family: var(--mu-ed-serif); font-size: 18px; font-weight: 700; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--mu-ed-ink); }
.mu-ed .data-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--mu-ed-rule); }
.mu-ed .data-label { font-size: 12px; color: var(--mu-ed-mid); flex: 1; }
.mu-ed .data-bar-wrap { width: 120px; height: 4px; background: var(--mu-ed-rule); border-radius: 2px; overflow: hidden; }
.mu-ed .data-bar { height: 100%; background: var(--mu-ed-ink); border-radius: 2px; }
.mu-ed .data-bar[data-w="38"] { width: 38%; }
.mu-ed .data-bar[data-w="41"] { width: 41%; }
.mu-ed .data-bar[data-w="55"] { width: 55%; }
.mu-ed .data-bar[data-w="72"] { width: 72%; }
.mu-ed .data-bar[data-w="87"] { width: 87%; }
.mu-ed .data-val { font-family: var(--mu-ed-serif); font-size: 14px; font-weight: 700; min-width: 40px; text-align: right; }
.mu-ed .newsletter { background: var(--mu-ed-ink); padding: 40px; margin-bottom: 48px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
.mu-ed .nl-eyebrow { font-size: 10px; letter-spacing: 0.2em; color: rgba(255,255,255,0.4); text-transform: uppercase; margin-bottom: 8px; }
.mu-ed .nl-title { font-family: var(--mu-ed-serif); font-size: 26px; font-weight: 700; color: var(--mu-ed-white); line-height: 1.2; }
.mu-ed .nl-form { display: flex; gap: 0; }
.mu-ed .nl-input { font-family: var(--mu-ed-sans); font-size: 14px; padding: 14px 20px; border: none; background: rgba(255,255,255,0.1); color: var(--mu-ed-white); outline: none; min-width: 280px; }
.mu-ed .nl-input::placeholder { color: rgba(255,255,255,0.3); }
.mu-ed .nl-btn { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; padding: 14px 24px; background: var(--mu-ed-accent); color: var(--mu-ed-white); border: none; cursor: pointer; font-family: var(--mu-ed-sans); font-weight: 600; transition: opacity 0.2s; }
.mu-ed .nl-btn:hover { opacity: 0.85; }
@media (max-width: 900px) {
.mu-ed .top-bar, .mu-ed .masthead, .mu-ed .page-wrap { padding-left: 24px; padding-right: 24px; }
.mu-ed .masthead-nav { margin: 0 -24px; flex-wrap: wrap; }
.mu-ed .feature-grid { grid-template-columns: 1fr; gap: 24px; }
.mu-ed .feat-col { padding: 0; }
.mu-ed .col-rule { display: none; }
.mu-ed .card-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
.mu-ed .opinion-data { grid-template-columns: 1fr; gap: 24px; }
.mu-ed .newsletter { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
.mu-ed .nl-form { flex-direction: column; gap: 8px; }
.mu-ed .nl-input { min-width: 0; }
}
```
**JS:**
```js
(() => {
// Scoped reading-progress bar — the source mock read
// document.documentElement.scrollTop, which would track the host
// page's scroll. Rebind to the wrapper's nearest scrollable
// ancestor (or window as a fallback for full-page demos).
const root = document.querySelector('.mu-ed');
if (!root) return;
const progress = root.querySelector('[data-mu-ed-progress]');
if (!progress) return;
function update() {
const r = root.getBoundingClientRect();
const total = root.scrollHeight - window.innerHeight;
if (total <= 0) { progress.style.width = '0%'; return; }
const scrolled = Math.max(0, -r.top);
const pct = Math.min(100, (scrolled / total) * 100);
progress.style.width = pct + '%';
}
window.addEventListener('scroll', update, { passive: true });
window.addEventListener('resize', update);
update();
})();
```
### 05. Elara FinTech
**Type:** Pure CSS
**Description:** A minimalist mobile fintech app UI rendered inside a realistic phone frame — proving that small-screen mobile interfaces win by stripping visual noise and exposing primary data in a single glance. Phone outer with rounded corners, notch (camera + speaker), and inner status bar (9:41 + battery/signal SVGs). Inside the screen: greeting header ("Good morning, Elara") with avatar, gradient balance card with $24,832.49 total + glow gradient corners + four wallet actions (Send / Receive / Swap / More), two-up quick stat cards (Portfolio +4.2% / Savings Goal 76%), animated SVG spending chart with gradient fill area + active dot, recent transactions list with iconified merchant rows + debit/credit amounts, and a frosted bottom dock nav with floating center "+" action button. Beside the phone: three context cards (Design Principles, AI Insights with three insight rows, Quick Actions 2x2 grid). Typography pairs Plus Jakarta Sans (UI) with Space Mono (numbers). Best for fintech mobile apps, banking apps, crypto wallets, budgeting UIs, neobank landing pages, mobile-first product showcases.
**HTML:**
```html
Total Balance
$24,832.49
↑
+$1,204.20
this month
↑
Send
↓
Receive
⇄
Swap
⋯
More
$3,214
↓ $380 vs last month
🛒
Whole Foods Market
Today, 8:24 AM
−$62.40
☕
Blue Bottle Coffee
Mon, May 26
−$7.80
⌂
Home
◫
Cards
+
◎
Invest
◉
Profile
Design Principles
Zero-friction money flows
Every interaction is designed to reduce cognitive load. Primary data is always one glance away, secondary actions one tap, tertiary flows never more than two steps deep.
AI Insights
📈
Spending down
vs. 3-month avg
−11%
🎯
Goal on track
House fund · $40K
76%
⚡
Bill due soon
Rent · Jun 1
3d
```
**CSS:**
```css
/* ─── 05 Elara FinTech Mobile — minimalist mobile app UI ───────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');
.mu-fn {
--mu-fn-bg: #0e0e14;
--mu-fn-surface: #16161f;
--mu-fn-surface2: #1e1e2a;
--mu-fn-border: #26263a;
--mu-fn-text: #f0f0f8;
--mu-fn-text-mid: #8888aa;
--mu-fn-text-dim: #44445a;
--mu-fn-green: #00e5a0;
--mu-fn-green-dim: rgba(0,229,160,0.12);
--mu-fn-blue: #4488ff;
--mu-fn-blue-dim: rgba(68,136,255,0.1);
--mu-fn-red: #ff4466;
--mu-fn-yellow: #ffcc44;
--mu-fn-sans: 'Plus Jakarta Sans', sans-serif;
--mu-fn-mono: 'Space Mono', monospace;
position: relative;
width: 100%;
min-height: 900px;
background: var(--mu-fn-bg);
color: var(--mu-fn-text);
font-family: var(--mu-fn-sans);
display: flex;
align-items: center;
justify-content: center;
padding: 40px;
overflow: hidden;
box-sizing: border-box;
}
.mu-fn *, .mu-fn *::before, .mu-fn *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Ambient radial glow — was body::before fixed; scoped. */
.mu-fn::before {
content: '';
position: absolute;
width: 600px;
height: 600px;
border-radius: 50%;
background: radial-gradient(circle,rgba(0,229,160,0.06) 0%,transparent 70%);
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
pointer-events: none;
z-index: 0;
}
.mu-fn .layout { position: relative; z-index: 1; display: flex; gap: 40px; align-items: center; }
.mu-fn .phone-outer { position: relative; background: linear-gradient(160deg,#2a2a3a,#1a1a28); border-radius: 54px; padding: 14px; box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 40px 120px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.04); width: 380px; flex-shrink: 0; }
.mu-fn .phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 100px; height: 28px; background: #0e0e14; border-radius: 0 0 20px 20px; z-index: 10; display: flex; align-items: center; justify-content: center; gap: 6px; }
.mu-fn .notch-camera { width: 10px; height: 10px; border-radius: 50%; background: #1a1a24; border: 2px solid #252535; }
.mu-fn .notch-speaker { width: 48px; height: 5px; border-radius: 3px; background: #1a1a24; }
.mu-fn .phone-screen { background: var(--mu-fn-bg); border-radius: 42px; overflow: hidden; height: 780px; position: relative; display: flex; flex-direction: column; }
.mu-fn .status-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px 0; position: relative; z-index: 5; }
.mu-fn .status-time { font-family: var(--mu-fn-mono); font-size: 13px; font-weight: 700; }
.mu-fn .notch-space { width: 120px; }
.mu-fn .status-icons { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--mu-fn-text-mid); }
.mu-fn .screen-content { flex: 1; overflow-y: auto; padding: 8px 0 80px; scroll-behavior: smooth; }
.mu-fn .screen-content::-webkit-scrollbar { display: none; }
.mu-fn .app-header { padding: 16px 24px 20px; }
.mu-fn .greeting-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.mu-fn .greeting { font-size: 13px; color: var(--mu-fn-text-mid); font-weight: 400; }
.mu-fn .header-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg,var(--mu-fn-green),#008860); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #0a0a0a; }
.mu-fn .user-name-main { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.mu-fn .balance-card { margin: 0 20px 20px; background: linear-gradient(135deg,#0f1f18 0%,#0a1810 50%,#0f1f18 100%); border: 1px solid rgba(0,229,160,0.15); border-radius: 24px; padding: 28px 28px 24px; position: relative; overflow: hidden; animation: mu-fn-cardin 0.5s ease 0.1s both; }
.mu-fn .balance-card::before { content: ''; position: absolute; top: -60px; right: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle,rgba(0,229,160,0.1) 0%,transparent 70%); }
.mu-fn .balance-card::after { content: ''; position: absolute; bottom: -40px; left: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle,rgba(0,229,160,0.05) 0%,transparent 70%); }
.mu-fn .balance-label { font-size: 12px; letter-spacing: 0.12em; color: rgba(0,229,160,0.6); text-transform: uppercase; margin-bottom: 8px; font-weight: 500; position: relative; }
.mu-fn .balance-amount { font-family: var(--mu-fn-mono); font-size: 40px; font-weight: 700; letter-spacing: -0.03em; color: var(--mu-fn-text); line-height: 1; margin-bottom: 6px; position: relative; }
.mu-fn .balance-cents { font-size: 24px; opacity: 0.5; }
.mu-fn .balance-change { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mu-fn-green); font-weight: 600; margin-bottom: 24px; position: relative; }
.mu-fn .chg-arrow { font-size: 14px; }
.mu-fn .chg-period { color: var(--mu-fn-text-mid); font-weight: 400; }
.mu-fn .balance-actions { display: flex; gap: 10px; position: relative; }
.mu-fn .bal-action { flex: 1; background: rgba(0,229,160,0.1); border: 1px solid rgba(0,229,160,0.15); border-radius: 14px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; transition: all 0.2s; font-family: inherit; color: inherit; }
.mu-fn .bal-action:hover { background: rgba(0,229,160,0.18); }
.mu-fn .bal-action-icon { font-size: 18px; }
.mu-fn .bal-action-label { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mu-fn-text-mid); font-weight: 600; }
.mu-fn .stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 20px 20px; animation: mu-fn-cardin 0.5s ease 0.2s both; }
.mu-fn .stat-card { background: var(--mu-fn-surface); border: 1px solid var(--mu-fn-border); border-radius: 20px; padding: 18px 18px; }
.mu-fn .stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mu-fn .stat-icon-wrap { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.mu-fn .stat-icon-green { background: var(--mu-fn-green-dim); } .mu-fn .stat-icon-blue { background: var(--mu-fn-blue-dim); }
.mu-fn .stat-change { font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 20px; }
.mu-fn .stat-change.up { background: var(--mu-fn-green-dim); color: var(--mu-fn-green); }
.mu-fn .stat-label { font-size: 11px; color: var(--mu-fn-text-mid); margin-bottom: 4px; font-weight: 500; }
.mu-fn .stat-value { font-family: var(--mu-fn-mono); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.mu-fn .stat-value-green { color: var(--mu-fn-green); }
.mu-fn .chart-section { margin: 0 20px 20px; }
.mu-fn .chart-card { background: var(--mu-fn-surface); border: 1px solid var(--mu-fn-border); border-radius: 20px; padding: 20px; animation: mu-fn-cardin 0.5s ease 0.3s both; }
.mu-fn .chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.mu-fn .chart-title { font-size: 14px; font-weight: 700; }
.mu-fn .chart-period-group { display: flex; gap: 2px; background: var(--mu-fn-surface2); border-radius: 8px; padding: 2px; }
.mu-fn .chart-period { font-size: 10px; padding: 4px 10px; border-radius: 6px; cursor: pointer; color: var(--mu-fn-text-dim); font-weight: 600; }
.mu-fn .chart-period.active { background: var(--mu-fn-border); color: var(--mu-fn-text); }
.mu-fn .chart-total { font-family: var(--mu-fn-mono); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.mu-fn .chart-sub { font-size: 11px; color: var(--mu-fn-green); font-weight: 600; margin-bottom: 18px; }
.mu-fn .chart-svg { width: 100%; height: 90px; }
.mu-fn .transactions { padding: 0 20px; }
.mu-fn .tx-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mu-fn .tx-title { font-size: 15px; font-weight: 700; }
.mu-fn .tx-see-all { font-size: 12px; color: var(--mu-fn-green); font-weight: 600; cursor: pointer; }
.mu-fn .tx-item { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--mu-fn-border); }
.mu-fn .tx-item:last-child { border-bottom: none; }
.mu-fn .tx-icon { width: 42px; height: 42px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.mu-fn .tx-icon-blue { background: var(--mu-fn-blue-dim); }
.mu-fn .tx-icon-green { background: var(--mu-fn-green-dim); }
.mu-fn .tx-icon-yellow { background: rgba(255,204,68,0.1); }
.mu-fn .tx-icon-red { background: rgba(255,68,102,0.1); }
.mu-fn .tx-info { flex: 1; min-width: 0; }
.mu-fn .tx-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.mu-fn .tx-date { font-size: 11px; color: var(--mu-fn-text-mid); }
.mu-fn .tx-amount { font-family: var(--mu-fn-mono); font-size: 14px; font-weight: 700; }
.mu-fn .tx-amount.debit { color: var(--mu-fn-text); }
.mu-fn .tx-amount.credit { color: var(--mu-fn-green); }
.mu-fn .bottom-nav { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(14,14,20,0.95); backdrop-filter: blur(20px); border-top: 1px solid var(--mu-fn-border); display: flex; align-items: center; justify-content: space-around; padding: 12px 8px 20px; }
.mu-fn .nav-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; flex: 1; padding: 4px; border: none; background: transparent; font-family: inherit; color: inherit; }
.mu-fn .nav-btn-icon { font-size: 22px; transition: transform 0.2s; }
.mu-fn .nav-btn-label { font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mu-fn-text-dim); font-weight: 600; }
.mu-fn .nav-btn.active .nav-btn-label { color: var(--mu-fn-green); }
.mu-fn .nav-btn.active .nav-btn-icon { transform: scale(1.1); }
.mu-fn .nav-center-btn { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg,var(--mu-fn-green),#00aa78); display: flex; align-items: center; justify-content: center; font-size: 22px; cursor: pointer; box-shadow: 0 0 24px rgba(0,229,160,0.3); transition: transform 0.2s, box-shadow 0.2s; flex-shrink: 0; margin-top: -18px; border: none; font-family: inherit; color: inherit; }
.mu-fn .nav-center-btn:hover { transform: scale(1.05); box-shadow: 0 0 32px rgba(0,229,160,0.4); }
.mu-fn .context-wrap { display: flex; flex-direction: column; gap: 20px; max-width: 280px; }
.mu-fn .context-card { background: var(--mu-fn-surface); border: 1px solid var(--mu-fn-border); border-radius: 20px; padding: 22px; }
.mu-fn .ctx-label { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--mu-fn-text-mid); font-weight: 600; margin-bottom: 12px; }
.mu-fn .ctx-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.mu-fn .ctx-desc { font-size: 12px; color: var(--mu-fn-text-mid); line-height: 1.7; font-weight: 300; }
.mu-fn .insight-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--mu-fn-border); }
.mu-fn .insight-row:last-child { border-bottom: none; }
.mu-fn .insight-icon { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.mu-fn .insight-icon-green { background: var(--mu-fn-green-dim); }
.mu-fn .insight-icon-blue { background: var(--mu-fn-blue-dim); }
.mu-fn .insight-icon-yellow { background: rgba(255,204,68,0.1); }
.mu-fn .insight-text { flex: 1; }
.mu-fn .insight-name { font-size: 12px; font-weight: 600; margin-bottom: 1px; }
.mu-fn .insight-sub { font-size: 10px; color: var(--mu-fn-text-mid); }
.mu-fn .insight-val { font-family: var(--mu-fn-mono); font-size: 12px; font-weight: 700; }
.mu-fn .insight-val-green { color: var(--mu-fn-green); }
.mu-fn .insight-val-blue { color: var(--mu-fn-blue); }
.mu-fn .insight-val-yellow { color: var(--mu-fn-yellow); }
.mu-fn .quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.mu-fn .quick-tile { background: var(--mu-fn-surface2); border: 1px solid var(--mu-fn-border); border-radius: 12px; padding: 14px; cursor: pointer; text-align: center; }
.mu-fn .quick-tile.quick-tile-accent { background: var(--mu-fn-green-dim); border-color: rgba(0,229,160,0.2); }
.mu-fn .quick-icon { font-size: 20px; margin-bottom: 4px; }
.mu-fn .quick-label { font-size: 11px; color: var(--mu-fn-text-mid); font-weight: 600; }
.mu-fn .quick-label.quick-label-accent { color: var(--mu-fn-green); }
@keyframes mu-fn-cardin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 900px) {
.mu-fn .layout { flex-direction: column; gap: 24px; align-items: stretch; }
.mu-fn .context-wrap { max-width: 380px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
.mu-fn .balance-card, .mu-fn .stats-row, .mu-fn .chart-card { animation: none !important; }
}
```
### 06. Crest Landing
**Type:** CSS + JS
**Description:** A minimalist SaaS landing page UI for a deployment platform — proving that high-impact single-product landing pages convert when they marry bold display typography to a focused single CTA. Sticky top nav (logo + Product / Pricing / Docs / Blog + orange "Start Free →" CTA), split-screen hero with an animated perspective grid background, pulsing orange ambient glow, "BUILD faster. SHIP BOLDLY." headline mixing Bebas Neue display + Fraunces italic serif, social-proof avatars (4,200+ teams), and on the right a live-updating product card mock with animated bars + counter + floating metric cards (99.98% Uptime, 1.2s Avg Deploy). Below: 4-column stats strip (4B+ requests, 1.2s deploys, 99.98% uptime, 140+ edges) with hover-revealed accent underlines, a 3×2 features grid with oversized ghost numbers and italic-serif feature names, and a centered CTA section with ambient glow + email capture form. Typography: Bebas Neue + Fraunces + Inter. Best for SaaS landing pages, dev-tool homepages, deployment platforms, B2B product launches, single-product marketing sites.
**HTML:**
```html
Crest.
Product
Pricing
Docs
Blog
Start Free →
The Platform for Modern Teams
BUILD
faster.
SHIP
BOLDLY.
Crest is the all-in-one deployment and analytics platform that gets out of your way. Zero config. Instant rollbacks. Real insight — from commit to conversion.
Get Started Free →
Watch Demo
★★★★★
4,200+ teams ship faster with Crest
Live Dashboard · Production
● Live
prod-v2.4.1
p95: 42ms
4B+
Requests served every month across our global edge network
1.2s
Average deployment time from push to production-ready
99.98%
Uptime SLA across all regions in the last 12 months
140+
Edge locations across six continents for instant delivery
⚡
Instant Deploy
Push your code and we handle the rest. Automatic builds, zero-downtime rollouts, and instant CDN propagation to every edge node simultaneously.
◎
Real-time Insight
Not just traffic — conversion funnels, session replays, and anomaly detection that fires before your users notice anything is wrong.
↩
One-click Rollback
Every deployment is immutable and stored. Spotted a regression? Roll back to any point in history in under two seconds, with full audit trail.
⬡
Edge Functions
Run server-side logic at 140+ locations worldwide. Sub-millisecond cold starts. No container overhead. Pay per invocation, not per instance.
🔐
Secrets Vault
Encrypted environment variables, rotated automatically. Zero-knowledge architecture means even we cannot read your credentials.
⌥
Team Workflows
Preview environments for every pull request. Configurable approval gates. Slack and Linear integrations so deployment news lives where your team does.
Get early access
SHIP YOURbest work.
Join 4,200 teams who stopped fighting their infrastructure and started focusing on what actually matters.
Start Free →
No credit card required · Free forever on Starter plan · Cancel anytime
```
**CSS:**
```css
/* ─── 06 Crest SaaS Landing — minimalist single-product landing ── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,700;1,9..144,300;1,9..144,700&family=Inter:wght@300;400;500&display=swap');
.mu-ls {
--mu-ls-black: #060606;
--mu-ls-offblack: #0d0d0d;
--mu-ls-white: #fafafa;
--mu-ls-cream: #f5f0e6;
--mu-ls-orange: #ff4d00;
--mu-ls-orange-glow: rgba(255,77,0,0.15);
--mu-ls-mid: #666;
--mu-ls-dim: #333;
--mu-ls-display: 'Bebas Neue', sans-serif;
--mu-ls-serif: 'Fraunces', serif;
--mu-ls-body: 'Inter', sans-serif;
position: relative;
width: 100%;
min-height: 2200px;
background: var(--mu-ls-black);
color: var(--mu-ls-white);
font-family: var(--mu-ls-body);
overflow-x: hidden;
box-sizing: border-box;
}
.mu-ls *, .mu-ls *::before, .mu-ls *::after { box-sizing: border-box; margin: 0; padding: 0; }
.mu-ls .topnav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 0 60px; height: 72px; background: rgba(6,6,6,0.85); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.06); }
.mu-ls .nav-logo { font-family: var(--mu-ls-display); font-size: 26px; letter-spacing: 0.08em; color: var(--mu-ls-white); }
.mu-ls .nav-logo span { color: var(--mu-ls-orange); }
.mu-ls .nav-links { display: flex; gap: 40px; }
.mu-ls .nav-link { font-size: 13px; letter-spacing: 0.05em; color: var(--mu-ls-mid); cursor: pointer; transition: color 0.2s; }
.mu-ls .nav-link:hover { color: var(--mu-ls-white); }
.mu-ls .nav-cta { font-size: 13px; letter-spacing: 0.08em; font-weight: 500; background: var(--mu-ls-orange); color: var(--mu-ls-white); padding: 11px 24px; border: none; cursor: pointer; transition: all 0.3s; font-family: inherit; }
.mu-ls .nav-cta:hover { background: #ff6620; }
.mu-ls .hero { min-height: 720px; display: grid; grid-template-columns: 1fr 1fr; position: relative; overflow: hidden; padding-top: 0; }
.mu-ls .hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 64px 64px; animation: mu-ls-grid 20s linear infinite; }
@keyframes mu-ls-grid { from { transform: translateY(0); } to { transform: translateY(64px); } }
.mu-ls .hero-glow { position: absolute; top: 20%; left: 30%; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle,var(--mu-ls-orange-glow) 0%,transparent 70%); pointer-events: none; animation: mu-ls-pulse 4s ease-in-out infinite; }
@keyframes mu-ls-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.7; } }
.mu-ls .hero-left { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: 80px 60px; border-right: 1px solid rgba(255,255,255,0.06); }
.mu-ls .hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mu-ls-orange); font-weight: 500; margin-bottom: 32px; }
.mu-ls .eyebrow-line { width: 32px; height: 1px; background: var(--mu-ls-orange); }
.mu-ls .hero-headline { font-family: var(--mu-ls-display); font-size: clamp(72px,8vw,130px); line-height: 0.92; letter-spacing: 0.02em; margin-bottom: 32px; animation: mu-ls-headlineIn 0.8s cubic-bezier(0.16,1,0.3,1) 0.1s both; }
.mu-ls .headline-accent { color: var(--mu-ls-orange); }
.mu-ls .headline-serif { font-family: var(--mu-ls-serif); font-style: italic; font-weight: 300; font-size: clamp(60px,7vw,110px); letter-spacing: -0.01em; display: block; line-height: 1; }
@keyframes mu-ls-headlineIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.mu-ls .hero-sub { font-size: 16px; color: var(--mu-ls-mid); line-height: 1.75; max-width: 420px; margin-bottom: 48px; font-weight: 300; animation: mu-ls-fadeUp 0.8s ease 0.3s both; }
@keyframes mu-ls-fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.mu-ls .hero-actions { display: flex; align-items: center; gap: 20px; animation: mu-ls-fadeUp 0.8s ease 0.45s both; margin-bottom: 60px; }
.mu-ls .btn-hero { font-family: var(--mu-ls-body); font-size: 14px; letter-spacing: 0.08em; font-weight: 500; padding: 16px 36px; border: none; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; gap: 8px; }
.mu-ls .btn-hero.primary { background: var(--mu-ls-orange); color: var(--mu-ls-white); }
.mu-ls .btn-hero.primary:hover { background: #ff6620; transform: translateY(-1px); }
.mu-ls .btn-hero.secondary { background: transparent; color: var(--mu-ls-mid); border: 1px solid var(--mu-ls-dim); }
.mu-ls .btn-hero.secondary:hover { border-color: var(--mu-ls-mid); color: var(--mu-ls-white); }
.mu-ls .btn-arrow { font-size: 18px; transition: transform 0.2s; }
.mu-ls .btn-hero.primary:hover .btn-arrow { transform: translateX(3px); }
.mu-ls .hero-social-proof { display: flex; align-items: center; gap: 16px; animation: mu-ls-fadeUp 0.8s ease 0.55s both; }
.mu-ls .proof-avatars { display: flex; }
.mu-ls .proof-avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--mu-ls-black); margin-left: -8px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.mu-ls .proof-avatar:first-child { margin-left: 0; }
.mu-ls .proof-a { background: linear-gradient(135deg,#ff6b6b,#ee5a24); }
.mu-ls .proof-m { background: linear-gradient(135deg,#48dbfb,#0abde3); }
.mu-ls .proof-s { background: linear-gradient(135deg,#ff9f43,#ee5a24); }
.mu-ls .proof-k { background: linear-gradient(135deg,#a29bfe,#6c5ce7); }
.mu-ls .proof-plus { background: linear-gradient(135deg,#55efc4,#00b894); }
.mu-ls .proof-text { font-size: 13px; color: var(--mu-ls-mid); }
.mu-ls .proof-text strong { color: var(--mu-ls-white); }
.mu-ls .proof-stars { color: var(--mu-ls-orange); letter-spacing: 1px; font-size: 12px; }
.mu-ls .hero-right { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 80px 60px; }
.mu-ls .product-visual { position: relative; width: 100%; max-width: 460px; }
.mu-ls .product-main-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 4px; padding: 40px; backdrop-filter: blur(10px); position: relative; overflow: hidden; }
.mu-ls .product-main-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg,transparent,var(--mu-ls-orange),transparent); }
.mu-ls .product-screen-label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,77,0,0.7); margin-bottom: 20px; font-weight: 500; }
.mu-ls .product-ui-mock { background: rgba(0,0,0,0.4); border-radius: 2px; overflow: hidden; }
.mu-ls .mock-topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.mu-ls .mock-dots { display: flex; gap: 6px; }
.mu-ls .mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.mu-ls .mock-dot-r { background: #ff5f57; } .mu-ls .mock-dot-y { background: #febc2e; } .mu-ls .mock-dot-g { background: #28c840; }
.mu-ls .mock-url { font-size: 10px; color: rgba(255,255,255,0.2); font-family: monospace; }
.mu-ls .mock-content { padding: 20px 16px; }
.mu-ls .mock-metric { margin-bottom: 16px; }
.mu-ls .mock-metric-label { font-size: 10px; color: rgba(255,255,255,0.3); margin-bottom: 4px; letter-spacing: 0.1em; }
.mu-ls .mock-metric-value { font-family: var(--mu-ls-display); font-size: 32px; letter-spacing: 0.04em; }
.mu-ls .mock-metric-value.accent { color: var(--mu-ls-orange); }
.mu-ls .mock-bars { display: flex; align-items: flex-end; gap: 6px; height: 60px; margin-bottom: 12px; }
.mu-ls .mock-bar { flex: 1; border-radius: 2px 2px 0 0; background: rgba(255,255,255,0.1); transition: height 0.3s; }
.mu-ls .mock-bar.active { background: var(--mu-ls-orange); }
.mu-ls .mock-bottom { display: flex; gap: 8px; }
.mu-ls .mock-chip { font-size: 9px; letter-spacing: 0.1em; padding: 5px 10px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; color: rgba(255,255,255,0.5); }
.mu-ls .float-card { position: absolute; background: rgba(13,13,13,0.95); border: 1px solid rgba(255,255,255,0.1); border-radius: 3px; padding: 14px 18px; backdrop-filter: blur(20px); animation: mu-ls-float 6s ease-in-out infinite; z-index: 3; }
.mu-ls .float-card:nth-child(2) { animation-delay: -2s; }
@keyframes mu-ls-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.mu-ls .float-card.top-right { top: -16px; right: -20px; }
.mu-ls .float-card.bottom-left { bottom: 20px; left: -30px; }
.mu-ls .float-val { font-family: var(--mu-ls-display); font-size: 24px; letter-spacing: 0.05em; color: var(--mu-ls-orange); }
.mu-ls .float-label { font-size: 10px; color: var(--mu-ls-mid); letter-spacing: 0.1em; margin-top: 2px; }
.mu-ls .stats-strip { border-top: 1px solid rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.06); display: grid; grid-template-columns: repeat(4,1fr); }
.mu-ls .stat-block { padding: 48px 60px; border-right: 1px solid rgba(255,255,255,0.06); position: relative; overflow: hidden; transition: background 0.3s; }
.mu-ls .stat-block:last-child { border-right: none; }
.mu-ls .stat-block:hover { background: rgba(255,255,255,0.02); }
.mu-ls .stat-block::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--mu-ls-orange); transform: scaleX(0); transform-origin: left; transition: transform 0.4s cubic-bezier(0.23,1,0.32,1); }
.mu-ls .stat-block:hover::after { transform: scaleX(1); }
.mu-ls .stat-number { font-family: var(--mu-ls-display); font-size: 56px; letter-spacing: 0.02em; line-height: 1; margin-bottom: 8px; }
.mu-ls .stat-number span { color: var(--mu-ls-orange); }
.mu-ls .stat-desc { font-size: 13px; color: var(--mu-ls-mid); line-height: 1.5; font-weight: 300; }
.mu-ls .features-section { padding: 120px 60px; }
.mu-ls .features-header { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-bottom: 80px; align-items: end; }
.mu-ls .feat-eyebrow { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mu-ls-orange); margin-bottom: 16px; font-weight: 500; }
.mu-ls .feat-headline { font-family: var(--mu-ls-display); font-size: clamp(48px,5vw,80px); letter-spacing: 0.02em; line-height: 0.95; }
.mu-ls .feat-desc { font-size: 15px; color: var(--mu-ls-mid); line-height: 1.8; font-weight: 300; max-width: 380px; }
.mu-ls .features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: rgba(255,255,255,0.06); }
.mu-ls .feature-item { background: var(--mu-ls-black); padding: 48px 40px; transition: background 0.3s; position: relative; overflow: hidden; }
.mu-ls .feature-item:hover { background: var(--mu-ls-offblack); }
.mu-ls .feature-item::before { content: attr(data-num); position: absolute; top: 24px; right: 24px; font-family: var(--mu-ls-display); font-size: 80px; color: rgba(255,255,255,0.03); letter-spacing: 0.04em; line-height: 1; }
.mu-ls .feature-icon { width: 48px; height: 48px; border: 1px solid rgba(255,77,0,0.3); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 24px; transition: border-color 0.3s; }
.mu-ls .feature-item:hover .feature-icon { border-color: var(--mu-ls-orange); }
.mu-ls .feature-name { font-family: var(--mu-ls-serif); font-size: 22px; font-weight: 300; margin-bottom: 12px; }
.mu-ls .feature-name em { font-style: italic; color: var(--mu-ls-orange); }
.mu-ls .feature-desc { font-size: 13px; color: var(--mu-ls-mid); line-height: 1.75; font-weight: 300; }
.mu-ls .cta-section { padding: 120px 60px; display: flex; flex-direction: column; align-items: center; text-align: center; border-top: 1px solid rgba(255,255,255,0.06); position: relative; overflow: hidden; }
.mu-ls .cta-glow { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 800px; height: 400px; background: radial-gradient(ellipse,var(--mu-ls-orange-glow) 0%,transparent 65%); }
.mu-ls .cta-pre { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--mu-ls-orange); margin-bottom: 24px; font-weight: 500; position: relative; z-index: 2; }
.mu-ls .cta-headline { font-family: var(--mu-ls-display); font-size: clamp(60px,8vw,120px); letter-spacing: 0.02em; line-height: 0.92; margin-bottom: 32px; position: relative; z-index: 2; }
.mu-ls .cta-headline em { font-family: var(--mu-ls-serif); font-style: italic; font-weight: 300; font-size: 0.85em; }
.mu-ls .cta-sub { font-size: 16px; color: var(--mu-ls-mid); max-width: 500px; margin-bottom: 48px; line-height: 1.7; font-weight: 300; position: relative; z-index: 2; }
.mu-ls .cta-form { display: flex; gap: 0; max-width: 460px; width: 100%; position: relative; z-index: 2; }
.mu-ls .cta-input { flex: 1; font-family: var(--mu-ls-body); font-size: 14px; padding: 16px 20px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-right: none; color: var(--mu-ls-white); outline: none; transition: border-color 0.2s; }
.mu-ls .cta-input::placeholder { color: var(--mu-ls-mid); }
.mu-ls .cta-input:focus { border-color: rgba(255,77,0,0.4); }
.mu-ls .cta-submit { font-family: var(--mu-ls-body); font-size: 13px; letter-spacing: 0.1em; font-weight: 500; padding: 16px 28px; background: var(--mu-ls-orange); color: var(--mu-ls-white); border: none; cursor: pointer; text-transform: uppercase; transition: background 0.2s; }
.mu-ls .cta-submit:hover { background: #ff6620; }
.mu-ls .cta-note { font-size: 12px; color: var(--mu-ls-dim); margin-top: 14px; position: relative; z-index: 2; }
.mu-ls .footer { border-top: 1px solid rgba(255,255,255,0.06); padding: 40px 60px; display: flex; align-items: center; justify-content: space-between; }
.mu-ls .footer-logo { font-family: var(--mu-ls-display); font-size: 20px; letter-spacing: 0.08em; }
.mu-ls .footer-logo span { color: var(--mu-ls-orange); }
.mu-ls .footer-links { display: flex; gap: 32px; }
.mu-ls .footer-link { font-size: 12px; color: var(--mu-ls-dim); cursor: pointer; transition: color 0.2s; }
.mu-ls .footer-link:hover { color: var(--mu-ls-white); }
.mu-ls .footer-copy { font-size: 12px; color: var(--mu-ls-dim); }
@media (max-width: 900px) {
.mu-ls .topnav { padding: 0 24px; }
.mu-ls .nav-links { display: none; }
.mu-ls .hero { grid-template-columns: 1fr; }
.mu-ls .hero-left, .mu-ls .hero-right { padding: 48px 24px; border-right: none; }
.mu-ls .stats-strip { grid-template-columns: 1fr 1fr; }
.mu-ls .stat-block { padding: 28px 24px; }
.mu-ls .features-section { padding: 64px 24px; }
.mu-ls .features-header { grid-template-columns: 1fr; gap: 24px; }
.mu-ls .features-grid { grid-template-columns: 1fr; }
.mu-ls .cta-section { padding: 64px 24px; }
.mu-ls .footer { padding: 24px; flex-direction: column; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
.mu-ls .hero-grid, .mu-ls .hero-glow, .mu-ls .hero-headline, .mu-ls .hero-sub, .mu-ls .hero-actions, .mu-ls .hero-social-proof, .mu-ls .float-card { animation: none !important; }
}
```
**JS:**
```js
(() => {
// Scoped landing-page animations. Rebuilds the mock bars + animated
// counter targeting scoped attributes inside .mu-ls only, and stores
// its intervals on the wrapper so a second instance of the demo
// doesn't double-fire timers.
const root = document.querySelector('.mu-ls');
if (!root) return;
const bars = root.querySelector('[data-mu-ls-bars]');
const counter = root.querySelector('[data-mu-ls-counter]');
if (!bars || !counter || bars.childElementCount > 0) return;
const barData = [30, 50, 40, 70, 55, 90, 65, 80, 45, 75, 60, 95];
barData.forEach((h, i) => {
const b = document.createElement('div');
b.className = 'mock-bar' + (i === 11 ? ' active' : '');
b.style.height = h + '%';
b.style.transition = 'height 0.5s ease';
bars.appendChild(b);
});
let count = 12840;
const counterTimer = setInterval(() => {
count += Math.floor(Math.random() * 40 - 10);
counter.textContent = count.toLocaleString();
}, 800);
const animTimer = setInterval(() => {
bars.querySelectorAll('.mock-bar').forEach(b => {
const h = 20 + Math.random() * 75;
b.style.height = h + '%';
});
}, 2000);
// Stash timers on the wrapper so an external lifecycle (e.g. a
// gallery re-mount) can stop them if needed.
root._muLsTimers = [counterTimer, animTimer];
})();
```
---
## 16 CSS Mobile Navigation Patterns
URL: https://codefronts.com/navigation/css-mobile-navigation/
Description: 16 hand-coded CSS mobile navigation patterns covering every production mobile-nav use case in 2026 — hamburger slide-out drawer, full-screen overlay menu, iOS-style bottom tab bar (Apple Human Interface Guidelines), morphing hamburger-to-X animation, radial fan menu, swipe-gesture sidebar (Facebook Messenger pattern), FAB speed dial navigation, tab bar with sliding indicator pill, mega-menu accordion, glassmorphism nav drawer, cyberpunk neon menu, minimal dot navigation, breadcrumb collapse for deep hierarchies, split-screen navigation, command-palette search (Cmd+K pattern), and neumorphic bottom navigation. 13 demos are 100% pure CSS using :checked state machines — drop into any stack with zero JS dependencies; 3 use ~40-60 lines of vanilla JavaScript for swipe gestures, dot-scrolling, and command-palette filtering. All ship 44×44px tap targets (WCAG 2.5.5), aria-current="page" on active links, aria-expanded on toggles, respect prefers-reduced-motion, scoped .mn-NN__* class names so multiple navs coexist without style bleed, MIT-licensed. Drop into React, Vue, Astro, Svelte, Rails, plain HTML.
Demo count: 16
### 01. Hamburger Slide-Out Drawer
**Type:** Pure CSS
**Description:** A dark slide-out nav drawer toggled by a Pure CSS checkbox. The hamburger icon morphs into an X via CSS transforms, while the drawer slides in over a click-to-close overlay.
**HTML:**
```html
Dashboard
New
Q4 Revenue Report
Your analytics are up 24% this quarter. Tap to view the full breakdown.
Recent Activity
3 new messages and 2 pending approvals waiting for your review.
Active Projects
5 projects in progress — 2 due this week.
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-01 {
--bg: #1a1a2e;
--drawer: #16213e;
--accent: #e94560;
--text: #eaeaea;
--muted: #8892a4;
--overlay: rgba(0,0,0,0.6);
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
background: var(--bg);
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
/* Hidden checkbox toggle */
.mn-01 #mn-01-toggle { display: none; }
/* Overlay */
.mn-01__overlay {
position: absolute;
inset: 0;
background: var(--overlay);
opacity: 0;
pointer-events: none;
transition: opacity 0.35s ease;
z-index: 10;
}
.mn-01 #mn-01-toggle:checked ~ .mn-01__overlay {
opacity: 1;
pointer-events: all;
}
/* Drawer */
.mn-01__drawer {
position: absolute;
top: 0;
left: 0;
width: 280px;
height: 100%;
background: var(--drawer);
transform: translateX(-100%);
transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 20;
display: flex;
flex-direction: column;
padding: 0;
}
.mn-01 #mn-01-toggle:checked ~ .mn-01__overlay ~ .mn-01__drawer {
transform: translateX(0);
}
.mn-01__drawer-header {
padding: 48px 24px 24px;
border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mn-01__avatar {
width: 52px;
height: 52px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent), #f5a623);
display: flex;
align-items: center;
justify-content: center;
font-size: 22px;
margin-bottom: 12px;
}
.mn-01__drawer-header h3 {
color: var(--text);
font-size: 16px;
font-weight: 600;
margin-bottom: 2px;
}
.mn-01__drawer-header p {
color: var(--muted);
font-size: 13px;
}
.mn-01__nav {
flex: 1;
padding: 16px 0;
overflow-y: auto;
}
.mn-01__nav a {
display: flex;
align-items: center;
gap: 14px;
padding: 14px 24px;
color: var(--muted);
text-decoration: none;
font-size: 15px;
font-weight: 500;
transition: all 0.2s;
position: relative;
}
.mn-01__nav a:hover, .mn-01__nav a.is-active {
color: var(--text);
background: rgba(233,69,96,0.08);
}
.mn-01__nav a.is-active::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 3px;
height: 60%;
background: var(--accent);
border-radius: 0 4px 4px 0;
}
.mn-01__nav-icon {
width: 20px;
text-align: center;
font-size: 17px;
}
.mn-01__section-label {
padding: 16px 24px 6px;
font-size: 10px;
font-weight: 700;
letter-spacing: 1.5px;
text-transform: uppercase;
color: rgba(136,146,164,0.5);
}
/* Hamburger button */
.mn-01__hamburger {
position: absolute;
top: 16px;
left: 16px;
z-index: 30;
width: 44px;
height: 44px;
border-radius: 12px;
background: rgba(255,255,255,0.06);
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 5px;
transition: background 0.2s;
}
.mn-01__hamburger:hover { background: rgba(255,255,255,0.1); }
.mn-01__hamburger span {
display: block;
width: 22px;
height: 2px;
background: var(--text);
border-radius: 2px;
transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
transform-origin: center;
}
.mn-01 #mn-01-toggle:checked ~ .mn-01__hamburger span:nth-child(1) {
transform: translateY(7px) rotate(45deg);
}
.mn-01 #mn-01-toggle:checked ~ .mn-01__hamburger span:nth-child(2) {
opacity: 0; transform: scaleX(0);
}
.mn-01 #mn-01-toggle:checked ~ .mn-01__hamburger span:nth-child(3) {
transform: translateY(-7px) rotate(-45deg);
}
/* Main page content */
.mn-01__page {
position: absolute;
inset: 0;
padding: 72px 20px 20px;
}
.mn-01__topbar {
position: absolute;
top: 0; left: 0; right: 0;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 60px;
}
.mn-01__topbar-title {
color: var(--text);
font-size: 17px;
font-weight: 600;
}
.mn-01__content {
margin-top: 16px;
}
.mn-01__card {
background: rgba(255,255,255,0.04);
border: 1px solid rgba(255,255,255,0.07);
border-radius: 16px;
padding: 20px;
margin-bottom: 12px;
}
.mn-01__card h4 {
color: var(--text);
font-size: 14px;
font-weight: 600;
margin-bottom: 6px;
}
.mn-01__card p {
color: var(--muted);
font-size: 12px;
line-height: 1.6;
}
.mn-01__pill {
display: inline-block;
background: rgba(233,69,96,0.15);
color: var(--accent);
font-size: 10px;
font-weight: 700;
letter-spacing: 0.8px;
text-transform: uppercase;
padding: 3px 8px;
border-radius: 20px;
margin-bottom: 8px;
}
@media (prefers-reduced-motion: reduce) {
.mn-01__drawer, .mn-01__overlay, .mn-01__hamburger span { transition: none; }
}
```
### 02. Full-Screen Overlay Navigation
**Type:** Pure CSS
**Description:** An editorial full-screen nav that expands via a circular clip-path reveal from the top-right corner. Menu links stagger in with a slide-up entrance driven entirely by CSS sibling selectors.
**HTML:**
```html
Creative Agency
We craft digital experiences
Award-winning design studio specializing in brand identity and digital products.
View Our Work →
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-02 {
--bg: #f7f3ee;
--overlay-bg: #1c1917;
--accent: #d97706;
--text-dark: #1c1917;
--text-light: #f7f3ee;
--muted: #78716c;
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
background: var(--bg);
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.mn-02 #mn-02-toggle { display: none; }
/* Overlay panel */
.mn-02__overlay {
position: absolute;
inset: 0;
background: var(--overlay-bg);
z-index: 20;
display: flex;
flex-direction: column;
justify-content: center;
padding: 40px 36px;
clip-path: circle(0% at calc(100% - 36px) 36px);
transition: clip-path 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}
.mn-02 #mn-02-toggle:checked ~ .mn-02__overlay {
clip-path: circle(150% at calc(100% - 36px) 36px);
}
.mn-02__overlay-links {
list-style: none;
margin-top: 40px;
}
.mn-02__overlay-links li {
overflow: hidden;
margin-bottom: 4px;
}
.mn-02__overlay-links a {
display: flex;
align-items: baseline;
gap: 16px;
color: var(--text-light);
text-decoration: none;
font-size: 38px;
font-weight: 700;
letter-spacing: -1px;
line-height: 1.2;
padding: 8px 0;
transition: color 0.2s;
transform: translateY(100%);
opacity: 0;
transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s, color 0.2s;
}
.mn-02__overlay-links a:hover { color: var(--accent); }
.mn-02__overlay-links a .num {
font-size: 13px;
font-weight: 400;
color: var(--muted);
letter-spacing: 0;
min-width: 28px;
}
.mn-02 #mn-02-toggle:checked ~ .mn-02__overlay .mn-02__overlay-links a {
transform: translateY(0);
opacity: 1;
}
.mn-02 #mn-02-toggle:checked ~ .mn-02__overlay .mn-02__overlay-links li:nth-child(1) a { transition-delay: 0.15s; }
.mn-02 #mn-02-toggle:checked ~ .mn-02__overlay .mn-02__overlay-links li:nth-child(2) a { transition-delay: 0.22s; }
.mn-02 #mn-02-toggle:checked ~ .mn-02__overlay .mn-02__overlay-links li:nth-child(3) a { transition-delay: 0.29s; }
.mn-02 #mn-02-toggle:checked ~ .mn-02__overlay .mn-02__overlay-links li:nth-child(4) a { transition-delay: 0.36s; }
.mn-02 #mn-02-toggle:checked ~ .mn-02__overlay .mn-02__overlay-links li:nth-child(5) a { transition-delay: 0.43s; }
.mn-02__overlay-footer {
margin-top: 48px;
display: flex;
gap: 24px;
}
.mn-02__overlay-footer a {
color: var(--muted);
text-decoration: none;
font-size: 13px;
transition: color 0.2s;
}
.mn-02__overlay-footer a:hover { color: var(--text-light); }
/* Close / hamburger button */
.mn-02__btn {
position: absolute;
top: 20px;
right: 20px;
z-index: 30;
width: 44px;
height: 44px;
border-radius: 50%;
background: var(--overlay-bg);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.mn-02 #mn-02-toggle:checked ~ .mn-02__btn {
background: rgba(255,255,255,0.1);
}
.mn-02__btn-lines {
width: 22px;
height: 14px;
position: relative;
}
.mn-02__btn-lines span {
position: absolute;
left: 0;
width: 100%;
height: 2px;
background: #fff;
border-radius: 2px;
transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
transform-origin: center;
}
.mn-02__btn-lines span:nth-child(1) { top: 0; }
.mn-02__btn-lines span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.mn-02__btn-lines span:nth-child(3) { bottom: 0; }
.mn-02 #mn-02-toggle:checked ~ .mn-02__btn .mn-02__btn-lines span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.mn-02 #mn-02-toggle:checked ~ .mn-02__btn .mn-02__btn-lines span:nth-child(2) { opacity: 0; }
.mn-02 #mn-02-toggle:checked ~ .mn-02__btn .mn-02__btn-lines span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }
.mn-02__overlay-label { color: rgba(255,255,255,0.3); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
/* Page */
.mn-02__page {
padding: 0;
height: 100%;
display: flex;
flex-direction: column;
}
.mn-02__header {
padding: 24px 20px 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.mn-02__logo {
font-size: 20px;
font-weight: 800;
color: var(--text-dark);
letter-spacing: -0.5px;
}
.mn-02__logo span { color: var(--accent); }
.mn-02__hero {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
padding: 32px 24px;
}
.mn-02__eyebrow {
font-size: 11px;
font-weight: 700;
letter-spacing: 2px;
text-transform: uppercase;
color: var(--accent);
margin-bottom: 12px;
}
.mn-02__hero h1 {
font-size: 38px;
font-weight: 800;
color: var(--text-dark);
letter-spacing: -1.5px;
line-height: 1.1;
margin-bottom: 16px;
}
.mn-02__hero p {
font-size: 14px;
color: var(--muted);
line-height: 1.7;
max-width: 280px;
}
.mn-02__cta {
display: inline-flex;
align-items: center;
gap: 8px;
margin-top: 24px;
background: var(--text-dark);
color: var(--text-light);
font-size: 14px;
font-weight: 600;
padding: 12px 24px;
border-radius: 100px;
text-decoration: none;
width: fit-content;
}
@media (prefers-reduced-motion: reduce) {
.mn-02__overlay, .mn-02__overlay-links a, .mn-02__btn-lines span { transition: none; }
}
```
### 03. iOS-Style Bottom Tab Bar
**Type:** Pure CSS
**Description:** An iOS-inspired bottom navigation bar with four tab pages driven by radio inputs. Pages transition with a fade-scale effect and the tab bar uses backdrop-filter frosted glass.
**HTML:**
```html
📈
Portfolio Value +2.4% today
›
🔍 Search transactions, people...
💸
Transfer received 2 days ago
+$200
⚠️
Unusual spend detected $340 at Electronics Hub
✅
Payment cleared Rent payment confirmed
🏠
Home
🔍
Search
🔔
Alerts
👤
Profile
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif; }
.mn-03 {
--bg: #f2f2f7;
--card: #ffffff;
--accent: #007aff;
--accent2: #34c759;
--accent3: #ff9500;
--accent4: #af52de;
--accent5: #ff2d55;
--text: #1c1c1e;
--muted: #8e8e93;
--tab-bg: #ffffff;
--tab-border: rgba(0,0,0,0.1);
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
background: var(--bg);
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.mn-03 input[type="radio"] { display: none; }
/* Status bar */
.mn-03__status {
height: 44px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
background: var(--card);
}
.mn-03__status-time { font-size: 15px; font-weight: 600; color: var(--text); }
.mn-03__status-icons { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text); }
/* Page area */
.mn-03__pages { position: absolute; top: 44px; left: 0; right: 0; bottom: 83px; }
.mn-03__page {
position: absolute;
inset: 0;
padding: 20px 16px;
opacity: 0;
pointer-events: none;
transform: scale(0.97);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#mn-03-home:checked ~ .mn-03__pages .mn-03__page[data-page="home"],
#mn-03-search:checked ~ .mn-03__pages .mn-03__page[data-page="search"],
#mn-03-alerts:checked ~ .mn-03__pages .mn-03__page[data-page="alerts"],
#mn-03-profile:checked ~ .mn-03__pages .mn-03__page[data-page="profile"] {
opacity: 1;
pointer-events: all;
transform: scale(1);
}
/* Page header */
.mn-03__page-header {
margin-bottom: 20px;
}
.mn-03__page-header h2 {
font-size: 28px;
font-weight: 700;
color: var(--text);
letter-spacing: -0.5px;
}
/* Cards */
.mn-03__section-card {
background: var(--card);
border-radius: 16px;
overflow: hidden;
margin-bottom: 12px;
}
.mn-03__row {
display: flex;
align-items: center;
gap: 14px;
padding: 14px 16px;
border-bottom: 1px solid rgba(0,0,0,0.05);
}
.mn-03__row:last-child { border-bottom: none; }
.mn-03__row-icon {
width: 32px;
height: 32px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
flex-shrink: 0;
}
.mn-03__row-text { flex: 1; }
.mn-03__row-text h4 { font-size: 14px; font-weight: 500; color: var(--text); }
.mn-03__row-text p { font-size: 12px; color: var(--muted); }
.mn-03__row-chevron { color: var(--muted); font-size: 12px; }
/* Search page */
.mn-03__search-bar {
background: var(--card);
border-radius: 12px;
padding: 12px 16px;
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 20px;
}
.mn-03__search-bar span { color: var(--muted); }
.mn-03__search-bar p { color: var(--muted); font-size: 15px; }
/* Alerts badge */
.mn-03__badge {
background: #ff3b30;
color: #fff;
font-size: 10px;
font-weight: 700;
min-width: 18px;
height: 18px;
border-radius: 9px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 4px;
}
/* Bottom Tab Bar */
.mn-03__tabbar {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 83px;
background: rgba(255,255,255,0.92);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-top: 1px solid var(--tab-border);
display: flex;
align-items: flex-start;
padding-top: 8px;
z-index: 10;
}
.mn-03__tab {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
cursor: pointer;
padding: 4px 0;
}
.mn-03__tab-icon {
font-size: 24px;
line-height: 1;
transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mn-03__tab-label {
font-size: 10px;
font-weight: 500;
color: var(--muted);
transition: color 0.2s;
}
#mn-03-home:checked ~ .mn-03__tabbar label[for="mn-03-home"] .mn-03__tab-label,
#mn-03-search:checked ~ .mn-03__tabbar label[for="mn-03-search"] .mn-03__tab-label,
#mn-03-alerts:checked ~ .mn-03__tabbar label[for="mn-03-alerts"] .mn-03__tab-label,
#mn-03-profile:checked ~ .mn-03__tabbar label[for="mn-03-profile"] .mn-03__tab-label {
color: var(--accent);
}
#mn-03-home:checked ~ .mn-03__tabbar label[for="mn-03-home"] .mn-03__tab-icon,
#mn-03-search:checked ~ .mn-03__tabbar label[for="mn-03-search"] .mn-03__tab-icon,
#mn-03-alerts:checked ~ .mn-03__tabbar label[for="mn-03-alerts"] .mn-03__tab-icon,
#mn-03-profile:checked ~ .mn-03__tabbar label[for="mn-03-profile"] .mn-03__tab-icon {
transform: scale(1.1);
}
/* Profile page */
.mn-03__profile-header {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px 0 24px;
background: var(--card);
border-radius: 16px;
margin-bottom: 12px;
}
.mn-03__profile-avatar {
width: 72px; height: 72px; border-radius: 50%;
background: linear-gradient(135deg, var(--accent), var(--accent4));
display: flex; align-items: center; justify-content: center;
font-size: 30px; margin-bottom: 12px;
}
.mn-03__profile-header h3 { font-size: 18px; font-weight: 600; color: var(--text); }
.mn-03__profile-header p { font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
.mn-03__page, .mn-03__tab-icon, .mn-03__tab-label { transition: none; }
}
```
### 04. Morphing Hamburger to X
**Type:** Pure CSS
**Description:** A GitHub-dark-inspired top navigation bar where the hamburger icon morphs cleanly into a close X via CSS transforms. The dropdown menu slides down from beneath the nav with a smooth cubic-bezier easing.
**HTML:**
```html
Good morning 👋
Welcome back, Dev
A collection of production-ready React components built with TypeScript.
High-performance API gateway with rate limiting and auth middleware.
60+ CSS animation demos with no dependencies required.
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-04 {
--bg: #0d1117;
--surface: #161b22;
--border: #30363d;
--accent: #58a6ff;
--accent2: #3fb950;
--text: #c9d1d9;
--muted: #8b949e;
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
background: var(--bg);
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.7);
color: var(--text);
}
.mn-04 #mn-04-toggle { display: none; }
/* Top bar */
.mn-04__topbar {
position: absolute;
top: 0; left: 0; right: 0;
height: 60px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
background: var(--bg);
border-bottom: 1px solid var(--border);
z-index: 5;
}
.mn-04__logo {
display: flex;
align-items: center;
gap: 8px;
}
.mn-04__logo-mark {
width: 28px; height: 28px;
background: var(--accent);
border-radius: 6px;
display: flex; align-items: center; justify-content: center;
font-size: 14px;
}
.mn-04__logo-text {
font-size: 16px;
font-weight: 700;
color: var(--text);
letter-spacing: -0.3px;
}
/* Morphing hamburger button */
.mn-04__btn {
width: 36px; height: 36px;
cursor: pointer;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.mn-04__btn-bar {
position: absolute;
width: 24px;
height: 2px;
background: var(--text);
border-radius: 2px;
transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
transform-origin: center;
}
.mn-04__btn-bar:nth-child(1) { transform: translateY(-7px); width: 16px; right: 6px; }
.mn-04__btn-bar:nth-child(2) { transform: translateY(0px); }
.mn-04__btn-bar:nth-child(3) { transform: translateY(7px); width: 20px; right: 6px; }
.mn-04 #mn-04-toggle:checked ~ .mn-04__topbar .mn-04__btn-bar:nth-child(1) {
transform: translateY(0) rotate(45deg);
width: 24px;
right: 6px;
}
.mn-04 #mn-04-toggle:checked ~ .mn-04__topbar .mn-04__btn-bar:nth-child(2) {
opacity: 0;
transform: scaleX(0) translateY(0);
}
.mn-04 #mn-04-toggle:checked ~ .mn-04__topbar .mn-04__btn-bar:nth-child(3) {
transform: translateY(0) rotate(-45deg);
width: 24px;
right: 6px;
}
/* Menu panel — drops from top */
.mn-04__menu {
position: absolute;
top: 60px; left: 0; right: 0;
background: var(--surface);
border-bottom: 1px solid var(--border);
z-index: 4;
transform: translateY(-100%);
opacity: 0;
transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s;
pointer-events: none;
}
.mn-04 #mn-04-toggle:checked ~ .mn-04__menu {
transform: translateY(0);
opacity: 1;
pointer-events: all;
}
.mn-04__menu-inner { padding: 8px 0 16px; }
.mn-04__menu-section {
padding: 12px 20px 4px;
font-size: 11px;
font-weight: 600;
letter-spacing: 1px;
text-transform: uppercase;
color: var(--muted);
}
.mn-04__menu-item {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 20px;
font-size: 14px;
color: var(--text);
cursor: pointer;
transition: background 0.15s;
text-decoration: none;
}
.mn-04__menu-item:hover { background: rgba(88,166,255,0.06); }
.mn-04__menu-item.is-active { color: var(--accent); }
.mn-04__menu-item-icon {
width: 18px;
text-align: center;
font-size: 15px;
}
.mn-04__menu-item-badge {
margin-left: auto;
background: var(--accent);
color: var(--bg);
font-size: 10px;
font-weight: 700;
padding: 2px 7px;
border-radius: 10px;
}
.mn-04__menu-divider {
height: 1px;
background: var(--border);
margin: 8px 20px;
}
/* Page content */
.mn-04__content {
position: absolute;
top: 60px; left: 0; right: 0; bottom: 0;
padding: 24px 20px;
overflow-y: auto;
}
.mn-04__greeting {
margin-bottom: 24px;
}
.mn-04__greeting p { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.mn-04__greeting h2 { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.mn-04__repo {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 16px;
margin-bottom: 10px;
transition: border-color 0.2s;
}
.mn-04__repo:hover { border-color: var(--accent); }
.mn-04__repo-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.mn-04__repo-name { font-size: 14px; font-weight: 600; color: var(--accent); }
.mn-04__repo-desc { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.mn-04__repo-meta { display: flex; gap: 14px; }
.mn-04__repo-meta span { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.mn-04__dot { width: 10px; height: 10px; border-radius: 50%; }
@media (prefers-reduced-motion: reduce) {
.mn-04__btn-bar, .mn-04__menu { transition: none; }
}
```
### 05. Radial Fan Menu
**Type:** Pure CSS
**Description:** A floating action button that rotates 45° on activation and fans out five labelled radial action items in a bottom-right arc, each with a staggered spring entrance via CSS cubic-bezier.
**HTML:**
```html
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-05 {
--bg: #0f172a;
--surface: #1e293b;
--accent: #6366f1;
--accent2: #ec4899;
--accent3: #14b8a6;
--accent4: #f59e0b;
--accent5: #22c55e;
--text: #f1f5f9;
--muted: #64748b;
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
background: var(--bg);
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}
.mn-05 #mn-05-toggle { display: none; }
/* Background overlay */
.mn-05__overlay {
position: absolute;
inset: 0;
background: rgba(0,0,0,0.5);
opacity: 0;
pointer-events: none;
transition: opacity 0.3s;
z-index: 5;
}
.mn-05 #mn-05-toggle:checked ~ .mn-05__overlay {
opacity: 1;
pointer-events: all;
}
/* Page content */
.mn-05__page {
position: absolute;
inset: 0;
padding: 24px 20px;
display: flex;
flex-direction: column;
}
.mn-05__header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 32px;
}
.mn-05__logo {
font-size: 22px;
font-weight: 800;
color: var(--text);
letter-spacing: -0.5px;
}
.mn-05__logo span { color: var(--accent); }
.mn-05__hero-text {
margin-bottom: 24px;
}
.mn-05__hero-text h2 {
font-size: 28px;
font-weight: 700;
color: var(--text);
letter-spacing: -0.7px;
line-height: 1.2;
margin-bottom: 8px;
}
.mn-05__hero-text p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.mn-05__stat-row {
display: flex;
gap: 12px;
margin-bottom: 24px;
}
.mn-05__stat {
flex: 1;
background: var(--surface);
border-radius: 14px;
padding: 16px;
border: 1px solid rgba(255,255,255,0.06);
}
.mn-05__stat-val { font-size: 22px; font-weight: 700; color: var(--text); }
.mn-05__stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
/* FAB button */
.mn-05__fab {
position: absolute;
bottom: 28px;
right: 24px;
z-index: 20;
width: 58px;
height: 58px;
border-radius: 50%;
background: var(--accent);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 8px 32px rgba(99,102,241,0.5);
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s;
}
.mn-05__fab:hover { transform: scale(1.08); }
.mn-05 #mn-05-toggle:checked ~ .mn-05__fab {
background: var(--accent2);
transform: rotate(45deg);
}
.mn-05__fab-icon {
font-size: 22px;
color: #fff;
transition: transform 0.3s;
line-height: 1;
}
/* Radial items */
.mn-05__radial-item {
position: absolute;
z-index: 15;
display: flex;
/* row-reverse: label sits to the LEFT of the btn. The btn is on
the right edge of the item (anchored to the right:Npx arc
position), and the label extends LEFTWARD into the empty page
area instead of stacking vertically below the btn — that fixes
the label/adjacent-btn overlap when buttons sit close on the
vertical part of the arc. */
flex-direction: row-reverse;
align-items: center;
gap: 8px;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mn-05__radial-btn {
width: 48px;
height: 48px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.mn-05__radial-label {
font-size: 10px;
font-weight: 600;
color: var(--text);
background: rgba(0,0,0,0.6);
padding: 2px 7px;
border-radius: 20px;
white-space: nowrap;
}
/* Items positioned on a 140px arc fanning out from the FAB center.
FAB at bottom:28 right:24 (58x58) so FAB center is at bottom:57
right:53. Item buttons are 48x48 → subtract 24 to center btn on
the arc. Result:
right = 53 + 140*sin(θ) - 24 = 29 + 140*sin(θ)
bottom = 57 + 140*cos(θ) - 24 = 33 + 140*cos(θ)
Five items spread across 10°-85° with NON-LINEAR angle distribution
(10°, 32°, 50°, 68°, 85°) so vertical spacing between adjacent items
increases progressively along the arc — the top items where cos
changes slowly get larger angular jumps to avoid label overlap.
Source-order matches visual order: Gallery near top, Settings near
left. */
.mn-05__radial-item:nth-child(1) { bottom: 171px; right: 53px; transform: translateY(20px) scale(0.7); } /* 10° Gallery */
.mn-05__radial-item:nth-child(2) { bottom: 152px; right: 103px; transform: translateY(20px) scale(0.7); } /* 32° Edit */
.mn-05__radial-item:nth-child(3) { bottom: 123px; right: 136px; transform: translateY(20px) scale(0.7); } /* 50° Share */
.mn-05__radial-item:nth-child(4) { bottom: 86px; right: 159px; transform: translateY(20px) scale(0.7); } /* 68° Favorites */
.mn-05__radial-item:nth-child(5) { bottom: 45px; right: 168px; transform: translateY(20px) scale(0.7); } /* 85° Settings */
.mn-05 #mn-05-toggle:checked ~ .mn-05__radial-items .mn-05__radial-item {
opacity: 1;
pointer-events: all;
}
.mn-05 #mn-05-toggle:checked ~ .mn-05__radial-items .mn-05__radial-item:nth-child(1) { transform: translateY(0) scale(1); transition-delay: 0.03s; }
.mn-05 #mn-05-toggle:checked ~ .mn-05__radial-items .mn-05__radial-item:nth-child(2) { transform: translateY(0) scale(1); transition-delay: 0.08s; }
.mn-05 #mn-05-toggle:checked ~ .mn-05__radial-items .mn-05__radial-item:nth-child(3) { transform: translateY(0) scale(1); transition-delay: 0.13s; }
.mn-05 #mn-05-toggle:checked ~ .mn-05__radial-items .mn-05__radial-item:nth-child(4) { transform: translateY(0) scale(1); transition-delay: 0.18s; }
.mn-05 #mn-05-toggle:checked ~ .mn-05__radial-items .mn-05__radial-item:nth-child(5) { transform: translateY(0) scale(1); transition-delay: 0.23s; }
@media (prefers-reduced-motion: reduce) {
.mn-05__fab, .mn-05__radial-item, .mn-05__overlay { transition: none; }
}
```
### 06. Swipe Gesture Sidebar
**Type:** CSS + JS
**Description:** A sidebar navigation that responds to edge-swipe touch gestures with real drag tracking, velocity-based dismiss, and a page push parallax effect — built with a small vanilla JS touch handler and CSS transitions.
**HTML:**
```html
← Swipe right from the left edge or tap the menu button to open the sidebar
Brand Identity Project
Updated 2 hours ago · 14 layers
App Redesign
Updated yesterday · 38 layers
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-06 {
--bg: #18181b;
--surface: #27272a;
--border: #3f3f46;
--accent: #a78bfa;
--accent2: #f472b6;
--text: #fafafa;
--muted: #71717a;
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
background: var(--bg);
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.7);
touch-action: pan-y;
user-select: none;
}
/* Overlay */
.mn-06__overlay {
position: absolute;
inset: 0;
background: rgba(0,0,0,0);
z-index: 10;
pointer-events: none;
transition: background 0.3s;
}
.mn-06.is-open .mn-06__overlay {
background: rgba(0,0,0,0.55);
pointer-events: all;
}
/* Sidebar */
.mn-06__sidebar {
position: absolute;
top: 0; left: 0; bottom: 0;
width: 280px;
background: var(--surface);
transform: translateX(-100%);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 20;
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
will-change: transform;
}
.mn-06.is-open .mn-06__sidebar { transform: translateX(0); }
.mn-06__sidebar.is-dragging { transition: none; }
/* Edge hit zone */
.mn-06__edge-zone {
position: absolute;
top: 0; left: 0; bottom: 0;
width: 20px;
z-index: 25;
cursor: ew-resize;
}
.mn-06__sidebar-header {
padding: 40px 20px 20px;
background: linear-gradient(135deg, rgba(167,139,250,0.15), rgba(244,114,182,0.08));
border-bottom: 1px solid var(--border);
}
.mn-06__user-pill {
display: flex;
align-items: center;
gap: 12px;
}
.mn-06__avatar {
width: 44px; height: 44px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent), var(--accent2));
display: flex; align-items: center; justify-content: center;
font-size: 18px;
flex-shrink: 0;
}
.mn-06__user-info h4 { font-size: 15px; font-weight: 600; color: var(--text); }
.mn-06__user-info p { font-size: 12px; color: var(--muted); }
.mn-06__sidebar-nav { flex: 1; padding: 12px 0; }
.mn-06__nav-label {
padding: 12px 20px 4px;
font-size: 10px;
font-weight: 700;
letter-spacing: 1.5px;
text-transform: uppercase;
color: rgba(113,113,122,0.6);
}
.mn-06__nav-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 20px;
color: var(--muted);
text-decoration: none;
font-size: 14px;
font-weight: 500;
transition: all 0.15s;
border-radius: 0;
cursor: pointer;
}
.mn-06__nav-item:hover, .mn-06__nav-item.is-active {
color: var(--text);
background: rgba(167,139,250,0.1);
}
.mn-06__nav-item.is-active { color: var(--accent); }
/* Swipe hint */
.mn-06__hint {
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 4px;
height: 48px;
background: linear-gradient(to bottom, var(--accent), var(--accent2));
border-radius: 0 4px 4px 0;
opacity: 0.5;
animation: mn-06-pulse 2s ease-in-out infinite;
}
.mn-06.is-open .mn-06__hint { opacity: 0; }
@keyframes mn-06-pulse {
0%, 100% { opacity: 0.2; transform: translateY(-50%) scaleY(0.8); }
50% { opacity: 0.6; transform: translateY(-50%) scaleY(1); }
}
/* Page content */
.mn-06__page {
position: absolute;
inset: 0;
padding: 20px;
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
will-change: transform;
}
.mn-06.is-open .mn-06__page { transform: translateX(60px); }
.mn-06__topbar {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 28px;
}
.mn-06__menu-btn {
width: 40px; height: 40px;
border-radius: 10px;
background: var(--surface);
display: flex; flex-direction: column;
align-items: center; justify-content: center;
gap: 4px;
cursor: pointer;
border: 1px solid var(--border);
}
.mn-06__menu-btn span {
width: 18px; height: 2px;
background: var(--text);
border-radius: 2px;
}
.mn-06__page-title { font-size: 18px; font-weight: 700; color: var(--text); }
.mn-06__swipe-hint-text {
text-align: center;
margin-top: 40px;
color: var(--muted);
font-size: 13px;
line-height: 1.8;
}
.mn-06__swipe-hint-text strong { color: var(--accent); }
.mn-06__card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 16px;
padding: 20px;
margin-bottom: 12px;
}
.mn-06__card h4 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.mn-06__card p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.mn-06__card-accent { width: 32px; height: 3px; border-radius: 2px; margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) {
.mn-06__sidebar, .mn-06__page, .mn-06__overlay, .mn-06__hint { transition: none; animation: none; }
}
```
**JS:**
```js
(function() {
const root = document.getElementById('mn-06-root');
const sidebar = document.getElementById('mn-06-sidebar');
const overlay = document.getElementById('mn-06-overlay');
const menuBtn = document.getElementById('mn-06-menu-btn');
const edge = document.getElementById('mn-06-edge');
const SIDEBAR_W = 280;
let startX = 0, startY = 0, currentX = 0, isDragging = false, isOpen = false;
function open() { isOpen = true; root.classList.add('is-open'); }
function close() { isOpen = false; root.classList.remove('is-open'); sidebar.style.transform = ''; sidebar.classList.remove('is-dragging'); }
menuBtn.addEventListener('click', () => isOpen ? close() : open());
overlay.addEventListener('click', close);
function onTouchStart(e) {
startX = e.touches[0].clientX;
startY = e.touches[0].clientY;
isDragging = false;
}
function onTouchMove(e) {
const dx = e.touches[0].clientX - startX;
const dy = e.touches[0].clientY - startY;
if (!isDragging && Math.abs(dy) > Math.abs(dx)) return;
if (!isDragging && Math.abs(dx) < 8) return;
isDragging = true;
const rect = root.getBoundingClientRect();
currentX = e.touches[0].clientX - rect.left;
if (!isOpen && currentX > SIDEBAR_W + 20) return;
if (isOpen) {
const offset = Math.min(0, currentX - startX);
if (offset < 0) {
sidebar.classList.add('is-dragging');
sidebar.style.transform = `translateX(${offset}px)`;
}
} else {
const offset = Math.min(SIDEBAR_W, Math.max(0, currentX));
sidebar.classList.add('is-dragging');
sidebar.style.transform = `translateX(${offset - SIDEBAR_W}px)`;
}
}
function onTouchEnd(e) {
if (!isDragging) return;
sidebar.classList.remove('is-dragging');
sidebar.style.transform = '';
const dx = e.changedTouches[0].clientX - startX;
if (!isOpen && dx > 60) open();
else if (isOpen && dx < -60) close();
isDragging = false;
}
root.addEventListener('touchstart', onTouchStart, { passive: true });
root.addEventListener('touchmove', onTouchMove, { passive: true });
root.addEventListener('touchend', onTouchEnd);
})();
```
### 07. FAB Speed Dial Navigation
**Type:** Pure CSS
**Description:** A map-style UI with a floating action button that expands into a vertical speed-dial stack of four labelled action items, each with a spring entrance. The FAB morphs from a rounded square to a circle and rotates 45°.
**HTML:**
```html
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-07 {
--bg: #fafaf9;
--surface: #ffffff;
--border: #e7e5e4;
--accent: #dc2626;
--text: #1c1917;
--muted: #78716c;
--shadow: rgba(0,0,0,0.12);
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
background: var(--bg);
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.mn-07 #mn-07-toggle { display: none; }
/* Scrim */
.mn-07__scrim {
position: absolute;
inset: 0;
background: rgba(0,0,0,0);
pointer-events: none;
transition: background 0.3s;
z-index: 5;
}
.mn-07 #mn-07-toggle:checked ~ .mn-07__scrim {
background: rgba(0,0,0,0.2);
pointer-events: all;
}
/* Map-style page */
.mn-07__map {
position: absolute;
inset: 0;
background:
linear-gradient(rgba(250,250,249,0) 0%, rgba(250,250,249,0) 100%),
repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(0,0,0,0.05) 39px, rgba(0,0,0,0.05) 40px),
repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(0,0,0,0.05) 39px, rgba(0,0,0,0.05) 40px);
background-color: #f5f0e8;
}
.mn-07__map-road {
position: absolute;
background: #fff;
border-radius: 4px;
}
.mn-07__map-road:nth-child(1) { top: 120px; left: 0; right: 0; height: 18px; }
.mn-07__map-road:nth-child(2) { top: 0; bottom: 0; left: 140px; width: 18px; }
.mn-07__map-road:nth-child(3) { top: 280px; left: 0; right: 0; height: 10px; }
.mn-07__map-road:nth-child(4) { top: 0; bottom: 0; left: 60px; width: 10px; }
.mn-07__map-road:nth-child(5) { top: 0; bottom: 0; right: 80px; width: 10px; }
.mn-07__map-pin {
position: absolute;
top: 90px;
left: 110px;
font-size: 28px;
filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
transform: translate(-50%, -100%);
animation: mn-07-drop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes mn-07-drop {
from { transform: translate(-50%, -160%) scale(0.5); opacity: 0; }
to { transform: translate(-50%, -100%) scale(1); opacity: 1; }
}
/* Search bar */
.mn-07__search {
position: absolute;
top: 20px;
left: 16px;
right: 16px;
background: var(--surface);
border-radius: 28px;
padding: 14px 18px;
display: flex;
align-items: center;
gap: 10px;
box-shadow: 0 4px 16px var(--shadow);
z-index: 3;
}
.mn-07__search p { color: var(--muted); font-size: 14px; }
/* Speed dial items */
.mn-07__speed-item {
position: absolute;
right: 24px;
z-index: 15;
display: flex;
align-items: center;
gap: 12px;
opacity: 0;
pointer-events: none;
transform: scale(0.6) translateY(20px);
transition: opacity 0.25s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mn-07__speed-label {
background: rgba(28,25,23,0.85);
color: #fff;
font-size: 12px;
font-weight: 600;
padding: 6px 12px;
border-radius: 20px;
white-space: nowrap;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.mn-07__speed-btn {
width: 48px; height: 48px;
border-radius: 50%;
display: flex; align-items: center; justify-content: center;
font-size: 20px;
box-shadow: 0 4px 16px rgba(0,0,0,0.2);
flex-shrink: 0;
}
/* Stacked upward from FAB at bottom: 100px */
.mn-07__speed-item:nth-child(1) { bottom: 104px; }
.mn-07__speed-item:nth-child(2) { bottom: 164px; }
.mn-07__speed-item:nth-child(3) { bottom: 224px; }
.mn-07__speed-item:nth-child(4) { bottom: 284px; }
.mn-07 #mn-07-toggle:checked ~ .mn-07__speed-items .mn-07__speed-item {
opacity: 1; pointer-events: all;
}
.mn-07 #mn-07-toggle:checked ~ .mn-07__speed-items .mn-07__speed-item:nth-child(1) { transform: scale(1) translateY(0); transition-delay: 0s; }
.mn-07 #mn-07-toggle:checked ~ .mn-07__speed-items .mn-07__speed-item:nth-child(2) { transform: scale(1) translateY(0); transition-delay: 0.05s; }
.mn-07 #mn-07-toggle:checked ~ .mn-07__speed-items .mn-07__speed-item:nth-child(3) { transform: scale(1) translateY(0); transition-delay: 0.1s; }
.mn-07 #mn-07-toggle:checked ~ .mn-07__speed-items .mn-07__speed-item:nth-child(4) { transform: scale(1) translateY(0); transition-delay: 0.15s; }
/* FAB */
.mn-07__fab {
position: absolute;
bottom: 28px;
right: 24px;
z-index: 20;
width: 56px; height: 56px;
border-radius: 16px;
background: var(--accent);
cursor: pointer;
display: flex; align-items: center; justify-content: center;
box-shadow: 0 8px 24px rgba(220,38,38,0.45);
transition: border-radius 0.3s, transform 0.2s;
}
.mn-07__fab:hover { transform: scale(1.05); }
.mn-07 #mn-07-toggle:checked ~ .mn-07__fab {
border-radius: 50%;
transform: rotate(45deg);
}
.mn-07__fab-icon { font-size: 22px; color: #fff; }
@media (prefers-reduced-motion: reduce) {
.mn-07__speed-item, .mn-07__fab, .mn-07__scrim, .mn-07__map-pin { transition: none; animation: none; }
}
```
### 08. Tab Bar with Sliding Indicator Pill
**Type:** Pure CSS
**Description:** A dark music-app tab bar with a smooth sliding pill indicator that transitions between four tabs, each with its own accent colour. Pages switch with a fade-slide animation, all driven by radio inputs.
**HTML:**
```html
🎵 Music
🎙️ Pods
📻 Radio
📚 Library
Trending Now
🎵
Neon Lights Synthwave Collective · 3:42
⋯
🎸
Midnight Drive Neon Atlas · 4:18
⋯
🎹
Electric Dream Pixel Sound · 5:01
⋯
Live Radio
📻
Synthwave FM 🔴 Live · 2.4k listeners
▶
🎶
Chill Beats 🔴 Live · 8.1k listeners
▶
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-08 {
--bg: #09090b;
--surface: #18181b;
--border: #27272a;
--accent: #22d3ee;
--accent2: #fb923c;
--accent3: #a78bfa;
--accent4: #4ade80;
--text: #fafafa;
--muted: #71717a;
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
background: var(--bg);
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.8);
}
.mn-08 input[type="radio"] { display: none; }
/* Header */
.mn-08__header {
padding: 28px 20px 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.mn-08__logo {
font-size: 20px;
font-weight: 800;
letter-spacing: -0.5px;
background: linear-gradient(90deg, var(--accent), var(--accent3));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.mn-08__notif {
width: 36px; height: 36px;
border-radius: 50%;
background: var(--surface);
border: 1px solid var(--border);
display: flex; align-items: center; justify-content: center;
font-size: 16px;
position: relative;
}
.mn-08__notif::after {
content: '';
position: absolute;
top: 6px; right: 7px;
width: 8px; height: 8px;
background: #ef4444;
border-radius: 50%;
border: 2px solid var(--bg);
}
/* Tab pill nav */
.mn-08__tabs {
position: relative;
display: flex;
align-items: center;
background: var(--surface);
border-radius: 20px;
margin: 20px 16px;
padding: 4px;
border: 1px solid var(--border);
}
.mn-08__tab-pill {
position: absolute;
height: calc(100% - 8px);
border-radius: 16px;
top: 4px;
transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
pointer-events: none;
}
/* 4 tabs → each 25% */
#mn-08-t1:checked ~ .mn-08__tabs .mn-08__tab-pill {
left: 4px; width: calc(25% - 2px); background: var(--accent);
}
#mn-08-t2:checked ~ .mn-08__tabs .mn-08__tab-pill {
left: calc(25% + 2px); width: calc(25% - 2px); background: var(--accent2);
}
#mn-08-t3:checked ~ .mn-08__tabs .mn-08__tab-pill {
left: calc(50% + 2px); width: calc(25% - 2px); background: var(--accent3);
}
#mn-08-t4:checked ~ .mn-08__tabs .mn-08__tab-pill {
left: calc(75% + 2px); width: calc(25% - 4px); background: var(--accent4);
}
.mn-08__tab-label {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 3px;
padding: 8px 4px;
cursor: pointer;
z-index: 1;
transition: color 0.25s;
color: var(--muted);
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
border-radius: 16px;
}
.mn-08__tab-label span { font-size: 18px; display: block; }
#mn-08-t1:checked ~ .mn-08__tabs label[for="mn-08-t1"],
#mn-08-t2:checked ~ .mn-08__tabs label[for="mn-08-t2"],
#mn-08-t3:checked ~ .mn-08__tabs label[for="mn-08-t3"],
#mn-08-t4:checked ~ .mn-08__tabs label[for="mn-08-t4"] {
color: var(--bg);
}
/* Pages */
.mn-08__pages { position: absolute; top: 158px; left: 0; right: 0; bottom: 0; }
.mn-08__page {
position: absolute;
inset: 0;
padding: 0 16px 16px;
opacity: 0;
pointer-events: none;
transform: translateY(10px);
transition: opacity 0.3s, transform 0.3s;
overflow-y: auto;
}
#mn-08-t1:checked ~ .mn-08__pages .mn-08__page[data-p="1"],
#mn-08-t2:checked ~ .mn-08__pages .mn-08__page[data-p="2"],
#mn-08-t3:checked ~ .mn-08__pages .mn-08__page[data-p="3"],
#mn-08-t4:checked ~ .mn-08__pages .mn-08__page[data-p="4"] {
opacity: 1;
pointer-events: all;
transform: translateY(0);
}
.mn-08__section-title {
font-size: 20px;
font-weight: 700;
color: var(--text);
letter-spacing: -0.4px;
margin-bottom: 16px;
}
.mn-08__track {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 14px;
padding: 14px 16px;
display: flex;
align-items: center;
gap: 14px;
margin-bottom: 10px;
}
.mn-08__track-art {
width: 48px; height: 48px;
border-radius: 10px;
display: flex; align-items: center; justify-content: center;
font-size: 22px;
flex-shrink: 0;
}
.mn-08__track-info h4 { font-size: 14px; font-weight: 600; color: var(--text); }
.mn-08__track-info p { font-size: 12px; color: var(--muted); }
.mn-08__track-more { margin-left: auto; color: var(--muted); font-size: 18px; cursor: pointer; }
/* Podcast / video cards */
.mn-08__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mn-08__grid-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 14px;
padding: 16px;
display: flex;
flex-direction: column;
gap: 8px;
}
.mn-08__grid-icon { font-size: 28px; }
.mn-08__grid-card h4 { font-size: 13px; font-weight: 600; color: var(--text); }
.mn-08__grid-card p { font-size: 11px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
.mn-08__tab-pill, .mn-08__page { transition: none; }
}
```
### 09. Mega Menu Accordion
**Type:** Pure CSS
**Description:** A light-mode mobile nav where a hamburger toggles a full-height drawer containing three accordion sections. Sections expand via max-height transitions with animated chevrons, all driven by Pure CSS checkboxes.
**HTML:**
```html
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-09 {
--bg: #ffffff;
--surface: #f9fafb;
--border: #e5e7eb;
--accent: #059669;
--accent2: #0891b2;
--accent3: #7c3aed;
--text: #111827;
--muted: #6b7280;
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
background: var(--bg);
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.5);
display: flex;
flex-direction: column;
}
.mn-09 input[type="checkbox"], .mn-09 input[type="radio"] { display: none; }
/* Top bar */
.mn-09__topbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-bottom: 1px solid var(--border);
background: var(--bg);
z-index: 10;
flex-shrink: 0;
}
.mn-09__logo {
font-size: 18px;
font-weight: 800;
color: var(--text);
}
.mn-09__logo span { color: var(--accent); }
.mn-09__nav-toggle {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
font-weight: 600;
color: var(--text);
cursor: pointer;
padding: 8px 14px;
border: 1px solid var(--border);
border-radius: 20px;
transition: background 0.2s;
}
.mn-09__nav-toggle:hover { background: var(--surface); }
.mn-09__nav-toggle-bars {
width: 16px;
display: flex;
flex-direction: column;
gap: 3px;
}
.mn-09__nav-toggle-bars span {
display: block;
height: 2px;
background: var(--text);
border-radius: 1px;
transition: all 0.3s;
}
.mn-09__nav-toggle-bars span:nth-child(2) { width: 12px; }
#mn-09-main:checked ~ .mn-09__topbar .mn-09__nav-toggle .mn-09__nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
#mn-09-main:checked ~ .mn-09__topbar .mn-09__nav-toggle .mn-09__nav-toggle-bars span:nth-child(2) { opacity: 0; }
#mn-09-main:checked ~ .mn-09__topbar .mn-09__nav-toggle .mn-09__nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); width: 16px; }
/* Full nav drawer */
.mn-09__nav-drawer {
position: absolute;
top: 57px;
left: 0; right: 0; bottom: 0;
background: var(--bg);
z-index: 9;
transform: translateY(-100%);
transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
overflow-y: auto;
}
#mn-09-main:checked ~ .mn-09__nav-drawer { transform: translateY(0); }
/* Accordion items */
.mn-09__acc-item { border-bottom: 1px solid var(--border); }
.mn-09__acc-label {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
font-size: 15px;
font-weight: 600;
color: var(--text);
cursor: pointer;
gap: 8px;
}
.mn-09__acc-label-left {
display: flex; align-items: center; gap: 12px;
}
.mn-09__acc-icon {
width: 32px; height: 32px;
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-size: 15px;
}
.mn-09__acc-chevron {
width: 20px; height: 20px;
border-radius: 50%;
background: var(--surface);
display: flex; align-items: center; justify-content: center;
font-size: 10px;
transition: transform 0.3s;
color: var(--muted);
}
.mn-09__acc-body {
max-height: 0;
overflow: hidden;
transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
background: var(--surface);
}
.mn-09__acc-check:checked ~ .mn-09__acc-item .mn-09__acc-body { max-height: 300px; }
.mn-09__acc-check:checked ~ .mn-09__acc-item .mn-09__acc-chevron { transform: rotate(180deg); }
.mn-09__sub-links { padding: 8px 0 16px 60px; }
.mn-09__sub-links a {
display: flex; align-items: center; gap: 10px;
padding: 10px 20px 10px 0;
color: var(--muted);
text-decoration: none;
font-size: 14px;
transition: color 0.15s;
border-bottom: 1px solid rgba(0,0,0,0.04);
}
.mn-09__sub-links a:last-child { border-bottom: none; }
.mn-09__sub-links a:hover { color: var(--text); }
.mn-09__sub-badge {
margin-left: auto;
font-size: 10px;
font-weight: 700;
padding: 2px 6px;
border-radius: 10px;
background: rgba(5,150,105,0.12);
color: var(--accent);
}
/* Promo strip in accordion */
.mn-09__acc-promo {
margin: 0 16px 16px;
padding: 14px;
border-radius: 12px;
background: linear-gradient(135deg, rgba(5,150,105,0.08), rgba(8,145,178,0.08));
border: 1px solid rgba(5,150,105,0.2);
display: flex; align-items: center; gap: 12px;
}
.mn-09__acc-promo p { font-size: 13px; color: var(--text); line-height: 1.4; }
.mn-09__acc-promo strong { font-weight: 700; color: var(--accent); }
/* Nav footer */
.mn-09__nav-footer {
padding: 20px;
display: flex; gap: 10px;
}
.mn-09__nav-footer a {
flex: 1;
text-align: center;
padding: 12px;
border-radius: 10px;
font-size: 13px;
font-weight: 600;
text-decoration: none;
}
.mn-09__nav-footer a:first-child { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.mn-09__nav-footer a:last-child { background: var(--accent); color: #fff; }
/* Page content */
.mn-09__page { flex: 1; padding: 20px; overflow-y: auto; }
.mn-09__page h2 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.mn-09__page p { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.mn-09__feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mn-09__feature {
background: var(--surface);
border-radius: 14px;
padding: 16px;
border: 1px solid var(--border);
}
.mn-09__feature-icon { font-size: 24px; margin-bottom: 8px; }
.mn-09__feature h4 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.mn-09__feature p { font-size: 11px; color: var(--muted); line-height: 1.4; margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) {
.mn-09__nav-drawer, .mn-09__acc-body, .mn-09__acc-chevron, .mn-09__nav-toggle-bars span { transition: none; }
}
```
### 10. Glass Morphism Nav Drawer
**Type:** Pure CSS
**Description:** A sidebar drawer with heavy backdrop-filter glass styling over continuously animated gradient blobs. Features a frosted glass avatar, gradient-tinted nav links, and an upgrade card — all Pure CSS.
**HTML:**
```html
✨
Morgan Lee
morglee@studio.io
Upgrade to Pro ✨
Unlock unlimited projects, advanced analytics, and priority support.
Upgrade Now
Good evening ✨
Here's your workspace overview
Active Projects
8 projects running — 3 due this week
Recent Designs
Landing page refresh updated 20 min ago
Team Activity
4 collaborators online right now
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-10 {
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}
/* Background gradient blobs */
.mn-10__bg {
position: absolute;
inset: 0;
background: linear-gradient(135deg, #1a0533 0%, #0a0a2a 50%, #001a33 100%);
z-index: 0;
}
.mn-10__blob {
position: absolute;
border-radius: 50%;
filter: blur(60px);
opacity: 0.6;
}
.mn-10__blob:nth-child(1) {
width: 250px; height: 250px;
top: -80px; left: -60px;
background: radial-gradient(circle, #7c3aed, transparent 70%);
animation: mn-10-blob1 8s ease-in-out infinite;
}
.mn-10__blob:nth-child(2) {
width: 200px; height: 200px;
bottom: -40px; right: -40px;
background: radial-gradient(circle, #0ea5e9, transparent 70%);
animation: mn-10-blob2 10s ease-in-out infinite;
}
.mn-10__blob:nth-child(3) {
width: 150px; height: 150px;
top: 50%; left: 60%;
background: radial-gradient(circle, #ec4899, transparent 70%);
animation: mn-10-blob3 12s ease-in-out infinite;
}
@keyframes mn-10-blob1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(30px,30px)} }
@keyframes mn-10-blob2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-20px,-20px)} }
@keyframes mn-10-blob3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-15px,10px) scale(1.2)} }
.mn-10 #mn-10-toggle { display: none; }
/* Topbar */
.mn-10__topbar {
position: absolute;
top: 0; left: 0; right: 0;
height: 64px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
z-index: 10;
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mn-10__logo {
font-size: 18px;
font-weight: 700;
color: #fff;
letter-spacing: -0.3px;
}
.mn-10__logo span {
background: linear-gradient(90deg, #a78bfa, #38bdf8);
-webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
/* Hamburger */
.mn-10__btn {
width: 40px; height: 40px;
border-radius: 12px;
background: rgba(255,255,255,0.1);
border: 1px solid rgba(255,255,255,0.15);
cursor: pointer;
display: flex; flex-direction: column;
align-items: center; justify-content: center;
gap: 5px;
}
.mn-10__btn span {
width: 18px; height: 2px;
background: rgba(255,255,255,0.9);
border-radius: 2px;
transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
transform-origin: center;
}
.mn-10 #mn-10-toggle:checked ~ .mn-10__topbar .mn-10__btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mn-10 #mn-10-toggle:checked ~ .mn-10__topbar .mn-10__btn span:nth-child(2) { opacity: 0; }
.mn-10 #mn-10-toggle:checked ~ .mn-10__topbar .mn-10__btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Overlay */
.mn-10__overlay {
position: absolute;
inset: 0;
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
background: rgba(0,0,0,0.3);
z-index: 15;
opacity: 0;
pointer-events: none;
transition: opacity 0.35s;
}
.mn-10 #mn-10-toggle:checked ~ .mn-10__overlay {
opacity: 1;
pointer-events: all;
}
/* Glass drawer */
.mn-10__drawer {
position: absolute;
top: 0; left: 0; bottom: 0;
width: 285px;
background: rgba(255,255,255,0.07);
backdrop-filter: blur(24px) saturate(180%);
-webkit-backdrop-filter: blur(24px) saturate(180%);
border-right: 1px solid rgba(255,255,255,0.12);
z-index: 20;
transform: translateX(-100%);
transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
display: flex;
flex-direction: column;
}
.mn-10 #mn-10-toggle:checked ~ .mn-10__overlay ~ .mn-10__drawer {
transform: translateX(0);
}
.mn-10__drawer-top {
padding: 80px 24px 24px;
border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mn-10__glass-avatar {
width: 56px; height: 56px;
border-radius: 50%;
background: linear-gradient(135deg, rgba(167,139,250,0.5), rgba(56,189,248,0.5));
border: 2px solid rgba(255,255,255,0.3);
display: flex; align-items: center; justify-content: center;
font-size: 24px;
margin-bottom: 14px;
backdrop-filter: blur(10px);
}
.mn-10__drawer-top h3 {
color: rgba(255,255,255,0.95);
font-size: 16px;
font-weight: 600;
margin-bottom: 2px;
}
.mn-10__drawer-top p { color: rgba(255,255,255,0.45); font-size: 13px; }
.mn-10__drawer-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.mn-10__nav-section { padding: 12px 24px 4px; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.25); }
.mn-10__nav-link {
display: flex; align-items: center; gap: 12px;
padding: 12px 24px;
color: rgba(255,255,255,0.65);
text-decoration: none;
font-size: 14px;
font-weight: 500;
transition: all 0.2s;
border-radius: 0;
}
.mn-10__nav-link:hover, .mn-10__nav-link.is-active {
background: rgba(255,255,255,0.07);
color: rgba(255,255,255,0.95);
}
.mn-10__nav-link.is-active { color: #a78bfa; }
.mn-10__nav-link-icon { width: 18px; text-align: center; font-size: 16px; }
.mn-10__nav-link-badge {
margin-left: auto;
background: rgba(167,139,250,0.2);
color: #a78bfa;
font-size: 10px;
font-weight: 700;
padding: 2px 8px;
border-radius: 10px;
}
/* Glass upgrade card */
.mn-10__upgrade {
margin: 12px 16px 24px;
padding: 16px;
border-radius: 16px;
background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(14,165,233,0.15));
border: 1px solid rgba(167,139,250,0.3);
}
.mn-10__upgrade h4 { color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.mn-10__upgrade p { color: rgba(255,255,255,0.55); font-size: 11px; line-height: 1.5; margin-bottom: 10px; }
.mn-10__upgrade-btn {
display: block; width: 100%;
background: linear-gradient(90deg, #7c3aed, #0ea5e9);
color: #fff;
text-align: center;
font-size: 12px;
font-weight: 600;
padding: 8px;
border-radius: 8px;
text-decoration: none;
}
/* Page */
.mn-10__page {
position: absolute;
top: 64px; inset-inline: 0; bottom: 0;
padding: 24px 20px;
z-index: 5;
overflow-y: auto;
}
.mn-10__welcome { color: rgba(255,255,255,0.95); font-size: 24px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 8px; }
.mn-10__sub { color: rgba(255,255,255,0.45); font-size: 13px; margin-bottom: 24px; }
.mn-10__glass-card {
background: rgba(255,255,255,0.06);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 16px;
padding: 18px;
margin-bottom: 12px;
backdrop-filter: blur(8px);
}
.mn-10__glass-card h4 { color: rgba(255,255,255,0.9); font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.mn-10__glass-card p { color: rgba(255,255,255,0.45); font-size: 12px; line-height: 1.5; }
.mn-10__card-accent-bar { height: 3px; border-radius: 2px; margin-bottom: 12px; }
@media (prefers-reduced-motion: reduce) {
.mn-10__blob { animation: none; }
.mn-10__drawer, .mn-10__overlay, .mn-10__btn span { transition: none; }
}
```
### 11. Cyberpunk Neon Menu
**Type:** Pure CSS
**Description:** A full-screen cyberpunk navigation overlay with a scanline effect, CSS grid background, clip-path left-to-right reveal, and individually neon-coloured menu items that stagger in on activation.
**HTML:**
```html
// System Status
Nexus Core
Active Missions
3 operations in progress — 1 critical priority
Network Uplink
Encrypted tunnel established · Ping 12ms
Agent Status
Identity verified · Clearance level ALPHA
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Courier New', monospace; }
.mn-11 {
--bg: #05010f;
--surface: #0d0922;
--cyan: #00f5ff;
--magenta: #ff00a0;
--yellow: #ffe600;
--green: #00ff88;
--text: #e0e0ff;
--muted: #5a5a8a;
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
background: var(--bg);
border-radius: 32px;
box-shadow: 0 0 60px rgba(0,245,255,0.15), 0 30px 80px rgba(0,0,0,0.9);
}
/* Scanlines */
.mn-11::before {
content: '';
position: absolute;
inset: 0;
background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.05) 2px, rgba(0,0,0,0.05) 4px);
pointer-events: none;
z-index: 1;
}
.mn-11 #mn-11-toggle { display: none; }
/* Grid lines */
.mn-11__grid {
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(0,245,255,0.04) 1px, transparent 1px),
linear-gradient(90deg, rgba(0,245,255,0.04) 1px, transparent 1px);
background-size: 40px 40px;
}
/* Top bar */
.mn-11__topbar {
position: absolute;
top: 0; left: 0; right: 0;
height: 56px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
z-index: 10;
border-bottom: 1px solid rgba(0,245,255,0.15);
}
.mn-11__logo {
font-size: 16px;
font-weight: 700;
letter-spacing: 4px;
text-transform: uppercase;
color: var(--cyan);
text-shadow: 0 0 10px var(--cyan), 0 0 20px rgba(0,245,255,0.5);
animation: mn-11-glow 3s ease-in-out infinite;
}
@keyframes mn-11-glow {
0%, 100% { text-shadow: 0 0 8px var(--cyan), 0 0 16px rgba(0,245,255,0.4); }
50% { text-shadow: 0 0 16px var(--cyan), 0 0 32px rgba(0,245,255,0.7); }
}
/* Neon hamburger */
.mn-11__btn {
width: 40px; height: 40px;
cursor: pointer;
display: flex; flex-direction: column;
align-items: center; justify-content: center;
gap: 6px;
border: 1px solid rgba(0,245,255,0.3);
border-radius: 4px;
background: rgba(0,245,255,0.04);
transition: border-color 0.2s, box-shadow 0.2s;
}
.mn-11__btn:hover {
border-color: var(--cyan);
box-shadow: 0 0 10px rgba(0,245,255,0.3) inset;
}
.mn-11__btn span {
width: 20px; height: 1px;
background: var(--cyan);
box-shadow: 0 0 6px var(--cyan);
transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
transform-origin: center;
}
.mn-11 #mn-11-toggle:checked ~ .mn-11__topbar .mn-11__btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mn-11 #mn-11-toggle:checked ~ .mn-11__topbar .mn-11__btn span:nth-child(2) { opacity: 0; }
.mn-11 #mn-11-toggle:checked ~ .mn-11__topbar .mn-11__btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Fullscreen neon overlay */
.mn-11__menu {
position: absolute;
inset: 0;
background: rgba(5,1,15,0.97);
z-index: 20;
display: flex;
flex-direction: column;
justify-content: center;
padding: 40px 32px;
opacity: 0;
pointer-events: none;
clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
transition: opacity 0.4s, clip-path 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.mn-11 #mn-11-toggle:checked ~ .mn-11__menu {
opacity: 1;
pointer-events: all;
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.mn-11__menu-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 48px;
}
.mn-11__menu-sys {
font-size: 11px;
letter-spacing: 2px;
color: var(--muted);
text-transform: uppercase;
}
.mn-11__menu-sys span { color: var(--green); }
.mn-11__close {
font-size: 20px;
color: var(--cyan);
cursor: pointer;
text-shadow: 0 0 10px var(--cyan);
}
.mn-11__nav-list { list-style: none; }
.mn-11__nav-list li {
margin-bottom: 4px;
opacity: 0;
transform: translateX(-30px);
transition: opacity 0.4s, transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.mn-11 #mn-11-toggle:checked ~ .mn-11__menu .mn-11__nav-list li { opacity: 1; transform: translateX(0); }
.mn-11 #mn-11-toggle:checked ~ .mn-11__menu .mn-11__nav-list li:nth-child(1) { transition-delay: 0.15s; }
.mn-11 #mn-11-toggle:checked ~ .mn-11__menu .mn-11__nav-list li:nth-child(2) { transition-delay: 0.22s; }
.mn-11 #mn-11-toggle:checked ~ .mn-11__menu .mn-11__nav-list li:nth-child(3) { transition-delay: 0.29s; }
.mn-11 #mn-11-toggle:checked ~ .mn-11__menu .mn-11__nav-list li:nth-child(4) { transition-delay: 0.36s; }
.mn-11 #mn-11-toggle:checked ~ .mn-11__menu .mn-11__nav-list li:nth-child(5) { transition-delay: 0.43s; }
.mn-11__nav-list a {
display: flex; align-items: center; gap: 16px;
padding: 14px 0;
text-decoration: none;
border-bottom: 1px solid rgba(0,245,255,0.08);
transition: all 0.2s;
position: relative;
overflow: hidden;
}
.mn-11__nav-list a:hover { padding-left: 8px; }
.mn-11__nav-list a .num {
font-size: 11px;
color: var(--muted);
letter-spacing: 1px;
min-width: 28px;
}
.mn-11__nav-list a .label {
font-size: 30px;
font-weight: 700;
letter-spacing: -0.5px;
text-transform: uppercase;
transition: color 0.2s, text-shadow 0.2s;
}
.mn-11__nav-list li:nth-child(1) a .label { color: var(--cyan); text-shadow: 0 0 12px rgba(0,245,255,0.5); }
.mn-11__nav-list li:nth-child(2) a .label { color: var(--magenta); text-shadow: 0 0 12px rgba(255,0,160,0.5); }
.mn-11__nav-list li:nth-child(3) a .label { color: var(--yellow); text-shadow: 0 0 12px rgba(255,230,0,0.5); }
.mn-11__nav-list li:nth-child(4) a .label { color: var(--green); text-shadow: 0 0 12px rgba(0,255,136,0.5); }
.mn-11__nav-list li:nth-child(5) a .label { color: var(--text); }
.mn-11__nav-list a .arrow { margin-left: auto; font-size: 18px; color: var(--muted); }
.mn-11__menu-footer {
margin-top: 40px;
font-size: 11px;
letter-spacing: 1.5px;
text-transform: uppercase;
color: var(--muted);
}
.mn-11__menu-footer span { color: var(--magenta); }
/* Page content */
.mn-11__page {
position: absolute;
top: 56px; inset-inline: 0; bottom: 0;
padding: 24px 20px;
z-index: 5;
}
.mn-11__page-title {
font-size: 11px;
letter-spacing: 3px;
text-transform: uppercase;
color: var(--cyan);
margin-bottom: 4px;
text-shadow: 0 0 8px rgba(0,245,255,0.5);
}
.mn-11__page-h1 {
font-size: 28px;
font-weight: 700;
color: var(--text);
letter-spacing: -0.5px;
margin-bottom: 24px;
}
.mn-11__neon-card {
border: 1px solid;
border-radius: 4px;
padding: 16px;
margin-bottom: 12px;
position: relative;
}
.mn-11__neon-card:nth-child(1) { border-color: rgba(0,245,255,0.3); }
.mn-11__neon-card:nth-child(2) { border-color: rgba(255,0,160,0.3); }
.mn-11__neon-card:nth-child(3) { border-color: rgba(0,255,136,0.3); }
.mn-11__neon-card::before {
content: '';
position: absolute;
top: 0; left: 16px;
width: 32px; height: 2px;
border-radius: 0 0 4px 4px;
}
.mn-11__neon-card:nth-child(1)::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.mn-11__neon-card:nth-child(2)::before { background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
.mn-11__neon-card:nth-child(3)::before { background: var(--green); box-shadow: 0 0 8px var(--green); }
.mn-11__neon-card h4 { font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text); margin-bottom: 4px; }
.mn-11__neon-card p { font-size: 12px; color: var(--muted); line-height: 1.5; }
@media (prefers-reduced-motion: reduce) {
.mn-11__logo { animation: none; }
.mn-11__menu, .mn-11__nav-list li, .mn-11__btn span { transition: none; }
}
```
### 12. Minimal Dot Navigation
**Type:** CSS + JS
**Description:** A swipeable five-slide carousel with dot indicators that expand into a pill on the active slide. Supports arrow buttons, dot click, touch swipe, and auto-advance — with CSS transitions handling all visual motion.
**HTML:**
```html
🚀
Launch Your Ideas
Build and ship products 10x faster with our streamlined platform.
Get Started →
🔐
Security First
Enterprise-grade encryption and compliance built into every layer.
Learn More →
⚡
Lightning Fast
Sub-100ms response times globally with our edge network.
See Benchmarks →
💎
Premium Support
24/7 expert support with guaranteed 1-hour response time.
Talk to Us →
Discover
1 / 5
‹
›
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-12 {
--accent: #6366f1;
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}
/* Slides */
.mn-12__track {
display: flex;
width: 500%;
height: 100%;
transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
will-change: transform;
}
.mn-12__slide {
width: 20%;
height: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 40px 36px;
text-align: center;
position: relative;
}
.mn-12__slide:nth-child(1) { background: linear-gradient(160deg, #1e1b4b 0%, #312e81 100%); }
.mn-12__slide:nth-child(2) { background: linear-gradient(160deg, #0c1446 0%, #1e3a5f 100%); }
.mn-12__slide:nth-child(3) { background: linear-gradient(160deg, #1a0533 0%, #3b0764 100%); }
.mn-12__slide:nth-child(4) { background: linear-gradient(160deg, #0a2e1a 0%, #14532d 100%); }
.mn-12__slide:nth-child(5) { background: linear-gradient(160deg, #2d1606 0%, #7c2d12 100%); }
.mn-12__slide-emoji { font-size: 72px; margin-bottom: 24px; filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3)); }
.mn-12__slide h2 {
font-size: 28px;
font-weight: 700;
color: #fff;
letter-spacing: -0.5px;
margin-bottom: 12px;
line-height: 1.2;
}
.mn-12__slide p { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.7; max-width: 280px; }
/* CTA button */
.mn-12__slide-cta {
display: inline-block;
margin-top: 28px;
background: rgba(255,255,255,0.15);
color: #fff;
font-size: 13px;
font-weight: 600;
padding: 12px 28px;
border-radius: 100px;
text-decoration: none;
border: 1px solid rgba(255,255,255,0.25);
transition: background 0.2s;
}
.mn-12__slide-cta:hover { background: rgba(255,255,255,0.22); }
/* Dot navigation */
.mn-12__dots {
position: absolute;
bottom: 32px;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 8px;
z-index: 10;
}
.mn-12__dot {
width: 8px; height: 8px;
border-radius: 50%;
background: rgba(255,255,255,0.3);
border: none;
cursor: pointer;
padding: 0;
transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mn-12__dot.is-active {
width: 28px;
border-radius: 4px;
background: #fff;
}
/* Arrow nav */
.mn-12__arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
z-index: 10;
width: 44px; height: 44px;
border-radius: 50%;
background: rgba(255,255,255,0.12);
border: 1px solid rgba(255,255,255,0.2);
display: flex; align-items: center; justify-content: center;
cursor: pointer;
color: #fff;
font-size: 16px;
transition: background 0.2s;
}
.mn-12__arrow:hover { background: rgba(255,255,255,0.22); }
.mn-12__arrow--prev { left: 16px; }
.mn-12__arrow--next { right: 16px; }
/* Slide counter */
.mn-12__counter {
position: absolute;
top: 20px;
right: 20px;
font-size: 13px;
font-weight: 600;
color: rgba(255,255,255,0.5);
letter-spacing: 1px;
}
.mn-12__counter span { color: rgba(255,255,255,0.9); }
/* Top label */
.mn-12__label {
position: absolute;
top: 20px;
left: 20px;
font-size: 12px;
font-weight: 700;
letter-spacing: 2px;
text-transform: uppercase;
color: rgba(255,255,255,0.3);
}
@media (prefers-reduced-motion: reduce) {
.mn-12__track { transition: none; }
.mn-12__dot { transition: none; }
}
```
**JS:**
```js
(function() {
const track = document.getElementById('mn-12-track');
const dots = document.querySelectorAll('.mn-12__dot');
const counter = document.getElementById('mn-12-curr');
const total = 5;
let current = 0;
function goTo(idx) {
current = (idx + total) % total;
track.style.transform = `translateX(-${current * 20}%)`;
dots.forEach((d, i) => d.classList.toggle('is-active', i === current));
counter.textContent = current + 1;
}
document.getElementById('mn-12-prev').addEventListener('click', () => goTo(current - 1));
document.getElementById('mn-12-next').addEventListener('click', () => goTo(current + 1));
dots.forEach(d => d.addEventListener('click', () => goTo(+d.dataset.i)));
// Touch swipe
let startX = 0;
track.addEventListener('touchstart', e => { startX = e.touches[0].clientX; }, { passive: true });
track.addEventListener('touchend', e => {
const dx = e.changedTouches[0].clientX - startX;
if (Math.abs(dx) > 50) goTo(current + (dx < 0 ? 1 : -1));
});
// Auto-advance
let timer = setInterval(() => goTo(current + 1), 4000);
document.getElementById('mn-12-root').addEventListener('touchstart', () => clearInterval(timer));
})();
```
### 13. Breadcrumb Collapse Navigation
**Type:** Pure CSS
**Description:** A file explorer UI with a collapsed breadcrumb showing an ellipsis button that reveals the full ancestor path as a dropdown. The dropdown toggles via Pure CSS checkbox with a scale-and-opacity entrance.
**HTML:**
```html
📁
Design Assets
48 items
›
📁
Client Reports
12 items
›
📁
Contracts
7 items
›
📄
Q4 Summary Report.pdf
PDF · 2.4 MB
📊
Analytics Dashboard.xlsx
Excel · 840 KB
🖼️
Brand Guidelines.fig
Figma · 18 MB
☁️
24.8 GB of 50 GB used
Upgrade for more storage
Upgrade
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-13 {
--bg: #fafafa;
--surface: #ffffff;
--border: #e4e4e7;
--accent: #2563eb;
--accent-hover: #1d4ed8;
--text: #18181b;
--muted: #71717a;
--success: #16a34a;
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
background: var(--bg);
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.5);
display: flex;
flex-direction: column;
}
.mn-13 #mn-13-collapse { display: none; }
/* Top app bar */
.mn-13__appbar {
background: var(--surface);
border-bottom: 1px solid var(--border);
padding: 14px 16px;
flex-shrink: 0;
}
.mn-13__appbar-row {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 10px;
}
.mn-13__back {
width: 32px; height: 32px;
border-radius: 8px;
background: var(--bg);
border: 1px solid var(--border);
display: flex; align-items: center; justify-content: center;
font-size: 14px;
cursor: pointer;
color: var(--text);
flex-shrink: 0;
}
.mn-13__appbar-title {
font-size: 16px;
font-weight: 600;
color: var(--text);
flex: 1;
}
.mn-13__appbar-actions {
display: flex;
gap: 8px;
}
.mn-13__icon-btn {
width: 32px; height: 32px;
border-radius: 8px;
background: var(--bg);
border: 1px solid var(--border);
display: flex; align-items: center; justify-content: center;
font-size: 14px;
cursor: pointer;
}
/* Breadcrumb row */
.mn-13__breadcrumb {
display: flex;
align-items: center;
gap: 0;
overflow: hidden;
height: 28px;
}
.mn-13__bc-item {
display: flex;
align-items: center;
gap: 4px;
font-size: 12px;
font-weight: 500;
color: var(--muted);
white-space: nowrap;
flex-shrink: 0;
}
.mn-13__bc-item a {
color: var(--accent);
text-decoration: none;
padding: 2px 4px;
border-radius: 4px;
transition: background 0.15s;
}
.mn-13__bc-item a:hover { background: rgba(37,99,235,0.08); }
.mn-13__bc-item.is-current { color: var(--text); font-weight: 600; }
.mn-13__bc-sep { color: var(--border); margin: 0 2px; font-size: 14px; }
/* Collapsed ellipsis */
.mn-13__bc-ellipsis {
display: flex;
align-items: center;
gap: 4px;
flex-shrink: 0;
}
.mn-13__ellipsis-btn {
width: 28px; height: 20px;
border-radius: 4px;
background: var(--bg);
border: 1px solid var(--border);
display: flex; align-items: center; justify-content: center;
font-size: 11px;
cursor: pointer;
color: var(--muted);
font-weight: 700;
letter-spacing: 1px;
transition: background 0.2s, border-color 0.2s;
}
.mn-13__ellipsis-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
/* Dropdown from ellipsis */
.mn-13__bc-dropdown {
position: absolute;
top: 88px;
left: 16px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
box-shadow: 0 8px 24px rgba(0,0,0,0.12);
z-index: 20;
min-width: 180px;
opacity: 0;
pointer-events: none;
transform: translateY(-8px) scale(0.96);
transform-origin: top left;
transition: opacity 0.2s, transform 0.2s;
}
.mn-13 #mn-13-collapse:checked ~ .mn-13__appbar .mn-13__bc-dropdown {
opacity: 1;
pointer-events: all;
transform: translateY(0) scale(1);
}
.mn-13__bc-dropdown a {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 14px;
font-size: 13px;
color: var(--text);
text-decoration: none;
border-bottom: 1px solid rgba(0,0,0,0.04);
transition: background 0.15s;
}
.mn-13__bc-dropdown a:last-child { border-bottom: none; }
.mn-13__bc-dropdown a:hover { background: var(--bg); }
.mn-13__bc-dropdown a span { color: var(--muted); font-size: 14px; }
/* Page content */
.mn-13__content { flex: 1; overflow-y: auto; }
/* File/folder explorer */
.mn-13__section-header {
padding: 16px 16px 8px;
font-size: 11px;
font-weight: 700;
letter-spacing: 1px;
text-transform: uppercase;
color: var(--muted);
display: flex; justify-content: space-between; align-items: center;
}
.mn-13__section-header span {
font-size: 12px;
font-weight: 500;
letter-spacing: 0;
text-transform: none;
color: var(--accent);
cursor: pointer;
}
.mn-13__file-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
border-bottom: 1px solid rgba(0,0,0,0.04);
cursor: pointer;
transition: background 0.15s;
}
.mn-13__file-item:hover { background: rgba(0,0,0,0.02); }
.mn-13__file-icon {
width: 36px; height: 36px;
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-size: 18px;
flex-shrink: 0;
}
.mn-13__file-info { flex: 1; }
.mn-13__file-info h4 { font-size: 14px; font-weight: 500; color: var(--text); }
.mn-13__file-info p { font-size: 11px; color: var(--muted); margin-top: 1px; }
.mn-13__file-meta { font-size: 11px; color: var(--muted); text-align: right; }
.mn-13__file-meta p:first-child { color: var(--text); font-weight: 500; }
/* Folder items */
.mn-13__folder-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
border-bottom: 1px solid rgba(0,0,0,0.04);
cursor: pointer;
transition: background 0.15s;
}
.mn-13__folder-item:hover { background: rgba(0,0,0,0.02); }
.mn-13__folder-icon { font-size: 22px; flex-shrink: 0; }
.mn-13__folder-name { font-size: 14px; font-weight: 500; color: var(--text); flex: 1; }
.mn-13__folder-count { font-size: 12px; color: var(--muted); }
.mn-13__chevron { font-size: 12px; color: var(--muted); }
/* Upload bar */
.mn-13__upload {
background: rgba(37,99,235,0.06);
border-top: 1px solid rgba(37,99,235,0.15);
padding: 12px 16px;
display: flex;
align-items: center;
gap: 12px;
flex-shrink: 0;
}
.mn-13__upload-icon {
width: 36px; height: 36px;
border-radius: 10px;
background: var(--accent);
display: flex; align-items: center; justify-content: center;
font-size: 16px;
color: #fff;
}
.mn-13__upload-text { flex: 1; }
.mn-13__upload-text h4 { font-size: 13px; font-weight: 600; color: var(--text); }
.mn-13__upload-text p { font-size: 11px; color: var(--muted); }
.mn-13__upload-btn {
font-size: 12px; font-weight: 600;
color: var(--accent);
cursor: pointer;
padding: 6px 12px;
border-radius: 6px;
border: 1px solid rgba(37,99,235,0.3);
}
@media (prefers-reduced-motion: reduce) {
.mn-13__bc-dropdown { transition: none; }
}
```
### 14. Split-Screen Navigation
**Type:** Pure CSS
**Description:** A split-panel layout with a narrow 120px left category sidebar and a full-height right content panel. Radio inputs switch categories with a fade-slide page transition and a right-edge active indicator.
**HTML:**
```html
🎮
Gaming
🌿
Nature
❤️
Health
📱
Tech
🎮
Pro Controller Wireless · 40hr battery
$79
🎧
Gaming Headset 7.1 Surround · Noise cancel
$120
🖥️
144Hz Monitor 27" IPS · 1ms response
$349
🌱
Succulent Set 6-pack · Indoor
$32
🪴
Ceramic Planter Matte White · 8"
$28
🌿
Plant Fertilizer Organic · 500ml
$14
⌚
Fitness Tracker Heart rate · Sleep
$89
💊
Vitamin D3 5000 IU · 90 caps
$22
🎧
ANC Earbuds Wireless · 30hr
$149
📱
Charging Pad 15W · Qi2 compatible
$35
🖱️
Wireless Mouse Silent click · Ergonomic
$55
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-14 {
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.mn-14 input[type="radio"] { display: none; }
/* Toggle button */
.mn-14__toggle-btn {
position: absolute;
top: 20px;
right: 20px;
z-index: 30;
width: 40px; height: 40px;
border-radius: 50%;
background: rgba(255,255,255,0.15);
border: 1px solid rgba(255,255,255,0.25);
cursor: pointer;
display: flex; align-items: center; justify-content: center;
font-size: 16px;
}
/* Left panel — category list */
.mn-14__left {
position: absolute;
top: 0; left: 0; bottom: 0;
width: 120px;
background: #1a1a2e;
display: flex;
flex-direction: column;
padding-top: 80px;
}
.mn-14__cat-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
padding: 16px 8px;
cursor: pointer;
position: relative;
transition: background 0.2s;
}
.mn-14__cat-icon {
width: 44px; height: 44px;
border-radius: 14px;
display: flex; align-items: center; justify-content: center;
font-size: 22px;
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mn-14__cat-name {
font-size: 10px;
font-weight: 600;
letter-spacing: 0.3px;
color: rgba(255,255,255,0.4);
text-align: center;
transition: color 0.2s;
}
.mn-14__cat-indicator {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
width: 3px;
height: 0;
background: #fff;
border-radius: 3px 0 0 3px;
transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Active state via radio siblings */
#mn-14-c1:checked ~ .mn-14__left label[for="mn-14-c1"] .mn-14__cat-name,
#mn-14-c2:checked ~ .mn-14__left label[for="mn-14-c2"] .mn-14__cat-name,
#mn-14-c3:checked ~ .mn-14__left label[for="mn-14-c3"] .mn-14__cat-name,
#mn-14-c4:checked ~ .mn-14__left label[for="mn-14-c4"] .mn-14__cat-name { color: rgba(255,255,255,0.95); }
#mn-14-c1:checked ~ .mn-14__left label[for="mn-14-c1"] .mn-14__cat-icon,
#mn-14-c2:checked ~ .mn-14__left label[for="mn-14-c2"] .mn-14__cat-icon,
#mn-14-c3:checked ~ .mn-14__left label[for="mn-14-c3"] .mn-14__cat-icon,
#mn-14-c4:checked ~ .mn-14__left label[for="mn-14-c4"] .mn-14__cat-icon { transform: scale(1.1); }
#mn-14-c1:checked ~ .mn-14__left label[for="mn-14-c1"] .mn-14__cat-indicator,
#mn-14-c2:checked ~ .mn-14__left label[for="mn-14-c2"] .mn-14__cat-indicator,
#mn-14-c3:checked ~ .mn-14__left label[for="mn-14-c3"] .mn-14__cat-indicator,
#mn-14-c4:checked ~ .mn-14__left label[for="mn-14-c4"] .mn-14__cat-indicator { height: 28px; }
/* Right panel */
.mn-14__right {
position: absolute;
top: 0;
left: 120px; right: 0; bottom: 0;
overflow: hidden;
}
.mn-14__panel {
position: absolute;
inset: 0;
padding: 0;
opacity: 0;
pointer-events: none;
transform: translateX(20px);
transition: opacity 0.3s, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
overflow-y: auto;
}
#mn-14-c1:checked ~ .mn-14__right .mn-14__panel[data-p="1"],
#mn-14-c2:checked ~ .mn-14__right .mn-14__panel[data-p="2"],
#mn-14-c3:checked ~ .mn-14__right .mn-14__panel[data-p="3"],
#mn-14-c4:checked ~ .mn-14__right .mn-14__panel[data-p="4"] { opacity: 1; pointer-events: all; transform: translateX(0); }
/* Panel header */
.mn-14__panel-header {
height: 80px;
display: flex;
align-items: flex-end;
padding: 0 16px 14px;
position: relative;
flex-shrink: 0;
}
.mn-14__panel-header h2 {
font-size: 22px;
font-weight: 700;
color: #fff;
letter-spacing: -0.4px;
}
.mn-14__panel-body { padding: 12px 14px 20px; }
/* Product cards */
.mn-14__product-card {
background: rgba(255,255,255,0.06);
border: 1px solid rgba(255,255,255,0.08);
border-radius: 14px;
padding: 14px;
margin-bottom: 10px;
display: flex;
gap: 12px;
align-items: center;
}
.mn-14__product-img {
width: 52px; height: 52px;
border-radius: 10px;
display: flex; align-items: center; justify-content: center;
font-size: 26px;
flex-shrink: 0;
}
.mn-14__product-info { flex: 1; }
.mn-14__product-info h4 { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.9); margin-bottom: 2px; }
.mn-14__product-info p { font-size: 11px; color: rgba(255,255,255,0.4); }
.mn-14__product-price { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.9); }
/* Unique left panel colors per category */
#mn-14-c1:checked ~ .mn-14__left { background: linear-gradient(180deg, #1a1a2e 0%, #1a1232 100%); }
#mn-14-c2:checked ~ .mn-14__left { background: linear-gradient(180deg, #0c1f0c 0%, #0a2e0a 100%); }
#mn-14-c3:checked ~ .mn-14__left { background: linear-gradient(180deg, #1a0c0c 0%, #2e0a0a 100%); }
#mn-14-c4:checked ~ .mn-14__left { background: linear-gradient(180deg, #0c1a2e 0%, #0a1a3a 100%); }
.mn-14__panel[data-p="1"] { background: linear-gradient(160deg, #1a1232, #0d0a1f); }
.mn-14__panel[data-p="2"] { background: linear-gradient(160deg, #0a2e0a, #051505); }
.mn-14__panel[data-p="3"] { background: linear-gradient(160deg, #2e0a0a, #1a0505); }
.mn-14__panel[data-p="4"] { background: linear-gradient(160deg, #0a1a3a, #050d20); }
@media (prefers-reduced-motion: reduce) {
.mn-14__panel, .mn-14__cat-icon, .mn-14__cat-indicator { transition: none; }
}
```
### 15. Command Palette Search Nav
**Type:** CSS + JS
**Description:** A Spotlight-style command palette triggered by a search bar click or a keyboard shortcut. Live-filters a command list by label and description, with group labels, keyboard shortcut badges, and an animated box entrance.
**HTML:**
```html
🔍
Search or jump to...
⌘ K
Quick Actions
✍️
New Document
Create blank doc
📅
Schedule
Add to calendar
👥
Invite Team
Share workspace
📊
Analytics
View insights
Recently Visited
📄
Product Roadmap Updated 10 min ago
💬
Design Review Thread Updated 1 hour ago
📋
Sprint Planning Board Updated yesterday
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-15 {
--bg: #111113;
--surface: #1c1c1f;
--surface2: #252528;
--border: #2d2d32;
--accent: #f97316;
--text: #ececf1;
--muted: #737379;
--highlight: rgba(249,115,22,0.1);
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
background: var(--bg);
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.8);
}
/* Search trigger button */
.mn-15__trigger {
position: absolute;
top: 20px;
left: 16px;
right: 16px;
display: flex;
align-items: center;
gap: 10px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 12px 14px;
cursor: text;
z-index: 5;
transition: border-color 0.2s, box-shadow 0.2s;
}
.mn-15__trigger:hover {
border-color: rgba(249,115,22,0.4);
box-shadow: 0 0 0 3px rgba(249,115,22,0.08);
}
.mn-15__trigger-icon { font-size: 16px; color: var(--muted); }
.mn-15__trigger-text { flex: 1; color: var(--muted); font-size: 14px; }
.mn-15__trigger-kbd {
display: flex;
gap: 4px;
}
.mn-15__trigger-kbd kbd {
background: var(--surface2);
border: 1px solid var(--border);
border-radius: 4px;
padding: 2px 6px;
font-size: 11px;
color: var(--muted);
font-family: inherit;
}
/* Command palette overlay */
.mn-15__palette {
position: absolute;
inset: 0;
background: rgba(0,0,0,0.6);
z-index: 20;
display: flex;
flex-direction: column;
padding: 60px 16px 16px;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s;
}
.mn-15__palette.is-open {
opacity: 1;
pointer-events: all;
}
.mn-15__palette-box {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 16px;
overflow: hidden;
box-shadow: 0 24px 64px rgba(0,0,0,0.5);
transform: scale(0.95) translateY(-8px);
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mn-15__palette.is-open .mn-15__palette-box {
transform: scale(1) translateY(0);
}
/* Search input */
.mn-15__input-row {
display: flex;
align-items: center;
gap: 10px;
padding: 14px 16px;
border-bottom: 1px solid var(--border);
}
.mn-15__input-icon { font-size: 18px; color: var(--muted); }
.mn-15__input {
flex: 1;
background: transparent;
border: none;
outline: none;
font-size: 15px;
color: var(--text);
font-family: inherit;
}
.mn-15__input::placeholder { color: var(--muted); }
.mn-15__input-clear {
width: 22px; height: 22px;
border-radius: 50%;
background: var(--surface2);
display: flex; align-items: center; justify-content: center;
cursor: pointer;
font-size: 10px;
color: var(--muted);
border: none;
padding: 0;
display: none;
}
.mn-15__input-clear.is-visible { display: flex; }
/* Results */
.mn-15__results { max-height: 380px; overflow-y: auto; }
.mn-15__group-label {
padding: 8px 16px 4px;
font-size: 10px;
font-weight: 700;
letter-spacing: 1.5px;
text-transform: uppercase;
color: var(--muted);
}
.mn-15__result-item {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 16px;
cursor: pointer;
transition: background 0.1s;
}
.mn-15__result-item:hover, .mn-15__result-item.is-selected {
background: var(--highlight);
}
.mn-15__result-icon {
width: 32px; height: 32px;
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-size: 16px;
flex-shrink: 0;
background: var(--surface2);
}
.mn-15__result-info { flex: 1; }
.mn-15__result-info h4 { font-size: 13px; font-weight: 500; color: var(--text); }
.mn-15__result-info p { font-size: 11px; color: var(--muted); }
.mn-15__result-shortcut {
font-size: 11px;
color: var(--muted);
}
.mn-15__result-shortcut kbd {
background: var(--surface2);
border: 1px solid var(--border);
border-radius: 4px;
padding: 1px 5px;
font-family: inherit;
}
.mn-15__divider { height: 1px; background: var(--border); margin: 4px 0; }
/* Palette footer */
.mn-15__palette-footer {
display: flex;
align-items: center;
gap: 16px;
padding: 8px 14px;
border-top: 1px solid var(--border);
}
.mn-15__palette-footer span {
display: flex;
align-items: center;
gap: 5px;
font-size: 11px;
color: var(--muted);
}
.mn-15__palette-footer kbd {
background: var(--surface2);
border: 1px solid var(--border);
border-radius: 4px;
padding: 1px 5px;
font-size: 10px;
font-family: inherit;
}
/* Page content */
.mn-15__page {
position: absolute;
top: 72px; left: 0; right: 0; bottom: 0;
padding: 16px;
overflow-y: auto;
}
.mn-15__section-title {
font-size: 11px;
font-weight: 700;
letter-spacing: 1.5px;
text-transform: uppercase;
color: var(--muted);
margin-bottom: 12px;
}
.mn-15__quick-actions {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
margin-bottom: 20px;
}
.mn-15__action-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 14px;
padding: 16px;
cursor: pointer;
transition: border-color 0.2s;
}
.mn-15__action-card:hover { border-color: var(--accent); }
.mn-15__action-card .icon { font-size: 24px; margin-bottom: 8px; }
.mn-15__action-card h4 { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.mn-15__action-card p { font-size: 11px; color: var(--muted); }
.mn-15__recent-item {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 0;
border-bottom: 1px solid rgba(255,255,255,0.04);
cursor: pointer;
}
.mn-15__recent-icon {
width: 32px; height: 32px;
border-radius: 8px;
background: var(--surface);
display: flex; align-items: center; justify-content: center;
font-size: 15px;
}
.mn-15__recent-text h4 { font-size: 13px; font-weight: 500; color: var(--text); }
.mn-15__recent-text p { font-size: 11px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
.mn-15__palette, .mn-15__palette-box { transition: none; }
}
```
**JS:**
```js
(function() {
const trigger = document.getElementById('mn-15-trigger');
const palette = document.getElementById('mn-15-palette');
const input = document.getElementById('mn-15-input');
const results = document.getElementById('mn-15-results');
const clear = document.getElementById('mn-15-clear');
const root = document.getElementById('mn-15-root');
const COMMANDS = [
{ group: 'Pages', icon: '🏠', label: 'Dashboard', desc: 'Main workspace' },
{ group: 'Pages', icon: '📊', label: 'Analytics', desc: 'Traffic & conversions' },
{ group: 'Pages', icon: '👥', label: 'Team Members', desc: '12 members' },
{ group: 'Pages', icon: '⚙️', label: 'Settings', desc: 'Account & preferences' },
{ group: 'Actions', icon: '✍️', label: 'New Document', desc: 'Create blank page', shortcut: 'N' },
{ group: 'Actions', icon: '📤', label: 'Export', desc: 'Download as PDF', shortcut: 'E' },
{ group: 'Actions', icon: '🔗', label: 'Copy Link', desc: 'Share current page', shortcut: 'L' },
{ group: 'Actions', icon: '🎨', label: 'Change Theme', desc: 'Appearance settings' },
{ group: 'Recent', icon: '📄', label: 'Product Roadmap', desc: '10 min ago' },
{ group: 'Recent', icon: '💬', label: 'Design Review', desc: '1 hour ago' },
];
function render(q) {
const filtered = q ? COMMANDS.filter(c => c.label.toLowerCase().includes(q.toLowerCase()) || c.desc.toLowerCase().includes(q.toLowerCase())) : COMMANDS;
if (!filtered.length) {
results.innerHTML = `No results for "${q}"
`;
return;
}
let html = '';
let lastGroup = '';
filtered.forEach(c => {
if (c.group !== lastGroup) {
if (lastGroup) html += '
';
html += `${c.group}
`;
lastGroup = c.group;
}
html += `
${c.icon}
${c.shortcut ? `
${c.shortcut}
` : ''}
`;
});
results.innerHTML = html;
}
function open() { palette.classList.add('is-open'); setTimeout(() => input.focus(), 50); render(''); }
function close() { palette.classList.remove('is-open'); input.value = ''; clear.classList.remove('is-visible'); }
trigger.addEventListener('click', open);
palette.addEventListener('click', e => { if (e.target === palette) close(); });
input.addEventListener('input', () => {
render(input.value);
clear.classList.toggle('is-visible', input.value.length > 0);
});
clear.addEventListener('click', () => { input.value = ''; render(''); clear.classList.remove('is-visible'); input.focus(); });
document.addEventListener('keydown', e => {
if ((e.metaKey || e.ctrlKey) && e.key === 'k') { e.preventDefault(); palette.classList.contains('is-open') ? close() : open(); }
if (e.key === 'Escape') close();
});
render('');
})();
```
### 16. Neumorphic Bottom Navigation
**Type:** Pure CSS
**Description:** A soft-UI neumorphic bottom navigation bar on a warm light-gray background. Active tabs press inward with a CSS inset box-shadow. Four pages switch with a fade-slide transition driven by radio inputs.
**HTML:**
```html
Overview
Good morning, Taylor ☀️
Daily Goal
74% complete — keep going!
Steps Progress
7,400 steps 10,000
Workouts
This week's activity
Morning Run
5.2 km · 28 min · 310 cal burned
Strength Training
45 min · Full body · 280 cal burned
Nutrition
Today's intake
Calories
1,240 eaten 2,000 goal
Protein · 68g
Chicken, eggs, Greek yogurt
Carbs · 142g
Oats, rice, banana
Profile
Your health data
🏃
Taylor Kim Premium · Since 2022
🏠
Home
🏃
Workout
🥗
Nutrition
👤
Profile
```
**CSS:**
```css
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0f0f13; font-family: 'Segoe UI', sans-serif; }
.mn-16 {
--bg: #e0e5ec;
--text: #2d3748;
--muted: #8899aa;
--accent: #4f7cff;
--accent2: #ff6b9d;
--accent3: #43d9b0;
--accent4: #ffb347;
--shadow-light: rgba(255,255,255,0.8);
--shadow-dark: rgba(163,177,198,0.7);
width: 375px;
height: 667px;
position: relative;
overflow: hidden;
background: var(--bg);
border-radius: 32px;
box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.mn-16 input[type="radio"] { display: none; }
/* Page area */
.mn-16__pages {
position: absolute;
top: 0; left: 0; right: 0;
bottom: 88px;
padding: 32px 24px 16px;
}
.mn-16__page {
position: absolute;
inset: 0;
padding: 32px 24px 16px;
opacity: 0;
pointer-events: none;
transform: translateY(12px);
transition: opacity 0.3s, transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
#mn-16-t1:checked ~ .mn-16__pages .mn-16__page[data-p="1"],
#mn-16-t2:checked ~ .mn-16__pages .mn-16__page[data-p="2"],
#mn-16-t3:checked ~ .mn-16__pages .mn-16__page[data-p="3"],
#mn-16-t4:checked ~ .mn-16__pages .mn-16__page[data-p="4"] {
opacity: 1;
pointer-events: all;
transform: translateY(0);
}
/* Page heading */
.mn-16__page-title {
font-size: 26px;
font-weight: 700;
color: var(--text);
letter-spacing: -0.5px;
margin-bottom: 4px;
}
.mn-16__page-sub { font-size: 13px; color: var(--muted); margin-bottom: 28px; }
/* Neumorphic cards */
.mn-16__neu-card {
background: var(--bg);
border-radius: 20px;
padding: 20px;
margin-bottom: 14px;
box-shadow:
6px 6px 14px var(--shadow-dark),
-6px -6px 14px var(--shadow-light);
}
.mn-16__neu-card h4 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.mn-16__neu-card p { font-size: 12px; color: var(--muted); line-height: 1.6; }
/* Neumorphic inset card */
.mn-16__neu-inset {
background: var(--bg);
border-radius: 16px;
padding: 16px;
margin-bottom: 14px;
box-shadow:
inset 4px 4px 10px var(--shadow-dark),
inset -4px -4px 10px var(--shadow-light);
}
.mn-16__neu-inset h4 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
/* Progress bar */
.mn-16__progress-track {
height: 8px;
border-radius: 4px;
background: var(--bg);
box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
overflow: hidden;
margin-bottom: 6px;
}
.mn-16__progress-fill {
height: 100%;
border-radius: 4px;
background: linear-gradient(90deg, var(--accent), var(--accent3));
}
.mn-16__progress-label {
display: flex; justify-content: space-between;
font-size: 11px; color: var(--muted);
}
/* Icon row */
.mn-16__icon-row {
display: flex; gap: 12px; margin-bottom: 14px;
}
.mn-16__neu-icon-btn {
width: 52px; height: 52px;
border-radius: 14px;
background: var(--bg);
display: flex; align-items: center; justify-content: center;
font-size: 22px;
box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
cursor: pointer;
transition: box-shadow 0.15s;
}
.mn-16__neu-icon-btn:active {
box-shadow: inset 3px 3px 8px var(--shadow-dark), inset -3px -3px 8px var(--shadow-light);
}
/* Bottom nav bar */
.mn-16__navbar {
position: absolute;
bottom: 0; left: 0; right: 0;
height: 88px;
background: var(--bg);
display: flex;
align-items: center;
justify-content: space-around;
padding: 0 16px 12px;
box-shadow: 0 -2px 20px rgba(163,177,198,0.4);
}
.mn-16__nav-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
cursor: pointer;
padding: 8px 16px;
border-radius: 16px;
transition: all 0.2s;
position: relative;
}
/* Inset pressed state for active tab */
#mn-16-t1:checked ~ .mn-16__navbar label[for="mn-16-t1"],
#mn-16-t2:checked ~ .mn-16__navbar label[for="mn-16-t2"],
#mn-16-t3:checked ~ .mn-16__navbar label[for="mn-16-t3"],
#mn-16-t4:checked ~ .mn-16__navbar label[for="mn-16-t4"] {
box-shadow: inset 3px 3px 8px var(--shadow-dark), inset -3px -3px 8px var(--shadow-light);
}
.mn-16__nav-icon {
font-size: 22px;
line-height: 1;
transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mn-16__nav-label {
font-size: 10px;
font-weight: 600;
color: var(--muted);
transition: color 0.2s;
}
#mn-16-t1:checked ~ .mn-16__navbar label[for="mn-16-t1"] .mn-16__nav-label { color: var(--accent); }
#mn-16-t2:checked ~ .mn-16__navbar label[for="mn-16-t2"] .mn-16__nav-label { color: var(--accent2); }
#mn-16-t3:checked ~ .mn-16__navbar label[for="mn-16-t3"] .mn-16__nav-label { color: var(--accent3); }
#mn-16-t4:checked ~ .mn-16__navbar label[for="mn-16-t4"] .mn-16__nav-label { color: var(--accent4); }
#mn-16-t1:checked ~ .mn-16__navbar label[for="mn-16-t1"] .mn-16__nav-icon,
#mn-16-t2:checked ~ .mn-16__navbar label[for="mn-16-t2"] .mn-16__nav-icon,
#mn-16-t3:checked ~ .mn-16__navbar label[for="mn-16-t3"] .mn-16__nav-icon,
#mn-16-t4:checked ~ .mn-16__navbar label[for="mn-16-t4"] .mn-16__nav-icon {
transform: scale(1.15);
}
/* Dot stat row */
.mn-16__stat-row { display: flex; gap: 12px; }
.mn-16__stat-pill {
flex: 1;
background: var(--bg);
border-radius: 14px;
padding: 14px 12px;
text-align: center;
box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
}
.mn-16__stat-pill .val { font-size: 20px; font-weight: 700; color: var(--text); }
.mn-16__stat-pill .lbl { font-size: 10px; color: var(--muted); margin-top: 2px; }
@media (prefers-reduced-motion: reduce) {
.mn-16__page, .mn-16__nav-icon, .mn-16__nav-label { transition: none; }
}
```
---
## 8 CSS Navbar Designs
URL: https://codefronts.com/navigation/css-navbars/
Description: 8 hand-coded CSS navbar patterns covering the surfaces every site needs to handle — a responsive hamburger drawer, a mega menu with hover panels, a floating glassmorphism nav, a collapsible vertical sidebar, a sticky scroll-transforming bar, a full-screen overlay menu, a navbar with a dark-mode toggle, and a minimalist navbar with underline hover animations. Pure CSS plus scoped JS — no UI framework, semantic HTML, accessibility-first.
Demo count: 8
### 01. Responsive CSS Navbar with Hamburger Menu
**Type:** CSS + JS
**Description:** A literary-magazine editorial navbar UI in ink and paper — proving that a responsive hamburger nav can carry serious typographic identity instead of disappearing into a sans-serif default. Top bar with a numbered issue badge (No. 47), a Playfair Display wordmark with italic rust accent, a column-ruled link list (Features / Culture / Opinion / Science / Archive) with a rust underline sweep on hover, a search icon button, and a black "Subscribe" CTA. On mobile (<900px) the desktop links hide and a 1.5px-line hamburger appears; clicking it morphs the three lines into an X and reveals a full-bleed dark drawer with six numbered category tiles (each with a Playfair label + monospace subtext) and a footer row carrying the tagline + "$9/mo" subscribe CTA. Below the navbar a rust-colored marquee ticker scrolls four headline items. Playfair Display + DM Mono. Best for editorial publications, online magazines, literary sites, indie newsletter brands, content-led marketing pages.
**HTML:**
```html
Independent since 2008
Subscribe — $9/mo
World Press Freedom Day
The Climate Issue — Out Now
Interview: The Architects of AI
Summer Reading List 2026
World Press Freedom Day
The Climate Issue — Out Now
Interview: The Architects of AI
Summer Reading List 2026
Cover Story
The LastQuiet Places
As noise pollution reaches crisis levels in every major city, researchers are mapping the world's remaining acoustic sanctuaries — and what their disappearance will cost us.
Read the feature
"Silence is not the absence of sound — it is the presence of everything we've forgotten to hear."
Dr. Helena Marsh, Acoustic Ecologist
```
**CSS:**
```css
/* ─── 01 Verdure Editorial Hamburger — magazine navbar UI ──────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=DM+Mono:wght@300;400;500&display=swap');
.nb-hbg {
--nb-hbg-ink: #0e0d0b;
--nb-hbg-paper: #f5f0e8;
--nb-hbg-rust: #c4451c;
--nb-hbg-muted: #8a8070;
--nb-hbg-rule: #d4cdc0;
--nb-hbg-nav-h: 72px;
position: relative;
width: 100%;
min-height: 820px;
background: var(--nb-hbg-paper);
color: var(--nb-hbg-ink);
font-family: 'DM Mono', monospace;
overflow: hidden;
box-sizing: border-box;
}
.nb-hbg *, .nb-hbg *::before, .nb-hbg *::after { box-sizing: border-box; margin: 0; padding: 0; }
.nb-hbg nav { position: absolute; top: 0; left: 0; right: 0; z-index: 100; background: var(--nb-hbg-paper); border-bottom: 2px solid var(--nb-hbg-ink); height: var(--nb-hbg-nav-h); }
.nb-hbg .nav-inner { max-width: 1400px; margin: 0 auto; height: 100%; display: flex; align-items: center; padding: 0 2rem; gap: 2rem; }
.nb-hbg .issue-tag { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--nb-hbg-paper); background: var(--nb-hbg-rust); padding: 3px 8px; flex-shrink: 0; }
.nb-hbg .brand { font-family: 'Playfair Display', serif; font-size: 1.7rem; font-weight: 900; letter-spacing: -0.02em; color: var(--nb-hbg-ink); text-decoration: none; line-height: 1; flex-shrink: 0; }
.nb-hbg .brand em { font-style: italic; color: var(--nb-hbg-rust); }
.nb-hbg .rule-v { width: 1px; height: 28px; background: var(--nb-hbg-rule); flex-shrink: 0; }
.nb-hbg .nav-links { display: flex; align-items: center; gap: 0; list-style: none; flex: 1; }
.nb-hbg .nav-links a { display: flex; align-items: center; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nb-hbg-muted); text-decoration: none; padding: 0 1.1rem; height: var(--nb-hbg-nav-h); border-right: 1px solid var(--nb-hbg-rule); transition: color 0.15s, background 0.15s; position: relative; }
.nb-hbg .nav-links li:first-child a { border-left: 1px solid var(--nb-hbg-rule); }
.nb-hbg .nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--nb-hbg-rust); transform: scaleX(0); transform-origin: left; transition: transform 0.2s ease; }
.nb-hbg .nav-links a:hover { color: var(--nb-hbg-ink); background: rgba(196,69,28,0.04); }
.nb-hbg .nav-links a:hover::after, .nb-hbg .nav-links a.active::after { transform: scaleX(1); }
.nb-hbg .nav-links a.active { color: var(--nb-hbg-ink); }
.nb-hbg .nav-spacer { flex: 1; }
.nb-hbg .nav-actions { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.nb-hbg .btn-subscribe { font-family: 'DM Mono', monospace; font-size: 0.65rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nb-hbg-paper); background: var(--nb-hbg-ink); border: none; padding: 9px 18px; cursor: pointer; transition: background 0.15s; }
.nb-hbg .btn-subscribe:hover { background: var(--nb-hbg-rust); }
.nb-hbg .btn-search { background: none; border: none; cursor: pointer; padding: 6px; color: var(--nb-hbg-muted); transition: color 0.15s; display: flex; }
.nb-hbg .btn-search:hover { color: var(--nb-hbg-ink); }
.nb-hbg .hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; background: none; border: none; cursor: pointer; padding: 6px; flex-shrink: 0; }
.nb-hbg .hamburger span { display: block; width: 100%; height: 1.5px; background: var(--nb-hbg-ink); transition: transform 0.3s cubic-bezier(0.23,1,0.32,1), opacity 0.2s; transform-origin: center; }
.nb-hbg .hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nb-hbg .hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nb-hbg .hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nb-hbg .mobile-drawer { position: absolute; top: var(--nb-hbg-nav-h); left: 0; right: 0; background: var(--nb-hbg-ink); z-index: 99; transform: translateY(-101%); transition: transform 0.4s cubic-bezier(0.23,1,0.32,1); border-bottom: 3px solid var(--nb-hbg-rust); }
.nb-hbg .mobile-drawer.open { transform: translateY(0); }
.nb-hbg .drawer-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(255,255,255,0.08); }
.nb-hbg .drawer-item { display: flex; flex-direction: column; padding: 1.5rem 2rem; border-right: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08); text-decoration: none; transition: background 0.15s; position: relative; overflow: hidden; }
.nb-hbg .drawer-item:hover { background: rgba(196,69,28,0.12); }
.nb-hbg .drawer-item:nth-child(even) { border-right: none; }
.nb-hbg .drawer-item-num { font-size: 0.6rem; letter-spacing: 0.15em; color: var(--nb-hbg-rust); margin-bottom: 0.5rem; }
.nb-hbg .drawer-item-label { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: var(--nb-hbg-paper); line-height: 1.1; }
.nb-hbg .drawer-item-sub { font-size: 0.6rem; letter-spacing: 0.08em; color: rgba(245,240,232,0.4); margin-top: 0.4rem; text-transform: uppercase; }
.nb-hbg .drawer-bottom { padding: 1.5rem 2rem; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,0.08); }
.nb-hbg .drawer-tagline { font-size: 0.65rem; letter-spacing: 0.1em; color: rgba(245,240,232,0.35); text-transform: uppercase; }
.nb-hbg .drawer-cta { font-family: 'DM Mono', monospace; font-size: 0.65rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nb-hbg-ink); background: var(--nb-hbg-rust); border: none; padding: 9px 18px; cursor: pointer; }
.nb-hbg .ticker { background: var(--nb-hbg-rust); overflow: hidden; white-space: nowrap; padding: 0.6rem 0; margin-top: var(--nb-hbg-nav-h); }
.nb-hbg .ticker-inner { display: inline-block; animation: nb-hbg-ticker 18s linear infinite; }
.nb-hbg .ticker span { font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--nb-hbg-paper); padding: 0 3rem; }
.nb-hbg .ticker span::before { content: '◆ '; }
@keyframes nb-hbg-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.nb-hbg .hero { min-height: 680px; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 2px solid var(--nb-hbg-ink); }
.nb-hbg .hero-text { padding: 5rem 3rem 4rem; border-right: 2px solid var(--nb-hbg-ink); display: flex; flex-direction: column; justify-content: center; }
.nb-hbg .overline { font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--nb-hbg-rust); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; }
.nb-hbg .overline::before { content: ''; width: 24px; height: 1.5px; background: var(--nb-hbg-rust); }
.nb-hbg h1 { font-family: 'Playfair Display', serif; font-size: clamp(3rem, 5vw, 5.5rem); font-weight: 900; line-height: 1.0; letter-spacing: -0.02em; color: var(--nb-hbg-ink); margin-bottom: 1.5rem; }
.nb-hbg h1 em { font-style: italic; color: var(--nb-hbg-rust); }
.nb-hbg .deck { font-size: 1rem; line-height: 1.65; color: var(--nb-hbg-muted); max-width: 38ch; margin-bottom: 2.5rem; }
.nb-hbg .read-more { display: inline-flex; align-items: center; gap: 0.75rem; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nb-hbg-ink); text-decoration: none; border-bottom: 1.5px solid var(--nb-hbg-ink); padding-bottom: 2px; transition: color 0.15s, border-color 0.15s; }
.nb-hbg .read-more:hover { color: var(--nb-hbg-rust); border-color: var(--nb-hbg-rust); }
.nb-hbg .read-more svg { transition: transform 0.2s; }
.nb-hbg .read-more:hover svg { transform: translateX(4px); }
.nb-hbg .hero-visual { background: var(--nb-hbg-ink); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.nb-hbg .hero-pattern { position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,0.04) 39px, rgba(255,255,255,0.04) 40px), repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,0.04) 39px, rgba(255,255,255,0.04) 40px); }
.nb-hbg .hero-pullquote { position: relative; z-index: 1; padding: 3rem; text-align: center; }
.nb-hbg .hero-pullquote blockquote { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 3vw, 3rem); font-weight: 400; font-style: italic; color: var(--nb-hbg-paper); line-height: 1.3; }
.nb-hbg .hero-pullquote cite { display: block; font-family: 'DM Mono', monospace; font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--nb-hbg-rust); margin-top: 1.5rem; font-style: normal; }
@media (max-width: 900px) {
.nb-hbg .nav-links, .nb-hbg .rule-v, .nb-hbg .issue-tag, .nb-hbg .btn-subscribe, .nb-hbg .btn-search { display: none; }
.nb-hbg .hamburger { display: flex; }
.nb-hbg .hero { grid-template-columns: 1fr; }
.nb-hbg .hero-text { border-right: none; border-bottom: 2px solid var(--nb-hbg-ink); padding: 3rem 1.5rem; }
.nb-hbg .hero-pullquote blockquote { font-size: 1.6rem; }
.nb-hbg .drawer-grid { grid-template-columns: 1fr; }
.nb-hbg .drawer-item { border-right: none; }
}
@media (max-width: 500px) {
.nb-hbg .nav-inner { padding: 0 1rem; }
.nb-hbg .hero-text { padding: 2.5rem 1rem 2rem; }
}
@media (prefers-reduced-motion: reduce) {
.nb-hbg .ticker-inner, .nb-hbg .hamburger span, .nb-hbg .mobile-drawer, .nb-hbg .read-more svg { animation: none !important; transition: none !important; }
}
```
**JS:**
```js
(() => {
// Scoped hamburger + drawer wiring. The source mock binds a click
// listener to `document` to close on outside-click — re-scope to
// the wrapper so two demos can coexist without interfering with
// each other or the gallery page chrome.
const root = document.querySelector('.nb-hbg');
if (!root) return;
const burger = root.querySelector('[data-nb-hbg-burger]');
const drawer = root.querySelector('[data-nb-hbg-drawer]');
if (!burger || !drawer) return;
function setOpen(open) {
burger.classList.toggle('open', open);
drawer.classList.toggle('open', open);
burger.setAttribute('aria-expanded', open);
drawer.setAttribute('aria-hidden', !open);
}
burger.addEventListener('click', (e) => {
e.stopPropagation();
setOpen(!burger.classList.contains('open'));
});
// Close on click outside the burger + drawer, but only within
// this wrapper. Listening on the wrapper itself, not document.
root.addEventListener('click', (e) => {
if (!burger.classList.contains('open')) return;
if (!burger.contains(e.target) && !drawer.contains(e.target)) {
setOpen(false);
}
});
})();
```
### 02. CSS Mega Menu
**Type:** Pure CSS
**Description:** A luxury fashion mega menu navbar UI in deep void black with gold #c9a84c accents and Cormorant Garamond display type — proving a mega menu can carry editorial weight without the SaaS-default look. Top bar with a serif-italic "Aurèlia" wordmark and a 5-item menubar (Women, Men, Collections, Designers, Sale). Hovering Women drops a 4-column panel (Ready to Wear + Accessories + By Occasion link lists with New badges + an italic editorial card "The Art of Understated Power"). Men opens a 4-column with grooming + AW26 lookbook card. Collections shows a 4-up grid of seasonal collection cards (Lumière Douce SS26, Nuit Blanche Pre-Fall, Jardin Sauvage Capsule, Maison Éternelle Bridal). Designers gives a featured list + 12-tile A–Z directory + Voices from the Atelier interview card. Right-rail has Search, Account, and a gold-bordered Bag CTA with a "3" counter. Cormorant Garamond + Jost. Best for luxury fashion e-commerce, boutique storefronts, jewellery sites, perfume houses, premium B2C navigation.
**HTML:**
```html
Aurè lia
Women
Editorial — SS26
The Art of Understated Power
Discover →
Men
Lookbook — AW26
New Tailoring Classics
Explore →
Collections
Spring / Summer 2026
Lumière Douce
Soft light and shadow play through sheer silks and structured linen.
Pre-Fall 2026
Nuit Blanche
The elegance of the in-between — neither day nor evening.
Capsule
Jardin Sauvage
Botanically inspired prints on sustainable organic cotton.
Bridal 2026
Maison Éternelle
Couture-grade craftsmanship for life's most defining moments.
Designers
Sale UP TO 60%
New Season — SS 2026
The Art ofRefinement
Hover over the navigation to explore our collections. Each category unfolds into a world carefully curated for you.
```
**CSS:**
```css
/* ─── 02 Aurélia — luxury e-commerce mega menu navbar UI ───────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Jost:wght@300;400;500;600&display=swap');
.nb-mga {
--nb-mga-void: #080808;
--nb-mga-deep: #111010;
--nb-mga-surface: #1a1918;
--nb-mga-gold: #c9a84c;
--nb-mga-gold-light: #e8c97a;
--nb-mga-cream: #f2ede6;
--nb-mga-muted: #6b6560;
--nb-mga-border: rgba(201,168,76,0.15);
--nb-mga-nav-h: 80px;
position: relative;
width: 100%;
min-height: 720px;
background: var(--nb-mga-deep);
color: var(--nb-mga-cream);
font-family: 'Jost', sans-serif;
overflow: hidden;
box-sizing: border-box;
}
.nb-mga *, .nb-mga *::before, .nb-mga *::after { box-sizing: border-box; margin: 0; padding: 0; }
.nb-mga nav { position: absolute; top: 0; left: 0; right: 0; z-index: 200; height: var(--nb-mga-nav-h); background: var(--nb-mga-void); border-bottom: 1px solid var(--nb-mga-border); }
.nb-mga .nav-inner { max-width: 1440px; margin: 0 auto; height: 100%; display: flex; align-items: center; padding: 0 3rem; }
.nb-mga .brand { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 300; letter-spacing: 0.3em; text-transform: uppercase; color: var(--nb-mga-cream); text-decoration: none; flex-shrink: 0; margin-right: 4rem; }
.nb-mga .brand strong { color: var(--nb-mga-gold); font-weight: 600; }
.nb-mga .nav-items { display: flex; align-items: stretch; height: 100%; flex: 1; list-style: none; gap: 0; }
.nb-mga .nav-item { position: static; height: 100%; }
.nb-mga .nav-item > a, .nb-mga .nav-item > button { display: flex; align-items: center; gap: 5px; height: 100%; padding: 0 1.4rem; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(242,237,230,0.6); text-decoration: none; background: none; border: none; cursor: pointer; transition: color 0.2s; position: relative; white-space: nowrap; font-family: inherit; }
.nb-mga .nav-item > a::after, .nb-mga .nav-item > button::after { content: ''; position: absolute; bottom: 0; left: 50%; right: 50%; height: 1px; background: var(--nb-mga-gold); transition: left 0.3s ease, right 0.3s ease; }
.nb-mga .nav-item:hover > a, .nb-mga .nav-item:hover > button, .nb-mga .nav-item:focus-within > a, .nb-mga .nav-item:focus-within > button { color: var(--nb-mga-cream); }
.nb-mga .nav-item:hover > a::after, .nb-mga .nav-item:hover > button::after, .nb-mga .nav-item:focus-within > a::after, .nb-mga .nav-item:focus-within > button::after { left: 1.4rem; right: 1.4rem; }
.nb-mga .chevron { width: 8px; height: 8px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 0.25s; flex-shrink: 0; }
.nb-mga .nav-item:hover .chevron, .nb-mga .nav-item:focus-within .chevron { transform: rotate(225deg) translateY(-2px); }
.nb-mga .nav-spacer { flex: 1; }
.nb-mga .nav-utils { display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; }
.nb-mga .util-btn { display: flex; align-items: center; gap: 6px; font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(242,237,230,0.5); background: none; border: none; cursor: pointer; padding: 8px 12px; transition: color 0.2s; white-space: nowrap; font-family: inherit; }
.nb-mga .util-btn:hover { color: var(--nb-mga-cream); }
.nb-mga .cart-btn { display: flex; align-items: center; gap: 8px; font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nb-mga-gold); background: none; border: 1px solid var(--nb-mga-border); cursor: pointer; padding: 8px 16px; transition: border-color 0.2s, background 0.2s; margin-left: 0.5rem; font-family: inherit; }
.nb-mga .cart-btn:hover { border-color: var(--nb-mga-gold); background: rgba(201,168,76,0.06); }
.nb-mga .cart-count { background: var(--nb-mga-gold); color: var(--nb-mga-void); font-size: 0.55rem; font-weight: 600; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.nb-mga .sale-flash { color: var(--nb-mga-gold); margin-left: 4px; font-size: 0.6rem; letter-spacing: 0.1em; }
.nb-mga .mega { position: absolute; top: var(--nb-mga-nav-h); left: 0; right: 0; background: var(--nb-mga-void); border-bottom: 1px solid var(--nb-mga-border); z-index: 199; opacity: 0; visibility: hidden; transform: translateY(-12px); transition: opacity 0.3s ease, visibility 0.3s, transform 0.3s cubic-bezier(0.16,1,0.3,1); pointer-events: none; }
.nb-mga .nav-item:hover .mega, .nb-mga .nav-item:focus-within .mega { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: all; }
.nb-mga .mega-inner { max-width: 1440px; margin: 0 auto; padding: 3rem; display: grid; gap: 3rem; }
.nb-mga .mega-women .mega-inner { grid-template-columns: 2fr 1fr 1fr 1.2fr; }
.nb-mga .mega-men .mega-inner { grid-template-columns: 1fr 1fr 1fr 1.5fr; }
.nb-mga .mega-collections .mega-inner { grid-template-columns: repeat(4, 1fr); }
.nb-mga .mega-designers .mega-inner { grid-template-columns: 1fr 1fr 2fr; }
.nb-mga .mega-col-title { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--nb-mga-gold); margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--nb-mga-border); }
.nb-mga .mega-links { list-style: none; display: flex; flex-direction: column; gap: 0; }
.nb-mga .mega-links a { display: flex; align-items: center; justify-content: space-between; font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-weight: 300; color: rgba(242,237,230,0.7); text-decoration: none; padding: 0.55rem 0; border-bottom: 1px solid rgba(201,168,76,0.06); transition: color 0.2s, padding-left 0.2s; }
.nb-mga .mega-links a:hover { color: var(--nb-mga-gold-light); padding-left: 0.5rem; }
.nb-mga .mega-links a span { font-family: 'Jost', sans-serif; font-size: 0.6rem; letter-spacing: 0.1em; color: var(--nb-mga-muted); }
.nb-mga .mega-links a:hover span { color: var(--nb-mga-gold); }
.nb-mga .mega-editorial { position: relative; overflow: hidden; min-height: 240px; background: var(--nb-mga-surface); display: flex; flex-direction: column; justify-content: flex-end; padding: 2rem; }
.nb-mga .editorial-pattern { position: absolute; inset: 0; background: radial-gradient(ellipse at 80% 20%, rgba(201,168,76,0.08) 0%, transparent 60%), repeating-linear-gradient(135deg, transparent, transparent 20px, rgba(201,168,76,0.02) 20px, rgba(201,168,76,0.02) 21px); }
.nb-mga .editorial-tag { font-size: 0.55rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--nb-mga-gold); margin-bottom: 0.5rem; position: relative; z-index: 1; }
.nb-mga .editorial-headline { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; font-weight: 300; font-style: italic; color: var(--nb-mga-cream); line-height: 1.3; margin-bottom: 1rem; position: relative; z-index: 1; }
.nb-mga .editorial-cta { display: inline-flex; align-items: center; gap: 8px; font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--nb-mga-gold); text-decoration: none; transition: gap 0.2s; position: relative; z-index: 1; }
.nb-mga .editorial-cta:hover { gap: 14px; }
.nb-mga .designers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.nb-mga .designer-tile { padding: 0.9rem 1rem; background: var(--nb-mga-surface); font-family: 'Cormorant Garamond', serif; font-size: 1rem; font-weight: 300; color: rgba(242,237,230,0.65); text-decoration: none; transition: background 0.2s, color 0.2s; display: flex; align-items: center; gap: 0.5rem; }
.nb-mga .designer-tile::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: var(--nb-mga-gold); opacity: 0; transition: opacity 0.2s; flex-shrink: 0; }
.nb-mga .designer-tile:hover { background: rgba(201,168,76,0.08); color: var(--nb-mga-gold-light); }
.nb-mga .designer-tile:hover::before { opacity: 1; }
.nb-mga .collection-card { background: var(--nb-mga-surface); padding: 2rem 1.5rem; position: relative; overflow: hidden; transition: transform 0.2s; }
.nb-mga .collection-card:hover { transform: translateY(-4px); }
.nb-mga .collection-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--nb-mga-gold), transparent); opacity: 0; transition: opacity 0.2s; }
.nb-mga .collection-card:hover .collection-card-accent { opacity: 1; }
.nb-mga .collection-season { font-size: 0.55rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--nb-mga-gold); margin-bottom: 0.5rem; }
.nb-mga .collection-name { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 300; color: var(--nb-mga-cream); margin-bottom: 0.75rem; line-height: 1.2; }
.nb-mga .collection-desc { font-size: 0.7rem; color: var(--nb-mga-muted); line-height: 1.6; }
.nb-mga .page-content { padding-top: var(--nb-mga-nav-h); min-height: 640px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; gap: 1.5rem; position: relative; overflow: hidden; }
.nb-mga .bg-orb { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; }
.nb-mga .bg-orb-1 { width: 600px; height: 600px; background: rgba(201,168,76,0.04); top: -200px; left: -200px; }
.nb-mga .bg-orb-2 { width: 400px; height: 400px; background: rgba(201,168,76,0.03); bottom: -100px; right: -100px; }
.nb-mga .page-eyebrow { font-size: 0.65rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--nb-mga-gold); }
.nb-mga .page-h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(3.5rem, 8vw, 8rem); font-weight: 300; letter-spacing: 0.05em; color: var(--nb-mga-cream); line-height: 1; }
.nb-mga .page-h1 em { font-style: italic; color: var(--nb-mga-gold); }
.nb-mga .page-sub { font-size: 0.8rem; letter-spacing: 0.08em; color: var(--nb-mga-muted); max-width: 40ch; }
.nb-mga .page-line { width: 60px; height: 1px; background: linear-gradient(90deg, transparent, var(--nb-mga-gold), transparent); }
@media (max-width: 900px) {
.nb-mga .nav-inner { padding: 0 1.5rem; }
.nb-mga .nav-items { display: none; }
.nb-mga .brand { margin-right: 0; flex: 1; }
.nb-mga .util-btn span, .nb-mga .util-btn { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
.nb-mga .mega, .nb-mga .chevron, .nb-mga .collection-card, .nb-mga .designer-tile { transition: none !important; }
}
```
### 03. Glassmorphism CSS Navbar
**Type:** Pure CSS
**Description:** A pill-shaped glassmorphism navbar UI floating 20px above the wrapper edge, built with backdrop-filter:blur() over a living aurora gradient background — proving that frosted-glass navbars composite cleanly against any vibrant scene. Four blurred radial-gradient orbs (violet, cyan, rose, green) drift in mix-blend-mode:screen across a deep #050311 backdrop, with a fractal noise overlay for grain. The pill nav itself has Syne wordmark + cyan dot, divider rule, link list with active-pill state + glowing cyan dot indicator, two has-drop dropdown triggers that reveal nested glassmorphic panels with icon tiles (⚡ Analytics, 🧠 AI Studio, 🔗 Integrations / 🏢 Enterprise, 🚀 Startups, 🎓 Education), Search + Theme icon buttons, and a cyan-to-violet gradient "Get Started" CTA. Below, a gradient-clipped "Build the future, fast." hero with three frosted demo cards. Syne + Inter. Best for SaaS product sites, AI/ML company landing pages, modern marketing chrome, cyberpunk-inflected dashboards.
**HTML:**
```html
Now in public beta
Build thefuture, fast.
The glassmorphic navbar adapts elegantly to any vibrant background — see how the frosted blur composites perfectly against live aurora gradients.
⚡
Speed
12ms avg response
```
**CSS:**
```css
/* ─── 03 Nōva — glassmorphism floating pill navbar UI ──────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Inter:wght@300;400;500&display=swap');
.nb-gls {
--nb-gls-glass-bg: rgba(255,255,255,0.07);
--nb-gls-glass-border: rgba(255,255,255,0.14);
--nb-gls-glass-shadow: rgba(0,0,0,0.2);
--nb-gls-text-primary: rgba(255,255,255,0.95);
--nb-gls-text-muted: rgba(255,255,255,0.55);
--nb-gls-accent-cyan: #00f0ff;
--nb-gls-accent-violet: #c77dff;
--nb-gls-accent-rose: #ff6b9d;
--nb-gls-nav-h: 68px;
position: relative;
width: 100%;
min-height: 720px;
background: #050311;
font-family: 'Inter', sans-serif;
overflow: hidden;
box-sizing: border-box;
}
.nb-gls *, .nb-gls *::before, .nb-gls *::after { box-sizing: border-box; margin: 0; padding: 0; }
.nb-gls .bg-scene { position: absolute; inset: 0; z-index: 0; background: #050311; overflow: hidden; }
.nb-gls .aurora { position: absolute; border-radius: 50%; filter: blur(80px); mix-blend-mode: screen; animation: nb-gls-float var(--dur, 14s) ease-in-out infinite alternate; }
@keyframes nb-gls-float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(var(--tx, 40px), var(--ty, 30px)) scale(var(--s, 1.1)); } }
.nb-gls .a1 { width: 700px; height: 700px; background: radial-gradient(circle, #6e00ff 0%, transparent 70%); top: -200px; left: -100px; --dur: 18s; --tx: 60px; --ty: 50px; --s: 1.2; opacity: 0.5; }
.nb-gls .a2 { width: 600px; height: 600px; background: radial-gradient(circle, #00c8ff 0%, transparent 70%); top: 100px; right: -150px; --dur: 22s; --tx: -80px; --ty: 60px; --s: 1.15; opacity: 0.45; }
.nb-gls .a3 { width: 500px; height: 500px; background: radial-gradient(circle, #ff0080 0%, transparent 70%); bottom: -100px; left: 30%; --dur: 16s; --tx: -50px; --ty: -40px; --s: 1.3; opacity: 0.35; }
.nb-gls .a4 { width: 400px; height: 400px; background: radial-gradient(circle, #00ff88 0%, transparent 70%); bottom: 200px; right: 20%; --dur: 20s; --tx: 30px; --ty: -60px; --s: 1.1; opacity: 0.25; }
.nb-gls .bg-scene::after { content: ''; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E"); pointer-events: none; opacity: 0.4; }
.nb-gls nav { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 100; width: calc(100% - 48px); max-width: 1200px; height: var(--nb-gls-nav-h); background: var(--nb-gls-glass-bg); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); border: 1px solid var(--nb-gls-glass-border); border-radius: 20px; box-shadow: 0 8px 32px var(--nb-gls-glass-shadow), inset 0 1px 0 rgba(255,255,255,0.12), 0 0 0 1px rgba(255,255,255,0.04); }
.nb-gls nav::before { content: ''; position: absolute; top: 0; left: 15%; right: 15%; height: 1px; background: linear-gradient(90deg, transparent, rgba(0,240,255,0.5), rgba(199,125,255,0.5), transparent); border-radius: 0 0 50% 50%; }
.nb-gls .nav-inner { height: 100%; display: flex; align-items: center; padding: 0 1.5rem; gap: 0; }
.nb-gls .brand { font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 800; color: var(--nb-gls-text-primary); text-decoration: none; letter-spacing: -0.02em; flex-shrink: 0; position: relative; }
.nb-gls .brand-dot { display: inline-block; width: 6px; height: 6px; background: var(--nb-gls-accent-cyan); border-radius: 50%; margin-left: 2px; box-shadow: 0 0 10px var(--nb-gls-accent-cyan); vertical-align: middle; margin-bottom: 3px; }
.nb-gls .nav-divider { width: 1px; height: 24px; background: var(--nb-gls-glass-border); margin: 0 1.5rem; flex-shrink: 0; }
.nb-gls .nav-links { display: flex; align-items: center; gap: 0; list-style: none; flex: 1; }
.nb-gls .nav-links a { display: block; font-family: 'Syne', sans-serif; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.02em; color: var(--nb-gls-text-muted); text-decoration: none; padding: 8px 14px; border-radius: 10px; transition: color 0.2s, background 0.2s; position: relative; white-space: nowrap; }
.nb-gls .nav-links a:hover { color: var(--nb-gls-text-primary); background: rgba(255,255,255,0.08); }
.nb-gls .nav-links a.active { color: var(--nb-gls-text-primary); background: rgba(255,255,255,0.1); }
.nb-gls .nav-links a.active::after { content: ''; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--nb-gls-accent-cyan); box-shadow: 0 0 8px var(--nb-gls-accent-cyan); }
.nb-gls .has-drop { position: relative; }
.nb-gls .has-drop > a { display: flex; align-items: center; gap: 4px; }
.nb-gls .drop-arrow { width: 12px; height: 12px; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.nb-gls .has-drop:hover .drop-arrow { transform: rotate(180deg); }
.nb-gls .drop-menu { position: absolute; top: calc(100% + 12px); left: 0; min-width: 200px; background: rgba(10,6,30,0.7); backdrop-filter: blur(32px) saturate(180%); -webkit-backdrop-filter: blur(32px) saturate(180%); border: 1px solid var(--nb-gls-glass-border); border-radius: 16px; padding: 8px; z-index: 200; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.97); transform-origin: top left; transition: opacity 0.2s, visibility 0.2s, transform 0.2s cubic-bezier(0.16,1,0.3,1); box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08); }
.nb-gls .has-drop:hover .drop-menu, .nb-gls .has-drop:focus-within .drop-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.nb-gls .drop-menu a { display: flex; align-items: center; gap: 10px; font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 400; color: var(--nb-gls-text-muted); text-decoration: none; padding: 9px 12px; border-radius: 10px; transition: background 0.15s, color 0.15s; white-space: nowrap; }
.nb-gls .drop-menu a:hover { background: rgba(255,255,255,0.07); color: var(--nb-gls-text-primary); }
.nb-gls .drop-icon { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.9rem; }
.nb-gls .drop-divider { height: 1px; background: var(--nb-gls-glass-border); margin: 6px 0; }
.nb-gls .nav-spacer { flex: 1; min-width: 1rem; }
.nb-gls .nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nb-gls .action-icon { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,0.06); border: 1px solid var(--nb-gls-glass-border); display: flex; align-items: center; justify-content: center; color: var(--nb-gls-text-muted); cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.nb-gls .action-icon:hover { background: rgba(255,255,255,0.12); color: var(--nb-gls-text-primary); border-color: rgba(255,255,255,0.25); }
.nb-gls .btn-launch { font-family: 'Syne', sans-serif; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; color: #050311; background: linear-gradient(135deg, var(--nb-gls-accent-cyan), var(--nb-gls-accent-violet)); border: none; border-radius: 12px; padding: 9px 18px; cursor: pointer; transition: opacity 0.2s, transform 0.15s; box-shadow: 0 4px 20px rgba(0,240,255,0.3); white-space: nowrap; }
.nb-gls .btn-launch:hover { opacity: 0.9; transform: translateY(-1px); }
.nb-gls .page { position: relative; z-index: 1; min-height: 720px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 120px; text-align: center; gap: 2rem; }
.nb-gls .pill-badge { display: inline-flex; align-items: center; gap: 8px; font-family: 'Syne', sans-serif; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; color: var(--nb-gls-accent-cyan); background: rgba(0,240,255,0.08); border: 1px solid rgba(0,240,255,0.2); border-radius: 100px; padding: 6px 16px; }
.nb-gls .pill-badge::before { content: '◉'; font-size: 0.6rem; animation: nb-gls-pulse 2s ease-in-out infinite; }
@keyframes nb-gls-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.nb-gls .hero-title { font-family: 'Syne', sans-serif; font-size: clamp(3rem, 7vw, 7rem); font-weight: 800; color: var(--nb-gls-text-primary); line-height: 1; letter-spacing: -0.03em; }
.nb-gls .hero-title .gradient-text { background: linear-gradient(135deg, var(--nb-gls-accent-cyan), var(--nb-gls-accent-violet), var(--nb-gls-accent-rose)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nb-gls .hero-sub { font-size: 1.1rem; color: var(--nb-gls-text-muted); max-width: 50ch; line-height: 1.7; }
.nb-gls .demo-cards { display: flex; gap: 1rem; margin-top: 1rem; }
.nb-gls .demo-card { background: var(--nb-gls-glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--nb-gls-glass-border); border-radius: 16px; padding: 1.5rem; width: 160px; text-align: left; transition: transform 0.2s, border-color 0.2s; }
.nb-gls .demo-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.25); }
.nb-gls .demo-card-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.nb-gls .demo-card-label { font-family: 'Syne', sans-serif; font-size: 0.75rem; font-weight: 700; color: var(--nb-gls-text-primary); margin-bottom: 0.25rem; }
.nb-gls .demo-card-val { font-size: 0.7rem; color: var(--nb-gls-text-muted); }
@media (max-width: 768px) {
.nb-gls nav { width: calc(100% - 24px); top: 12px; }
.nb-gls .nav-links .has-drop, .nb-gls .nav-links li:not(.has-drop):nth-child(n+4) { display: none; }
.nb-gls .nav-divider { display: none; }
.nb-gls .demo-cards { display: none; }
.nb-gls .hero-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.nb-gls .aurora, .nb-gls .pill-badge::before, .nb-gls .demo-card { animation: none !important; transition: none !important; }
}
```
### 04. Vertical CSS Sidebar Navigation
**Type:** CSS + JS
**Description:** A GitHub-dark-inspired collapsible sidebar navbar UI for a SaaS dashboard — proving that the canonical 240px ↔ 64px sidebar collapse pattern can carry a complete information density. Sidebar with gradient hex logo, a circular collapse-toggle button that rotates 180° on click, a workspace selector card (Acme Corp / Pro Plan), three nav sections (Overview / Workspace / System) with mono-uppercase labels and colour-coded badges (Live green, "12" blue, "2" orange, "3" red), and a bottom user row with gradient avatar. On collapse the entire 240px width animates to 64px — every label, badge, and the workspace info smoothly fade out — and tooltips appear on hover via a `data-label` attribute. The main pane carries a sticky topbar (breadcrumb / ⌘K search / notifications dot / command icon) and the actual dashboard content: 4-up stat cards (Revenue $84.2k +12.4%, Active Users 4,291, Deployments 138 −3.2%, Uptime 99.97%) plus a 14-bar Request Volume chart + Recent Activity feed. IBM Plex Sans + IBM Plex Mono. Best for SaaS admin panels, developer tools, internal dashboards, analytics platforms, B2B product chrome.
**HTML:**
```html
hexlane
Acme Corp
Dashboard
Search...
⌘K
Overview
Your workspace at a glance — updated just now
Request Volume
Last 14 days — hover over bars
Recent Activity
Live feed
Deploy succeeded — production v2.4.1
2m ago
Jordan Lee updated API keys
14m
Alert triggered — latency spike
1h
Build failed — staging branch
2h
```
**CSS:**
```css
/* ─── 04 hexlane — collapsible sidebar dashboard navbar UI ─────── */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');
.nb-sdb {
--nb-sdb-sidebar-w: 240px;
--nb-sdb-sidebar-collapsed: 64px;
--nb-sdb-bg: #0d1117;
--nb-sdb-surface: #161b22;
--nb-sdb-surface-2: #21262d;
--nb-sdb-border: #30363d;
--nb-sdb-text: #e6edf3;
--nb-sdb-text-muted: #7d8590;
--nb-sdb-text-dim: #484f58;
--nb-sdb-accent: #58a6ff;
--nb-sdb-accent-green: #3fb950;
--nb-sdb-accent-orange: #d29922;
--nb-sdb-accent-red: #f85149;
--nb-sdb-accent-purple: #bc8cff;
--nb-sdb-transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
width: 100%;
min-height: 720px;
background: var(--nb-sdb-bg);
color: var(--nb-sdb-text);
font-family: 'IBM Plex Sans', sans-serif;
display: flex;
overflow: hidden;
box-sizing: border-box;
}
.nb-sdb *, .nb-sdb *::before, .nb-sdb *::after { box-sizing: border-box; margin: 0; padding: 0; }
.nb-sdb aside { width: var(--nb-sdb-sidebar-w); background: var(--nb-sdb-surface); border-right: 1px solid var(--nb-sdb-border); display: flex; flex-direction: column; transition: width var(--nb-sdb-transition); position: relative; z-index: 50; overflow: hidden; flex-shrink: 0; }
.nb-sdb aside.collapsed { width: var(--nb-sdb-sidebar-collapsed); }
.nb-sdb .sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--nb-sdb-border); flex-shrink: 0; overflow: hidden; white-space: nowrap; }
.nb-sdb .logo-icon { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--nb-sdb-accent), var(--nb-sdb-accent-purple)); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; box-shadow: 0 2px 12px rgba(88,166,255,0.3); color: #fff; }
.nb-sdb .logo-text { font-family: 'IBM Plex Mono', monospace; font-size: 0.9rem; font-weight: 500; letter-spacing: -0.02em; color: var(--nb-sdb-text); transition: opacity var(--nb-sdb-transition), width var(--nb-sdb-transition); overflow: hidden; }
.nb-sdb .logo-dot { color: var(--nb-sdb-accent); }
.nb-sdb aside.collapsed .logo-text { opacity: 0; width: 0; }
/* Collapse toggle sits at the sidebar's outer edge. Lifted out of
so aside's overflow:hidden (which clips the fading labels)
doesn't also clip this button. Positioned absolute against the
wrapper; its left coord tracks the sidebar width via :has(). */
.nb-sdb .collapse-btn {
position: absolute;
top: 68px;
left: calc(var(--nb-sdb-sidebar-w) - 12px);
width: 24px;
height: 24px;
border-radius: 50%;
background: var(--nb-sdb-surface-2);
border: 1px solid var(--nb-sdb-border);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--nb-sdb-text-muted);
transition: background 0.15s, color 0.15s, left var(--nb-sdb-transition);
z-index: 60;
}
.nb-sdb:has(aside.collapsed) .collapse-btn {
left: calc(var(--nb-sdb-sidebar-collapsed) - 12px);
}
.nb-sdb .collapse-btn:hover { background: var(--nb-sdb-accent); color: #fff; border-color: var(--nb-sdb-accent); }
.nb-sdb .collapse-btn svg { transition: transform var(--nb-sdb-transition); }
.nb-sdb:has(aside.collapsed) .collapse-btn svg { transform: rotate(180deg); }
.nb-sdb .workspace { margin: 12px 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--nb-sdb-border); background: var(--nb-sdb-surface-2); display: flex; align-items: center; gap: 10px; cursor: pointer; transition: border-color 0.15s, background 0.15s; overflow: hidden; white-space: nowrap; flex-shrink: 0; }
.nb-sdb .workspace:hover { border-color: var(--nb-sdb-accent); background: rgba(88,166,255,0.05); }
.nb-sdb .ws-avatar { width: 24px; height: 24px; border-radius: 6px; background: linear-gradient(135deg, #3fb950, #1f6feb); flex-shrink: 0; font-size: 0.6rem; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; }
.nb-sdb .ws-info { flex: 1; min-width: 0; overflow: hidden; transition: opacity var(--nb-sdb-transition), width var(--nb-sdb-transition); }
.nb-sdb aside.collapsed .ws-info { opacity: 0; width: 0; }
.nb-sdb .ws-name { font-size: 0.75rem; font-weight: 500; color: var(--nb-sdb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-sdb .ws-plan { font-size: 0.6rem; color: var(--nb-sdb-text-muted); letter-spacing: 0.05em; text-transform: uppercase; }
.nb-sdb .ws-chevron { color: var(--nb-sdb-text-dim); flex-shrink: 0; transition: opacity var(--nb-sdb-transition); }
.nb-sdb aside.collapsed .ws-chevron { opacity: 0; }
.nb-sdb .sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0; scrollbar-width: thin; scrollbar-color: var(--nb-sdb-border) transparent; }
.nb-sdb .sidebar-nav::-webkit-scrollbar { width: 4px; }
.nb-sdb .sidebar-nav::-webkit-scrollbar-thumb { background: var(--nb-sdb-border); border-radius: 2px; }
.nb-sdb .nav-section { margin-bottom: 4px; }
.nb-sdb .nav-section-label { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nb-sdb-text-dim); padding: 8px 20px 4px; white-space: nowrap; overflow: hidden; transition: opacity var(--nb-sdb-transition); }
.nb-sdb aside.collapsed .nav-section-label { opacity: 0; }
.nb-sdb .nav-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 16px; margin: 1px 8px; border-radius: 8px; font-size: 0.82rem; font-weight: 400; color: var(--nb-sdb-text-muted); text-decoration: none; cursor: pointer; transition: background 0.12s, color 0.12s; white-space: nowrap; overflow: hidden; user-select: none; }
.nb-sdb .nav-item:hover { background: var(--nb-sdb-surface-2); color: var(--nb-sdb-text); }
.nb-sdb .nav-item.active { background: rgba(88,166,255,0.1); color: var(--nb-sdb-accent); }
.nb-sdb .nav-item.active::before { content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px; border-radius: 0 2px 2px 0; background: var(--nb-sdb-accent); }
.nb-sdb .nav-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; opacity: 0.8; }
.nb-sdb .nav-item.active .nav-icon, .nb-sdb .nav-item:hover .nav-icon { opacity: 1; }
.nb-sdb .nav-label { transition: opacity var(--nb-sdb-transition), width var(--nb-sdb-transition); overflow: hidden; }
.nb-sdb aside.collapsed .nav-label { opacity: 0; width: 0; }
.nb-sdb .nav-badge { margin-left: auto; flex-shrink: 0; font-size: 0.6rem; font-weight: 600; padding: 2px 6px; border-radius: 100px; transition: opacity var(--nb-sdb-transition); }
.nb-sdb aside.collapsed .nav-badge { opacity: 0; }
.nb-sdb .badge-blue { background: rgba(88,166,255,0.15); color: var(--nb-sdb-accent); }
.nb-sdb .badge-green { background: rgba(63,185,80,0.15); color: var(--nb-sdb-accent-green); }
.nb-sdb .badge-orange { background: rgba(210,153,34,0.15); color: var(--nb-sdb-accent-orange); }
.nb-sdb .badge-red { background: rgba(248,81,73,0.15); color: var(--nb-sdb-accent-red); }
.nb-sdb aside.collapsed .nav-item::after { content: attr(data-label); position: absolute; left: calc(var(--nb-sdb-sidebar-collapsed) - 8px); top: 50%; transform: translateY(-50%); background: var(--nb-sdb-surface-2); color: var(--nb-sdb-text); font-size: 0.75rem; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--nb-sdb-border); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.15s; z-index: 100; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.nb-sdb aside.collapsed .nav-item:hover::after { opacity: 1; }
.nb-sdb .sidebar-foot { border-top: 1px solid var(--nb-sdb-border); padding: 10px; flex-shrink: 0; overflow: hidden; }
.nb-sdb .user-row { display: flex; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 8px; cursor: pointer; transition: background 0.12s; white-space: nowrap; overflow: hidden; }
.nb-sdb .user-row:hover { background: var(--nb-sdb-surface-2); }
.nb-sdb .user-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--nb-sdb-accent-purple), var(--nb-sdb-accent)); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; color: #fff; }
.nb-sdb .user-info { flex: 1; min-width: 0; overflow: hidden; transition: opacity var(--nb-sdb-transition), width var(--nb-sdb-transition); }
.nb-sdb aside.collapsed .user-info { opacity: 0; width: 0; }
.nb-sdb .user-name { font-size: 0.78rem; font-weight: 500; color: var(--nb-sdb-text); overflow: hidden; text-overflow: ellipsis; }
.nb-sdb .user-handle { font-size: 0.65rem; color: var(--nb-sdb-text-dim); overflow: hidden; text-overflow: ellipsis; }
.nb-sdb .user-menu-btn { color: var(--nb-sdb-text-dim); flex-shrink: 0; transition: opacity var(--nb-sdb-transition); }
.nb-sdb aside.collapsed .user-menu-btn { opacity: 0; }
.nb-sdb .main { flex: 1; display: flex; flex-direction: column; min-height: 720px; }
.nb-sdb .topbar { height: 56px; border-bottom: 1px solid var(--nb-sdb-border); display: flex; align-items: center; padding: 0 24px; gap: 16px; background: var(--nb-sdb-surface); flex-shrink: 0; }
.nb-sdb .breadcrumb { display: flex; align-items: center; gap: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; color: var(--nb-sdb-text-muted); }
.nb-sdb .breadcrumb span { color: var(--nb-sdb-text-dim); }
.nb-sdb .breadcrumb strong { color: var(--nb-sdb-text); font-weight: 500; }
.nb-sdb .topbar-spacer { flex: 1; }
.nb-sdb .topbar-search { display: flex; align-items: center; gap: 8px; background: var(--nb-sdb-bg); border: 1px solid var(--nb-sdb-border); border-radius: 8px; padding: 6px 12px; color: var(--nb-sdb-text-muted); font-size: 0.75rem; cursor: pointer; transition: border-color 0.15s; }
.nb-sdb .topbar-search:hover { border-color: var(--nb-sdb-text-dim); }
.nb-sdb .search-shortcut { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; background: var(--nb-sdb-surface-2); border: 1px solid var(--nb-sdb-border); border-radius: 4px; padding: 1px 5px; color: var(--nb-sdb-text-dim); margin-left: 24px; }
.nb-sdb .topbar-actions { display: flex; align-items: center; gap: 8px; }
.nb-sdb .topbar-icon { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--nb-sdb-border); background: transparent; display: flex; align-items: center; justify-content: center; color: var(--nb-sdb-text-muted); cursor: pointer; transition: background 0.12s, color 0.12s; position: relative; }
.nb-sdb .topbar-icon:hover { background: var(--nb-sdb-surface-2); color: var(--nb-sdb-text); }
.nb-sdb .notif-dot { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--nb-sdb-accent-red); border: 1.5px solid var(--nb-sdb-surface); }
.nb-sdb .content { padding: 28px; flex: 1; }
.nb-sdb .page-title { font-size: 1.2rem; font-weight: 600; color: var(--nb-sdb-text); margin-bottom: 4px; }
.nb-sdb .page-desc { font-size: 0.82rem; color: var(--nb-sdb-text-muted); margin-bottom: 24px; }
.nb-sdb .stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.nb-sdb .stat-card { background: var(--nb-sdb-surface); border: 1px solid var(--nb-sdb-border); border-radius: 12px; padding: 18px 20px; transition: border-color 0.15s; }
.nb-sdb .stat-card:hover { border-color: var(--nb-sdb-text-dim); }
.nb-sdb .stat-label { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--nb-sdb-text-muted); margin-bottom: 10px; }
.nb-sdb .stat-value { font-family: 'IBM Plex Mono', monospace; font-size: 1.6rem; font-weight: 500; color: var(--nb-sdb-text); line-height: 1; margin-bottom: 8px; }
.nb-sdb .stat-change { font-size: 0.72rem; display: flex; align-items: center; gap: 4px; }
.nb-sdb .up { color: var(--nb-sdb-accent-green); }
.nb-sdb .down { color: var(--nb-sdb-accent-red); }
.nb-sdb .chart-area { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.nb-sdb .chart-card { background: var(--nb-sdb-surface); border: 1px solid var(--nb-sdb-border); border-radius: 12px; padding: 20px; }
.nb-sdb .chart-title { font-size: 0.82rem; font-weight: 500; color: var(--nb-sdb-text); margin-bottom: 4px; }
.nb-sdb .chart-sub { font-size: 0.72rem; color: var(--nb-sdb-text-muted); margin-bottom: 16px; }
.nb-sdb .chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 100px; }
.nb-sdb .bar { flex: 1; border-radius: 4px 4px 0 0; background: rgba(88,166,255,0.15); border: 1px solid rgba(88,166,255,0.2); transition: background 0.15s; }
.nb-sdb .bar:hover { background: rgba(88,166,255,0.35); }
.nb-sdb .bar.active { background: rgba(88,166,255,0.6); border-color: var(--nb-sdb-accent); }
.nb-sdb .bh-40 { height: 40%; } .nb-sdb .bh-45 { height: 45%; } .nb-sdb .bh-50 { height: 50%; }
.nb-sdb .bh-55 { height: 55%; } .nb-sdb .bh-60 { height: 60%; } .nb-sdb .bh-65 { height: 65%; }
.nb-sdb .bh-70 { height: 70%; } .nb-sdb .bh-75 { height: 75%; } .nb-sdb .bh-78 { height: 78%; }
.nb-sdb .bh-80 { height: 80%; } .nb-sdb .bh-85 { height: 85%; } .nb-sdb .bh-90 { height: 90%; } .nb-sdb .bh-95 { height: 95%; }
.nb-sdb .activity-list { display: flex; flex-direction: column; gap: 12px; }
.nb-sdb .activity-item { display: flex; gap: 10px; align-items: flex-start; }
.nb-sdb .activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.nb-sdb .dot-green { background: var(--nb-sdb-accent-green); }
.nb-sdb .dot-blue { background: var(--nb-sdb-accent); }
.nb-sdb .dot-orange { background: var(--nb-sdb-accent-orange); }
.nb-sdb .dot-red { background: var(--nb-sdb-accent-red); }
.nb-sdb .activity-text { font-size: 0.75rem; line-height: 1.5; color: var(--nb-sdb-text-muted); }
.nb-sdb .activity-text strong { color: var(--nb-sdb-text); }
.nb-sdb .activity-time { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; color: var(--nb-sdb-text-dim); margin-left: auto; flex-shrink: 0; }
@media (max-width: 1024px) {
.nb-sdb .stats-row { grid-template-columns: repeat(2, 1fr); }
.nb-sdb .chart-area { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
.nb-sdb .stats-row { grid-template-columns: 1fr; }
.nb-sdb .search-shortcut { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.nb-sdb aside, .nb-sdb .nav-label, .nb-sdb .ws-info, .nb-sdb .user-info, .nb-sdb .collapse-btn svg { transition: none !important; }
}
```
**JS:**
```js
(() => {
// Scoped collapsible-sidebar wiring. State lives on the wrapper, so
// two instances of this demo on one page can each collapse
// independently.
const root = document.querySelector('.nb-sdb');
if (!root) return;
const sidebar = root.querySelector('[data-nb-sdb-sidebar]');
const toggle = root.querySelector('[data-nb-sdb-toggle]');
if (!sidebar || !toggle) return;
toggle.addEventListener('click', () => {
const collapsed = sidebar.classList.toggle('collapsed');
toggle.setAttribute('aria-expanded', !collapsed);
});
// Click to set the active nav item, scoped to this sidebar.
sidebar.querySelectorAll('.nav-item').forEach((item) => {
item.addEventListener('click', (e) => {
e.preventDefault();
sidebar.querySelectorAll('.nav-item').forEach((i) => i.classList.remove('active'));
item.classList.add('active');
});
});
})();
```
### 05. Sticky CSS Navbar on Scroll
**Type:** CSS + JS
**Description:** A sustainable lifestyle brand navbar UI that gracefully compresses on scroll — proving the right way to do scroll-transforming sticky navigation without janky reflow. The navbar starts at 96px tall with a large Fraunces serif "Sylvé" wordmark and a "Sustainable Living" sub-tagline beneath; as the page scrolls past 60px, a single class toggle (driven by IntersectionObserver scoped to this demo) compresses the bar to a 60px frosted-glass version, fades the sub-tagline out, and shrinks the wordmark to 1.3rem — all via pure CSS transitions, no JS animation loop. A 3px lime-to-clay gradient progress bar tracks reading depth at the very top of the wrapper. Below the navbar is a sage-and-sand long-form page: decorative circles in the hero, Fraunces italic "earth in mind" headline, a 3-up Regenerative/Zero-Waste/Transparent feature grid, a sage pull-quote divider, and a "Slow Living" journal section that gives readers reason to scroll. Fraunces + Mulish. Best for sustainable brands, lifestyle e-commerce, editorial product sites, slow-content brands, marketing pages that need scroll-aware chrome.
**HTML:**
```html
New Collection 2026
Living in full bloom
Scroll down to watch the navbar gracefully compress and transform — growing more refined as you descend deeper into the page.
Our Philosophy
Designed with theearth in mind
Every product in our collection is crafted with deep respect for natural systems. We source exclusively from regenerative farms and artisan workshops that prioritize ecological balance over extraction.
01
Regenerative
All materials sourced from certified regenerative agriculture operations that actively restore soil biodiversity.
02
Zero-Waste
Our production process generates zero landfill waste. All offcuts are composted or repurposed into secondary goods.
03
Transparent
Every product includes a full supply chain trace, from seed to shelf, available in your account dashboard.
"The most sustainable product is one that lasts a lifetime."
Browse All Products →
From the Journal
Stories ofslow living
Reflections on seasonality, craft, ecology, and the small daily choices that accumulate into a life well-lived in relationship with the living world.
```
**CSS:**
```css
/* ─── 05 Sylvé — sticky scroll-transforming navbar UI ──────────── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;0,9..144,900;1,9..144,300;1,9..144,600&family=Mulish:wght@300;400;600&display=swap');
.nb-stk {
--nb-stk-sage: #3a5a40;
--nb-stk-sage-light: #4e7c57;
--nb-stk-sand: #f7f4ef;
--nb-stk-warm: #e8e0d0;
--nb-stk-warm-2: #d4c9b4;
--nb-stk-clay: #8b6f47;
--nb-stk-text: #1c2417;
--nb-stk-muted: #7a8c72;
--nb-stk-nav-h-tall: 96px;
--nb-stk-nav-h-short: 60px;
position: relative;
width: 100%;
min-height: 1800px;
background: var(--nb-stk-sand);
color: var(--nb-stk-text);
font-family: 'Mulish', sans-serif;
/* overflow:clip keeps horizontal escapes contained without
establishing a scrolling container — overflow:hidden would make
this wrapper the scrolling ancestor for the sticky nav and break
sticky behavior inside the iframe + gallery context. */
overflow: clip;
box-sizing: border-box;
scroll-behavior: smooth;
}
.nb-stk *, .nb-stk *::before, .nb-stk *::after { box-sizing: border-box; margin: 0; padding: 0; }
.nb-stk .progress-bar { position: absolute; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--nb-stk-sage), var(--nb-stk-clay)); z-index: 200; transform-origin: left; transform: scaleX(0); transition: transform 0.05s linear; border-radius: 0 2px 2px 0; width: 100%; }
.nb-stk nav { position: sticky; top: 0; left: 0; right: 0; z-index: 100; height: var(--nb-stk-nav-h-tall); background: transparent; transition: height 0.4s cubic-bezier(0.4,0,0.2,1), background 0.4s ease, box-shadow 0.4s ease, border-bottom 0.4s ease; }
.nb-stk nav.scrolled { height: var(--nb-stk-nav-h-short); background: rgba(247,244,239,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 1px 0 rgba(58,90,64,0.1), 0 8px 32px rgba(28,36,23,0.06); }
.nb-stk .nav-inner { max-width: 1320px; margin: 0 auto; height: 100%; display: flex; align-items: center; padding: 0 3rem; gap: 2rem; transition: padding 0.4s cubic-bezier(0.4,0,0.2,1); }
.nb-stk nav.scrolled .nav-inner { padding: 0 2rem; }
.nb-stk .brand { text-decoration: none; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-start; }
.nb-stk .brand-main { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 900; letter-spacing: -0.04em; color: var(--nb-stk-sage); line-height: 1; transition: font-size 0.4s cubic-bezier(0.4,0,0.2,1); }
.nb-stk .brand-sub { font-size: 0.55rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--nb-stk-muted); line-height: 1; margin-top: 3px; transition: opacity 0.3s, max-height 0.3s, margin 0.3s; max-height: 20px; overflow: hidden; }
.nb-stk nav.scrolled .brand-main { font-size: 1.3rem; }
.nb-stk nav.scrolled .brand-sub { opacity: 0; max-height: 0; margin: 0; }
.nb-stk .nav-links { display: flex; align-items: center; list-style: none; gap: 0.25rem; flex: 1; justify-content: center; }
.nb-stk .nav-links a { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nb-stk-muted); text-decoration: none; padding: 8px 14px; border-radius: 100px; transition: color 0.2s, background 0.2s; position: relative; }
.nb-stk .nav-links a:hover { color: var(--nb-stk-sage); background: rgba(58,90,64,0.06); }
.nb-stk .nav-links a.active { color: var(--nb-stk-sage); background: rgba(58,90,64,0.1); }
.nb-stk .nav-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.nb-stk .btn-ghost { font-family: 'Mulish', sans-serif; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nb-stk-sage); background: none; border: 1.5px solid var(--nb-stk-warm-2); border-radius: 100px; padding: 8px 18px; cursor: pointer; transition: border-color 0.2s, background 0.2s, color 0.2s; }
.nb-stk .btn-ghost:hover { border-color: var(--nb-stk-sage); background: rgba(58,90,64,0.04); }
.nb-stk .btn-solid { font-family: 'Mulish', sans-serif; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nb-stk-sand); background: var(--nb-stk-sage); border: 1.5px solid var(--nb-stk-sage); border-radius: 100px; padding: 8px 20px; cursor: pointer; transition: background 0.2s, transform 0.15s; }
.nb-stk .btn-solid:hover { background: var(--nb-stk-sage-light); transform: translateY(-1px); }
.nb-stk .hero { min-height: 680px; display: flex; align-items: center; position: relative; overflow: hidden; padding-top: 1rem; }
.nb-stk .hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 40%, rgba(58,90,64,0.06) 0%, transparent 60%), radial-gradient(ellipse at 20% 80%, rgba(139,111,71,0.06) 0%, transparent 50%); }
.nb-stk .hero-circle { position: absolute; border-radius: 50%; pointer-events: none; }
.nb-stk .hc-1 { width: 500px; height: 500px; border: 1px solid rgba(58,90,64,0.1); top: 10%; right: -100px; }
.nb-stk .hc-2 { width: 300px; height: 300px; border: 1px solid rgba(58,90,64,0.08); top: 25%; right: 50px; }
.nb-stk .hc-3 { width: 40px; height: 40px; background: rgba(58,90,64,0.12); bottom: 30%; left: 10%; animation: nb-stk-float 8s ease-in-out infinite; }
.nb-stk .hc-4 { width: 16px; height: 16px; background: var(--nb-stk-clay); opacity: 0.3; top: 35%; left: 25%; animation: nb-stk-float 12s ease-in-out infinite reverse; border-radius: 50%; }
@keyframes nb-stk-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
.nb-stk .hero-inner { max-width: 1320px; margin: 0 auto; padding: 4rem 3rem; position: relative; z-index: 1; width: 100%; }
.nb-stk .hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--nb-stk-clay); margin-bottom: 2rem; }
.nb-stk .hero-eyebrow::before { content: ''; width: 28px; height: 1.5px; background: var(--nb-stk-clay); }
.nb-stk h1 { font-family: 'Fraunces', serif; font-size: clamp(4rem, 7vw, 8rem); font-weight: 300; line-height: 1.05; letter-spacing: -0.03em; color: var(--nb-stk-text); margin-bottom: 2rem; max-width: 14ch; }
.nb-stk h1 em { font-style: italic; color: var(--nb-stk-sage); }
.nb-stk .hero-body { font-size: 1.05rem; color: var(--nb-stk-muted); line-height: 1.7; max-width: 42ch; margin-bottom: 2.5rem; }
.nb-stk .hero-ctas { display: flex; gap: 1rem; align-items: center; }
.nb-stk .cta-primary { font-family: 'Mulish', sans-serif; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--nb-stk-sand); background: var(--nb-stk-sage); border: none; border-radius: 100px; padding: 14px 32px; cursor: pointer; transition: background 0.2s, transform 0.15s; box-shadow: 0 4px 24px rgba(58,90,64,0.3); }
.nb-stk .cta-primary:hover { background: var(--nb-stk-sage-light); transform: translateY(-2px); }
.nb-stk .cta-secondary { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600; color: var(--nb-stk-muted); text-decoration: none; transition: color 0.2s, gap 0.2s; }
.nb-stk .cta-secondary:hover { color: var(--nb-stk-sage); gap: 12px; }
.nb-stk .section { padding: 8rem 0; }
.nb-stk .section-inner { max-width: 1320px; margin: 0 auto; padding: 0 3rem; }
.nb-stk .section-label { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--nb-stk-clay); margin-bottom: 1rem; display: flex; align-items: center; gap: 10px; }
.nb-stk .section-label::after { content: ''; flex: 1; max-width: 40px; height: 1px; background: var(--nb-stk-clay); }
.nb-stk .section-title { font-family: 'Fraunces', serif; font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 300; letter-spacing: -0.02em; color: var(--nb-stk-text); line-height: 1.1; margin-bottom: 1.5rem; }
.nb-stk .section-title em { font-style: italic; color: var(--nb-stk-sage); }
.nb-stk .section-body { font-size: 1rem; color: var(--nb-stk-muted); max-width: 52ch; line-height: 1.75; }
.nb-stk .feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5px; margin-top: 4rem; background: var(--nb-stk-warm-2); border: 1.5px solid var(--nb-stk-warm-2); }
.nb-stk .feature-card { background: var(--nb-stk-sand); padding: 2.5rem 2rem; transition: background 0.2s; }
.nb-stk .feature-card:hover { background: var(--nb-stk-warm); }
.nb-stk .feature-num { font-family: 'Fraunces', serif; font-size: 2.5rem; font-weight: 900; color: rgba(58,90,64,0.12); line-height: 1; margin-bottom: 1rem; }
.nb-stk .feature-title { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 600; color: var(--nb-stk-text); margin-bottom: 0.75rem; }
.nb-stk .feature-text { font-size: 0.85rem; color: var(--nb-stk-muted); line-height: 1.65; }
.nb-stk .divider-section { background: var(--nb-stk-sage); padding: 5rem 0; text-align: center; position: relative; overflow: hidden; }
.nb-stk .divider-section::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255,255,255,0.02) 40px, rgba(255,255,255,0.02) 41px); }
.nb-stk .divider-inner { position: relative; z-index: 1; }
.nb-stk .divider-inner h2 { font-family: 'Fraunces', serif; font-size: clamp(2rem, 4vw, 4rem); font-weight: 300; font-style: italic; color: rgba(247,244,239,0.95); line-height: 1.2; margin-bottom: 2rem; }
.nb-stk .divider-inner button { font-family: 'Mulish', sans-serif; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nb-stk-sage); background: var(--nb-stk-sand); border: none; border-radius: 100px; padding: 13px 30px; cursor: pointer; }
.nb-stk .long-section { padding: 6rem 0; border-top: 1px solid var(--nb-stk-warm-2); }
.nb-stk .scroll-hint { position: absolute; bottom: 3rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--nb-stk-muted); z-index: 1; }
.nb-stk .scroll-hint-text { font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; }
.nb-stk .scroll-mouse { width: 22px; height: 34px; border: 1.5px solid var(--nb-stk-warm-2); border-radius: 12px; display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; }
.nb-stk .scroll-mouse::after { content: ''; width: 4px; height: 8px; background: var(--nb-stk-sage); border-radius: 2px; animation: nb-stk-scrollDot 1.8s ease-in-out infinite; }
@keyframes nb-stk-scrollDot { 0%, 100% { opacity: 1; transform: translateY(0); } 50% { opacity: 0.2; transform: translateY(6px); } }
@media (max-width: 768px) {
.nb-stk .feature-grid { grid-template-columns: 1fr; }
.nb-stk .hero-inner { padding: 3rem 1.5rem; }
.nb-stk .section-inner { padding: 0 1.5rem; }
.nb-stk .nav-links { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.nb-stk nav, .nb-stk .brand-main, .nb-stk .brand-sub, .nb-stk .hc-3, .nb-stk .hc-4, .nb-stk .scroll-mouse::after { animation: none !important; transition: none !important; }
}
```
**JS:**
```js
(() => {
// Scoped sticky-scroll navbar wiring. The source mock bound a
// `window.scroll` listener and read documentElement.scrollTop —
// that would track the host gallery's scroll. Re-scope: use a
// sentinel `hero` element to toggle the .scrolled class via
// IntersectionObserver (fires when the hero top passes 60px below
// the viewport top), and compute reading progress from the wrapper's
// own bounding rect against the viewport.
const root = document.querySelector('.nb-stk');
if (!root) return;
const nav = root.querySelector('[data-nb-stk-nav]');
const progress = root.querySelector('[data-nb-stk-progress]');
const hero = root.querySelector('.hero');
if (!nav || !progress) return;
// Toggle .scrolled when the hero crosses 60px below the viewport top.
if (hero && 'IntersectionObserver' in window) {
const io = new IntersectionObserver(
([entry]) => {
// entry.boundingClientRect.top < -60 means the hero has scrolled
// up past the threshold. We rely on entry.isIntersecting plus
// the sentinel offset.
const top = entry.boundingClientRect.top;
nav.classList.toggle('scrolled', top < -60);
},
{ threshold: [0], rootMargin: '-60px 0px 0px 0px' }
);
io.observe(hero);
}
function updateProgress() {
const r = root.getBoundingClientRect();
const vh = window.innerHeight;
const total = root.offsetHeight - vh;
if (total <= 0) { progress.style.transform = 'scaleX(0)'; return; }
const scrolled = Math.min(Math.max(-r.top, 0), total);
const pct = scrolled / total;
progress.style.transform = 'scaleX(' + pct.toFixed(4) + ')';
}
window.addEventListener('scroll', updateProgress, { passive: true });
window.addEventListener('resize', updateProgress);
updateProgress();
// Smooth scroll for in-page anchors.
root.querySelectorAll('.nav-links a').forEach((a) => {
a.addEventListener('click', (e) => {
const href = a.getAttribute('href');
if (!href || !href.startsWith('#')) return;
const target = root.querySelector(href);
if (!target) return;
e.preventDefault();
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
root.querySelectorAll('.nav-links a').forEach((l) => l.classList.remove('active'));
a.classList.add('active');
});
});
})();
```
### 06. Full Screen Overlay CSS Menu
**Type:** CSS + JS
**Description:** A creative-agency full-screen overlay menu navbar UI for Kairos/Studio — proving that hamburger nav can be the headline interaction instead of an afterthought. Minimal dark header with a Space Mono "Kairos/Studio" wordmark (lime slash) and an asymmetric three-line hamburger button (28/18/28 px). Clicking the burger triggers a two-panel curtain wipe (panel 1 #09090b + panel 2 #0f0f11 with a 0.05s delay) that fills the demo, then reveals five giant Bebas Neue stacked menu items (01 Work / 02 Studio / 03 Services / 04 Journal / 05 Contact) that slide up from below with staggered 50ms-step delays. A right sidebar panel fades in showing selected work links, a pulsing-lime "Available for projects" status dot, and four monospace social links. Hover any item: text turns lime, a lime arrow slides in. Closing reverses the curtain. The demo page itself carries a giant "KAIROS" outlined-stroke background letterform, a corner deco block, a randomised 5x5 dot grid, and a "We craft the unusual." hero with a lime CTA. Bebas Neue + Outfit + Space Mono. Best for creative agency sites, design studios, motion/portfolio brands, asymmetric editorial sites, full-bleed creative landings.
**HTML:**
```html
KAIROS
DESIGN STUDIO
EST. 2019
BERLIN — NYC
Click the hamburger above to trigger a full-screen overlay — bold typography slides in with staggered reveals and the menu becomes the moment.
Open the menu
```
**CSS:**
```css
/* ─── 06 Kairos/Studio — fullscreen overlay menu navbar UI ─────── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600&family=Space+Mono:ital,wght@0,400;1,400&display=swap');
.nb-ovl {
--nb-ovl-void: #09090b;
--nb-ovl-lime: #c8f135;
--nb-ovl-lime-dim: #9bb822;
--nb-ovl-off-white: #f0efeb;
--nb-ovl-warm-grey: #a09fa0;
--nb-ovl-border: rgba(240,239,235,0.1);
position: relative;
width: 100%;
min-height: 720px;
background: var(--nb-ovl-void);
color: var(--nb-ovl-off-white);
font-family: 'Outfit', sans-serif;
overflow: hidden;
box-sizing: border-box;
}
.nb-ovl *, .nb-ovl *::before, .nb-ovl *::after { box-sizing: border-box; margin: 0; padding: 0; }
.nb-ovl header { position: absolute; top: 0; left: 0; right: 0; z-index: 200; padding: 1.5rem 2.5rem; display: flex; align-items: center; mix-blend-mode: difference; }
.nb-ovl .brand { font-family: 'Space Mono', monospace; font-size: 1rem; font-weight: 400; letter-spacing: 0.04em; color: var(--nb-ovl-off-white); text-decoration: none; z-index: 10; position: relative; }
.nb-ovl .brand .slash { color: var(--nb-ovl-lime); margin: 0 2px; }
.nb-ovl .header-spacer { flex: 1; }
.nb-ovl .menu-btn { background: none; border: none; cursor: pointer; padding: 8px; display: flex; flex-direction: column; gap: 0; align-items: flex-end; z-index: 300; position: relative; }
.nb-ovl .menu-line { display: block; height: 1.5px; background: var(--nb-ovl-off-white); border-radius: 1px; transition: transform 0.4s cubic-bezier(0.23,1,0.32,1), width 0.3s ease, opacity 0.2s; }
.nb-ovl .l1 { width: 28px; margin-bottom: 6px; }
.nb-ovl .l2 { width: 18px; margin-bottom: 6px; }
.nb-ovl .l3 { width: 28px; }
.nb-ovl .menu-btn.open .l1 { transform: translateY(7.5px) rotate(45deg); width: 28px; }
.nb-ovl .menu-btn.open .l2 { opacity: 0; transform: scaleX(0); }
.nb-ovl .menu-btn.open .l3 { transform: translateY(-7.5px) rotate(-45deg); width: 28px; }
.nb-ovl .overlay { position: absolute; inset: 0; z-index: 150; pointer-events: none; overflow: hidden; }
.nb-ovl .overlay-panel { position: absolute; inset: 0; background: var(--nb-ovl-void); transform: translateY(-100%); transition: transform 0.65s cubic-bezier(0.86,0,0.07,1); }
.nb-ovl .overlay-panel-2 { background: #0f0f11; transition-delay: 0.05s; }
.nb-ovl .overlay.open .overlay-panel { transform: translateY(0); }
.nb-ovl .overlay.open { pointer-events: all; }
.nb-ovl .overlay:not(.open) .overlay-panel { transition: transform 0.5s cubic-bezier(0.86,0,0.07,1); transform: translateY(-100%); }
.nb-ovl .overlay.closing .overlay-panel { transform: translateY(-100%); }
.nb-ovl .overlay.closing .overlay-panel-2 { transition-delay: 0.05s; }
.nb-ovl .overlay-content { position: absolute; inset: 0; z-index: 10; display: grid; grid-template-columns: 1fr 340px; opacity: 0; transition: opacity 0.3s 0.2s; pointer-events: none; }
.nb-ovl .overlay.open .overlay-content { opacity: 1; pointer-events: all; }
.nb-ovl .overlay.closing .overlay-content { opacity: 0; transition-delay: 0s; }
.nb-ovl .overlay-nav { display: flex; flex-direction: column; justify-content: center; padding: 6rem 4rem; border-right: 1px solid var(--nb-ovl-border); overflow: hidden; }
.nb-ovl .overlay-counter { font-family: 'Space Mono', monospace; font-size: 0.65rem; letter-spacing: 0.15em; color: rgba(240,239,235,0.25); margin-bottom: 3rem; }
.nb-ovl .menu-item { display: flex; align-items: baseline; gap: 1.5rem; text-decoration: none; overflow: hidden; padding: 0.3rem 0; cursor: pointer; position: relative; }
.nb-ovl .menu-item-inner { display: flex; align-items: baseline; gap: 1.5rem; transform: translateY(100%); transition: transform 0.6s cubic-bezier(0.23,1,0.32,1); width: 100%; }
.nb-ovl .overlay.open .menu-item:nth-child(2) .menu-item-inner { transition-delay: 0.15s; transform: translateY(0); }
.nb-ovl .overlay.open .menu-item:nth-child(3) .menu-item-inner { transition-delay: 0.20s; transform: translateY(0); }
.nb-ovl .overlay.open .menu-item:nth-child(4) .menu-item-inner { transition-delay: 0.25s; transform: translateY(0); }
.nb-ovl .overlay.open .menu-item:nth-child(5) .menu-item-inner { transition-delay: 0.30s; transform: translateY(0); }
.nb-ovl .overlay.open .menu-item:nth-child(6) .menu-item-inner { transition-delay: 0.35s; transform: translateY(0); }
.nb-ovl .overlay.closing .menu-item .menu-item-inner { transform: translateY(-100%); transition-delay: 0s !important; transition-duration: 0.3s; }
.nb-ovl .item-num { font-family: 'Space Mono', monospace; font-size: 0.7rem; color: rgba(240,239,235,0.3); letter-spacing: 0.1em; flex-shrink: 0; margin-bottom: 4px; align-self: flex-end; }
.nb-ovl .item-label { font-family: 'Bebas Neue', sans-serif; font-size: clamp(4rem, 8vw, 8rem); font-weight: 400; letter-spacing: 0.02em; color: var(--nb-ovl-off-white); line-height: 0.9; transition: color 0.2s; position: relative; }
.nb-ovl .item-arrow { opacity: 0; transform: translateX(-10px); transition: opacity 0.2s, transform 0.2s; color: var(--nb-ovl-lime); font-size: 2rem; align-self: center; flex-shrink: 0; }
.nb-ovl .menu-item:hover .item-label { color: var(--nb-ovl-lime); }
.nb-ovl .menu-item:hover .item-num { color: var(--nb-ovl-lime); }
.nb-ovl .menu-item:hover .item-arrow { opacity: 1; transform: translateX(0); }
.nb-ovl .item-line { position: absolute; bottom: 0; left: 0; height: 1px; background: var(--nb-ovl-border); width: 100%; }
.nb-ovl .overlay-sidebar { padding: 6rem 2.5rem 3rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; opacity: 0; transform: translateX(20px); transition: opacity 0.4s 0.4s, transform 0.4s 0.4s; }
.nb-ovl .overlay.open .overlay-sidebar { opacity: 1; transform: translateX(0); }
.nb-ovl .overlay.closing .overlay-sidebar { opacity: 0; transform: translateX(20px); transition-delay: 0s; }
.nb-ovl .sidebar-block { display: flex; flex-direction: column; gap: 0.5rem; }
.nb-ovl .sidebar-block-spaced { margin-top: 1.5rem; }
.nb-ovl .sidebar-label { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(240,239,235,0.3); margin-bottom: 0.5rem; }
.nb-ovl .sidebar-link { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: rgba(240,239,235,0.6); text-decoration: none; transition: color 0.15s; padding: 3px 0; }
.nb-ovl .sidebar-link:hover { color: var(--nb-ovl-off-white); }
.nb-ovl .sidebar-link::before { content: '→'; color: var(--nb-ovl-lime); font-size: 0.7rem; }
.nb-ovl .sidebar-status { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: rgba(240,239,235,0.5); }
.nb-ovl .status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--nb-ovl-lime); box-shadow: 0 0 8px var(--nb-ovl-lime); flex-shrink: 0; animation: nb-ovl-pulse 2s ease-in-out infinite; }
@keyframes nb-ovl-pulse { 0%, 100% { box-shadow: 0 0 8px var(--nb-ovl-lime); } 50% { box-shadow: 0 0 16px var(--nb-ovl-lime); } }
.nb-ovl .sidebar-social { display: flex; gap: 1rem; flex-wrap: wrap; }
.nb-ovl .social-link { font-family: 'Space Mono', monospace; font-size: 0.6rem; letter-spacing: 0.1em; color: rgba(240,239,235,0.35); text-decoration: none; transition: color 0.15s; }
.nb-ovl .social-link:hover { color: var(--nb-ovl-lime); }
.nb-ovl .page { min-height: 720px; position: relative; overflow: hidden; }
.nb-ovl .page::before { content: ''; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E"); pointer-events: none; z-index: 0; opacity: 0.6; }
.nb-ovl .bg-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: 'Bebas Neue', sans-serif; font-size: clamp(12rem, 25vw, 28rem); font-weight: 400; color: transparent; -webkit-text-stroke: 1px rgba(240,239,235,0.04); letter-spacing: 0.05em; white-space: nowrap; pointer-events: none; user-select: none; z-index: 0; line-height: 1; }
.nb-ovl .hero-content { position: relative; z-index: 1; min-height: 720px; display: flex; flex-direction: column; justify-content: flex-end; padding: 4rem 3rem; }
.nb-ovl .hero-caption { display: grid; grid-template-columns: auto 1fr; gap: 3rem; align-items: end; max-width: 1200px; }
.nb-ovl .h-eyebrow { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1rem; }
.nb-ovl .h-eyebrow-line { width: 40px; height: 1.5px; background: var(--nb-ovl-lime); }
.nb-ovl .h-eyebrow-text { font-family: 'Space Mono', monospace; font-size: 0.65rem; letter-spacing: 0.15em; color: rgba(240,239,235,0.45); text-transform: uppercase; }
.nb-ovl .h-title { font-family: 'Bebas Neue', sans-serif; font-size: clamp(4rem, 10vw, 12rem); font-weight: 400; letter-spacing: 0.02em; line-height: 0.9; color: var(--nb-ovl-off-white); }
.nb-ovl .h-title .accent { color: var(--nb-ovl-lime); }
.nb-ovl .h-right { display: flex; flex-direction: column; justify-content: flex-end; gap: 1.5rem; padding-bottom: 0.5rem; }
.nb-ovl .h-desc { font-size: 0.9rem; color: rgba(240,239,235,0.5); line-height: 1.65; max-width: 36ch; }
.nb-ovl .h-cta { display: inline-flex; align-items: center; gap: 10px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nb-ovl-void); background: var(--nb-ovl-lime); border: none; padding: 12px 24px; border-radius: 100px; cursor: pointer; transition: background 0.2s, transform 0.15s; width: fit-content; font-family: inherit; }
.nb-ovl .h-cta:hover { background: #d4f850; transform: translateX(4px); }
.nb-ovl .corner-deco { position: absolute; top: 2rem; right: 2rem; font-family: 'Space Mono', monospace; font-size: 0.6rem; letter-spacing: 0.12em; color: rgba(240,239,235,0.15); text-align: right; line-height: 2; z-index: 1; pointer-events: none; }
.nb-ovl .grid-deco { position: absolute; bottom: 3rem; right: 3rem; display: grid; grid-template-columns: repeat(5, 6px); grid-template-rows: repeat(5, 6px); gap: 4px; z-index: 1; pointer-events: none; }
.nb-ovl .grid-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(240,239,235,0.12); }
.nb-ovl .grid-dot.lit { background: var(--nb-ovl-lime); opacity: 0.6; }
@media (max-width: 768px) {
.nb-ovl .hero-caption { grid-template-columns: 1fr; gap: 1.5rem; }
.nb-ovl .overlay-content { grid-template-columns: 1fr; }
.nb-ovl .overlay-sidebar { display: none; }
.nb-ovl .overlay-nav { padding: 6rem 2rem; }
.nb-ovl .item-label { font-size: clamp(3rem, 12vw, 6rem); }
.nb-ovl header { padding: 1rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
.nb-ovl .overlay-panel, .nb-ovl .menu-item-inner, .nb-ovl .overlay-sidebar, .nb-ovl .status-dot, .nb-ovl .menu-line { transition: none !important; animation: none !important; }
}
```
**JS:**
```js
(() => {
// Scoped fullscreen-overlay wiring. Drops the source mock's
// `document.body.style.overflow = 'hidden'` since the embedded
// wrapper isn't the viewport. Escape-to-close listener bound to
// the wrapper, so two demos can coexist on one page.
const root = document.querySelector('.nb-ovl');
if (!root) return;
const overlay = root.querySelector('[data-nb-ovl-overlay]');
const toggle = root.querySelector('[data-nb-ovl-toggle]');
const opener = root.querySelector('[data-nb-ovl-open]');
const dotGrid = root.querySelector('[data-nb-ovl-dotgrid]');
if (!overlay || !toggle) return;
// Build the 5x5 dot grid once.
if (dotGrid && dotGrid.childElementCount === 0) {
for (let i = 0; i < 25; i++) {
const d = document.createElement('div');
d.className = 'grid-dot' + (Math.random() > 0.7 ? ' lit' : '');
dotGrid.appendChild(d);
}
}
let isOpen = false;
function openMenu() {
isOpen = true;
overlay.classList.remove('closing');
overlay.classList.add('open');
toggle.classList.add('open');
toggle.setAttribute('aria-expanded', 'true');
overlay.setAttribute('aria-hidden', 'false');
}
function closeMenu() {
if (!isOpen) return;
isOpen = false;
overlay.classList.add('closing');
toggle.classList.remove('open');
toggle.setAttribute('aria-expanded', 'false');
overlay.setAttribute('aria-hidden', 'true');
setTimeout(() => {
overlay.classList.remove('open', 'closing');
}, 650);
}
toggle.addEventListener('click', () => { isOpen ? closeMenu() : openMenu(); });
if (opener) opener.addEventListener('click', openMenu);
// Close on any overlay menu item click.
root.querySelectorAll('[data-nb-ovl-link]').forEach((link) => {
link.addEventListener('click', (e) => {
e.preventDefault();
closeMenu();
});
});
// Escape closes (only when overlay is open). Listener on wrapper so
// multiple demos don't all close on one keypress.
root.addEventListener('keydown', (e) => {
if (e.key === 'Escape' && isOpen) closeMenu();
});
// Subtle dot animation, scoped.
let dotTimer = null;
if (dotGrid) {
dotTimer = setInterval(() => {
const dots = dotGrid.querySelectorAll('.grid-dot');
if (!dots.length) return;
const idx = Math.floor(Math.random() * dots.length);
dots[idx].classList.toggle('lit');
}, 800);
root._nbOvlDotTimer = dotTimer;
}
})();
```
### 07. CSS Navbar with Dark Mode Toggle
**Type:** CSS + JS
**Description:** A CSS navbar with a built-in dark mode toggle that flips the entire UI in under half a second — proving that semantic design tokens beat a `prefers-color-scheme` media query when you want users to control the theme themselves. The frosted backdrop-filter navbar carries a Linea wordmark + version chip, 5 active-dot nav links (Overview / Components / Templates / Docs / Changelog), and a custom track-and-thumb theme toggle that transitions between sun and moon icons with a 0.45s ease. Click triggers a radial flash overlay that ripples outward as the body recolors. Below the navbar: a hero with a live token preview panel (4 swatch cards for `--bg`, `--text`, `--accent`, `--border` updating their hex values in real time) + a `[data-theme]` CSS code block that re-renders + a stats strip (48 Tokens / 2 Themes / 0.45s Transition). Bottom features grid covers semantic-token theming, CSS-only transitions, WCAG AA contrast, and `localStorage` persistence. Epilogue + Fira Code. Best for design system docs, developer tool sites, modern SaaS landing pages, theme-toggle component galleries.
**HTML:**
```html
Light
Sign in
Get started
Now in v3 — See what's new
Design tokens that adapt with you.
Every color, shadow, and surface in this UI is driven by semantic CSS custom properties. Watch them all flip in under half a second — click the toggle above.
Live token preview — toggle the theme above
[data-theme="light " ] {
--bg : #fafaf8 ;
--text : #18181a ;
--accent : #e84a2f ;
--surface : #ffffff ;
}
◑
Semantic tokens
Every value maps to intent, not raw colors. Theme by switching a single attribute.
⚡
CSS-only transitions
No JavaScript required for the color shift. Pure CSS custom properties do the work.
♿
WCAG AA+
Both themes pass contrast requirements for text, borders, and interactive states.
💾
Persisted preference
Choice is saved to localStorage and respects prefers-color-scheme on first load.
```
**CSS:**
```css
/* ─── 07 Linea — CSS navbar with dark mode toggle UI ──────────── */
@import url('https://fonts.googleapis.com/css2?family=Epilogue:ital,wght@0,300;0,400;0,500;0,700;0,900;1,300;1,700&family=Fira+Code:wght@300;400;500&display=swap');
.nb-drk {
--nb-drk-ease: cubic-bezier(0.4, 0, 0.2, 1);
--nb-drk-dur: 0.45s;
position: relative;
width: 100%;
min-height: 720px;
font-family: 'Epilogue', sans-serif;
overflow: hidden;
box-sizing: border-box;
transition: background var(--nb-drk-dur) var(--nb-drk-ease), color var(--nb-drk-dur) var(--nb-drk-ease);
}
.nb-drk *, .nb-drk *::before, .nb-drk *::after { box-sizing: border-box; margin: 0; padding: 0; }
.nb-drk[data-theme="light"] {
--nb-drk-bg: #fafaf8;
--nb-drk-bg-2: #f2f1ee;
--nb-drk-surface: #ffffff;
--nb-drk-surface-float: rgba(255,255,255,0.85);
--nb-drk-border: #e4e2dc;
--nb-drk-border-soft: rgba(0,0,0,0.06);
--nb-drk-text: #18181a;
--nb-drk-text-2: #5a5856;
--nb-drk-text-3: #a09e99;
--nb-drk-accent: #e84a2f;
--nb-drk-accent-bg: rgba(232,74,47,0.08);
--nb-drk-toggle-track: #e4e2dc;
--nb-drk-toggle-thumb: #18181a;
--nb-drk-shadow-nav: 0 1px 0 var(--nb-drk-border), 0 4px 24px rgba(0,0,0,0.05);
--nb-drk-shadow-card: 0 2px 16px rgba(0,0,0,0.07);
--nb-drk-invert-text: #fafaf8;
}
.nb-drk[data-theme="dark"] {
--nb-drk-bg: #111113;
--nb-drk-bg-2: #19191c;
--nb-drk-surface: #1e1e22;
--nb-drk-surface-float: rgba(22,22,26,0.88);
--nb-drk-border: #2e2e34;
--nb-drk-border-soft: rgba(255,255,255,0.06);
--nb-drk-text: #f0efec;
--nb-drk-text-2: #9e9c97;
--nb-drk-text-3: #5c5a57;
--nb-drk-accent: #ff6b4a;
--nb-drk-accent-bg: rgba(255,107,74,0.1);
--nb-drk-toggle-track: #2e2e34;
--nb-drk-toggle-thumb: #f0efec;
--nb-drk-shadow-nav: 0 1px 0 var(--nb-drk-border), 0 4px 32px rgba(0,0,0,0.3);
--nb-drk-shadow-card: 0 2px 20px rgba(0,0,0,0.3);
--nb-drk-invert-text: #111113;
}
.nb-drk { background: var(--nb-drk-bg); color: var(--nb-drk-text); }
.nb-drk nav { position: absolute; top: 0; left: 0; right: 0; z-index: 100; height: 64px; background: var(--nb-drk-surface-float); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border-bottom: 1px solid var(--nb-drk-border); box-shadow: var(--nb-drk-shadow-nav); transition: background var(--nb-drk-dur) var(--nb-drk-ease), border-color var(--nb-drk-dur) var(--nb-drk-ease), box-shadow var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .nav-inner { max-width: 1280px; margin: 0 auto; height: 100%; display: flex; align-items: center; padding: 0 2rem; gap: 2rem; }
.nb-drk .brand { text-decoration: none; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nb-drk .brand-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--nb-drk-accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .brand-mark svg { display: block; }
.nb-drk .brand-name { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; color: var(--nb-drk-text); transition: color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .brand-tag { font-family: 'Fira Code', monospace; font-size: 0.6rem; font-weight: 300; color: var(--nb-drk-text-3); letter-spacing: 0.04em; transition: color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .nav-links { display: flex; align-items: center; gap: 0; list-style: none; flex: 1; }
.nb-drk .nav-links a { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 500; color: var(--nb-drk-text-2); text-decoration: none; padding: 7px 13px; border-radius: 8px; transition: color var(--nb-drk-dur) var(--nb-drk-ease), background 0.18s var(--nb-drk-ease); white-space: nowrap; }
.nb-drk .nav-links a:hover { color: var(--nb-drk-text); background: var(--nb-drk-border-soft); }
.nb-drk .nav-links a.active { color: var(--nb-drk-text); background: var(--nb-drk-accent-bg); }
.nb-drk .nav-links a.active .link-dot { background: var(--nb-drk-accent); }
.nb-drk .link-dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; flex-shrink: 0; transition: background var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .nav-spacer { flex: 1; }
.nb-drk .nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nb-drk .theme-toggle { display: flex; align-items: center; gap: 9px; background: none; border: none; cursor: pointer; padding: 6px 10px; border-radius: 10px; transition: background 0.18s; font-family: inherit; color: inherit; }
.nb-drk .theme-toggle:hover { background: var(--nb-drk-border-soft); }
.nb-drk .toggle-track { width: 36px; height: 20px; border-radius: 100px; background: var(--nb-drk-toggle-track); border: 1.5px solid var(--nb-drk-border); position: relative; transition: background var(--nb-drk-dur) var(--nb-drk-ease), border-color var(--nb-drk-dur) var(--nb-drk-ease); flex-shrink: 0; }
.nb-drk .toggle-thumb { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--nb-drk-toggle-thumb); transition: transform var(--nb-drk-dur) cubic-bezier(0.34, 1.56, 0.64, 1), background var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk[data-theme="dark"] .toggle-thumb { transform: translateX(16px); }
.nb-drk .icon-sun, .nb-drk .icon-moon { width: 14px; height: 14px; transition: opacity 0.3s var(--nb-drk-ease), transform 0.4s var(--nb-drk-ease), color var(--nb-drk-dur) var(--nb-drk-ease); color: var(--nb-drk-text-2); }
.nb-drk[data-theme="light"] .icon-sun { opacity: 1; transform: rotate(0deg); }
.nb-drk[data-theme="light"] .icon-moon { opacity: 0.3; }
.nb-drk[data-theme="dark"] .icon-moon { opacity: 1; transform: rotate(-15deg); }
.nb-drk[data-theme="dark"] .icon-sun { opacity: 0.3; }
.nb-drk .toggle-label { font-family: 'Fira Code', monospace; font-size: 0.65rem; color: var(--nb-drk-text-3); transition: color var(--nb-drk-dur) var(--nb-drk-ease); white-space: nowrap; }
.nb-drk .nav-div { width: 1px; height: 20px; background: var(--nb-drk-border); transition: background var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .btn-ghost { font-family: 'Epilogue', sans-serif; font-size: 0.78rem; font-weight: 500; color: var(--nb-drk-text-2); background: none; border: 1px solid var(--nb-drk-border); border-radius: 8px; padding: 7px 15px; cursor: pointer; transition: color var(--nb-drk-dur) var(--nb-drk-ease), border-color var(--nb-drk-dur) var(--nb-drk-ease), background 0.18s; white-space: nowrap; }
.nb-drk .btn-ghost:hover { color: var(--nb-drk-text); border-color: var(--nb-drk-text-3); }
.nb-drk .btn-fill { font-family: 'Epilogue', sans-serif; font-size: 0.78rem; font-weight: 700; color: var(--nb-drk-invert-text); background: var(--nb-drk-text); border: none; border-radius: 8px; padding: 7px 16px; cursor: pointer; transition: background var(--nb-drk-dur) var(--nb-drk-ease), color var(--nb-drk-dur) var(--nb-drk-ease), transform 0.15s; white-space: nowrap; }
.nb-drk .btn-fill:hover { transform: translateY(-1px); }
.nb-drk .page { padding-top: 64px; }
.nb-drk .hero { min-height: 560px; display: grid; grid-template-columns: 1fr 1fr; }
.nb-drk .hero-left { padding: 5rem 4rem; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--nb-drk-border); transition: border-color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .hero-pill { display: inline-flex; align-items: center; gap: 8px; font-family: 'Fira Code', monospace; font-size: 0.65rem; font-weight: 400; color: var(--nb-drk-accent); background: var(--nb-drk-accent-bg); border: 1px solid rgba(232,74,47,0.15); border-radius: 100px; padding: 5px 12px; margin-bottom: 2rem; width: fit-content; transition: color var(--nb-drk-dur) var(--nb-drk-ease), background var(--nb-drk-dur) var(--nb-drk-ease), border-color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .hero-pill::before { content: '◉'; font-size: 0.55rem; }
.nb-drk h1 { font-size: clamp(2.8rem, 4.5vw, 5rem); font-weight: 900; letter-spacing: -0.04em; line-height: 1.0; color: var(--nb-drk-text); margin-bottom: 1.5rem; transition: color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk h1 em { font-style: italic; font-weight: 300; color: var(--nb-drk-accent); transition: color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .hero-body { font-size: 1rem; color: var(--nb-drk-text-2); line-height: 1.7; max-width: 42ch; margin-bottom: 2.5rem; transition: color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .hero-ctas { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nb-drk .cta-main { font-family: 'Epilogue', sans-serif; font-size: 0.82rem; font-weight: 700; color: var(--nb-drk-invert-text); background: var(--nb-drk-text); border: none; border-radius: 10px; padding: 12px 22px; cursor: pointer; transition: background var(--nb-drk-dur) var(--nb-drk-ease), color var(--nb-drk-dur) var(--nb-drk-ease), transform 0.15s; }
.nb-drk .cta-main:hover { transform: translateY(-2px); }
.nb-drk .cta-link { font-size: 0.82rem; font-weight: 500; color: var(--nb-drk-text-2); text-decoration: none; transition: color 0.2s; display: flex; align-items: center; gap: 6px; }
.nb-drk .cta-link:hover { color: var(--nb-drk-text); }
.nb-drk .hero-right { padding: 3rem; display: flex; align-items: center; justify-content: center; background: var(--nb-drk-bg-2); transition: background var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .preview-panel { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 12px; }
.nb-drk .preview-label { font-family: 'Fira Code', monospace; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nb-drk-text-3); margin-bottom: 4px; transition: color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .token-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.nb-drk .token-card { background: var(--nb-drk-surface); border: 1px solid var(--nb-drk-border); border-radius: 10px; padding: 12px 14px; transition: background var(--nb-drk-dur) var(--nb-drk-ease), border-color var(--nb-drk-dur) var(--nb-drk-ease), box-shadow var(--nb-drk-dur) var(--nb-drk-ease); box-shadow: var(--nb-drk-shadow-card); }
.nb-drk .token-swatch { width: 20px; height: 20px; border-radius: 5px; margin-bottom: 8px; border: 1px solid var(--nb-drk-border-soft); }
.nb-drk .token-name { font-family: 'Fira Code', monospace; font-size: 0.6rem; color: var(--nb-drk-text-3); transition: color var(--nb-drk-dur) var(--nb-drk-ease); margin-bottom: 2px; }
.nb-drk .token-val { font-family: 'Fira Code', monospace; font-size: 0.65rem; color: var(--nb-drk-text); font-weight: 500; transition: color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .code-block { background: var(--nb-drk-surface); border: 1px solid var(--nb-drk-border); border-radius: 10px; padding: 14px 16px; font-family: 'Fira Code', monospace; font-size: 0.68rem; line-height: 1.8; color: var(--nb-drk-text-2); transition: background var(--nb-drk-dur) var(--nb-drk-ease), border-color var(--nb-drk-dur) var(--nb-drk-ease), color var(--nb-drk-dur) var(--nb-drk-ease); box-shadow: var(--nb-drk-shadow-card); }
.nb-drk .code-attr { color: var(--nb-drk-accent); transition: color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .code-val { color: var(--nb-drk-text); transition: color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .stat-strip { display: flex; gap: 0; background: var(--nb-drk-surface); border: 1px solid var(--nb-drk-border); border-radius: 10px; overflow: hidden; box-shadow: var(--nb-drk-shadow-card); transition: background var(--nb-drk-dur) var(--nb-drk-ease), border-color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .stat-item { flex: 1; padding: 12px 14px; border-right: 1px solid var(--nb-drk-border); transition: border-color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .stat-item:last-child { border-right: none; }
.nb-drk .stat-val { font-size: 1.2rem; font-weight: 900; letter-spacing: -0.03em; color: var(--nb-drk-text); line-height: 1; margin-bottom: 3px; transition: color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .stat-lbl { font-size: 0.62rem; color: var(--nb-drk-text-3); font-weight: 500; letter-spacing: 0.04em; transition: color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .theme-flash { position: absolute; inset: 0; z-index: 99; pointer-events: none; opacity: 0; border-radius: 50%; transform: scale(0); }
.nb-drk .theme-flash.animate { animation: nb-drk-ripple 0.55s ease-out forwards; }
@keyframes nb-drk-ripple {
0% { opacity: 0.12; transform: scale(0); border-radius: 50%; }
60% { opacity: 0.06; transform: scale(3); }
100% { opacity: 0; transform: scale(5); }
}
.nb-drk .features { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--nb-drk-border); transition: border-color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .feature { padding: 2.5rem 2rem; border-right: 1px solid var(--nb-drk-border); transition: background 0.2s, border-color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .feature:last-child { border-right: none; }
.nb-drk .feature:hover { background: var(--nb-drk-bg-2); }
.nb-drk .feature-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--nb-drk-accent-bg); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; color: var(--nb-drk-accent); font-size: 1rem; transition: background var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .feature-title { font-size: 0.88rem; font-weight: 700; color: var(--nb-drk-text); margin-bottom: 0.4rem; letter-spacing: -0.01em; transition: color var(--nb-drk-dur) var(--nb-drk-ease); }
.nb-drk .feature-desc { font-size: 0.78rem; color: var(--nb-drk-text-2); line-height: 1.6; transition: color var(--nb-drk-dur) var(--nb-drk-ease); }
@media (max-width: 900px) {
.nb-drk .hero { grid-template-columns: 1fr; }
.nb-drk .hero-left { border-right: none; border-bottom: 1px solid var(--nb-drk-border); padding: 3rem 2rem; }
.nb-drk .hero-right { padding: 2rem; }
.nb-drk .features { grid-template-columns: 1fr 1fr; }
.nb-drk .feature:nth-child(2) { border-right: none; }
.nb-drk .feature:nth-child(3), .nb-drk .feature:nth-child(4) { border-top: 1px solid var(--nb-drk-border); }
.nb-drk .nav-links { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.nb-drk *, .nb-drk *::before, .nb-drk *::after { transition: none !important; animation: none !important; }
}
```
**JS:**
```js
(() => {
// Scoped dark-mode toggle. Theme attribute lives on the wrapper, not
// , so multiple instances on a page each carry their own theme
// state. The source mock used localStorage + prefers-color-scheme —
// both dropped because the embedded demo doesn't own the host page's
// theme preference. The radial flash overlay is bounded to the
// wrapper (position:absolute) so it doesn't escape into the gallery.
const root = document.querySelector('.nb-drk');
if (!root) return;
const toggle = root.querySelector('[data-nb-drk-toggle]');
const label = root.querySelector('[data-nb-drk-label]');
const flash = root.querySelector('[data-nb-drk-flash]');
if (!toggle || !label || !flash) return;
const tokens = {
light: { bg: '#fafaf8', text: '#18181a', accent: '#e84a2f', border: '#e4e2dc', surface: '#ffffff' },
dark: { bg: '#111113', text: '#f0efec', accent: '#ff6b4a', border: '#2e2e34', surface: '#1e1e22' },
};
function updatePreview(theme) {
const t = tokens[theme];
for (const key of ['bg', 'text', 'accent', 'border']) {
const valEl = root.querySelector('[data-nb-drk-val="' + key + '"]');
const swatchEl = root.querySelector('[data-nb-drk-swatch="' + key + '"]');
if (valEl) valEl.textContent = t[key];
if (swatchEl) swatchEl.style.background = t[key];
}
for (const key of ['bg', 'text', 'accent', 'surface']) {
const codeEl = root.querySelector('[data-nb-drk-code="' + key + '"]');
if (codeEl) codeEl.textContent = t[key];
}
const themeInCode = root.querySelector('[data-nb-drk-theme-in-code]');
if (themeInCode) themeInCode.textContent = theme;
label.textContent = theme === 'dark' ? 'Dark' : 'Light';
}
function triggerFlash(theme) {
flash.style.background = theme === 'dark' ? '#f0efec' : '#111113';
flash.classList.remove('animate');
// Force reflow so the animation restarts.
void flash.offsetWidth;
flash.classList.add('animate');
}
function applyTheme(theme) {
root.setAttribute('data-theme', theme);
updatePreview(theme);
}
// Seed from the wrapper's current data-theme (default "light" via HTML).
applyTheme(root.getAttribute('data-theme') || 'light');
toggle.addEventListener('click', () => {
const next = root.getAttribute('data-theme') === 'dark' ? 'light' : 'dark';
triggerFlash(next);
applyTheme(next);
});
})();
```
### 08. CSS Navbar with Underline Hover Animation
**Type:** CSS + JS
**Description:** A minimalist CSS navbar with three distinct underline hover animation techniques side-by-side — proving that the most elegant nav effects come from doing less, not more. Variant 1 (the production nav at top) uses a JS-driven magnetic ink line: a single absolutely-positioned 1.5px rail glides between hovered items via getBoundingClientRect, with a red static line marking the active item. Variant 2 is pure CSS — each link owns an `::after` pseudo-element that starts at `left: 50%; right: 50%` (zero width, centered) and expands outward to the padding edge on hover, blooming symmetrically. Variant 3 uses the same `::after` trick but transitions only one edge, producing a left-anchored directional wipe. The page includes a Libre Baskerville serif "art of the quiet hover" hero, an A–Z alphabet ticker where every letter gets the underline treatment, and a 4-row showcase list where each title gets a 2px red underline wipe on hover. Libre Baskerville + Instrument Sans. Best for editorial sites, personal portfolios, design studio navs, content-led blogs, minimalist typography-first layouts.
**HTML:**
```html
The art of the quiet hover.
Three distinct CSS underline animation techniques — each achieving elegance through restraint. The navbar above uses a magnetic sliding ink line that follows your cursor. Below, explore every method.
"Typography is a silent conversation — the best underlines join it without interrupting. Hover the navigation above and each demo below to see them in motion."
01
Magnetic Sliding Line — Single Global Rail
One line glides beneath the entire nav, tracking the hovered link. Active item uses a static accent-colored line.
One .ink-line element is positioned with JS using getBoundingClientRect() on each hover target.
CSS transition: left, width with cubic-bezier(0.25,1,0.5,1) creates the magnetic feel.
The static .ink-line-static marks the active item in accent red.
02
Center-Bloom — Per-Link ::after Pseudo-Element
Each link owns its underline. On hover, it expands from the center outward — no JavaScript needed at all.
CSS only. Each a::after starts at left: 50%; right: 50% (zero width, centered).
On :hover, left and right both animate to the padding value — blooming outward symmetrically.
03
Left-Wipe — Directional Reveal
The underline sweeps in from the left, anchored to the link's left edge. Clean, directional, editorial.
CSS only. a::before starts at left: 50%; right: 50% and transitions to left: 1.1rem; right: 1.1rem.
The asymmetric easing of left gives it the wipe directionality.
Every link, same principle — hover any letter
```
**CSS:**
```css
/* ─── 08 Thesis — CSS navbar underline hover animation UI ─────── */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');
.nb-und {
--nb-und-paper: #f8f6f1;
--nb-und-ink: #1a1916;
--nb-und-ink-2: #6b6760;
--nb-und-ink-3: #b5b2ac;
--nb-und-rule: #e0ddd6;
--nb-und-red: #c93a24;
--nb-und-nav-h: 70px;
position: relative;
width: 100%;
min-height: 1600px;
background: var(--nb-und-paper);
color: var(--nb-und-ink);
font-family: 'Instrument Sans', sans-serif;
overflow: clip;
box-sizing: border-box;
}
.nb-und *, .nb-und *::before, .nb-und *::after { box-sizing: border-box; margin: 0; padding: 0; }
.nb-und nav { position: absolute; top: 0; left: 0; right: 0; z-index: 100; height: var(--nb-und-nav-h); background: var(--nb-und-paper); border-bottom: 1px solid var(--nb-und-rule); }
.nb-und .nav-inner { max-width: 1440px; margin: 0 auto; height: 100%; display: flex; align-items: center; padding: 0 3rem; }
.nb-und .brand { font-family: 'Libre Baskerville', serif; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; color: var(--nb-und-ink); text-decoration: none; flex-shrink: 0; margin-right: 4rem; }
.nb-und .nav-links-wrap { flex: 1; position: relative; display: flex; align-items: center; }
.nb-und .nav-links { display: flex; align-items: center; list-style: none; gap: 0; }
.nb-und .ink-line { position: absolute; bottom: -1px; height: 1.5px; background: var(--nb-und-ink); transition: left 0.38s cubic-bezier(0.25, 1, 0.5, 1), width 0.38s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.25s; pointer-events: none; opacity: 0; }
.nb-und .ink-line.visible { opacity: 1; }
.nb-und .ink-line-static { position: absolute; bottom: -1px; height: 1.5px; background: var(--nb-und-red); pointer-events: none; transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1), width 0.4s; }
.nb-und .nav-links a { display: flex; align-items: center; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.04em; color: var(--nb-und-ink-2); text-decoration: none; padding: 0 1.1rem; height: var(--nb-und-nav-h); transition: color 0.22s; position: relative; white-space: nowrap; }
.nb-und .nav-links a:hover { color: var(--nb-und-ink); }
.nb-und .nav-links a.active { color: var(--nb-und-ink); }
.nb-und .nav-links a span { display: inline-block; transition: letter-spacing 0.35s cubic-bezier(0.25, 1, 0.5, 1); }
.nb-und .nav-links a:hover span { letter-spacing: 0.09em; }
.nb-und .nav-links a.active span { letter-spacing: 0.02em; }
/* Variant 2 — center-bloom (pure CSS) */
.nb-und .nav-links-v2 { display: flex; align-items: center; list-style: none; gap: 0; }
.nb-und .nav-links-v2 a { display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.04em; color: var(--nb-und-ink-2); text-decoration: none; padding: 0 1.1rem; height: var(--nb-und-nav-h); position: relative; white-space: nowrap; transition: color 0.22s; }
.nb-und .nav-links-v2 a:hover { color: var(--nb-und-ink); }
.nb-und .nav-links-v2 a.active { color: var(--nb-und-ink); }
.nb-und .nav-links-v2 a::after { content: ''; position: absolute; bottom: 0; left: 50%; right: 50%; height: 1.5px; background: var(--nb-und-ink); transition: left 0.35s cubic-bezier(0.25, 1, 0.5, 1), right 0.35s cubic-bezier(0.25, 1, 0.5, 1); }
.nb-und .nav-links-v2 a.active::after { background: var(--nb-und-red); left: 1.1rem; right: 1.1rem; }
.nb-und .nav-links-v2 a:hover::after { left: 1.1rem; right: 1.1rem; }
/* Variant 3 — left-wipe */
.nb-und .nav-links-v3 { display: flex; align-items: center; list-style: none; gap: 0; }
.nb-und .nav-links-v3 a { display: flex; align-items: center; height: var(--nb-und-nav-h); padding: 0 1.1rem; text-decoration: none; white-space: nowrap; position: relative; overflow: hidden; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.04em; color: var(--nb-und-ink-2); transition: color 0.22s; }
.nb-und .nav-links-v3 a:hover, .nb-und .nav-links-v3 a.active { color: var(--nb-und-ink); }
.nb-und .nav-links-v3 a::before { content: ''; position: absolute; bottom: 0; left: 50%; right: 50%; height: 1.5px; background: var(--nb-und-ink); transition: left 0.3s ease, right 0.3s ease; }
.nb-und .nav-links-v3 a:hover::before { left: 1.1rem; right: 1.1rem; }
.nb-und .nav-links-v3 a.active::before { left: 1.1rem; right: 1.1rem; background: var(--nb-und-red); }
.nb-und .nav-spacer { flex: 1; }
.nb-und .nav-end { display: flex; align-items: center; gap: 1.5rem; flex-shrink: 0; }
.nb-und .nav-end a { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.04em; color: var(--nb-und-ink-2); text-decoration: none; transition: color 0.2s; position: relative; }
.nb-und .nav-end a::after { content: ''; position: absolute; bottom: -2px; left: 50%; right: 50%; height: 1px; background: var(--nb-und-ink); transition: left 0.3s ease, right 0.3s ease; }
.nb-und .nav-end a:hover { color: var(--nb-und-ink); }
.nb-und .nav-end a:hover::after { left: 0; right: 0; }
.nb-und .nav-end-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--nb-und-rule); }
.nb-und .btn-nav { font-family: 'Instrument Sans', sans-serif; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; color: var(--nb-und-paper); background: var(--nb-und-ink); border: none; padding: 8px 18px; border-radius: 2px; cursor: pointer; transition: background 0.2s; }
.nb-und .btn-nav:hover { background: var(--nb-und-red); }
.nb-und .page { padding-top: var(--nb-und-nav-h); }
.nb-und .hero { padding: 6rem 3rem 4rem; max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: end; }
.nb-und .hero-left h1 { font-family: 'Libre Baskerville', serif; font-size: clamp(3rem, 5vw, 5.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; color: var(--nb-und-ink); margin-bottom: 1.5rem; }
.nb-und .hero-left h1 em { font-style: italic; font-weight: 400; color: var(--nb-und-red); }
.nb-und .hero-left p { font-size: 1rem; color: var(--nb-und-ink-2); line-height: 1.7; max-width: 44ch; }
.nb-und .hero-right { padding-bottom: 1rem; }
.nb-und .hero-right p { font-family: 'Libre Baskerville', serif; font-size: 1.3rem; font-style: italic; font-weight: 400; color: var(--nb-und-ink-2); line-height: 1.6; max-width: 36ch; }
.nb-und .hero-right p strong { color: var(--nb-und-ink); font-style: normal; font-weight: 700; }
.nb-und .section-rule { height: 1px; background: var(--nb-und-rule); margin: 0 3rem; }
.nb-und .section { padding: 5rem 3rem; max-width: 1440px; margin: 0 auto; }
.nb-und .variant-label { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.nb-und .variant-num { font-family: 'Libre Baskerville', serif; font-size: 3rem; font-weight: 400; color: var(--nb-und-rule); line-height: 1; }
.nb-und .variant-info h3 { font-size: 0.88rem; font-weight: 600; color: var(--nb-und-ink); letter-spacing: 0.02em; margin-bottom: 3px; }
.nb-und .variant-info p { font-size: 0.78rem; color: var(--nb-und-ink-2); line-height: 1.5; }
.nb-und .demo-nav { border: 1px solid var(--nb-und-rule); border-radius: 4px; background: var(--nb-und-paper); height: 60px; display: flex; align-items: center; padding: 0 2rem; position: relative; margin-bottom: 1.5rem; overflow: hidden; }
.nb-und .demo-wrap { position: relative; display: flex; align-items: center; }
.nb-und .code-note { font-family: 'Instrument Sans', monospace; font-size: 0.72rem; color: var(--nb-und-ink-3); line-height: 1.7; background: #f2f0ea; border-left: 2px solid var(--nb-und-rule); padding: 0.75rem 1rem; border-radius: 0 3px 3px 0; margin-bottom: 3rem; }
.nb-und .code-note code { font-family: monospace; color: var(--nb-und-red); font-size: 0.7rem; }
.nb-und .alphabet-demo { margin: 4rem 3rem; padding: 3rem; border: 1px solid var(--nb-und-rule); border-radius: 4px; text-align: center; }
.nb-und .alpha-label { font-size: 0.62rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--nb-und-ink-3); margin-bottom: 2rem; }
.nb-und .alpha-links { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; }
.nb-und .alpha-links a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-family: 'Libre Baskerville', serif; font-size: 1rem; color: var(--nb-und-ink-3); text-decoration: none; position: relative; transition: color 0.2s; border-radius: 4px; }
.nb-und .alpha-links a::after { content: ''; position: absolute; bottom: 4px; left: 50%; right: 50%; height: 1px; background: var(--nb-und-ink); transition: left 0.3s ease, right 0.3s ease; }
.nb-und .alpha-links a:hover { color: var(--nb-und-ink); }
.nb-und .alpha-links a:hover::after { left: 8px; right: 8px; }
.nb-und .showcase { padding: 5rem 3rem; border-top: 1px solid var(--nb-und-rule); max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }
.nb-und .showcase-item { display: flex; align-items: center; justify-content: space-between; padding: 2rem 0; border-bottom: 1px solid var(--nb-und-rule); cursor: pointer; overflow: hidden; position: relative; }
.nb-und .showcase-title { font-family: 'Libre Baskerville', serif; font-size: clamp(2rem, 4vw, 4rem); font-weight: 400; color: var(--nb-und-ink); line-height: 1; position: relative; display: inline-block; transition: color 0.2s; }
.nb-und .showcase-title::after { content: ''; position: absolute; bottom: 4px; left: 0; right: 100%; height: 2px; background: var(--nb-und-red); transition: right 0.5s cubic-bezier(0.25, 1, 0.5, 1); }
.nb-und .showcase-item:hover .showcase-title::after { right: 0; }
.nb-und .showcase-item:hover .showcase-title { color: var(--nb-und-red); }
.nb-und .showcase-right { display: flex; align-items: center; gap: 1rem; }
.nb-und .showcase-meta { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nb-und-ink-3); }
.nb-und .showcase-arrow { font-size: 1.5rem; color: var(--nb-und-ink-3); transform: translateX(-8px); transition: transform 0.3s ease, color 0.2s; }
.nb-und .showcase-item:hover .showcase-arrow { transform: translateX(0); color: var(--nb-und-red); }
@media (max-width: 900px) {
.nb-und .hero { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 1.5rem 2rem; }
.nb-und .nav-end a, .nb-und .nav-end-dot { display: none; }
.nb-und .section { padding: 3rem 1.5rem; }
.nb-und .alphabet-demo { margin: 2rem 1.5rem; padding: 2rem 1rem; }
.nb-und .showcase { padding: 3rem 1.5rem; }
.nb-und .demo-nav { padding: 0 1rem; }
.nb-und nav .nav-inner { padding: 0 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
.nb-und * { transition: none !important; }
}
```
**JS:**
```js
(() => {
// Scoped magnetic-line wiring. Two instances of the magnetic line
// pattern run on the page (the main top nav + the demo nav in
// variant 01). Each is independently bound to its wrapper + nav
// + line + static-line via data-* attributes — no document.getElementById,
// no shared state, multiple instances coexist safely.
const root = document.querySelector('.nb-und');
if (!root) return;
function setupMagneticLine(navEl, wrapper, line, staticLine) {
if (!navEl || !wrapper || !line || !staticLine) return;
const links = navEl.querySelectorAll('a');
function positionLine(el, targetLine, useAccent) {
const wRect = wrapper.getBoundingClientRect();
const rect = el.getBoundingClientRect();
targetLine.style.left = (rect.left - wRect.left) + 'px';
targetLine.style.width = rect.width + 'px';
if (useAccent) targetLine.style.background = 'var(--nb-und-red)';
}
const active = navEl.querySelector('a.active');
if (active) {
requestAnimationFrame(() => positionLine(active, staticLine, true));
}
links.forEach((a) => {
a.addEventListener('mouseenter', () => {
positionLine(a, line);
line.classList.add('visible');
});
a.addEventListener('click', (e) => {
e.preventDefault();
links.forEach((l) => l.classList.remove('active'));
a.classList.add('active');
positionLine(a, staticLine, true);
});
});
wrapper.addEventListener('mouseleave', () => {
line.classList.remove('visible');
});
}
// Main top nav
setupMagneticLine(
root.querySelector('[data-nb-und-nav]'),
root.querySelector('[data-nb-und-wrap]'),
root.querySelector('[data-nb-und-line]'),
root.querySelector('[data-nb-und-static]'),
);
// Demo 1 (the in-page variant showcase)
setupMagneticLine(
root.querySelector('[data-nb-und-demo-nav]'),
root.querySelector('[data-nb-und-demo-wrap]'),
root.querySelector('[data-nb-und-demo-line]'),
root.querySelector('[data-nb-und-demo-static]'),
);
// Variant 2 / 3 click-to-activate (pure CSS hover; this just keeps the
// active state in sync after a click).
root.querySelectorAll('.nav-links-v2 a, .nav-links-v3 a').forEach((a) => {
a.addEventListener('click', (e) => {
e.preventDefault();
const siblings = a.closest('ul').querySelectorAll('a');
siblings.forEach((s) => s.classList.remove('active'));
a.classList.add('active');
});
});
// Alphabet ticker — 26 links built once.
const alpha = root.querySelector('[data-nb-und-alpha]');
if (alpha && alpha.childElementCount === 0) {
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('').forEach((ch) => {
const a = document.createElement('a');
a.href = '#';
a.textContent = ch;
a.addEventListener('click', (e) => e.preventDefault());
alpha.appendChild(a);
});
}
})();
```
---
## 15 CSS Navigation Menu Designs
URL: https://codefronts.com/navigation/css-navigation-menu-designs/
Description: 15 hand-coded CSS navigation menu designs covering every production navigation pattern developers ship in 2026 — horizontal navigation bar with hover underline, dropdown navigation menu, full mega menu with category columns and feature panel, hamburger menu with slide-out drawer, full-screen overlay navigation, sticky navigation bar with scroll shrink (scroll-driven CSS animation), sidebar navigation menu, tab navigation with animated sliding indicator, breadcrumb navigation, glassmorphism navigation (frosted-glass backdrop-filter pattern), animated navigation icons with labels, multi-level accordion navigation, navigation with magnetic hover effect, neon glow navigation menu, and morphing navigation pill indicator. 13 demos are 100% pure CSS using :hover + :focus-within + :checked state machines — drop into any stack with zero JS dependencies. 2 use ~20-50 lines of vanilla JavaScript for sticky-scroll behaviour and pointer-tracking magnetic hover effects. All ship semantic <nav> + <ul> markup with aria-current="page" on the active link, aria-expanded on toggles, aria-haspopup on dropdown triggers, respect prefers-reduced-motion, use scoped .nav-NN__* class names so multiple navs coexist on the same page without style bleed, ship with 44×44px tap targets (WCAG 2.5.5), MIT-licensed. Drop into React, Vue, Astro, Svelte, Rails ERB, plain HTML, WordPress, Shopify, or any other stack.
Demo count: 15
### 01. CSS Horizontal Navigation Bar with Hover Underline
**Type:** Pure CSS
**Description:** A clean, professional horizontal navigation bar featuring smooth animated underline indicators on hover. Built with CSS custom properties for easy theming, this pattern is the foundation of most website headers — links slide a colored underline in from the left on hover with a cubic-bezier transition.
**HTML:**
```html
Clarity
Pure CSS underline effect
Hover the nav links above
Each link reveals a smooth underline indicator using a CSS ::after pseudo-element scaled from zero via cubic-bezier spring easing — no JavaScript.
The underline uses
transform: scaleX() — a compositor-only property — so hover transitions run at 60 fps even on low-end devices.
```
**CSS:**
```css
.nav-01,.nav-01 *,.nav-01 *::before,.nav-01 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-01 ::selection{background:#2563eb;color:#fff}
.nav-01{
--bg:#f8fafc;--surface:#ffffff;--border:#e2e8f0;
--text:#1e293b;--muted:#64748b;--accent:#2563eb;--accent-light:#dbeafe;
font-family:'Inter',system-ui,sans-serif;
background:var(--bg);min-height:100vh;display:flex;flex-direction:column;
}
.nav-01__bar{
background:var(--surface);border-bottom:1px solid var(--border);
padding:0 40px;display:flex;align-items:center;justify-content:space-between;
height:64px;position:sticky;top:0;z-index:10;
box-shadow:0 1px 3px rgba(0,0,0,.04);
}
.nav-01__logo{
font-size:1.125rem;font-weight:600;color:var(--text);
letter-spacing:-.02em;display:flex;align-items:center;gap:8px;
}
.nav-01__logo-dot{width:8px;height:8px;border-radius:50%;background:var(--accent);display:inline-block}
.nav-01__links{display:flex;align-items:center;gap:4px;list-style:none}
.nav-01__links a{
display:flex;align-items:center;padding:8px 14px;
color:var(--muted);text-decoration:none;
font-size:.875rem;font-weight:500;border-radius:6px;
position:relative;transition:color .2s ease;
}
.nav-01__links a::after{
content:'';position:absolute;bottom:-1px;left:14px;right:14px;
height:2px;background:var(--accent);border-radius:1px;
transform:scaleX(0);transform-origin:center;
transition:transform .25s cubic-bezier(.34,1.56,.64,1);
}
.nav-01__links a:hover{color:var(--text)}
.nav-01__links a:hover::after,.nav-01__links a.nav-01__active::after{transform:scaleX(1)}
.nav-01__links a.nav-01__active{color:var(--text)}
.nav-01__actions{display:flex;align-items:center;gap:10px}
.nav-01__btn-ghost{
padding:7px 16px;border:1px solid var(--border);border-radius:6px;
background:transparent;color:var(--text);font-size:.875rem;font-weight:500;
cursor:pointer;transition:background .18s,border-color .18s;
text-decoration:none;display:inline-flex;align-items:center;
}
.nav-01__btn-ghost:hover{background:var(--bg);border-color:#cbd5e1}
.nav-01__btn-primary{
padding:7px 16px;border:1px solid var(--accent);border-radius:6px;
background:var(--accent);color:#fff;font-size:.875rem;font-weight:500;
cursor:pointer;transition:opacity .18s;
text-decoration:none;display:inline-flex;align-items:center;
}
.nav-01__btn-primary:hover{opacity:.88}
.nav-01__hero{
flex:1;display:flex;flex-direction:column;
align-items:center;justify-content:center;
padding:80px 24px;text-align:center;
}
.nav-01__badge{
display:inline-flex;align-items:center;gap:6px;
background:var(--accent-light);color:var(--accent);
padding:4px 12px;border-radius:100px;
font-size:.75rem;font-weight:600;letter-spacing:.04em;
text-transform:uppercase;margin-bottom:24px;
}
.nav-01__hero h1{
font-size:clamp(2rem,5vw,3.5rem);font-weight:600;
color:var(--text);letter-spacing:-.03em;line-height:1.15;
max-width:640px;margin-bottom:16px;
}
.nav-01__hero p{
font-size:1.0625rem;color:var(--muted);
max-width:480px;line-height:1.65;
}
.nav-01__note{
display:flex;align-items:flex-start;gap:8px;
background:var(--surface);border:1px solid var(--border);
border-radius:10px;padding:14px 18px;margin-top:40px;
max-width:480px;font-size:.8125rem;color:var(--muted);
line-height:1.5;text-align:left;
}
.nav-01__note svg{width:18px;height:18px;flex-shrink:0;margin-top:1px;color:var(--accent)}
code{background:#f1f5f9;padding:1px 5px;border-radius:3px;font-family:monospace;font-size:.85em}
@media(max-width:600px){.nav-01__links,.nav-01__btn-ghost{display:none}}
@media(prefers-reduced-motion:reduce){.nav-01__links a::after,.nav-01__links a{transition:none}}
```
### 02. CSS Dropdown Navigation Menu
**Type:** Pure CSS
**Description:** A multi-level dropdown navigation built entirely with CSS using the checkbox hack and `:focus-within` for accessibility. Submenus fade and slide down on hover, with smooth opacity and transform transitions — no JavaScript required.
**HTML:**
```html
Hover any nav item with an arrow
CSS Dropdown Navigation Menu
Dropdowns appear on :hover using opacity + translateY transitions. Wide panels use CSS Grid. Zero JavaScript required.
```
**CSS:**
```css
.nav-02,.nav-02 *,.nav-02 *::before,.nav-02 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-02 ::selection{background:#7c3aed;color:#fff}
.nav-02{
--bg:#faf5ff;--surface:#ffffff;--border:#ede9fe;
--text:#1e1b4b;--muted:#6b7280;--accent:#7c3aed;
--accent2:#a78bfa;--shadow:rgba(124,58,237,.12);
font-family:'Plus Jakarta Sans',system-ui,sans-serif;
background:var(--bg);min-height:100vh;
}
.nav-02__bar{
background:var(--surface);border-bottom:1px solid var(--border);
padding:0 48px;display:flex;align-items:center;
justify-content:space-between;height:68px;
position:sticky;top:0;z-index:100;
box-shadow:0 2px 16px var(--shadow);
}
.nav-02__logo{
font-size:1.25rem;font-weight:600;color:var(--text);
letter-spacing:-.03em;display:flex;align-items:center;gap:10px;
}
.nav-02__logo-mark{
width:32px;height:32px;border-radius:8px;
background:linear-gradient(135deg,var(--accent),var(--accent2));
display:grid;place-items:center;
}
.nav-02__logo-mark svg{width:18px;height:18px;fill:#fff}
.nav-02__links{display:flex;align-items:center;gap:2px;list-style:none}
/* top-level item */
.nav-02__links > li{position:relative}
.nav-02__links > li > a{
display:flex;align-items:center;gap:5px;
padding:10px 14px;color:var(--muted);
text-decoration:none;font-size:.875rem;font-weight:500;
border-radius:7px;transition:color .18s,background .18s;
white-space:nowrap;
}
.nav-02__links > li > a:hover,.nav-02__links > li:hover > a{
color:var(--text);background:var(--bg);
}
.nav-02__links > li > a .nav-02__caret{
width:14px;height:14px;opacity:.5;
transition:transform .22s ease;
}
.nav-02__links > li:hover > a .nav-02__caret{transform:rotate(180deg)}
/* dropdown panel */
.nav-02__dropdown{
position:absolute;top:calc(100% + 8px);left:50%;
transform:translateX(-50%) translateY(-6px);
background:var(--surface);
border:1px solid var(--border);
border-radius:12px;
box-shadow:0 12px 40px var(--shadow);
padding:8px;
min-width:200px;
list-style:none;
opacity:0;pointer-events:none;
transition:opacity .18s ease,transform .2s ease;
z-index:200;
}
.nav-02__links > li:hover .nav-02__dropdown,
.nav-02__links > li:focus-within .nav-02__dropdown{
opacity:1;pointer-events:auto;transform:translateX(-50%) translateY(0);
}
.nav-02__dropdown li a{
display:flex;align-items:center;gap:10px;
padding:9px 12px;color:var(--muted);
text-decoration:none;font-size:.875rem;font-weight:500;
border-radius:7px;transition:background .15s,color .15s;
}
.nav-02__dropdown li a:hover{background:var(--bg);color:var(--text)}
.nav-02__dropdown-icon{
width:32px;height:32px;border-radius:7px;
background:var(--bg);display:grid;place-items:center;flex-shrink:0;
}
.nav-02__dropdown-icon svg{width:16px;height:16px;stroke:var(--accent);fill:none;stroke-width:2}
.nav-02__dropdown-text{display:flex;flex-direction:column;gap:1px}
.nav-02__dropdown-text span{font-size:.75rem;color:var(--accent2);font-weight:400}
.nav-02__dropdown-divider{height:1px;background:var(--border);margin:6px 8px}
/* wide dropdown */
.nav-02__dropdown--wide{min-width:480px;display:grid;grid-template-columns:1fr 1fr;gap:0}
/* cta row */
.nav-02__dropdown-cta{
grid-column:1/-1;
display:flex;align-items:center;justify-content:space-between;
background:linear-gradient(135deg,#f5f3ff,#ede9fe);
border-radius:8px;padding:12px 14px;margin-top:4px;
font-size:.8125rem;color:var(--accent);font-weight:600;
text-decoration:none;
}
.nav-02__dropdown-cta:hover{background:linear-gradient(135deg,#ede9fe,#ddd6fe)}
.nav-02__dropdown-cta svg{width:16px;height:16px;stroke:var(--accent);fill:none;stroke-width:2}
.nav-02__actions{display:flex;align-items:center;gap:10px}
.nav-02__btn{
padding:8px 18px;border-radius:7px;font-size:.875rem;font-weight:600;
cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;
transition:all .18s;border:1.5px solid;
}
.nav-02__btn--ghost{color:var(--accent);border-color:var(--border);background:transparent}
.nav-02__btn--ghost:hover{border-color:var(--accent2);background:var(--bg)}
.nav-02__btn--fill{color:#fff;border-color:var(--accent);background:var(--accent)}
.nav-02__btn--fill:hover{opacity:.88}
/* hero */
.nav-02__hero{
display:flex;flex-direction:column;align-items:center;
justify-content:center;padding:100px 24px;text-align:center;
}
.nav-02__hero h1{
font-size:clamp(2rem,5vw,3.25rem);font-weight:600;
color:var(--text);letter-spacing:-.03em;max-width:600px;
margin-bottom:14px;line-height:1.2;
}
.nav-02__hero p{font-size:1rem;color:var(--muted);max-width:440px;line-height:1.65}
.nav-02__pill{
display:inline-flex;align-items:center;gap:6px;
background:var(--accent);color:#fff;
border-radius:100px;padding:4px 12px 4px 6px;
font-size:.75rem;font-weight:600;margin-bottom:22px;
}
.nav-02__pill-dot{width:18px;height:18px;background:rgba(255,255,255,.25);border-radius:50%;display:grid;place-items:center}
.nav-02__pill-dot::after{content:'';width:6px;height:6px;background:#fff;border-radius:50%;display:block}
@media(max-width:700px){.nav-02__links,.nav-02__btn--ghost{display:none}}
@media(prefers-reduced-motion:reduce){
.nav-02__dropdown,.nav-02__links > li > a .nav-02__caret{transition:none}
}
```
### 03. CSS Mega Menu Navigation
**Type:** Pure CSS
**Description:** A full-width mega menu with categorized link columns, featured cards, and icon-enhanced entries. The mega panel spans the full viewport width and organizes content into a responsive grid, perfect for content-heavy sites like e-commerce or documentation portals.
**HTML:**
```html
ArcOS
CSS Mega Menu Navigation
Hover "Platform" or "Solutions" to reveal a grid-based mega panel. Built with pure CSS :hover + opacity transitions and CSS Grid layout — no JS.
```
**CSS:**
```css
.nav-03,.nav-03 *,.nav-03 *::before,.nav-03 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-03 ::selection{background:#0ea5e9;color:#fff}
.nav-03{
--bg:#0c1222;--surface:#111827;--surface2:#1e2a3d;
--border:rgba(255,255,255,.07);--text:#f1f5f9;
--muted:#94a3b8;--accent:#0ea5e9;--accent2:#38bdf8;
--green:#10b981;--orange:#f59e0b;--pink:#ec4899;
font-family:'DM Sans',system-ui,sans-serif;
background:var(--bg);min-height:100vh;
}
.nav-03__bar{
background:rgba(17,24,39,.9);backdrop-filter:blur(16px);
border-bottom:1px solid var(--border);
padding:0 48px;display:flex;align-items:center;
justify-content:space-between;height:68px;
position:sticky;top:0;z-index:100;
}
.nav-03__logo{
font-size:1.2rem;font-weight:700;color:var(--text);
display:flex;align-items:center;gap:10px;letter-spacing:-.02em;
}
.nav-03__logo span{color:var(--accent)}
.nav-03__links{display:flex;align-items:center;gap:2px;list-style:none}
.nav-03__links > li{position:relative}
.nav-03__links > li > a{
display:flex;align-items:center;gap:4px;
padding:9px 14px;color:var(--muted);
text-decoration:none;font-size:.875rem;font-weight:500;
border-radius:6px;transition:color .18s,background .18s;
}
.nav-03__links > li > a:hover,.nav-03__links > li:hover > a{
color:var(--text);background:rgba(255,255,255,.05);
}
.nav-03__links > li > a svg{width:14px;height:14px;opacity:.5;transition:transform .22s}
.nav-03__links > li:hover > a svg{transform:rotate(180deg)}
/* mega panel */
.nav-03__mega{
position:absolute;top:calc(100% + 10px);left:50%;
transform:translateX(-50%) translateY(-8px);
width:680px;
background:var(--surface);
border:1px solid var(--border);
border-radius:16px;
box-shadow:0 24px 60px rgba(0,0,0,.5);
padding:24px;
opacity:0;pointer-events:none;
transition:opacity .2s ease,transform .22s ease;
z-index:200;
}
.nav-03__links > li:hover .nav-03__mega,
.nav-03__links > li:focus-within .nav-03__mega{
opacity:1;pointer-events:auto;transform:translateX(-50%) translateY(0);
}
.nav-03__mega-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px}
.nav-03__mega-item{
display:flex;align-items:flex-start;gap:12px;
padding:12px;border-radius:10px;
text-decoration:none;
transition:background .15s;
}
.nav-03__mega-item:hover{background:var(--surface2)}
.nav-03__mega-icon{
width:38px;height:38px;border-radius:9px;flex-shrink:0;
display:grid;place-items:center;
}
.nav-03__mega-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.75}
.nav-03__mega-text h4{font-size:.8125rem;font-weight:600;color:var(--text);margin-bottom:3px}
.nav-03__mega-text p{font-size:.75rem;color:var(--muted);line-height:1.4}
.nav-03__mega-footer{
margin-top:16px;padding-top:16px;
border-top:1px solid var(--border);
display:flex;gap:8px;
}
.nav-03__mega-tag{
padding:4px 10px;border-radius:100px;
font-size:.7rem;font-weight:600;letter-spacing:.03em;
text-decoration:none;transition:opacity .15s;
}
.nav-03__mega-tag:hover{opacity:.75}
.nav-03__actions{display:flex;align-items:center;gap:10px}
.nav-03__btn{
padding:8px 18px;border-radius:7px;font-size:.875rem;font-weight:600;
text-decoration:none;display:inline-flex;align-items:center;gap:6px;
transition:all .18s;border:1.5px solid transparent;cursor:pointer;
}
.nav-03__btn--out{color:var(--muted);border-color:var(--border)}
.nav-03__btn--out:hover{color:var(--text);border-color:rgba(255,255,255,.15)}
.nav-03__btn--in{color:#fff;background:var(--accent);border-color:var(--accent)}
.nav-03__btn--in:hover{opacity:.88}
.nav-03__btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2}
/* hero */
.nav-03__hero{
display:flex;flex-direction:column;align-items:center;
justify-content:center;padding:100px 24px;text-align:center;
}
.nav-03__hero h1{
font-size:clamp(2rem,5vw,3.5rem);font-weight:700;
color:var(--text);letter-spacing:-.03em;
max-width:640px;margin-bottom:14px;line-height:1.15;
}
.nav-03__hero h1 em{color:var(--accent);font-style:normal}
.nav-03__hero p{font-size:1rem;color:var(--muted);max-width:460px;line-height:1.7}
@media(max-width:768px){.nav-03__links,.nav-03__btn--out{display:none}}
@media(prefers-reduced-motion:reduce){.nav-03__mega,.nav-03__links > li > a svg{transition:none}}
```
### 04. CSS Hamburger Menu with Slide-Out Drawer
**Type:** Pure CSS
**Description:** A mobile-first hamburger menu that reveals a full-height slide-out navigation drawer using only a hidden checkbox. The three-bar icon morphs into an X when active, and a backdrop overlay fades in behind the open drawer.
**HTML:**
```html
```
**CSS:**
```css
.nav-04,.nav-04 *,.nav-04 *::before,.nav-04 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-04 ::selection{background:#f97316;color:#fff}
.nav-04{
--bg:#fffbf7;--surface:#ffffff;--drawer:#1c1917;
--border:#fde8d8;--text:#1c1917;--muted:#78716c;
--accent:#f97316;--accent2:#fb923c;
font-family:'Outfit',system-ui,sans-serif;
background:var(--bg);min-height:100vh;
}
/* hidden checkbox toggle */
#nav-04-toggle{display:none}
.nav-04__bar{
background:var(--surface);border-bottom:2px solid var(--border);
padding:0 24px;display:flex;align-items:center;
justify-content:space-between;height:64px;
position:sticky;top:0;z-index:200;
}
.nav-04__logo{
font-size:1.3rem;font-weight:700;color:var(--text);letter-spacing:-.03em;
}
.nav-04__logo span{color:var(--accent)}
/* hamburger button */
.nav-04__ham{
width:44px;height:44px;cursor:pointer;
display:flex;flex-direction:column;
align-items:center;justify-content:center;gap:5px;
border-radius:10px;transition:background .18s;
user-select:none;
}
.nav-04__ham:hover{background:var(--border)}
.nav-04__ham span{
display:block;width:22px;height:2px;
background:var(--text);border-radius:2px;
transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .2s,width .3s;
transform-origin:center;
}
/* open state — morph to X */
#nav-04-toggle:checked ~ .nav-04__bar .nav-04__ham span:nth-child(1){
transform:translateY(7px) rotate(45deg);
}
#nav-04-toggle:checked ~ .nav-04__bar .nav-04__ham span:nth-child(2){
opacity:0;width:0;
}
#nav-04-toggle:checked ~ .nav-04__bar .nav-04__ham span:nth-child(3){
transform:translateY(-7px) rotate(-45deg);
}
/* overlay */
.nav-04__overlay{
position:fixed;inset:0;z-index:150;
background:rgba(0,0,0,0);pointer-events:none;
transition:background .35s ease;
}
#nav-04-toggle:checked ~ .nav-04__overlay{
background:rgba(0,0,0,.45);pointer-events:auto;
}
/* drawer */
.nav-04__drawer{
position:fixed;top:0;right:0;bottom:0;
width:300px;z-index:160;
background:var(--drawer);
transform:translateX(100%);
transition:transform .35s cubic-bezier(.23,1,.32,1);
display:flex;flex-direction:column;
overflow-y:auto;
}
#nav-04-toggle:checked ~ .nav-04__overlay ~ .nav-04__drawer{
transform:translateX(0);
}
.nav-04__drawer-head{
padding:20px 24px;border-bottom:1px solid rgba(255,255,255,.07);
display:flex;align-items:center;justify-content:space-between;
}
.nav-04__drawer-logo{
font-size:1.2rem;font-weight:700;color:#fff;letter-spacing:-.02em;
}
.nav-04__drawer-logo span{color:var(--accent)}
.nav-04__close{
width:36px;height:36px;border-radius:8px;cursor:pointer;
display:grid;place-items:center;background:rgba(255,255,255,.07);
transition:background .18s;
}
.nav-04__close:hover{background:rgba(255,255,255,.14)}
.nav-04__close svg{width:18px;height:18px;stroke:#fff;fill:none;stroke-width:2}
.nav-04__drawer-links{padding:16px;flex:1;list-style:none}
.nav-04__drawer-links li a{
display:flex;align-items:center;gap:12px;
padding:13px 14px;color:rgba(255,255,255,.7);
text-decoration:none;font-size:.9375rem;font-weight:500;
border-radius:10px;transition:background .18s,color .18s;
}
.nav-04__drawer-links li a:hover{background:rgba(255,255,255,.06);color:#fff}
.nav-04__drawer-links li a svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.75;flex-shrink:0;opacity:.6}
.nav-04__drawer-links .nav-04__active a{color:#fff;background:rgba(249,115,22,.12)}
.nav-04__drawer-links .nav-04__active a svg{color:var(--accent);opacity:1}
.nav-04__drawer-divider{height:1px;background:rgba(255,255,255,.06);margin:8px 14px}
.nav-04__drawer-footer{padding:20px 16px;border-top:1px solid rgba(255,255,255,.07)}
.nav-04__drawer-cta{
display:block;width:100%;padding:12px;
background:var(--accent);color:#fff;
border-radius:10px;text-align:center;
text-decoration:none;font-weight:600;font-size:.9rem;
transition:opacity .18s;
}
.nav-04__drawer-cta:hover{opacity:.88}
/* hero */
.nav-04__hero{
display:flex;flex-direction:column;align-items:center;
justify-content:center;padding:100px 24px;text-align:center;
}
.nav-04__hero h1{
font-size:clamp(2rem,5vw,3.25rem);font-weight:700;
color:var(--text);letter-spacing:-.03em;max-width:560px;
margin-bottom:14px;line-height:1.2;
}
.nav-04__hero p{font-size:1rem;color:var(--muted);max-width:420px;line-height:1.7}
.nav-04__instruction{
margin-top:32px;display:inline-flex;align-items:center;gap:8px;
background:var(--surface);border:2px solid var(--border);
padding:10px 18px;border-radius:100px;
font-size:.875rem;font-weight:600;color:var(--accent);
}
.nav-04__instruction svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2}
@media(prefers-reduced-motion:reduce){
.nav-04__ham span,.nav-04__drawer,.nav-04__overlay{transition:none}
}
```
### 05. CSS Full-Screen Overlay Navigation
**Type:** Pure CSS
**Description:** A dramatic full-screen navigation overlay that covers the entire viewport with a dark semi-transparent background. Menu links animate in with a staggered slide-up entrance, creating a cinematic reveal effect perfect for portfolio and creative agency sites.
**HTML:**
```html
```
**CSS:**
```css
.nav-05,.nav-05 *,.nav-05 *::before,.nav-05 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-05 ::selection{background:#d946ef;color:#fff}
#nav-05-toggle{display:none}
.nav-05{
--bg:#09090b;--surface:#18181b;
--text:#fafafa;--muted:#a1a1aa;
--accent:#d946ef;--accent2:#e879f9;
font-family:'Syne',system-ui,sans-serif;
background:var(--bg);min-height:100vh;
}
.nav-05__bar{
position:fixed;top:0;left:0;right:0;z-index:300;
padding:24px 40px;display:flex;
align-items:center;justify-content:space-between;
}
.nav-05__logo{
font-size:1.5rem;font-weight:800;color:var(--text);
letter-spacing:-.04em;text-decoration:none;z-index:310;position:relative;
}
.nav-05__logo em{color:var(--accent);font-style:normal}
/* open btn */
.nav-05__btn{
z-index:310;position:relative;cursor:pointer;
display:flex;flex-direction:column;gap:4px;padding:12px;
background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);
border-radius:10px;transition:background .18s;user-select:none;
}
.nav-05__btn:hover{background:rgba(255,255,255,.1)}
.nav-05__btn span{
display:block;border-radius:2px;background:var(--text);
transition:transform .35s cubic-bezier(.23,1,.32,1),opacity .25s,width .35s;
}
.nav-05__btn span:nth-child(1){width:24px;height:2px}
.nav-05__btn span:nth-child(2){width:16px;height:2px}
.nav-05__btn span:nth-child(3){width:20px;height:2px}
#nav-05-toggle:checked ~ .nav-05__bar .nav-05__btn span:nth-child(1){
transform:translateY(6px) rotate(45deg);width:24px;
}
#nav-05-toggle:checked ~ .nav-05__bar .nav-05__btn span:nth-child(2){opacity:0;width:0}
#nav-05-toggle:checked ~ .nav-05__bar .nav-05__btn span:nth-child(3){
transform:translateY(-6px) rotate(-45deg);width:24px;
}
/* full-screen overlay */
.nav-05__overlay{
position:fixed;inset:0;z-index:200;
background:var(--bg);
display:flex;flex-direction:column;
justify-content:center;
padding:80px 60px;
transform:translateY(-100%);
transition:transform .5s cubic-bezier(.77,0,.175,1);
overflow:hidden;
}
#nav-05-toggle:checked ~ .nav-05__overlay{transform:translateY(0)}
.nav-05__overlay::before{
content:'';position:absolute;bottom:-200px;right:-200px;
width:600px;height:600px;border-radius:50%;
background:radial-gradient(circle,rgba(217,70,239,.12) 0%,transparent 70%);
pointer-events:none;
}
.nav-05__nav-list{list-style:none;margin-bottom:48px}
.nav-05__nav-list li{overflow:hidden}
.nav-05__nav-list li a{
display:inline-flex;align-items:center;gap:16px;
font-size:clamp(2.5rem,7vw,5rem);font-weight:800;
color:rgba(255,255,255,.15);text-decoration:none;
letter-spacing:-.04em;line-height:1.15;
transition:color .2s ease;
padding:4px 0;
}
.nav-05__nav-list li a:hover{color:var(--text)}
.nav-05__nav-list li a .nav-05__num{
font-size:.875rem;font-weight:600;color:var(--accent);
letter-spacing:.06em;margin-top:4px;
opacity:0;transition:opacity .2s;
}
.nav-05__nav-list li a:hover .nav-05__num{opacity:1}
.nav-05__overlay-footer{
display:flex;align-items:center;gap:48px;flex-wrap:wrap;
}
.nav-05__overlay-social{display:flex;gap:16px}
.nav-05__overlay-social a{
font-size:.875rem;color:var(--muted);text-decoration:none;
font-weight:600;transition:color .18s;
}
.nav-05__overlay-social a:hover{color:var(--text)}
.nav-05__overlay-cta{
padding:12px 28px;background:var(--accent);color:#fff;
border-radius:100px;text-decoration:none;font-weight:700;
font-size:.9375rem;transition:opacity .18s;
}
.nav-05__overlay-cta:hover{opacity:.85}
/* page content */
.nav-05__hero{
min-height:100vh;display:flex;flex-direction:column;
align-items:center;justify-content:center;text-align:center;
padding:100px 24px;
}
.nav-05__hero h1{
font-size:clamp(2.5rem,8vw,6rem);font-weight:800;
color:var(--text);letter-spacing:-.05em;
line-height:1;margin-bottom:20px;
}
.nav-05__hero h1 span{
background:linear-gradient(135deg,var(--accent),var(--accent2));
-webkit-background-clip:text;-webkit-text-fill-color:transparent;
background-clip:text;
}
.nav-05__hero p{font-size:1.0625rem;color:var(--muted);max-width:440px;line-height:1.65}
@media(prefers-reduced-motion:reduce){
.nav-05__overlay,.nav-05__btn span{transition:none}
}
```
### 06. CSS Sticky Navigation Bar with Scroll Shrink
**Type:** CSS + JS
**Description:** A sticky navigation bar that smoothly shrinks its height and adds a drop shadow as the user scrolls down, with a scroll-progress indicator bar at the top. The shrink effect is driven by a CSS class toggled via a tiny IntersectionObserver-based scroll listener.
**HTML:**
```html
Sticky nav thatshrinks on scroll
Scroll down to see the navbar compress from 72px to 52px. JavaScript reads scrollY and toggles a class. All visual transitions are pure CSS.
How it works
A tiny scroll event listener adds .nav-06--shrunk once scrollY > 60. The navbar's height, logo scale, and button size all transition via CSS. The scroll progress bar width is updated in the same handler.
Performance
Only height, transform, and box-shadow animate — height is handled via CSS transition on a sticky element, transform stays on the compositor.
Accessibility
The navbar remains fully keyboard-navigable throughout. The shrink behaviour is a visual enhancement only and doesn't affect focus order or ARIA roles.
```
**CSS:**
```css
.nav-06,.nav-06 *,.nav-06 *::before,.nav-06 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-06 ::selection{background:#059669;color:#fff}
.nav-06{
--bg:#f0fdf4;--surface:#fff;
--text:#052e16;--muted:#6b7280;
--accent:#059669;--accent2:#34d399;--border:#d1fae5;
font-family:'Inter',system-ui,sans-serif;
background:var(--bg);min-height:200vh;
}
.nav-06__bar{
position:sticky;top:0;z-index:100;
background:rgba(255,255,255,.9);backdrop-filter:blur(12px);
border-bottom:1px solid var(--border);
padding:0 48px;display:flex;align-items:center;justify-content:space-between;
height:72px;
transition:height .3s ease,box-shadow .3s ease,border-color .3s;
}
.nav-06__bar.nav-06--shrunk{
height:52px;
box-shadow:0 4px 20px rgba(5,150,105,.1);
border-color:rgba(5,150,105,.2);
}
.nav-06__logo{
font-size:1.2rem;font-weight:700;color:var(--text);
display:flex;align-items:center;gap:8px;transition:transform .3s ease;
}
.nav-06__bar.nav-06--shrunk .nav-06__logo{transform:scale(.9)}
.nav-06__logo-leaf{
width:28px;height:28px;background:var(--accent);border-radius:50% 0 50% 50%;
display:grid;place-items:center;transition:width .3s,height .3s;
}
.nav-06__bar.nav-06--shrunk .nav-06__logo-leaf{width:22px;height:22px}
.nav-06__logo-leaf svg{width:14px;height:14px;stroke:#fff;fill:none;stroke-width:2}
.nav-06__links{display:flex;align-items:center;gap:4px;list-style:none}
.nav-06__links a{
padding:7px 13px;color:var(--muted);text-decoration:none;
font-size:.875rem;font-weight:500;border-radius:6px;
transition:color .18s,background .18s;
}
.nav-06__links a:hover{color:var(--text);background:var(--border)}
.nav-06__links a.nav-06__active{color:var(--accent);background:#ecfdf5}
.nav-06__actions{display:flex;align-items:center;gap:10px}
.nav-06__btn{
padding:7px 16px;border-radius:6px;font-size:.875rem;
font-weight:600;text-decoration:none;cursor:pointer;transition:all .18s;
display:inline-flex;align-items:center;
}
.nav-06__btn--ghost{color:var(--accent);background:transparent;border:1.5px solid var(--border)}
.nav-06__btn--ghost:hover{border-color:var(--accent2)}
.nav-06__btn--fill{color:#fff;background:var(--accent);border:1.5px solid var(--accent)}
.nav-06__btn--fill:hover{opacity:.88}
/* shrink cta */
.nav-06__bar.nav-06--shrunk .nav-06__btn{padding:5px 13px;font-size:.8125rem}
/* scroll indicator bar */
.nav-06__progress{
position:fixed;top:0;left:0;height:3px;z-index:101;
background:linear-gradient(90deg,var(--accent),var(--accent2));
width:0%;transition:width .1s linear;
}
/* sections */
.nav-06__hero{
padding:100px 48px;max-width:800px;margin:0 auto;
}
.nav-06__hero h1{
font-size:clamp(2.5rem,5vw,4rem);font-weight:700;
color:var(--text);letter-spacing:-.04em;line-height:1.1;
margin-bottom:20px;
}
.nav-06__hero h1 span{color:var(--accent)}
.nav-06__hero p{font-size:1.0625rem;color:var(--muted);max-width:520px;line-height:1.7;margin-bottom:32px}
.nav-06__scroll-hint{
display:inline-flex;align-items:center;gap:8px;
color:var(--accent);font-size:.875rem;font-weight:600;
animation:nav-06-bounce 1.5s ease-in-out infinite;
}
.nav-06__scroll-hint svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2}
@keyframes nav-06-bounce{0%,100%{transform:translateY(0)}50%{transform:translateY(5px)}}
.nav-06__content{padding:60px 48px;max-width:800px;margin:0 auto}
.nav-06__card{
background:var(--surface);border:1px solid var(--border);
border-radius:14px;padding:28px;margin-bottom:24px;
}
.nav-06__card h3{font-size:1.125rem;font-weight:600;color:var(--text);margin-bottom:8px}
.nav-06__card p{color:var(--muted);line-height:1.65;font-size:.9375rem}
@media(max-width:640px){.nav-06__links,.nav-06__btn--ghost{display:none}}
@media(prefers-reduced-motion:reduce){
.nav-06__bar,.nav-06__logo,.nav-06__logo-leaf,.nav-06__btn,.nav-06__scroll-hint{transition:none;animation:none}
}
```
**JS:**
```js
(function(){
var bar=document.getElementById('nav-06-bar');
var prog=document.getElementById('nav-06-progress');
function onScroll(){
var y=window.scrollY;
bar.classList.toggle('nav-06--shrunk',y>60);
var doc=document.documentElement;
var pct=y/(doc.scrollHeight-doc.clientHeight)*100;
prog.style.width=Math.min(pct,100)+'%';
}
window.addEventListener('scroll',onScroll,{passive:true});
}());
```
### 07. CSS Sidebar Navigation Menu
**Type:** Pure CSS
**Description:** A collapsible vertical sidebar navigation with nested sub-menus, icon support, and a mini-mode that collapses to icon-only width. The sidebar uses CSS Grid for layout and supports multiple levels of navigation hierarchy, ideal for admin dashboards and web apps.
**HTML:**
```html
Dashboard Overview
This month
Export
Revenue
$84.2k
↑ 12.4% vs last month
Users
4,218
↑ 8.1% vs last month
Orders
1,093
↑ 5.2% vs last month
Order Amount Date Status
#1082 – Acme Corp $2,400 Jun 11 Paid
#1081 – Globex Inc $980 Jun 10 Pending
#1080 – Initech $3,150 Jun 9 Paid
#1079 – Umbrella $640 Jun 8 Failed
```
**CSS:**
```css
.nav-07,.nav-07 *,.nav-07 *::before,.nav-07 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-07 ::selection{background:#4f46e5;color:#fff}
#nav-07-collapse{display:none}
.nav-07{
--bg:#f5f5f4;--sidebar:#1e1e2e;--sidebar-hover:#2a2a3e;
--surface:#ffffff;--border:#e7e5e4;
--text:#1c1917;--muted:#78716c;
--sidebar-text:rgba(255,255,255,.65);--sidebar-active:#fff;
--accent:#818cf8;--accent-bg:rgba(129,140,248,.15);
font-family:'IBM Plex Sans',system-ui,sans-serif;
background:var(--bg);min-height:100vh;
display:flex;
}
/* sidebar */
.nav-07__sidebar{
width:240px;min-height:100vh;background:var(--sidebar);
display:flex;flex-direction:column;flex-shrink:0;
transition:width .28s cubic-bezier(.4,0,.2,1);
overflow:hidden;
}
#nav-07-collapse:checked ~ .nav-07__sidebar{width:64px}
.nav-07__sidebar-top{
padding:20px 16px;border-bottom:1px solid rgba(255,255,255,.06);
display:flex;align-items:center;justify-content:space-between;
height:64px;
}
.nav-07__brand{
display:flex;align-items:center;gap:10px;
overflow:hidden;white-space:nowrap;
}
.nav-07__brand-icon{
width:32px;height:32px;flex-shrink:0;border-radius:8px;
background:linear-gradient(135deg,var(--accent),#6366f1);
display:grid;place-items:center;
}
.nav-07__brand-icon svg{width:16px;height:16px;fill:#fff}
.nav-07__brand-name{
font-size:1rem;font-weight:600;color:#fff;
letter-spacing:-.02em;
transition:opacity .2s,width .28s;
}
#nav-07-collapse:checked ~ .nav-07__sidebar .nav-07__brand-name{opacity:0;width:0}
.nav-07__collapse-btn{
width:28px;height:28px;flex-shrink:0;cursor:pointer;
background:rgba(255,255,255,.06);border-radius:6px;
display:grid;place-items:center;transition:background .18s;
}
.nav-07__collapse-btn:hover{background:rgba(255,255,255,.1)}
.nav-07__collapse-btn svg{width:14px;height:14px;stroke:#fff;fill:none;stroke-width:2;transition:transform .28s}
#nav-07-collapse:checked ~ .nav-07__sidebar .nav-07__collapse-btn svg{transform:rotate(180deg)}
/* nav sections */
.nav-07__nav{flex:1;padding:12px 8px;overflow-y:auto;overflow-x:hidden}
.nav-07__nav-label{
font-size:.65rem;font-weight:600;letter-spacing:.08em;
text-transform:uppercase;color:rgba(255,255,255,.25);
padding:4px 8px 6px;margin-top:8px;
white-space:nowrap;overflow:hidden;
transition:opacity .2s;
}
#nav-07-collapse:checked ~ .nav-07__sidebar .nav-07__nav-label{opacity:0}
.nav-07__nav ul{list-style:none}
.nav-07__nav li a{
display:flex;align-items:center;gap:10px;
padding:9px 8px;color:var(--sidebar-text);
text-decoration:none;font-size:.875rem;font-weight:500;
border-radius:8px;transition:background .18s,color .18s;
white-space:nowrap;overflow:hidden;
}
.nav-07__nav li a:hover{background:var(--sidebar-hover);color:var(--sidebar-active)}
.nav-07__nav li.nav-07__active a{background:var(--accent-bg);color:var(--accent)}
.nav-07__nav li a svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.75;flex-shrink:0}
.nav-07__nav li a span{transition:opacity .2s,width .28s}
#nav-07-collapse:checked ~ .nav-07__sidebar .nav-07__nav li a span{opacity:0;width:0;overflow:hidden;display:inline-block}
.nav-07__badge{
margin-left:auto;padding:2px 7px;border-radius:100px;
font-size:.65rem;font-weight:700;background:var(--accent);color:#fff;
flex-shrink:0;transition:opacity .2s;
}
#nav-07-collapse:checked ~ .nav-07__sidebar .nav-07__badge{opacity:0}
/* user row */
.nav-07__user{
padding:12px 10px;border-top:1px solid rgba(255,255,255,.06);
display:flex;align-items:center;gap:10px;overflow:hidden;
}
.nav-07__avatar{
width:34px;height:34px;border-radius:50%;flex-shrink:0;
background:linear-gradient(135deg,#818cf8,#6366f1);
display:grid;place-items:center;font-size:.8rem;font-weight:700;color:#fff;
}
.nav-07__user-info{overflow:hidden;white-space:nowrap;transition:opacity .2s}
.nav-07__user-info b{display:block;font-size:.8125rem;font-weight:600;color:#fff}
.nav-07__user-info span{font-size:.7rem;color:rgba(255,255,255,.35)}
#nav-07-collapse:checked ~ .nav-07__sidebar .nav-07__user-info{opacity:0;width:0}
/* main */
.nav-07__main{flex:1;padding:32px;overflow-y:auto}
.nav-07__topbar{
background:var(--surface);border:1px solid var(--border);
border-radius:12px;padding:16px 24px;margin-bottom:28px;
display:flex;align-items:center;gap:12px;
}
.nav-07__topbar h2{font-size:1rem;font-weight:600;color:var(--text)}
.nav-07__topbar-right{margin-left:auto;display:flex;gap:10px}
.nav-07__chip{
padding:5px 12px;border-radius:6px;font-size:.8rem;font-weight:500;
background:var(--bg);border:1px solid var(--border);color:var(--muted);
cursor:pointer;transition:background .18s;
}
.nav-07__chip:hover{background:var(--border)}
.nav-07__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:24px}
.nav-07__stat{
background:var(--surface);border:1px solid var(--border);
border-radius:12px;padding:20px 22px;
}
.nav-07__stat-label{font-size:.75rem;color:var(--muted);font-weight:500;margin-bottom:8px;letter-spacing:.03em;text-transform:uppercase}
.nav-07__stat-val{font-size:1.875rem;font-weight:700;color:var(--text);letter-spacing:-.03em}
.nav-07__stat-sub{font-size:.75rem;color:#10b981;font-weight:600;margin-top:4px}
.nav-07__table{background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden}
.nav-07__table-head{
display:grid;grid-template-columns:2fr 1fr 1fr 1fr;
padding:12px 20px;border-bottom:1px solid var(--border);
font-size:.75rem;font-weight:600;color:var(--muted);letter-spacing:.04em;text-transform:uppercase;
}
.nav-07__table-row{
display:grid;grid-template-columns:2fr 1fr 1fr 1fr;
padding:14px 20px;border-bottom:1px solid var(--border);
font-size:.875rem;color:var(--text);
transition:background .15s;
}
.nav-07__table-row:last-child{border-bottom:none}
.nav-07__table-row:hover{background:var(--bg)}
.nav-07__dot{
display:inline-flex;align-items:center;gap:6px;
}
.nav-07__dot::before{
content:'';width:7px;height:7px;border-radius:50%;display:inline-block;
}
.nav-07__dot--green::before{background:#10b981}
.nav-07__dot--yellow::before{background:#f59e0b}
.nav-07__dot--red::before{background:#ef4444}
@media(max-width:768px){
.nav-07__sidebar{width:64px}
.nav-07__brand-name,.nav-07__nav li a span,.nav-07__badge,.nav-07__user-info,.nav-07__nav-label{opacity:0;width:0;overflow:hidden}
.nav-07__main{padding:16px}
.nav-07__grid{grid-template-columns:1fr 1fr}
}
@media(prefers-reduced-motion:reduce){
.nav-07__sidebar,.nav-07__brand-name,.nav-07__nav li a span,.nav-07__badge,.nav-07__user-info{transition:none}
}
```
### 08. CSS Tab Navigation with Animated Indicator
**Type:** Pure CSS
**Description:** A tab navigation component with a smooth sliding pill indicator that moves between tabs using only CSS. The indicator position and width are driven by CSS custom properties set via sibling selectors from hidden radio inputs — no JavaScript required for the animation.
**HTML:**
```html
```
**CSS:**
```css
.nav-08,.nav-08 *,.nav-08 *::before,.nav-08 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-08 ::selection{background:#e11d48;color:#fff}
/* Hide the raw radio inputs. The labels are the visible tab triggers; the
:checked state on the inputs drives the sliding indicator via sibling
selectors. position:absolute + opacity:0 + 1px box keeps them keyboard-
focusable (screen-reader and tab-key users can still activate them) but
visually invisible. display:none would break keyboard accessibility. */
.nav-08 input[type="radio"]{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;margin:0;}
.nav-08{
--bg:#fff1f2;--surface:#fff;--border:#fecdd3;
--text:#1a0a0d;--muted:#9f1239;
--accent:#e11d48;--accent2:#fb7185;
font-family:'Manrope',system-ui,sans-serif;
background:var(--bg);min-height:100vh;
display:flex;flex-direction:column;align-items:center;
padding:60px 24px;
}
.nav-08__demo-wrap{width:100%;max-width:720px}
.nav-08__demo-wrap + .nav-08__demo-wrap{margin-top:56px}
.nav-08__demo-label{
font-size:.75rem;font-weight:700;color:var(--muted);
letter-spacing:.08em;text-transform:uppercase;margin-bottom:14px;
}
/* === Tab style 1: pill/capsule tabs === */
.nav-08__tabs-1{
background:var(--surface);border:1px solid var(--border);
border-radius:16px;padding:6px;
/* CSS Grid with 4 equal columns so each tab gets exactly 1/4 of
the container width regardless of label text length. The pill
spans one column and shifts by exact multiples — no hardcoded
pixel widths to drift from rendered label sizes. */
display:grid;grid-template-columns:repeat(4,1fr);gap:2px;
position:relative;
}
.nav-08__tabs-1 label{
position:relative;z-index:1;
padding:9px 12px;border-radius:11px;
font-size:.875rem;font-weight:600;color:var(--muted);
cursor:pointer;transition:color .2s;white-space:nowrap;
user-select:none;text-align:center;
}
.nav-08__pill{
position:absolute;top:6px;bottom:6px;
border-radius:11px;background:var(--accent);
/* Pill width = one grid column. With 4 columns + 3 gaps of 2px
inside a container with 6px left+right padding: track width
= 100% - 12px - 6px = 100% - 18px, single column = that / 4. */
width:calc((100% - 18px) / 4);
left:6px;
transition:transform .28s cubic-bezier(.34,1.2,.64,1);
z-index:0;
}
/* The radio inputs sit OUTSIDE .nav-08__tabs-1 (siblings of the
tabs container, not of the .nav-08__pill inside it), so the
old plain-sibling :checked ~ .nav-08__pill selector matched nothing.
:has() lets us style descendants based on a sibling's state. */
.nav-08__demo-wrap:has(#nav-08-t1-1:checked) .nav-08__pill{transform:translateX(0)}
.nav-08__demo-wrap:has(#nav-08-t1-1:checked) label[for="nav-08-t1-1"]{color:#fff}
.nav-08__demo-wrap:has(#nav-08-t1-2:checked) .nav-08__pill{transform:translateX(calc(100% + 2px))}
.nav-08__demo-wrap:has(#nav-08-t1-2:checked) label[for="nav-08-t1-2"]{color:#fff}
.nav-08__demo-wrap:has(#nav-08-t1-3:checked) .nav-08__pill{transform:translateX(calc(200% + 4px))}
.nav-08__demo-wrap:has(#nav-08-t1-3:checked) label[for="nav-08-t1-3"]{color:#fff}
.nav-08__demo-wrap:has(#nav-08-t1-4:checked) .nav-08__pill{transform:translateX(calc(300% + 6px))}
.nav-08__demo-wrap:has(#nav-08-t1-4:checked) label[for="nav-08-t1-4"]{color:#fff}
/* panel content */
.nav-08__panels-1{
background:var(--surface);border:1px solid var(--border);
border-radius:16px;margin-top:4px;overflow:hidden;
}
/* show panel matching checked */
.nav-08__panel{display:none;padding:28px}
#nav-08-t1-1:checked ~ .nav-08__panels-1 .nav-08__panel:nth-child(1){display:block}
#nav-08-t1-2:checked ~ .nav-08__panels-1 .nav-08__panel:nth-child(2){display:block}
#nav-08-t1-3:checked ~ .nav-08__panels-1 .nav-08__panel:nth-child(3){display:block}
#nav-08-t1-4:checked ~ .nav-08__panels-1 .nav-08__panel:nth-child(4){display:block}
.nav-08__panel h3{font-size:1rem;font-weight:700;color:var(--text);margin-bottom:8px}
.nav-08__panel p{font-size:.9rem;color:var(--muted);line-height:1.6}
/* === Tab style 2: underline tabs === */
.nav-08__tabs-2{
/* 3-column grid for 3 equally-sized tabs. Underline width matches
a single column exactly. */
display:grid;grid-template-columns:repeat(3,1fr);
border-bottom:2px solid var(--border);
position:relative;
}
.nav-08__tabs-2 label{
padding:12px 20px;font-size:.875rem;font-weight:600;
color:var(--muted);cursor:pointer;transition:color .2s;
user-select:none;text-align:center;
}
.nav-08__tabs-2 label:hover{color:var(--text)}
.nav-08__underline{
position:absolute;bottom:-2px;height:2px;
background:var(--accent);border-radius:2px;
width:calc(100% / 3);left:0;
transition:transform .28s cubic-bezier(.4,0,.2,1);
}
/* Same :has() pattern — radios are outside .nav-08__tabs-2. */
.nav-08__demo-wrap:has(#nav-08-t2-1:checked) .nav-08__underline{transform:translateX(0)}
.nav-08__demo-wrap:has(#nav-08-t2-1:checked) label[for="nav-08-t2-1"]{color:var(--text)}
.nav-08__demo-wrap:has(#nav-08-t2-2:checked) .nav-08__underline{transform:translateX(100%)}
.nav-08__demo-wrap:has(#nav-08-t2-2:checked) label[for="nav-08-t2-2"]{color:var(--text)}
.nav-08__demo-wrap:has(#nav-08-t2-3:checked) .nav-08__underline{transform:translateX(200%)}
.nav-08__demo-wrap:has(#nav-08-t2-3:checked) label[for="nav-08-t2-3"]{color:var(--text)}
.nav-08__panels-2{
background:var(--surface);border:1px solid var(--border);
border-top:none;border-radius:0 0 14px 14px;
}
#nav-08-t2-1:checked ~ .nav-08__panels-2 .nav-08__panel:nth-child(1){display:block}
#nav-08-t2-2:checked ~ .nav-08__panels-2 .nav-08__panel:nth-child(2){display:block}
#nav-08-t2-3:checked ~ .nav-08__panels-2 .nav-08__panel:nth-child(3){display:block}
/* === Segmented control === */
.nav-08__seg{
/* 3-column grid so each segment label is the same width as the
thumb that highlights it. */
display:grid;grid-template-columns:repeat(3,1fr);gap:2px;
background:var(--border);border-radius:10px;padding:3px;position:relative;
}
.nav-08__seg label{
padding:8px 18px;border-radius:8px;font-size:.8125rem;font-weight:600;
color:var(--muted);cursor:pointer;transition:color .2s;
position:relative;z-index:1;user-select:none;text-align:center;
}
.nav-08__seg-thumb{
position:absolute;top:3px;bottom:3px;
background:#fff;border-radius:8px;
box-shadow:0 1px 4px rgba(0,0,0,.1);
/* width = one column = (track width minus 6px padding and 4px gaps) / 3 */
width:calc((100% - 10px) / 3);
left:3px;
transition:transform .25s cubic-bezier(.34,1.2,.64,1);
z-index:0;
}
/* :has() — same pattern as the other two tab styles. */
.nav-08__demo-wrap:has(#nav-08-s1:checked) .nav-08__seg-thumb{transform:translateX(0)}
.nav-08__demo-wrap:has(#nav-08-s1:checked) label[for="nav-08-s1"]{color:var(--text)}
.nav-08__demo-wrap:has(#nav-08-s2:checked) .nav-08__seg-thumb{transform:translateX(calc(100% + 2px))}
.nav-08__demo-wrap:has(#nav-08-s2:checked) label[for="nav-08-s2"]{color:var(--text)}
.nav-08__demo-wrap:has(#nav-08-s3:checked) .nav-08__seg-thumb{transform:translateX(calc(200% + 4px))}
.nav-08__demo-wrap:has(#nav-08-s3:checked) label[for="nav-08-s3"]{color:var(--text)}
@media(prefers-reduced-motion:reduce){
.nav-08__pill,.nav-08__underline,.nav-08__seg-thumb{transition:none}
}
```
### 09. CSS Breadcrumb Navigation
**Type:** Pure CSS
**Description:** A versatile breadcrumb navigation component with three style variants: classic arrow separators, rounded pill badges, and a slash-separated minimal style. Breadcrumbs improve site navigation hierarchy clarity and are critical for SEO structured data markup.
**HTML:**
```html
In Context — Documentation Layout
Breadcrumb Navigation
Breadcrumbs show users where they are in the site hierarchy and let them jump up to any ancestor page. Built entirely with CSS using flex, pseudo-elements for separators, and :hover transitions — no JavaScript needed.
```
**CSS:**
```css
.nav-09,.nav-09 *,.nav-09 *::before,.nav-09 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-09 ::selection{background:#0d9488;color:#fff}
.nav-09{
--bg:#f0fdfa;--surface:#fff;--border:#ccfbf1;
--text:#0f172a;--muted:#64748b;--link:#0d9488;--link-h:#0f766e;
font-family:'Source Sans 3',system-ui,sans-serif;
background:var(--bg);min-height:100vh;
display:flex;flex-direction:column;align-items:center;
padding:60px 24px;gap:48px;
}
.nav-09__section{width:100%;max-width:700px}
.nav-09__section-label{
font-size:.7rem;font-weight:700;color:#0d9488;
letter-spacing:.1em;text-transform:uppercase;margin-bottom:12px;
}
/* base breadcrumb */
.nav-09__crumb{
display:flex;align-items:center;flex-wrap:wrap;
gap:0;list-style:none;background:var(--surface);
border:1px solid var(--border);border-radius:10px;
padding:12px 18px;
}
.nav-09__crumb li{display:flex;align-items:center}
.nav-09__crumb li a{
color:var(--link);text-decoration:none;font-size:.9rem;font-weight:500;
padding:3px 6px;border-radius:5px;transition:background .15s,color .15s;
}
.nav-09__crumb li a:hover{background:#ccfbf1;color:var(--link-h)}
.nav-09__crumb li span{
font-size:.9rem;font-weight:600;color:var(--text);
padding:3px 6px;
}
/* separator with chevron */
.nav-09__sep{
width:16px;height:16px;margin:0 2px;opacity:.35;flex-shrink:0;
stroke:var(--text);fill:none;stroke-width:2;
}
/* separator with slash */
.nav-09__crumb--slash li:not(:last-child)::after{
content:'/';margin:0 8px;color:rgba(0,0,0,.2);font-size:.9rem;
}
.nav-09__crumb--slash .nav-09__sep{display:none}
/* separator with dot */
.nav-09__crumb--dot li:not(:last-child)::after{
content:'·';margin:0 8px;color:rgba(0,0,0,.25);font-size:1.2rem;line-height:1;
}
.nav-09__crumb--dot .nav-09__sep{display:none}
/* icons in crumbs */
.nav-09__crumb-icon{
width:14px;height:14px;margin-right:5px;stroke:currentColor;fill:none;stroke-width:2;flex-shrink:0;
}
/* filled crumb style */
.nav-09__crumb--filled{background:transparent;border:none;padding:0;gap:4px}
.nav-09__crumb--filled li a{
background:var(--surface);border:1px solid var(--border);
padding:6px 12px;border-radius:8px;
display:flex;align-items:center;
}
.nav-09__crumb--filled li a:hover{background:#ccfbf1;border-color:#5eead4}
.nav-09__crumb--filled li span{
background:var(--link);color:#fff;padding:6px 12px;border-radius:8px;border:1px solid transparent;
}
.nav-09__crumb--filled .nav-09__sep{stroke:var(--muted)}
/* compact / mobile crumb with back only */
.nav-09__back{
display:inline-flex;align-items:center;gap:6px;
color:var(--link);text-decoration:none;font-size:.9rem;font-weight:600;
padding:8px 14px;border-radius:8px;border:1px solid var(--border);
background:var(--surface);transition:background .15s,border-color .15s;
}
.nav-09__back:hover{background:#ccfbf1;border-color:#5eead4}
.nav-09__back svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2.5}
/* doc layout */
.nav-09__doc{
background:var(--surface);border:1px solid var(--border);
border-radius:14px;overflow:hidden;
}
.nav-09__doc-bar{
padding:16px 24px;border-bottom:1px solid var(--border);
display:flex;align-items:center;justify-content:space-between;
}
.nav-09__doc-body{padding:28px 24px}
.nav-09__doc-body h2{font-size:1.375rem;font-weight:700;color:var(--text);margin-bottom:10px}
.nav-09__doc-body p{font-size:.9375rem;color:var(--muted);line-height:1.7}
@media(prefers-reduced-motion:reduce){.nav-09__crumb li a,.nav-09__back{transition:none}}
```
### 10. CSS Navigation with Glassmorphism Effect
**Type:** Pure CSS
**Description:** A stunning glassmorphism navigation bar with frosted glass effect, floating gradient orbs in the background, and animated blob shapes. The glass panel uses `backdrop-filter: blur()` for the frosted effect, with subtle border and inner glow for depth.
**HTML:**
```html
Design through glass
The navbar and card use backdrop-filter: blur() for frosted glass. Animated radial-gradient orbs behind create depth. Pure CSS with no images.
Explore →
backdrop-filter blur
rgba transparency
CSS animations
```
**CSS:**
```css
.nav-10,.nav-10 *,.nav-10 *::before,.nav-10 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-10 ::selection{background:#6366f1;color:#fff}
.nav-10{
--text:#fff;--muted:rgba(255,255,255,.65);
--glass:rgba(255,255,255,.1);--glass-border:rgba(255,255,255,.18);
--accent:#a5b4fc;
font-family:'Nunito',system-ui,sans-serif;
min-height:100vh;
background:
radial-gradient(ellipse at 20% 50%, #3730a3 0%, transparent 50%),
radial-gradient(ellipse at 80% 20%, #7e22ce 0%, transparent 45%),
radial-gradient(ellipse at 60% 90%, #1d4ed8 0%, transparent 45%),
#0a0a1a;
position:relative;overflow:hidden;
}
/* animated bg orbs */
.nav-10__orb{
position:absolute;border-radius:50%;
filter:blur(60px);opacity:.45;
animation:nav-10-drift 12s ease-in-out infinite alternate;
}
.nav-10__orb:nth-child(1){width:400px;height:400px;background:#6366f1;top:-100px;left:-100px}
.nav-10__orb:nth-child(2){width:350px;height:350px;background:#7c3aed;bottom:-80px;right:10%;animation-delay:-4s;animation-duration:15s}
.nav-10__orb:nth-child(3){width:280px;height:280px;background:#2563eb;top:40%;left:60%;animation-delay:-8s;animation-duration:10s}
@keyframes nav-10-drift{0%{transform:translate(0,0)}100%{transform:translate(30px,20px)}}
/* glass navbar */
.nav-10__bar{
position:sticky;top:20px;z-index:100;
margin:20px 40px 0;
background:var(--glass);
backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);
border:1px solid var(--glass-border);
border-radius:20px;
padding:12px 20px;
display:flex;align-items:center;justify-content:space-between;
box-shadow:0 8px 32px rgba(0,0,0,.25);
}
.nav-10__logo{
font-size:1.2rem;font-weight:700;color:var(--text);
display:flex;align-items:center;gap:8px;letter-spacing:-.02em;
}
.nav-10__logo-glyph{
width:30px;height:30px;border-radius:8px;
background:rgba(255,255,255,.15);border:1px solid var(--glass-border);
display:grid;place-items:center;
}
.nav-10__logo-glyph svg{width:16px;height:16px;stroke:#fff;fill:none;stroke-width:2}
.nav-10__links{display:flex;align-items:center;gap:2px;list-style:none}
.nav-10__links a{
padding:8px 14px;color:var(--muted);text-decoration:none;
font-size:.875rem;font-weight:600;border-radius:12px;
transition:background .2s,color .2s;
}
.nav-10__links a:hover{background:var(--glass);color:var(--text)}
.nav-10__links a.nav-10__active{background:rgba(255,255,255,.12);color:var(--text)}
.nav-10__actions{display:flex;align-items:center;gap:8px}
.nav-10__btn-out{
padding:7px 16px;border-radius:12px;font-size:.875rem;font-weight:600;
color:var(--text);background:transparent;border:1px solid var(--glass-border);
text-decoration:none;transition:background .2s;cursor:pointer;
}
.nav-10__btn-out:hover{background:var(--glass)}
.nav-10__btn-in{
padding:7px 16px;border-radius:12px;font-size:.875rem;font-weight:600;
color:#fff;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.25);
text-decoration:none;transition:background .2s;cursor:pointer;
}
.nav-10__btn-in:hover{background:rgba(255,255,255,.22)}
/* floating glass card */
.nav-10__hero{
position:relative;z-index:10;
display:flex;flex-direction:column;align-items:center;
justify-content:center;padding:80px 24px;text-align:center;
min-height:80vh;
}
.nav-10__card{
background:rgba(255,255,255,.08);
backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);
border:1px solid rgba(255,255,255,.15);
border-radius:24px;padding:48px 52px;
max-width:580px;
box-shadow:0 20px 60px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.2);
}
.nav-10__card h1{
font-size:clamp(2rem,5vw,3.25rem);font-weight:700;
color:#fff;letter-spacing:-.04em;line-height:1.15;
margin-bottom:16px;
}
.nav-10__card h1 span{
background:linear-gradient(135deg,#a5b4fc,#c4b5fd);
-webkit-background-clip:text;-webkit-text-fill-color:transparent;
background-clip:text;
}
.nav-10__card p{font-size:1rem;color:rgba(255,255,255,.7);line-height:1.7;margin-bottom:28px}
.nav-10__card-btn{
display:inline-flex;align-items:center;gap:8px;
padding:12px 28px;border-radius:14px;
background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.22);
color:#fff;font-size:.9375rem;font-weight:700;text-decoration:none;
transition:background .2s,box-shadow .2s;
backdrop-filter:blur(8px);
}
.nav-10__card-btn:hover{background:rgba(255,255,255,.2);box-shadow:0 4px 20px rgba(0,0,0,.2)}
/* small glass pills */
.nav-10__stats{
display:flex;gap:12px;margin-top:28px;flex-wrap:wrap;justify-content:center;
}
.nav-10__stat-pill{
background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);
border-radius:100px;padding:8px 18px;
font-size:.8rem;font-weight:600;color:rgba(255,255,255,.7);
}
.nav-10__stat-pill b{color:#fff}
@media(max-width:600px){
.nav-10__bar{margin:12px 16px 0;border-radius:16px}
.nav-10__links,.nav-10__btn-out{display:none}
.nav-10__card{padding:32px 24px}
}
@media(prefers-reduced-motion:reduce){
.nav-10__orb{animation:none}
.nav-10__links a,.nav-10__btn-out,.nav-10__btn-in,.nav-10__card-btn{transition:none}
}
```
### 11. CSS Animated Navigation Icons with Labels
**Type:** Pure CSS
**Description:** A bottom navigation bar with animated SVG icons and floating labels, designed for mobile app interfaces. Each icon features a unique CSS keyframe animation on the active state — bounce, spin, wiggle, pulse, and morph — creating an expressive, app-like feel.
**HTML:**
```html
```
**CSS:**
```css
.nav-11,.nav-11 *,.nav-11 *::before,.nav-11 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-11 ::selection{background:#f43f5e;color:#fff}
#nav-11-t1,#nav-11-t2,#nav-11-t3,#nav-11-t4,#nav-11-t5{display:none}
.nav-11{
--bg:#0f0f13;--surface:#18181f;--surface2:#22222c;
--border:rgba(255,255,255,.07);--text:#f5f5fa;--muted:#71717a;
--accent:#f43f5e;--cyan:#06b6d4;--green:#10b981;--amber:#f59e0b;--purple:#8b5cf6;
font-family:'Poppins',system-ui,sans-serif;
background:var(--bg);min-height:100vh;
display:flex;flex-direction:column;
}
/* top bar */
.nav-11__topbar{
background:var(--surface);border-bottom:1px solid var(--border);
padding:0 40px;display:flex;align-items:center;justify-content:space-between;
height:60px;
}
.nav-11__logo{font-size:1.1rem;font-weight:600;color:var(--text)}
.nav-11__logo span{color:var(--accent)}
/* icon dock - bottom */
.nav-11__dock{
position:fixed;bottom:28px;left:50%;transform:translateX(-50%);
background:rgba(24,24,31,.85);
backdrop-filter:blur(16px);
border:1px solid var(--border);
border-radius:24px;
padding:10px 14px;
display:flex;align-items:center;gap:6px;
box-shadow:0 8px 32px rgba(0,0,0,.5);
z-index:100;
}
.nav-11__dock-item{
position:relative;
display:flex;flex-direction:column;align-items:center;
cursor:pointer;user-select:none;
}
.nav-11__dock-item label{
cursor:pointer;
display:flex;flex-direction:column;align-items:center;
gap:4px;
padding:10px 14px;border-radius:16px;
transition:background .2s;
}
.nav-11__dock-item label:hover{background:rgba(255,255,255,.05)}
/* icon container */
.nav-11__dock-icon{
width:28px;height:28px;position:relative;
display:flex;align-items:center;justify-content:center;
}
.nav-11__dock-icon svg{
width:22px;height:22px;stroke:var(--muted);fill:none;stroke-width:1.75;
transition:stroke .2s,transform .3s cubic-bezier(.34,1.56,.64,1);
}
.nav-11__dock-label{
font-size:.65rem;font-weight:600;color:var(--muted);letter-spacing:.04em;
transition:color .2s,transform .2s;
}
/* badge */
.nav-11__dock-badge{
position:absolute;top:-3px;right:-3px;
width:16px;height:16px;border-radius:50%;
background:var(--accent);color:#fff;
font-size:.55rem;font-weight:700;
display:flex;align-items:center;justify-content:center;
border:2px solid var(--surface);
opacity:0;transform:scale(0);
transition:opacity .2s,transform .25s cubic-bezier(.34,1.56,.64,1);
}
/* active indicator dot */
.nav-11__dock-dot{
position:absolute;bottom:-6px;left:50%;transform:translateX(-50%) scale(0);
width:4px;height:4px;border-radius:50%;
transition:transform .25s cubic-bezier(.34,1.56,.64,1);
}
/* checked states */
#nav-11-t1:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(1) label{background:rgba(244,63,94,.1)}
#nav-11-t1:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(1) .nav-11__dock-icon svg{stroke:var(--accent);transform:scale(1.15)}
#nav-11-t1:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(1) .nav-11__dock-label{color:var(--accent)}
#nav-11-t1:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(1) .nav-11__dock-dot{background:var(--accent);transform:translateX(-50%) scale(1)}
#nav-11-t2:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(2) label{background:rgba(6,182,212,.1)}
#nav-11-t2:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(2) .nav-11__dock-icon svg{stroke:var(--cyan);transform:scale(1.15)}
#nav-11-t2:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(2) .nav-11__dock-label{color:var(--cyan)}
#nav-11-t2:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(2) .nav-11__dock-dot{background:var(--cyan);transform:translateX(-50%) scale(1)}
#nav-11-t2:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(2) .nav-11__dock-badge{opacity:1;transform:scale(1)}
#nav-11-t3:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(3) label{background:rgba(16,185,129,.1)}
#nav-11-t3:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(3) .nav-11__dock-icon svg{stroke:var(--green);transform:scale(1.15) rotate(-10deg)}
#nav-11-t3:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(3) .nav-11__dock-label{color:var(--green)}
#nav-11-t3:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(3) .nav-11__dock-dot{background:var(--green);transform:translateX(-50%) scale(1)}
#nav-11-t4:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(4) label{background:rgba(245,158,11,.1)}
#nav-11-t4:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(4) .nav-11__dock-icon svg{stroke:var(--amber);transform:scale(1.15)}
#nav-11-t4:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(4) .nav-11__dock-label{color:var(--amber)}
#nav-11-t4:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(4) .nav-11__dock-dot{background:var(--amber);transform:translateX(-50%) scale(1)}
#nav-11-t5:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(5) label{background:rgba(139,92,246,.1)}
#nav-11-t5:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(5) .nav-11__dock-icon svg{stroke:var(--purple);transform:scale(1.15)}
#nav-11-t5:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(5) .nav-11__dock-label{color:var(--purple)}
#nav-11-t5:checked ~ .nav-11__dock .nav-11__dock-item:nth-child(5) .nav-11__dock-dot{background:var(--purple);transform:translateX(-50%) scale(1)}
/* content panels */
.nav-11__content{
flex:1;display:flex;flex-direction:column;
align-items:center;justify-content:center;
padding:60px 24px 140px;text-align:center;
}
.nav-11__page{display:none;flex-direction:column;align-items:center;gap:16px}
#nav-11-t1:checked ~ .nav-11__content .nav-11__page:nth-child(1){display:flex}
#nav-11-t2:checked ~ .nav-11__content .nav-11__page:nth-child(2){display:flex}
#nav-11-t3:checked ~ .nav-11__content .nav-11__page:nth-child(3){display:flex}
#nav-11-t4:checked ~ .nav-11__content .nav-11__page:nth-child(4){display:flex}
#nav-11-t5:checked ~ .nav-11__content .nav-11__page:nth-child(5){display:flex}
.nav-11__page-icon{
width:72px;height:72px;border-radius:22px;
display:grid;place-items:center;margin-bottom:8px;
}
.nav-11__page-icon svg{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.75}
.nav-11__page h2{font-size:1.75rem;font-weight:600;color:var(--text);letter-spacing:-.02em}
.nav-11__page p{font-size:.9375rem;color:var(--muted);max-width:380px;line-height:1.65}
@media(prefers-reduced-motion:reduce){
.nav-11__dock-icon svg,.nav-11__dock-label,.nav-11__dock-dot,.nav-11__dock-badge{transition:none}
}
```
### 12. CSS Multi-Level Accordion Navigation
**Type:** Pure CSS
**Description:** A hierarchical accordion sidebar navigation with smooth expand/collapse animations, nested sub-menus, and visual depth indicators. Built with CSS `max-height` transitions and hidden checkbox inputs — ideal for documentation sites and complex application navigation trees.
**HTML:**
```html
```
**CSS:**
```css
.nav-12,.nav-12 *,.nav-12 *::before,.nav-12 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-12 ::selection{background:#0891b2;color:#fff}
.nav-12{
--bg:#f8fafc;--sidebar:#fff;--border:#e2e8f0;
--text:#1e293b;--muted:#64748b;--accent:#0891b2;--accent-bg:#ecfeff;
font-family:'Rubik',system-ui,sans-serif;
background:var(--bg);min-height:100vh;
display:flex;
}
/* accordion inputs */
.nav-12 input[type="checkbox"]{display:none}
.nav-12__sidebar{
width:260px;min-height:100vh;background:var(--sidebar);
border-right:1px solid var(--border);flex-shrink:0;
display:flex;flex-direction:column;
}
.nav-12__sidebar-head{
padding:20px 16px;border-bottom:1px solid var(--border);
display:flex;align-items:center;gap:10px;
}
.nav-12__sidebar-logo{font-size:1rem;font-weight:600;color:var(--text)}
.nav-12__sidebar-logo span{color:var(--accent)}
.nav-12__sidebar-icon{
width:30px;height:30px;border-radius:7px;
background:var(--accent);display:grid;place-items:center;
}
.nav-12__sidebar-icon svg{width:16px;height:16px;stroke:#fff;fill:none;stroke-width:2}
/* search */
.nav-12__search{
padding:12px 12px;border-bottom:1px solid var(--border);
}
.nav-12__search-inner{
display:flex;align-items:center;gap:8px;
background:var(--bg);border:1px solid var(--border);
border-radius:8px;padding:8px 12px;
}
.nav-12__search-inner svg{width:15px;height:15px;stroke:var(--muted);fill:none;stroke-width:2;flex-shrink:0}
.nav-12__search-inner span{font-size:.8125rem;color:var(--muted)}
.nav-12__tree{padding:10px 8px;flex:1;overflow-y:auto}
.nav-12__tree > ul{list-style:none}
/* top-level item */
.nav-12__item{margin-bottom:2px}
.nav-12__item > label,
.nav-12__item > a{
display:flex;align-items:center;gap:8px;
padding:9px 8px;border-radius:8px;
font-size:.875rem;font-weight:500;color:var(--muted);
cursor:pointer;transition:background .15s,color .15s;
user-select:none;text-decoration:none;
}
.nav-12__item > label:hover,
.nav-12__item > a:hover{background:var(--bg);color:var(--text)}
.nav-12__item > label svg,
.nav-12__item > a svg{
width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;flex-shrink:0;opacity:.7;
}
.nav-12__item > a.nav-12__active{background:var(--accent-bg);color:var(--accent);font-weight:600}
.nav-12__item > a.nav-12__active svg{opacity:1}
/* chevron */
.nav-12__chevron{
margin-left:auto;width:14px;height:14px;
stroke:currentColor;fill:none;stroke-width:2;
transition:transform .22s ease;opacity:.5;
}
/* sub list */
.nav-12__sub{
max-height:0;overflow:hidden;
list-style:none;
padding-left:22px;
transition:max-height .3s ease;
}
.nav-12__sub a{
display:flex;align-items:center;gap:8px;
padding:7px 8px 7px 16px;border-radius:8px;
font-size:.8125rem;font-weight:500;color:var(--muted);
text-decoration:none;transition:background .15s,color .15s;
position:relative;
}
.nav-12__sub a::before{
content:'';position:absolute;left:2px;top:50%;
width:5px;height:5px;border-radius:50%;
background:var(--border);transform:translateY(-50%);
transition:background .15s;
}
.nav-12__sub a:hover{background:var(--bg);color:var(--text)}
.nav-12__sub a:hover::before{background:var(--muted)}
.nav-12__sub a.nav-12__active{color:var(--accent)}
.nav-12__sub a.nav-12__active::before{background:var(--accent)}
/* nested sub */
.nav-12__sub .nav-12__sub{padding-left:16px}
/* checked open states */
#nav-12-c1:checked ~ * .nav-12__sub--1{max-height:500px}
#nav-12-c1:checked ~ * .nav-12__label--1 .nav-12__chevron{transform:rotate(90deg)}
#nav-12-c2:checked ~ * .nav-12__sub--2{max-height:300px}
#nav-12-c2:checked ~ * .nav-12__label--2 .nav-12__chevron{transform:rotate(90deg)}
#nav-12-c3:checked ~ * .nav-12__sub--3{max-height:300px}
#nav-12-c3:checked ~ * .nav-12__label--3 .nav-12__chevron{transform:rotate(90deg)}
#nav-12-c4:checked ~ * .nav-12__sub--4{max-height:300px}
#nav-12-c4:checked ~ * .nav-12__label--4 .nav-12__chevron{transform:rotate(90deg)}
/* main content */
.nav-12__main{flex:1;padding:32px;overflow-y:auto}
.nav-12__main h2{font-size:1.25rem;font-weight:600;color:var(--text);margin-bottom:16px}
.nav-12__main p{color:var(--muted);line-height:1.7;margin-bottom:16px;font-size:.9375rem}
.nav-12__code-block{
background:#0f172a;border-radius:10px;padding:20px 22px;
font-family:'IBM Plex Mono',monospace;font-size:.8rem;
color:#94a3b8;line-height:1.7;
}
.nav-12__code-block .kw{color:#7dd3fc}
.nav-12__code-block .str{color:#86efac}
.nav-12__code-block .cmt{color:#475569}
@media(max-width:600px){
.nav-12__sidebar{width:220px}
}
@media(prefers-reduced-motion:reduce){
.nav-12__sub,.nav-12__chevron{transition:none}
}
```
### 13. CSS Navigation with Magnetic Hover Effect
**Type:** CSS + JS
**Description:** An interactive navigation bar where menu items subtly attract to the cursor using a magnetic effect. CSS custom properties `--dx` and `--dy` are updated on mouse move via JavaScript, and CSS `translate` applies the offset — creating a fluid, physics-inspired hover interaction.
**HTML:**
```html
Arp.
Let's talk →
Creative Direction & Design
Move the cursornear the nav
Navigation links react magnetically to the cursor — a CSS custom property trick where JS writes --dx/--dy values and CSS transform: translate() picks them up, keeping animation on the compositor.
```
**CSS:**
```css
.nav-13,.nav-13 *,.nav-13 *::before,.nav-13 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-13 ::selection{background:#fbbf24;color:#000}
.nav-13{
--bg:#070707;--text:#fafafa;--muted:#737373;
--accent:#fbbf24;--border:rgba(255,255,255,.08);
font-family:'Space Grotesk',system-ui,sans-serif;
background:var(--bg);min-height:100vh;overflow:hidden;
}
/* cursor glow */
.nav-13__glow{
position:fixed;width:400px;height:400px;border-radius:50%;
background:radial-gradient(circle,rgba(251,191,36,.06) 0%,transparent 70%);
pointer-events:none;transform:translate(-50%,-50%);z-index:0;
transition:transform .12s ease;will-change:transform;
}
/* bar */
.nav-13__bar{
position:fixed;top:0;left:0;right:0;z-index:100;
padding:28px 48px;
display:flex;align-items:center;justify-content:space-between;
}
.nav-13__logo{
font-size:1.4rem;font-weight:700;color:var(--text);
letter-spacing:-.04em;position:relative;z-index:1;
text-decoration:none;
}
.nav-13__logo span{color:var(--accent)}
.nav-13__links{display:flex;align-items:center;gap:8px;list-style:none;position:relative;z-index:1}
.nav-13__links li{position:relative}
.nav-13__links a{
display:block;padding:10px 16px;
color:var(--muted);text-decoration:none;
font-size:.9375rem;font-weight:500;
border-radius:10px;
transition:color .15s;
position:relative;z-index:1;
}
/* hover bg pill */
.nav-13__links a::before{
content:'';position:absolute;inset:0;
border-radius:10px;background:rgba(255,255,255,.05);
transform:scale(.8);opacity:0;
transition:transform .22s cubic-bezier(.34,1.56,.64,1),opacity .2s;
z-index:-1;
}
.nav-13__links a:hover{color:var(--text)}
.nav-13__links a:hover::before{transform:scale(1);opacity:1}
/* magnetic effect via CSS custom props set by JS */
.nav-13__links a{
--dx:0px;--dy:0px;
transform:translate(var(--dx),var(--dy));
transition:color .15s,transform .3s cubic-bezier(.34,1.56,.64,1);
}
/* CTA button */
.nav-13__cta{
position:relative;z-index:1;
padding:10px 22px;border-radius:10px;
background:var(--accent);color:#000;
text-decoration:none;font-weight:700;font-size:.875rem;
display:inline-flex;align-items:center;gap:6px;
transition:transform .3s cubic-bezier(.34,1.56,.64,1),box-shadow .2s;
--dx:0px;--dy:0px;
transform:translate(var(--dx),var(--dy));
}
.nav-13__cta:hover{box-shadow:0 0 30px rgba(251,191,36,.3)}
/* hero */
.nav-13__hero{
position:relative;z-index:1;
min-height:100vh;
display:flex;flex-direction:column;
align-items:center;justify-content:center;
text-align:center;padding:120px 24px 60px;
}
.nav-13__label{
font-size:.75rem;font-weight:700;letter-spacing:.12em;
text-transform:uppercase;color:var(--accent);
margin-bottom:24px;
}
.nav-13__hero h1{
font-size:clamp(3rem,9vw,7rem);font-weight:700;
color:var(--text);letter-spacing:-.05em;line-height:.95;
margin-bottom:24px;
}
.nav-13__hero h1 span{
color:transparent;
-webkit-text-stroke:1px rgba(255,255,255,.2);
}
.nav-13__hero p{font-size:1rem;color:var(--muted);max-width:420px;line-height:1.65}
/* magnetic ring decoration */
.nav-13__ring{
position:absolute;width:600px;height:600px;
border:1px solid rgba(255,255,255,.03);border-radius:50%;
pointer-events:none;z-index:0;
}
.nav-13__ring:nth-child(2){width:900px;height:900px;border-color:rgba(255,255,255,.02)}
@media(max-width:680px){.nav-13__links{display:none}}
@media(prefers-reduced-motion:reduce){
.nav-13__links a,.nav-13__cta{transition:none;transform:none!important}
.nav-13__glow{display:none}
}
```
**JS:**
```js
(function(){
var glow=document.getElementById('nav-13-glow');
var mags=document.querySelectorAll('.nav-13__mag');
var strength=6;
function onMove(e){
var x=e.clientX,y=e.clientY;
if(glow){glow.style.transform='translate(calc(-50% + '+x+'px),calc(-50% + '+y+'px)'}
mags.forEach(function(el){
var r=el.getBoundingClientRect();
var cx=r.left+r.width/2,cy=r.top+r.height/2;
var dx=x-cx,dy=y-cy;
var dist=Math.sqrt(dx*dx+dy*dy);
var radius=80;
if(dist
NEON
Access
▶ System online — hover nav links above
Navigate the
Cyber
Grid
Each link has a neon underline that extends outward on hover via left/right transitions with a box-shadow glow. The top border has a scanning gradient animation.
Underline Glow
CSS box-shadow on ::after
Scan Gradient
CSS @keyframes on border
Fill Button
translateX slide-in reveal
```
**CSS:**
```css
.nav-14,.nav-14 *,.nav-14 *::before,.nav-14 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-14 ::selection{background:#00ff9d;color:#000}
.nav-14{
--bg:#030307;--text:#e8e8f0;--muted:#52527a;
--cyan:#00e5ff;--green:#00ff9d;--magenta:#ff00ff;
--amber:#ffaa00;--pink:#ff2d7f;
font-family:'Rajdhani',system-ui,sans-serif;
background:var(--bg);min-height:100vh;
display:flex;flex-direction:column;
}
/* grid lines bg */
.nav-14::before{
content:'';position:fixed;inset:0;
background-image:
linear-gradient(rgba(0,229,255,.03) 1px,transparent 1px),
linear-gradient(90deg,rgba(0,229,255,.03) 1px,transparent 1px);
background-size:40px 40px;
pointer-events:none;z-index:0;
}
.nav-14__bar{
position:relative;z-index:100;
display:flex;align-items:center;justify-content:space-between;
padding:0 48px;height:68px;
border-bottom:1px solid rgba(0,229,255,.15);
background:rgba(3,3,7,.8);
backdrop-filter:blur(8px);
}
/* neon underline anim */
.nav-14__bar::after{
content:'';position:absolute;bottom:0;left:0;right:0;height:1px;
background:linear-gradient(90deg,transparent 0%,var(--cyan) 30%,var(--magenta) 70%,transparent 100%);
opacity:.5;
animation:nav-14-scanline 4s linear infinite;
}
@keyframes nav-14-scanline{
0%{background-position:-100% 0}
100%{background-position:200% 0}
}
.nav-14__logo{
font-size:1.6rem;font-weight:700;letter-spacing:.08em;
text-transform:uppercase;color:var(--cyan);
text-shadow:0 0 12px var(--cyan),0 0 30px rgba(0,229,255,.4);
display:flex;align-items:center;gap:2px;
}
.nav-14__logo span{color:var(--magenta);text-shadow:0 0 12px var(--magenta),0 0 30px rgba(255,0,255,.4)}
.nav-14__links{display:flex;align-items:center;gap:4px;list-style:none}
.nav-14__links a{
display:flex;align-items:center;gap:6px;
padding:8px 14px;color:var(--muted);
text-decoration:none;font-size:.875rem;font-weight:600;
letter-spacing:.08em;text-transform:uppercase;
border-radius:4px;position:relative;
transition:color .2s;
}
.nav-14__links a::after{
content:'';position:absolute;bottom:0;left:50%;right:50%;
height:1.5px;background:currentColor;
transition:left .25s ease,right .25s ease,box-shadow .25s;
}
.nav-14__links a:hover{color:var(--text)}
.nav-14__links a:hover::after{left:8px;right:8px;box-shadow:0 0 8px currentColor}
.nav-14__links a.nav-14__active{color:var(--cyan);text-shadow:0 0 8px rgba(0,229,255,.5)}
.nav-14__links a.nav-14__active::after{left:8px;right:8px;box-shadow:0 0 8px var(--cyan)}
.nav-14__links a svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;opacity:.7}
/* neon circle btn */
.nav-14__btn{
padding:8px 20px;border-radius:4px;
background:transparent;border:1px solid var(--cyan);color:var(--cyan);
font-size:.8125rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
text-decoration:none;
transition:background .2s,box-shadow .2s,color .2s;
position:relative;overflow:hidden;
}
.nav-14__btn::before{
content:'';position:absolute;inset:0;
background:var(--cyan);transform:translateX(-101%);
transition:transform .2s ease;z-index:-1;
}
.nav-14__btn:hover{color:#000;box-shadow:0 0 20px rgba(0,229,255,.4)}
.nav-14__btn:hover::before{transform:translateX(0)}
/* hero */
.nav-14__hero{
position:relative;z-index:1;flex:1;
display:flex;flex-direction:column;align-items:center;
justify-content:center;padding:80px 24px;text-align:center;
}
.nav-14__scantext{
font-size:.7rem;font-weight:600;letter-spacing:.2em;
text-transform:uppercase;color:var(--cyan);
margin-bottom:28px;
animation:nav-14-blink 2.5s step-end infinite;
}
@keyframes nav-14-blink{0%,100%{opacity:1}50%{opacity:.2}}
.nav-14__hero h1{
font-size:clamp(3rem,9vw,7rem);font-weight:700;
letter-spacing:.05em;text-transform:uppercase;
color:transparent;
-webkit-text-stroke:1px rgba(255,255,255,.2);
position:relative;margin-bottom:8px;line-height:.95;
}
.nav-14__hero h1 span{
display:block;
color:var(--text);-webkit-text-stroke:0;
text-shadow:0 0 40px rgba(0,229,255,.15);
}
.nav-14__hero h1 span.nav-14__neon-c{color:var(--cyan);text-shadow:0 0 20px var(--cyan),0 0 50px rgba(0,229,255,.3);-webkit-text-stroke:0}
.nav-14__hero h1 span.nav-14__neon-m{color:var(--magenta);text-shadow:0 0 20px var(--magenta),0 0 50px rgba(255,0,255,.3);-webkit-text-stroke:0}
.nav-14__hero p{font-size:1rem;color:var(--muted);max-width:480px;line-height:1.65;margin-top:28px}
/* floating nav cards */
.nav-14__cards{
display:flex;flex-wrap:wrap;gap:14px;margin-top:48px;justify-content:center;
}
.nav-14__card{
background:rgba(255,255,255,.025);border-radius:8px;padding:18px 24px;
display:flex;align-items:center;gap:12px;
transition:border-color .2s,box-shadow .2s;
}
.nav-14__card:nth-child(1){border:1px solid rgba(0,229,255,.25)}
.nav-14__card:nth-child(1):hover{border-color:var(--cyan);box-shadow:0 0 20px rgba(0,229,255,.15)}
.nav-14__card:nth-child(2){border:1px solid rgba(255,0,255,.2)}
.nav-14__card:nth-child(2):hover{border-color:var(--magenta);box-shadow:0 0 20px rgba(255,0,255,.12)}
.nav-14__card:nth-child(3){border:1px solid rgba(0,255,157,.2)}
.nav-14__card:nth-child(3):hover{border-color:var(--green);box-shadow:0 0 20px rgba(0,255,157,.12)}
.nav-14__card svg{width:20px;height:20px;flex-shrink:0;stroke:currentColor;fill:none;stroke-width:1.75}
.nav-14__card:nth-child(1) svg{color:var(--cyan)}
.nav-14__card:nth-child(2) svg{color:var(--magenta)}
.nav-14__card:nth-child(3) svg{color:var(--green)}
.nav-14__card p{font-size:.8rem;font-weight:600;letter-spacing:.04em;color:var(--text);text-transform:uppercase;margin:0}
.nav-14__card span{font-size:.7rem;color:var(--muted);display:block;margin-top:2px;text-transform:none;letter-spacing:0}
@media(max-width:680px){.nav-14__links{display:none}}
@media(prefers-reduced-motion:reduce){
.nav-14__bar::after,.nav-14__scantext{animation:none}
.nav-14__links a::after,.nav-14__btn::before,.nav-14__links a,.nav-14__btn{transition:none}
}
```
### 15. CSS Morphing Navigation Pill Indicator
**Type:** Pure CSS
**Description:** An advanced navigation component featuring a morphing pill indicator that smoothly slides and stretches between tab positions using only CSS. The pill uses a squash-and-stretch scale animation during transition, creating a fluid, organic movement that feels alive.
**HTML:**
```html
```
**CSS:**
```css
.nav-15,.nav-15 *,.nav-15 *::before,.nav-15 *::after{box-sizing:border-box;margin:0;padding:0}
.nav-15 ::selection{background:#6366f1;color:#fff}
.nav-15{
--bg:#030712;--surface:#0d1117;--surface2:#161b26;
--border:rgba(255,255,255,.07);--text:#f9fafb;--muted:#6b7280;
--p1:#6366f1;--p2:#8b5cf6;--p3:#ec4899;--p4:#f59e0b;--p5:#10b981;
font-family:'Inter',system-ui,sans-serif;
background:var(--bg);min-height:100vh;
}
/* radio state */
.nav-15 input[type=radio]{display:none}
/* top centered floating pill nav */
.nav-15__wrap{
display:flex;flex-direction:column;align-items:center;
padding:40px 24px;
}
.nav-15__nav-shell{
background:rgba(255,255,255,.04);
border:1px solid var(--border);
border-radius:100px;
padding:5px;
/* 5-column grid so each tab gets 1/5 of the shell width regardless
of label-text length. The pill spans one column exactly. */
display:grid;grid-template-columns:repeat(5,1fr);
position:relative;
gap:2px;
}
/* sliding pill — width = one column, offset = N columns + gap */
.nav-15__pill{
position:absolute;top:5px;bottom:5px;
border-radius:100px;
transform-origin:center;
/* Width = one column = (shell minus 10px padding minus 8px of gaps) / 5 */
width:calc((100% - 18px) / 5);
left:5px;
transition:transform .45s cubic-bezier(.34,1.4,.64,1),background .3s ease;
z-index:0;
}
/* Squash-stretch morph — separated from the translateX motion so they
compose cleanly. Earlier attempt had the morph keyframe override
the pill's static translateX, causing the pill to "teleport back
to position 1" for the duration of the animation before snapping
to the correct tab.
The clean fix: keep transform on the OUTER pill for translateX
(driven by transition for smooth slide), and run the scale morph
on an INNER ::before pseudo-element that fills the pill. The two
transforms compose without conflict.
Each :checked rule assigns a unique animation name (1..5) to force
the keyframe to re-trigger on every tab change. */
.nav-15__pill::before{
content:"";position:absolute;inset:0;
border-radius:inherit;background:inherit;
/* Inherit the pill's background so the morph looks like the pill
itself is squashing/stretching. The outer pill keeps box-shadow
so the glow doesn't squish along with the morph. */
}
@keyframes nav-15-morph-1{0%,100%{transform:scaleY(1) scaleX(1)}50%{transform:scaleY(.7) scaleX(1.1)}}
@keyframes nav-15-morph-2{0%,100%{transform:scaleY(1) scaleX(1)}50%{transform:scaleY(.7) scaleX(1.1)}}
@keyframes nav-15-morph-3{0%,100%{transform:scaleY(1) scaleX(1)}50%{transform:scaleY(.7) scaleX(1.1)}}
@keyframes nav-15-morph-4{0%,100%{transform:scaleY(1) scaleX(1)}50%{transform:scaleY(.7) scaleX(1.1)}}
@keyframes nav-15-morph-5{0%,100%{transform:scaleY(1) scaleX(1)}50%{transform:scaleY(.7) scaleX(1.1)}}
/* Pill positioning — translateX on the OUTER pill (smooth slide
via transition). Morph animation runs on the ::before pseudo
inside the pill (composes without fighting the slide). */
#nav-15-1:checked ~ .nav-15__wrap .nav-15__nav-shell .nav-15__pill{transform:translateX(0);background:var(--p1);box-shadow:0 0 20px rgba(99,102,241,.4)}
#nav-15-1:checked ~ .nav-15__wrap .nav-15__nav-shell .nav-15__pill::before{animation:nav-15-morph-1 .45s ease-out}
#nav-15-2:checked ~ .nav-15__wrap .nav-15__nav-shell .nav-15__pill{transform:translateX(calc(100% + 2px));background:var(--p2);box-shadow:0 0 20px rgba(139,92,246,.4)}
#nav-15-2:checked ~ .nav-15__wrap .nav-15__nav-shell .nav-15__pill::before{animation:nav-15-morph-2 .45s ease-out}
#nav-15-3:checked ~ .nav-15__wrap .nav-15__nav-shell .nav-15__pill{transform:translateX(calc(200% + 4px));background:var(--p3);box-shadow:0 0 20px rgba(236,72,153,.4)}
#nav-15-3:checked ~ .nav-15__wrap .nav-15__nav-shell .nav-15__pill::before{animation:nav-15-morph-3 .45s ease-out}
#nav-15-4:checked ~ .nav-15__wrap .nav-15__nav-shell .nav-15__pill{transform:translateX(calc(300% + 6px));background:var(--p4);box-shadow:0 0 20px rgba(245,158,11,.35)}
#nav-15-4:checked ~ .nav-15__wrap .nav-15__nav-shell .nav-15__pill::before{animation:nav-15-morph-4 .45s ease-out}
#nav-15-5:checked ~ .nav-15__wrap .nav-15__nav-shell .nav-15__pill{transform:translateX(calc(400% + 8px));background:var(--p5);box-shadow:0 0 20px rgba(16,185,129,.35)}
#nav-15-5:checked ~ .nav-15__wrap .nav-15__nav-shell .nav-15__pill::before{animation:nav-15-morph-5 .45s ease-out}
/* labels */
.nav-15__nav-shell label{
position:relative;z-index:1;
display:flex;align-items:center;justify-content:center;gap:6px;
padding:9px 16px;border-radius:100px;
font-size:.8125rem;font-weight:600;color:var(--muted);
cursor:pointer;user-select:none;
transition:color .25s;white-space:nowrap;
}
.nav-15__nav-shell label svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;flex-shrink:0}
#nav-15-1:checked ~ .nav-15__wrap .nav-15__nav-shell label[for=nav-15-1]{color:#fff}
#nav-15-2:checked ~ .nav-15__wrap .nav-15__nav-shell label[for=nav-15-2]{color:#fff}
#nav-15-3:checked ~ .nav-15__wrap .nav-15__nav-shell label[for=nav-15-3]{color:#fff}
#nav-15-4:checked ~ .nav-15__wrap .nav-15__nav-shell label[for=nav-15-4]{color:#fff}
#nav-15-5:checked ~ .nav-15__wrap .nav-15__nav-shell label[for=nav-15-5]{color:#fff}
/* content area */
.nav-15__content{
width:100%;max-width:780px;margin-top:40px;
}
.nav-15__panel{
display:none;
background:var(--surface);border:1px solid var(--border);
border-radius:20px;overflow:hidden;
animation:nav-15-fade .25s ease forwards;
}
@keyframes nav-15-fade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
#nav-15-1:checked ~ .nav-15__wrap .nav-15__content .nav-15__panel:nth-child(1){display:block}
#nav-15-2:checked ~ .nav-15__wrap .nav-15__content .nav-15__panel:nth-child(2){display:block}
#nav-15-3:checked ~ .nav-15__wrap .nav-15__content .nav-15__panel:nth-child(3){display:block}
#nav-15-4:checked ~ .nav-15__wrap .nav-15__content .nav-15__panel:nth-child(4){display:block}
#nav-15-5:checked ~ .nav-15__wrap .nav-15__content .nav-15__panel:nth-child(5){display:block}
.nav-15__panel-hero{
padding:36px 36px 0;
display:flex;align-items:flex-start;gap:20px;
}
.nav-15__panel-icon{
width:52px;height:52px;border-radius:14px;flex-shrink:0;
display:grid;place-items:center;
}
.nav-15__panel-icon svg{width:24px;height:24px;stroke:#fff;fill:none;stroke-width:1.75}
.nav-15__panel-hero-text h2{
font-size:1.25rem;font-weight:700;color:var(--text);
letter-spacing:-.02em;margin-bottom:6px;
}
.nav-15__panel-hero-text p{font-size:.9rem;color:var(--muted);line-height:1.65}
.nav-15__panel-body{padding:28px 36px 36px}
.nav-15__metric-row{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:20px}
.nav-15__metric{
background:var(--surface2);border-radius:12px;padding:16px 18px;
}
.nav-15__metric-val{font-size:1.5rem;font-weight:700;color:var(--text);letter-spacing:-.03em}
.nav-15__metric-label{font-size:.75rem;color:var(--muted);margin-top:3px}
.nav-15__progress-row{display:flex;flex-direction:column;gap:10px}
.nav-15__prog-item{display:flex;flex-direction:column;gap:5px}
.nav-15__prog-label{display:flex;justify-content:space-between;font-size:.8rem;color:var(--muted);font-weight:500}
.nav-15__prog-track{height:6px;background:rgba(255,255,255,.06);border-radius:3px;overflow:hidden}
.nav-15__prog-fill{height:100%;border-radius:3px}
@media(max-width:600px){
.nav-15__metric-row{grid-template-columns:1fr 1fr}
.nav-15__nav-shell label span{display:none}
}
@media(prefers-reduced-motion:reduce){
.nav-15__pill{transition:none}
.nav-15__panel{animation:none}
}
```
---
## 12 CSS Neon Designs
URL: https://codefronts.com/design-styles/css-neon/
Description: 12 hand-coded CSS neon designs covering the full vocabulary of the aesthetic — glowing buttons, retro signage, rotating-border pricing cards, an 80s synthwave scene, futuristic controls, three nav patterns, broken/flickering signs, a cyberpunk palette token showcase, a Tailwind theme.extend neon config, drop-shadow SVG icon glows, an infinite seamless 3D perspective grid, and five rainbow text cycling techniques. Pure CSS plus scoped JS — no images, no SVG filters, every glow is layered shadow.
Demo count: 12
### 01. Neon Buttons
**Type:** Pure CSS
**Description:** Six glowing neon button treatments on one dark grid backdrop — border-trace cyan, pulse-glow pink, chamfered violet, ghost amber, double-border teal, and a red fill-sweep CTA. A cyan border-trace that draws itself on hover (SVG stroke-dasharray), a pink pulse-glow with an idle breathing animation, a solid violet with chamfered clip-path corners and a gradient sweep, an amber ghost with a vertical scanline that wipes top-to-bottom on hover, a teal double-bordered button using outline-offset for the secondary ring, and a red fill-sweep that slides a colored fill in from the left. Each button pairs with a phosphor-style icon. Rajdhani + Orbitron. Best for cyberpunk landing pages, gaming UIs, music/club sites, retro-futuristic SaaS heros.
**HTML:**
```html
ACTIVATE
IGNITE
EXECUTE
CONNECT
SECURE
LAUNCH
```
**CSS:**
```css
/* ─── 01 Neon Buttons — six glow treatments on dark grid ───────── */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;700&family=Orbitron:wght@400;700;900&display=swap');
.nn-btn {
position: relative;
width: 100%;
min-height: 560px;
background: #04040f;
font-family: 'Rajdhani', sans-serif;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nn-btn *,
.nn-btn *::before,
.nn-btn *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Dark grid backdrop — was body::before; scoped to wrapper. */
.nn-btn::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(0,255,200,0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(0,255,200,0.03) 1px, transparent 1px);
background-size: 40px 40px;
pointer-events: none;
z-index: 0;
}
.nn-btn .stage {
position: relative;
z-index: 1;
display: grid;
grid-template-columns: repeat(2, auto);
gap: 36px 48px;
align-items: center;
justify-items: center;
padding: 24px;
}
.nn-btn .btn {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
padding: 16px 44px;
font-family: 'Orbitron', monospace;
font-size: 13px;
font-weight: 700;
letter-spacing: 0.18em;
text-transform: uppercase;
text-decoration: none;
cursor: pointer;
border: none;
outline: none;
overflow: hidden;
transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.nn-btn .btn-icon {
width: 16px;
height: 16px;
fill: currentColor;
flex-shrink: 0;
}
/* 1 — BORDER TRACE CYAN */
.nn-btn .btn-trace { color: #00ffe5; background: transparent; }
.nn-btn .btn-trace::before {
content: '';
position: absolute;
inset: 0;
border: 1.5px solid rgba(0,255,229,0.25);
}
.nn-btn .btn-trace svg.tracer {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
overflow: visible;
pointer-events: none;
}
.nn-btn .btn-trace svg.tracer rect {
fill: none;
stroke: #00ffe5;
stroke-width: 2;
stroke-dasharray: 0 9999;
transition: stroke-dasharray 0s;
filter: drop-shadow(0 0 6px #00ffe5) drop-shadow(0 0 14px #00ffe5);
}
.nn-btn .btn-trace:hover svg.tracer rect {
stroke-dasharray: 9999 0;
transition: stroke-dasharray 0.65s ease;
}
.nn-btn .btn-trace:hover {
color: #fff;
text-shadow: 0 0 12px #00ffe5, 0 0 28px #00ffe5;
background: rgba(0,255,229,0.05);
box-shadow: inset 0 0 20px rgba(0,255,229,0.07);
}
/* 2 — PULSE GLOW PINK */
.nn-btn .btn-pulse {
color: #ff2d78;
background: rgba(255,45,120,0.08);
border: 1.5px solid #ff2d78;
text-shadow: 0 0 8px rgba(255,45,120,0.8);
box-shadow:
0 0 12px rgba(255,45,120,0.4),
inset 0 0 12px rgba(255,45,120,0.08);
animation: nn-btn-pulse 2.2s ease-in-out infinite;
}
@keyframes nn-btn-pulse {
0%, 100% { box-shadow: 0 0 10px rgba(255,45,120,0.35), 0 0 30px rgba(255,45,120,0.15), inset 0 0 12px rgba(255,45,120,0.07); }
50% { box-shadow: 0 0 22px rgba(255,45,120,0.7), 0 0 55px rgba(255,45,120,0.3), inset 0 0 20px rgba(255,45,120,0.12); }
}
.nn-btn .btn-pulse:hover {
background: rgba(255,45,120,0.18);
color: #fff;
text-shadow: 0 0 6px #fff, 0 0 18px #ff2d78;
box-shadow:
0 0 28px rgba(255,45,120,0.8),
0 0 70px rgba(255,45,120,0.4),
inset 0 0 28px rgba(255,45,120,0.15);
animation: none;
transform: scale(1.04);
}
/* 3 — SOLID FILLED VIOLET */
.nn-btn .btn-solid {
color: #0d0020;
background: linear-gradient(135deg, #bf5fff, #7b00ff);
box-shadow:
0 0 20px rgba(127,0,255,0.6),
0 0 50px rgba(127,0,255,0.25),
inset 0 1px 0 rgba(255,255,255,0.15);
clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
}
.nn-btn .btn-solid::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 60%);
pointer-events: none;
}
.nn-btn .btn-solid:hover {
background: linear-gradient(135deg, #d47fff, #9b2fff);
box-shadow:
0 0 35px rgba(127,0,255,0.9),
0 0 90px rgba(127,0,255,0.45),
inset 0 1px 0 rgba(255,255,255,0.2);
transform: translateY(-2px);
}
/* 4 — GHOST + SCANLINE AMBER */
.nn-btn .btn-ghost {
color: #ffb700;
background: transparent;
border: 2px solid #ffb700;
text-shadow: 0 0 10px rgba(255,183,0,0.9);
box-shadow: 0 0 16px rgba(255,183,0,0.3), inset 0 0 16px rgba(255,183,0,0.05);
overflow: hidden;
}
.nn-btn .btn-ghost::before {
content: '';
position: absolute;
top: -100%;
left: 0;
width: 100%;
height: 40%;
background: linear-gradient(180deg, transparent, rgba(255,183,0,0.18), transparent);
transform: skewY(-4deg);
transition: top 0s;
}
.nn-btn .btn-ghost:hover::before {
top: 200%;
transition: top 0.5s ease;
}
.nn-btn .btn-ghost:hover {
background: rgba(255,183,0,0.1);
box-shadow:
0 0 28px rgba(255,183,0,0.65),
0 0 60px rgba(255,183,0,0.3),
inset 0 0 22px rgba(255,183,0,0.12);
color: #fff;
text-shadow: 0 0 6px #ffb700, 0 0 20px #ffb700;
}
/* 5 — DOUBLE BORDER TEAL */
.nn-btn .btn-double {
color: #00ffcc;
background: transparent;
padding: 14px 40px;
outline: 1px solid rgba(0,255,204,0.2);
outline-offset: 5px;
border: 1.5px solid #00ffcc;
text-shadow: 0 0 8px #00ffcc;
box-shadow: 0 0 14px rgba(0,255,204,0.3), inset 0 0 14px rgba(0,255,204,0.05);
transition: all 0.3s ease;
}
.nn-btn .btn-double:hover {
outline-offset: 2px;
outline-color: rgba(0,255,204,0.7);
box-shadow:
0 0 28px rgba(0,255,204,0.6),
0 0 70px rgba(0,255,204,0.25),
inset 0 0 24px rgba(0,255,204,0.1);
color: #fff;
text-shadow: 0 0 4px #fff, 0 0 16px #00ffcc;
background: rgba(0,255,204,0.07);
}
/* 6 — FILL SWEEP RED */
.nn-btn .btn-sweep {
color: #ff3c3c;
background: transparent;
border: 1.5px solid #ff3c3c;
text-shadow: 0 0 8px rgba(255,60,60,0.8);
overflow: hidden;
z-index: 0;
}
.nn-btn .btn-sweep::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(90deg, #ff3c3c, #ff0066);
transform: translateX(-105%);
transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
z-index: -1;
}
.nn-btn .btn-sweep:hover::before { transform: translateX(0); }
.nn-btn .btn-sweep:hover {
color: #000;
text-shadow: none;
border-color: transparent;
box-shadow: 0 0 30px rgba(255,60,60,0.7), 0 0 70px rgba(255,60,60,0.3);
letter-spacing: 0.22em;
}
@media (max-width: 640px) {
.nn-btn .stage { grid-template-columns: 1fr; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
.nn-btn .btn,
.nn-btn .btn-pulse,
.nn-btn .btn-ghost::before,
.nn-btn .btn-sweep::before,
.nn-btn .btn-trace svg.tracer rect { animation: none !important; transition: none !important; }
}
```
### 02. Neon Typography
**Type:** Pure CSS
**Description:** Five neon text treatments arranged like a row of vintage bar signs — a classic cyan tube reading "OPEN 24/7", a flickering pink "NOVA CLUB" with two letters wired as dead bulbs that intermittently glow back to half-life, a chroma-shifting "CYBERPUNK" outline that cycles through pink/yellow/cyan/blue gradient stops, a breathing violet "PHANTOM" in Monoton, and a warm amber "LIVE MUSIC" framed by pulsing star glyphs. Each effect uses layered text-shadow stacks (6 layers deep on the cyan tube) to fake the gaslight-style outer glow that single-shadow approximations always miss. CRT scanlines overlay the entire stage. Boogaloo + Bebas Neue + Special Elite + Monoton. Best for music venues, bar/restaurant sites, retro-gaming, vaporwave/cyberpunk hero sections.
**HTML:**
```html
OPEN 24/7
N O V A
C L U B
CYBERPUNK
PHANTOM
LIVE MUSIC
```
**CSS:**
```css
/* ─── 02 Neon Typography — retro signage / vintage bar signs ───── */
@import url('https://fonts.googleapis.com/css2?family=Boogaloo&family=Bebas+Neue&family=Special+Elite&family=Monoton&display=swap');
.nn-typ {
position: relative;
width: 100%;
min-height: 700px;
background: #060614;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nn-typ *,
.nn-typ *::before,
.nn-typ *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Scanlines overlay — was body::after at z-index 100; scoped to
wrapper at z-index 5 so it covers the demo without escaping. */
.nn-typ::after {
content: '';
position: absolute;
inset: 0;
background: repeating-linear-gradient(
0deg,
transparent,
transparent 3px,
rgba(0,0,0,0.08) 3px,
rgba(0,0,0,0.08) 4px
);
pointer-events: none;
z-index: 5;
}
.nn-typ .stage {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
gap: 36px;
align-items: center;
padding: 50px 60px;
}
/* 1 — CLASSIC CYAN NEON SIGN */
.nn-typ .neon-classic {
font-family: 'Boogaloo', cursive;
font-size: 72px;
color: #fff;
text-shadow:
0 0 4px #fff,
0 0 10px #fff,
0 0 18px #fff,
0 0 30px #00eeff,
0 0 55px #00eeff,
0 0 80px #00eeff,
0 0 120px #00eeff;
letter-spacing: 0.05em;
}
/* 2 — FLICKERING BROKEN SIGN */
.nn-typ .neon-flicker {
font-family: 'Bebas Neue', sans-serif;
font-size: 64px;
letter-spacing: 0.12em;
color: #ff2d78;
text-shadow:
0 0 5px #ff2d78,
0 0 15px #ff2d78,
0 0 30px #ff2d78,
0 0 60px #ff2d78,
0 0 100px #ff2d78;
}
.nn-typ .neon-flicker span {
display: inline-block;
animation: nn-typ-flicker1 var(--d, 3s) var(--del, 0s) infinite;
}
.nn-typ .neon-flicker .dead {
color: rgba(255,45,120,0.18);
text-shadow: none;
animation: nn-typ-deadbulb var(--d, 4s) var(--del, 0s) infinite;
}
@keyframes nn-typ-flicker1 {
0%, 18%, 22%, 25%, 53%, 57%, 100% {
text-shadow:
0 0 4px #ff2d78,
0 0 12px #ff2d78,
0 0 26px #ff2d78,
0 0 52px #ff2d78,
0 0 90px #ff2d78;
color: #ff2d78;
}
20%, 24%, 55% {
text-shadow: none;
color: rgba(255,45,120,0.15);
}
}
@keyframes nn-typ-deadbulb {
0%, 45%, 55%, 100% {
color: rgba(255,45,120,0.18);
text-shadow: none;
}
48%, 52% {
color: rgba(255,45,120,0.55);
text-shadow: 0 0 8px rgba(255,45,120,0.4);
}
}
/* 3 — MULTICOLOR STROKE OUTLINE */
.nn-typ .neon-outline {
font-family: 'Bebas Neue', sans-serif;
font-size: 80px;
letter-spacing: 0.1em;
background: linear-gradient(135deg, #ff00cc 0%, #ffcc00 35%, #00ffcc 65%, #00aaff 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
filter: drop-shadow(0 0 8px rgba(255,0,204,0.6)) drop-shadow(0 0 20px rgba(0,255,204,0.4));
animation: nn-typ-chroma 5s ease-in-out infinite alternate;
}
@keyframes nn-typ-chroma {
0% { filter: drop-shadow(0 0 8px rgba(255,0,204,0.7)) drop-shadow(0 0 22px rgba(0,255,204,0.35)); }
50% { filter: drop-shadow(0 0 16px rgba(255,204,0,0.8)) drop-shadow(0 0 36px rgba(0,170,255,0.4)); }
100% { filter: drop-shadow(0 0 8px rgba(0,255,204,0.7)) drop-shadow(0 0 22px rgba(255,0,204,0.35)); }
}
/* 4 — SINGLE WORD INTENSE VIOLET */
.nn-typ .neon-intense {
font-family: 'Monoton', cursive;
font-size: 52px;
color: #e040fb;
letter-spacing: 0.25em;
text-shadow:
0 0 2px #fff,
0 0 6px #e040fb,
0 0 16px #e040fb,
0 0 32px #e040fb,
0 0 55px #7b00d4,
0 0 90px #7b00d4;
animation: nn-typ-breathe 3s ease-in-out infinite;
}
@keyframes nn-typ-breathe {
0%, 100% {
text-shadow:
0 0 2px #fff,
0 0 6px #e040fb,
0 0 16px #e040fb,
0 0 32px #e040fb,
0 0 55px #7b00d4,
0 0 90px #7b00d4;
}
50% {
text-shadow:
0 0 2px #fff,
0 0 10px #e040fb,
0 0 28px #e040fb,
0 0 52px #e040fb,
0 0 80px #b040fb,
0 0 140px #7b00d4;
}
}
/* 5 — RETRO SIGN FRAME */
.nn-typ .neon-frame {
position: relative;
padding: 18px 40px;
border: 2px solid rgba(255, 220, 0, 0.3);
box-shadow:
0 0 14px rgba(255,220,0,0.25),
inset 0 0 14px rgba(255,220,0,0.05);
}
.nn-typ .neon-frame::before,
.nn-typ .neon-frame::after {
content: '✦';
position: absolute;
top: 50%;
transform: translateY(-50%);
font-size: 18px;
color: #ffdc00;
text-shadow: 0 0 10px #ffdc00, 0 0 25px #ffdc00;
animation: nn-typ-starpulse 2s ease-in-out infinite;
}
.nn-typ .neon-frame::before { left: 14px; }
.nn-typ .neon-frame::after { right: 14px; }
@keyframes nn-typ-starpulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.35; }
}
.nn-typ .neon-frame-text {
font-family: 'Special Elite', cursive;
font-size: 38px;
letter-spacing: 0.14em;
color: #ffdc00;
text-shadow:
0 0 4px #ffdc00,
0 0 12px #ffdc00,
0 0 26px rgba(255,180,0,0.9),
0 0 50px rgba(255,140,0,0.6);
animation: nn-typ-warmglow 2.5s ease-in-out infinite;
}
@keyframes nn-typ-warmglow {
0%, 100% {
text-shadow:
0 0 4px #ffdc00,
0 0 12px #ffdc00,
0 0 26px rgba(255,180,0,0.9),
0 0 50px rgba(255,140,0,0.6);
}
50% {
text-shadow:
0 0 6px #fff,
0 0 16px #ffdc00,
0 0 38px rgba(255,180,0,1),
0 0 72px rgba(255,140,0,0.7);
}
}
@media (max-width: 640px) {
.nn-typ .neon-classic { font-size: 48px; }
.nn-typ .neon-flicker { font-size: 42px; }
.nn-typ .neon-outline { font-size: 56px; }
.nn-typ .neon-intense { font-size: 36px; }
.nn-typ .neon-frame-text { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
.nn-typ .neon-flicker span,
.nn-typ .neon-outline,
.nn-typ .neon-intense,
.nn-typ .neon-frame::before,
.nn-typ .neon-frame::after,
.nn-typ .neon-frame-text { animation: none !important; }
}
```
### 03. Neon Pricing Cards
**Type:** Pure CSS
**Description:** A three-tier pricing layout — Starter (cyan), Pro (pink, featured with "Most Popular" badge), Enterprise (violet) — each ringed by a conic-gradient border that rotates continuously. The trick is CSS @property: registering --a as a typed
means it can be interpolated, so a simple to-360deg keyframe spins the gradient smoothly. Pseudo-elements stack the rotating gradient under a solid card background so only the 1.5px ring edge shows. Hover lifts the card and intensifies the ring glow. Feature lists use arrow bullets colored to the tier. CTAs vary by tier: outlined cyan, solid pink gradient, outlined violet. Space Grotesk + Exo 2. Best for SaaS pricing pages, hosting/devtool tiers, cyberpunk product comparison.
**HTML:**
```html
Starter
5 active projects
10 GB cloud storage
API access (1k req/day)
Community support
Get Started
Most Popular
Pro
Unlimited projects
100 GB cloud storage
API access (unlimited)
Priority support 24/7
Custom domains
Upgrade Now
Enterprise
Unlimited everything
1 TB cloud storage
Dedicated servers
SLA 99.99% uptime
White-label option
Contact Sales
```
**CSS:**
```css
/* ─── 03 Neon Pricing Cards — rotating conic-gradient border ───── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;600;700&family=Exo+2:wght@300;700;900&display=swap');
/* @property is a document-level registration; can't be scoped to a
wrapper. Declared once here and referenced from .nn-crd. */
@property --nn-crd-a {
syntax: '';
inherits: false;
initial-value: 0deg;
}
.nn-crd {
position: relative;
width: 100%;
min-height: 640px;
background: #070711;
display: flex;
align-items: center;
justify-content: center;
padding: 60px 16px;
font-family: 'Space Grotesk', sans-serif;
overflow: hidden;
box-sizing: border-box;
}
.nn-crd *,
.nn-crd *::before,
.nn-crd *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Ambient gradient backdrop — was body::before fixed; scoped. */
.nn-crd::before {
content: '';
position: absolute;
inset: 0;
background:
radial-gradient(ellipse 60% 50% at 15% 50%, rgba(0,180,255,0.06) 0%, transparent 70%),
radial-gradient(ellipse 60% 50% at 85% 50%, rgba(180,0,255,0.06) 0%, transparent 70%);
pointer-events: none;
z-index: 0;
}
.nn-crd .stage {
position: relative;
z-index: 1;
display: flex;
gap: 28px;
padding: 24px;
align-items: stretch;
flex-wrap: wrap;
justify-content: center;
}
.nn-crd .card {
position: relative;
width: 220px;
padding: 32px 24px 28px;
border-radius: 4px;
background: rgba(12,12,28,0.95);
display: flex;
flex-direction: column;
gap: 16px;
cursor: pointer;
transition: transform 0.3s ease;
}
.nn-crd .card-featured { padding-top: 40px; }
.nn-crd .card:hover { transform: translateY(-6px); }
/* Rotating conic border via pseudo */
.nn-crd .card::before {
content: '';
position: absolute;
inset: -1.5px;
border-radius: 6px;
background: conic-gradient(
from var(--nn-crd-a),
var(--c1) 0deg,
var(--c2) 90deg,
transparent 130deg,
transparent 230deg,
var(--c2) 270deg,
var(--c1) 360deg
);
animation: nn-crd-spin 3s linear infinite;
z-index: 0;
}
@keyframes nn-crd-spin { to { --nn-crd-a: 360deg; } }
.nn-crd .card::after {
content: '';
position: absolute;
inset: 1.5px;
border-radius: 3px;
background: #0c0c1e;
z-index: 1;
}
.nn-crd .card > * { position: relative; z-index: 2; }
.nn-crd .card-cyan { --c1: #00eeff; --c2: rgba(0,238,255,0.3); }
.nn-crd .card-pink { --c1: #ff2d78; --c2: rgba(255,45,120,0.3); }
.nn-crd .card-violet { --c1: #bf5fff; --c2: rgba(191,95,255,0.3); }
.nn-crd .card-cyan:hover::before { box-shadow: 0 0 28px rgba(0,238,255,0.45), 0 0 60px rgba(0,238,255,0.2); }
.nn-crd .card-pink:hover::before { box-shadow: 0 0 28px rgba(255,45,120,0.45), 0 0 60px rgba(255,45,120,0.2); }
.nn-crd .card-violet:hover::before { box-shadow: 0 0 28px rgba(191,95,255,0.45), 0 0 60px rgba(191,95,255,0.2); }
/* Content */
.nn-crd .card-tier {
font-family: 'Exo 2', sans-serif;
font-size: 10px;
font-weight: 700;
letter-spacing: 0.2em;
text-transform: uppercase;
}
.nn-crd .card-cyan .card-tier { color: #00eeff; text-shadow: 0 0 10px #00eeff; }
.nn-crd .card-pink .card-tier { color: #ff2d78; text-shadow: 0 0 10px #ff2d78; }
.nn-crd .card-violet .card-tier { color: #bf5fff; text-shadow: 0 0 10px #bf5fff; }
.nn-crd .card-price {
font-family: 'Exo 2', sans-serif;
font-weight: 900;
font-size: 42px;
color: #f0f0ff;
line-height: 1;
letter-spacing: -0.02em;
}
.nn-crd .card-price sup {
font-size: 18px;
font-weight: 600;
vertical-align: super;
color: rgba(240,240,255,0.6);
}
.nn-crd .card-period {
font-size: 12px;
color: rgba(240,240,255,0.35);
margin-top: 2px;
letter-spacing: 0.05em;
}
.nn-crd .card-divider { height: 1px; background: rgba(255,255,255,0.07); }
.nn-crd .card-cyan .card-divider { background: linear-gradient(90deg, transparent, rgba(0,238,255,0.35), transparent); }
.nn-crd .card-pink .card-divider { background: linear-gradient(90deg, transparent, rgba(255,45,120,0.35), transparent); }
.nn-crd .card-violet .card-divider { background: linear-gradient(90deg, transparent, rgba(191,95,255,0.35), transparent); }
.nn-crd .card-features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.nn-crd .card-features li {
font-size: 12px;
color: rgba(210,210,240,0.7);
padding-left: 18px;
position: relative;
letter-spacing: 0.02em;
line-height: 1.4;
}
.nn-crd .card-features li::before {
content: '▸';
position: absolute;
left: 0;
font-size: 10px;
}
.nn-crd .card-cyan .card-features li::before { color: #00eeff; text-shadow: 0 0 6px #00eeff; }
.nn-crd .card-pink .card-features li::before { color: #ff2d78; text-shadow: 0 0 6px #ff2d78; }
.nn-crd .card-violet .card-features li::before { color: #bf5fff; text-shadow: 0 0 6px #bf5fff; }
.nn-crd .card-cta {
margin-top: auto;
padding: 11px 0;
text-align: center;
font-family: 'Exo 2', sans-serif;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.18em;
text-transform: uppercase;
cursor: pointer;
border: none;
border-radius: 2px;
transition: all 0.25s ease;
width: 100%;
}
.nn-crd .card-cyan .card-cta {
background: rgba(0,238,255,0.1);
color: #00eeff;
border: 1px solid rgba(0,238,255,0.5);
text-shadow: 0 0 8px rgba(0,238,255,0.8);
box-shadow: 0 0 12px rgba(0,238,255,0.15);
}
.nn-crd .card-cyan .card-cta:hover { background: rgba(0,238,255,0.22); box-shadow: 0 0 22px rgba(0,238,255,0.4); }
.nn-crd .card-pink .card-cta {
background: linear-gradient(135deg, rgba(255,45,120,0.85), rgba(200,20,90,0.85));
color: #fff;
text-shadow: 0 0 8px rgba(255,45,120,0.5);
box-shadow: 0 0 18px rgba(255,45,120,0.4), 0 0 40px rgba(255,45,120,0.15);
}
.nn-crd .card-pink .card-cta:hover { box-shadow: 0 0 28px rgba(255,45,120,0.65), 0 0 60px rgba(255,45,120,0.25); }
.nn-crd .card-violet .card-cta {
background: rgba(191,95,255,0.12);
color: #bf5fff;
border: 1px solid rgba(191,95,255,0.5);
text-shadow: 0 0 8px rgba(191,95,255,0.8);
box-shadow: 0 0 12px rgba(191,95,255,0.15);
}
.nn-crd .card-violet .card-cta:hover { background: rgba(191,95,255,0.22); box-shadow: 0 0 22px rgba(191,95,255,0.4); }
.nn-crd .badge {
position: absolute;
top: -12px;
left: 50%;
transform: translateX(-50%);
font-family: 'Exo 2', sans-serif;
font-size: 9px;
font-weight: 700;
letter-spacing: 0.15em;
text-transform: uppercase;
padding: 4px 14px;
background: linear-gradient(135deg, #ff2d78, #d4006a);
color: #fff;
z-index: 10;
text-shadow: 0 0 6px rgba(255,45,120,0.8);
box-shadow: 0 0 12px rgba(255,45,120,0.5);
}
@media (prefers-reduced-motion: reduce) {
.nn-crd .card::before { animation: none !important; }
.nn-crd .card { transition: none !important; }
}
```
### 04. Synthwave Scene
**Type:** CSS + JS
**Description:** A complete 80s retrofuture scene: a starfield (90 stars injected by JS, each with randomised size and twinkle timing), a vertically-banded sun melting from yellow to violet with horizontal CRT bands cutting through it, a glowing magenta horizon line, a perspective-rotated pink wireframe grid that scrolls toward the viewer, a polygon mountain silhouette with wireframe ridge highlights, a CRT-scanline overlay across the whole composition, and the "SYNTHWAVE" title with a layered magenta glow, "Retro · Future · Neon" tagline, and a "◈ 1 9 8 6 ◈" year badge in golden text. Pure CSS + 15 lines of JS for the stars. Audiowide + Oxanium. Best for vaporwave/synthwave landing pages, music albums, retro-gaming, nostalgic hero sections.
**HTML:**
```html
SYNTHWAVE
Retro · Future · Neon
◈ 1 9 8 6 ◈
```
**CSS:**
```css
/* ─── 04 Synthwave Scene — 80s retrofuture composition ─────────── */
@import url('https://fonts.googleapis.com/css2?family=Audiowide&family=Oxanium:wght@700;800&display=swap');
.nn-syn {
position: relative;
width: 100%;
min-height: 560px;
background: #0a0015;
font-family: 'Audiowide', cursive;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nn-syn *,
.nn-syn *::before,
.nn-syn *::after { box-sizing: border-box; margin: 0; padding: 0; }
.nn-syn .scene {
position: relative;
width: 700px;
max-width: 100%;
height: 480px;
overflow: hidden;
background: linear-gradient(
180deg,
#090010 0%,
#130025 30%,
#1a003a 55%,
#260050 70%,
#0f0020 100%
);
}
.nn-syn .stars { position: absolute; inset: 0 0 50% 0; overflow: hidden; }
.nn-syn .star {
position: absolute;
background: #fff;
border-radius: 50%;
animation: nn-syn-twinkle var(--dur, 2s) var(--del, 0s) ease-in-out infinite alternate;
}
@keyframes nn-syn-twinkle {
from { opacity: var(--min, 0.3); transform: scale(1); }
to { opacity: 1; transform: scale(1.4); }
}
.nn-syn .sun-wrap {
position: absolute;
left: 50%;
top: 24%;
transform: translateX(-50%);
width: 160px;
height: 160px;
}
.nn-syn .sun {
position: absolute;
inset: 0;
border-radius: 50%;
background: linear-gradient(
180deg,
#ffe066 0%,
#ff9900 20%,
#ff2d78 45%,
#c800ff 65%,
#6600cc 80%,
#2a0060 100%
);
box-shadow:
0 0 30px rgba(255,150,0,0.6),
0 0 70px rgba(255,80,150,0.5),
0 0 120px rgba(200,0,255,0.35),
0 0 200px rgba(100,0,200,0.2);
animation: nn-syn-sunpulse 4s ease-in-out infinite;
}
@keyframes nn-syn-sunpulse {
0%, 100% { box-shadow: 0 0 28px rgba(255,150,0,0.55), 0 0 65px rgba(255,80,150,0.45), 0 0 110px rgba(200,0,255,0.3); }
50% { box-shadow: 0 0 42px rgba(255,150,0,0.75), 0 0 90px rgba(255,80,150,0.6), 0 0 160px rgba(200,0,255,0.45); }
}
.nn-syn .sun-lines {
position: absolute;
inset: 0;
border-radius: 50%;
overflow: hidden;
pointer-events: none;
}
.nn-syn .sun-lines::before {
content: '';
position: absolute;
inset: 0;
background: repeating-linear-gradient(
0deg,
transparent 0px,
transparent 8px,
rgba(10,0,20,0.55) 8px,
rgba(10,0,20,0.55) 12px
);
}
.nn-syn .horizon {
position: absolute;
left: 0;
right: 0;
top: 56%;
height: 4px;
background: linear-gradient(90deg,
transparent 0%,
rgba(255,60,180,0.8) 20%,
#ff2aff 50%,
rgba(255,60,180,0.8) 80%,
transparent 100%
);
box-shadow:
0 0 18px rgba(255,40,255,0.8),
0 0 45px rgba(255,40,255,0.4),
0 0 80px rgba(255,40,255,0.2);
}
.nn-syn .grid-wrap {
position: absolute;
left: 0;
right: 0;
top: 57%;
bottom: 0;
overflow: hidden;
perspective: 300px;
}
.nn-syn .grid {
position: absolute;
width: 200%;
left: -50%;
top: 0;
height: 300%;
transform-origin: top center;
transform: rotateX(55deg) translateY(0);
background-image:
linear-gradient(rgba(255,0,200,0.7) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,0,200,0.7) 1px, transparent 1px);
background-size: 60px 60px;
animation: nn-syn-gridscroll 1.5s linear infinite;
}
@keyframes nn-syn-gridscroll {
from { background-position: 0 0; }
to { background-position: 0 60px; }
}
.nn-syn .grid-fade {
position: absolute;
inset: 0;
background:
linear-gradient(180deg, rgba(10,0,21,0.0) 0%, rgba(10,0,21,0.95) 100%),
linear-gradient(90deg, rgba(10,0,21,0.8) 0%, transparent 15%, transparent 85%, rgba(10,0,21,0.8) 100%);
pointer-events: none;
}
.nn-syn .mountains {
position: absolute;
left: 0;
right: 0;
top: 43%;
height: 18%;
overflow: hidden;
}
.nn-syn .mountains svg { width: 100%; height: 100%; }
.nn-syn .scanlines {
position: absolute;
inset: 0;
background: repeating-linear-gradient(
0deg,
transparent,
transparent 2px,
rgba(0,0,0,0.06) 2px,
rgba(0,0,0,0.06) 3px
);
pointer-events: none;
z-index: 10;
}
.nn-syn .title-wrap {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-bottom: 80px;
z-index: 5;
}
.nn-syn .title-main {
font-family: 'Oxanium', sans-serif;
font-size: 56px;
font-weight: 800;
letter-spacing: 0.18em;
color: #fff;
text-shadow:
0 0 6px #fff,
0 0 16px #ff69d0,
0 0 36px #ff2aff,
0 0 70px rgba(200,0,255,0.7);
animation: nn-syn-titlebreath 3s ease-in-out infinite;
}
.nn-syn .title-sub {
font-family: 'Audiowide', cursive;
font-size: 13px;
letter-spacing: 0.55em;
color: rgba(255,150,230,0.85);
text-shadow: 0 0 8px rgba(255,50,200,0.7), 0 0 20px rgba(255,0,200,0.4);
margin-top: 6px;
text-transform: uppercase;
}
@keyframes nn-syn-titlebreath {
0%, 100% { opacity: 1; }
50% { opacity: 0.88; }
}
.nn-syn .year {
font-family: 'Audiowide', cursive;
font-size: 11px;
letter-spacing: 0.3em;
color: rgba(255,220,0,0.8);
text-shadow: 0 0 10px rgba(255,200,0,0.7);
margin-top: 10px;
}
@media (max-width: 720px) {
.nn-syn .scene { width: 100%; height: 380px; }
.nn-syn .title-main { font-size: 40px; }
.nn-syn .sun-wrap { width: 120px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) {
.nn-syn .star,
.nn-syn .sun,
.nn-syn .grid,
.nn-syn .title-main { animation: none !important; }
}
```
**JS:**
```js
(() => {
// Scoped star injection — finds the stars container inside .nn-syn
// only, so the demo can render anywhere on the page without
// colliding on a global element id.
const root = document.querySelector('.nn-syn');
if (!root) return;
const stars = root.querySelector('[data-nn-syn-stars]');
if (!stars || stars.childElementCount > 0) return;
for (let i = 0; i < 90; i++) {
const s = document.createElement('div');
s.className = 'star';
const size = Math.random() * 2.2 + 0.5;
s.style.cssText =
'width:' + size + 'px;' +
'height:' + size + 'px;' +
'left:' + (Math.random() * 100) + '%;' +
'top:' + (Math.random() * 100) + '%;' +
'--dur:' + (Math.random() * 2.5 + 1.2).toFixed(2) + 's;' +
'--del:' + (Math.random() * 3).toFixed(2) + 's;' +
'--min:' + (Math.random() * 0.3 + 0.1).toFixed(2) + ';';
stars.appendChild(s);
}
})();
```
### 05. Neon Form Controls
**Type:** CSS + JS
**Description:** A "System Controls" panel with three glowing toggle rows (Neural Link cyan, Threat Scanner pink, Hologram HUD amber) that flip ON/OFF with text labels syncing to colour, two custom range sliders (cyan Signal Power and pink Plasma Charge) whose filled-track gradient updates as the user drags, three violet checkboxes for module selection (Crypto / Stealth / Override), and three yellow radio buttons for operating mode (Passive / Active / Combat). Every neon glow is a layered box-shadow / text-shadow stack — no images, no SVG filters. Inline event handlers from the source mock are rewritten as a single scoped delegator so multiple instances safely coexist on one page. Chakra Petch + Share Tech Mono. Best for cyberpunk dashboards, gaming HUDs, futuristic settings panels, sci-fi product UIs.
**HTML:**
```html
```
**CSS:**
```css
/* ─── 05 Neon Form Controls — futuristic system panel ──────────── */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Chakra+Petch:wght@400;600;700&display=swap');
.nn-ctl {
position: relative;
width: 100%;
min-height: 760px;
background: #050510;
font-family: 'Chakra Petch', sans-serif;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nn-ctl *,
.nn-ctl *::before,
.nn-ctl *::after { box-sizing: border-box; margin: 0; padding: 0; }
.nn-ctl .panel {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
gap: 28px;
background: rgba(10,10,28,0.9);
border: 1px solid rgba(0,255,200,0.1);
padding: 40px 50px;
box-shadow:
0 0 40px rgba(0,255,200,0.04),
inset 0 0 60px rgba(0,0,30,0.5);
width: 420px;
max-width: 100%;
}
.nn-ctl .panel-label {
font-size: 9px;
letter-spacing: 0.3em;
text-transform: uppercase;
color: rgba(0,255,200,0.5);
margin-bottom: -16px;
font-family: 'Share Tech Mono', monospace;
}
.nn-ctl .toggles { display: flex; flex-direction: column; gap: 16px; }
.nn-ctl .row { display: flex; align-items: center; justify-content: space-between; }
.nn-ctl .ctrl-label {
font-size: 12px;
letter-spacing: 0.08em;
color: rgba(200,200,240,0.75);
text-transform: uppercase;
font-weight: 600;
}
.nn-ctl .ctrl-label.section { font-size: 10px; display: block; margin-bottom: 12px; }
/* TOGGLES */
.nn-ctl .toggle-wrap { display: flex; align-items: center; gap: 10px; }
.nn-ctl .toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.nn-ctl .toggle-track {
display: flex;
align-items: center;
width: 58px;
height: 28px;
background: rgba(255,255,255,0.06);
border: 1px solid rgba(255,255,255,0.12);
border-radius: 14px;
cursor: pointer;
padding: 3px;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.nn-ctl .toggle-track::before {
content: '';
position: absolute;
inset: 0;
border-radius: inherit;
opacity: 0;
transition: opacity 0.3s ease;
}
.nn-ctl .toggle-knob {
width: 20px;
height: 20px;
border-radius: 50%;
background: rgba(180,180,200,0.4);
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
position: relative;
flex-shrink: 0;
box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.nn-ctl .toggle-input:checked ~ .toggle-track.cyan {
background: rgba(0,255,204,0.12);
border-color: rgba(0,255,204,0.5);
box-shadow: 0 0 12px rgba(0,255,204,0.3), inset 0 0 12px rgba(0,255,204,0.06);
}
.nn-ctl .toggle-input:checked ~ .toggle-track.cyan .toggle-knob {
transform: translateX(30px);
background: #00ffcc;
box-shadow: 0 0 10px #00ffcc, 0 0 22px rgba(0,255,204,0.6);
}
.nn-ctl .toggle-input:checked ~ .toggle-track.cyan::before {
background: radial-gradient(ellipse at 30% 50%, rgba(0,255,204,0.2), transparent 70%);
opacity: 1;
}
.nn-ctl .toggle-input:checked ~ .toggle-track.pink {
background: rgba(255,45,120,0.12);
border-color: rgba(255,45,120,0.5);
box-shadow: 0 0 12px rgba(255,45,120,0.3), inset 0 0 12px rgba(255,45,120,0.06);
}
.nn-ctl .toggle-input:checked ~ .toggle-track.pink .toggle-knob {
transform: translateX(30px);
background: #ff2d78;
box-shadow: 0 0 10px #ff2d78, 0 0 22px rgba(255,45,120,0.6);
}
.nn-ctl .toggle-input:checked ~ .toggle-track.amber {
background: rgba(255,180,0,0.12);
border-color: rgba(255,180,0,0.5);
box-shadow: 0 0 12px rgba(255,180,0,0.3), inset 0 0 12px rgba(255,180,0,0.06);
}
.nn-ctl .toggle-input:checked ~ .toggle-track.amber .toggle-knob {
transform: translateX(30px);
background: #ffb400;
box-shadow: 0 0 10px #ffb400, 0 0 22px rgba(255,180,0,0.6);
}
.nn-ctl .toggle-status {
font-family: 'Share Tech Mono', monospace;
font-size: 10px;
letter-spacing: 0.12em;
min-width: 30px;
text-align: right;
transition: all 0.3s;
}
/* SLIDERS */
.nn-ctl .slider-wrap { display: flex; flex-direction: column; gap: 8px; }
.nn-ctl .slider-header { display: flex; justify-content: space-between; align-items: center; }
.nn-ctl .slider-val {
font-family: 'Share Tech Mono', monospace;
font-size: 13px;
}
.nn-ctl .slider-val.cyan { color: #00ffcc; text-shadow: 0 0 8px #00ffcc; }
.nn-ctl .slider-val.pink { color: #ff2d78; text-shadow: 0 0 8px #ff2d78; }
.nn-ctl input[type="range"] {
-webkit-appearance: none;
appearance: none;
width: 100%;
height: 4px;
border-radius: 2px;
outline: none;
cursor: pointer;
background: rgba(255,255,255,0.08);
position: relative;
}
.nn-ctl input[type="range"].cyan-range {
background: linear-gradient(to right, #00ffcc var(--p, 65%), rgba(255,255,255,0.08) var(--p, 65%));
box-shadow: 0 0 6px rgba(0,255,204,0.4);
}
.nn-ctl input[type="range"].pink-range {
background: linear-gradient(to right, #ff2d78 var(--p, 40%), rgba(255,255,255,0.08) var(--p, 40%));
box-shadow: 0 0 6px rgba(255,45,120,0.4);
}
.nn-ctl input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 18px;
height: 18px;
border-radius: 50%;
cursor: pointer;
transition: box-shadow 0.2s;
}
.nn-ctl input[type="range"].cyan-range::-webkit-slider-thumb {
background: #00ffcc;
box-shadow: 0 0 8px #00ffcc, 0 0 18px rgba(0,255,204,0.5);
}
.nn-ctl input[type="range"].cyan-range:hover::-webkit-slider-thumb {
box-shadow: 0 0 14px #00ffcc, 0 0 30px rgba(0,255,204,0.7);
}
.nn-ctl input[type="range"].pink-range::-webkit-slider-thumb {
background: #ff2d78;
box-shadow: 0 0 8px #ff2d78, 0 0 18px rgba(255,45,120,0.5);
}
.nn-ctl input[type="range"].pink-range:hover::-webkit-slider-thumb {
box-shadow: 0 0 14px #ff2d78, 0 0 30px rgba(255,45,120,0.7);
}
.nn-ctl input[type="range"]::-moz-range-thumb {
width: 18px;
height: 18px;
border: none;
border-radius: 50%;
cursor: pointer;
}
.nn-ctl input[type="range"].cyan-range::-moz-range-thumb {
background: #00ffcc;
box-shadow: 0 0 8px #00ffcc, 0 0 18px rgba(0,255,204,0.5);
}
.nn-ctl input[type="range"].pink-range::-moz-range-thumb {
background: #ff2d78;
box-shadow: 0 0 8px #ff2d78, 0 0 18px rgba(255,45,120,0.5);
}
/* CHECKBOXES */
.nn-ctl .checks { display: flex; gap: 20px; flex-wrap: wrap; }
.nn-ctl .check-item {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
user-select: none;
position: relative;
}
.nn-ctl .check-item input[type="checkbox"] {
position: absolute;
opacity: 0;
width: 0;
height: 0;
}
.nn-ctl .check-box {
width: 18px;
height: 18px;
border: 1.5px solid rgba(191,95,255,0.4);
background: rgba(191,95,255,0.05);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
flex-shrink: 0;
}
.nn-ctl .check-box svg {
width: 10px;
height: 10px;
fill: none;
stroke: #bf5fff;
stroke-width: 2.5;
stroke-linecap: round;
stroke-linejoin: round;
opacity: 0;
transform: scale(0.5);
transition: all 0.2s ease;
}
.nn-ctl .check-item input:checked ~ .check-box {
border-color: #bf5fff;
background: rgba(191,95,255,0.15);
box-shadow: 0 0 8px rgba(191,95,255,0.45), inset 0 0 6px rgba(191,95,255,0.1);
}
.nn-ctl .check-item input:checked ~ .check-box svg { opacity: 1; transform: scale(1); }
.nn-ctl .check-text {
font-size: 11px;
color: rgba(200,200,240,0.65);
text-transform: uppercase;
letter-spacing: 0.07em;
}
/* RADIOS */
.nn-ctl .radios { display: flex; gap: 16px; flex-wrap: wrap; }
.nn-ctl .radio-item {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
user-select: none;
position: relative;
}
.nn-ctl .radio-item input[type="radio"] {
position: absolute;
opacity: 0;
width: 0;
height: 0;
}
.nn-ctl .radio-dot {
width: 18px;
height: 18px;
border-radius: 50%;
border: 1.5px solid rgba(255,220,0,0.35);
background: rgba(255,220,0,0.04);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
flex-shrink: 0;
}
.nn-ctl .radio-dot::before {
content: '';
width: 7px;
height: 7px;
border-radius: 50%;
background: #ffdc00;
box-shadow: 0 0 6px #ffdc00, 0 0 14px rgba(255,220,0,0.6);
transform: scale(0);
transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nn-ctl .radio-item input:checked ~ .radio-dot {
border-color: #ffdc00;
box-shadow: 0 0 8px rgba(255,220,0,0.4);
}
.nn-ctl .radio-item input:checked ~ .radio-dot::before { transform: scale(1); }
.nn-ctl .radio-text {
font-size: 11px;
color: rgba(200,200,240,0.65);
text-transform: uppercase;
letter-spacing: 0.07em;
}
.nn-ctl .divider {
height: 1px;
background: linear-gradient(90deg, transparent, rgba(0,255,200,0.12), transparent);
}
@media (max-width: 520px) {
.nn-ctl .panel { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
.nn-ctl * { transition: none !important; }
}
```
**JS:**
```js
(() => {
// Scoped wiring for the System Controls panel. Replaces the source
// mock's inline onchange/oninput handlers (which called global
// updateStatus / updateSlider) with a single scoped delegator so
// multiple instances safely coexist on one page.
const root = document.querySelector('.nn-ctl');
if (!root) return;
// Toggle ON/OFF status text
function paintToggle(input) {
const wrap = input.closest('.toggle-wrap');
if (!wrap) return;
const status = wrap.querySelector('[data-ctl-status]');
if (!status) return;
const on = status.dataset.onColor || '#00ffcc';
const off = status.dataset.offColor || 'rgba(255,255,255,0.5)';
status.textContent = input.checked ? 'ON' : 'OFF';
status.style.color = input.checked ? on : off;
status.style.textShadow = input.checked ? '0 0 8px ' + on : 'none';
}
root.querySelectorAll('.toggle-input').forEach(paintToggle);
root.addEventListener('change', (e) => {
if (e.target && e.target.matches && e.target.matches('.toggle-input')) {
paintToggle(e.target);
}
});
// Range slider fill + label
function paintSlider(range) {
const wrap = range.closest('.slider-wrap');
if (!wrap) return;
const val = wrap.querySelector('[data-ctl-sliderval]');
const pct = range.value + '%';
if (val) val.textContent = pct;
range.style.setProperty('--p', pct);
}
root.querySelectorAll('input[type="range"]').forEach(paintSlider);
root.addEventListener('input', (e) => {
if (e.target && e.target.matches && e.target.matches('input[type="range"]')) {
paintSlider(e.target);
}
});
})();
```
### 06. Neon Navigation
**Type:** CSS + JS
**Description:** Three production-ready neon nav patterns on a dark grid stage — a horizontal sliding-underline bar in cyan, a pill-tab nav with a violet sliding pill background, and a vertical sidebar with row icons and a pink accent indicator. (1) A horizontal nav bar with a cyan sliding underline that animates left/width between active tabs and corner accent brackets framing the bar. (2) A pill-tab nav where a violet pill background slides under the active item, with all four items reading like Syncopate-cased command labels. (3) A vertical sidebar with row icons, a 2px pink accent bar that slides up/down to the active row, and a translucent row-highlight that follows it. All three navs share one scoped delegator that recomputes offsets relative to the nearest nav container — no global handlers, no shared element IDs, multiple instances coexist safely. Syncopate + Jost. Best for SaaS app shells, admin dashboards, gaming/cyberpunk site navigation, futuristic landing pages.
**HTML:**
```html
```
**CSS:**
```css
/* ─── 06 Neon Navigation — slide / pill / sidebar trio ─────────── */
@import url('https://fonts.googleapis.com/css2?family=Syncopate:wght@400;700&family=Jost:wght@300;400;600&display=swap');
.nn-nav {
position: relative;
width: 100%;
min-height: 660px;
background: #040410;
font-family: 'Jost', sans-serif;
display: flex;
align-items: center;
justify-content: center;
padding: 56px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nn-nav *,
.nn-nav *::before,
.nn-nav *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Subtle blue grid — was body::before fixed; scoped. */
.nn-nav::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(0,200,255,0.025) 1px, transparent 1px),
linear-gradient(90deg, rgba(0,200,255,0.025) 1px, transparent 1px);
background-size: 50px 50px;
pointer-events: none;
z-index: 0;
}
.nn-nav .stage {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 56px;
}
/* NAV 1 — SLIDING UNDERLINE */
.nn-nav .nav-slide {
position: relative;
display: flex;
gap: 0;
background: rgba(8,8,22,0.9);
border: 1px solid rgba(0,230,255,0.1);
padding: 0 4px;
box-shadow: 0 0 30px rgba(0,0,0,0.6), inset 0 0 30px rgba(0,0,0,0.4);
}
.nn-nav .nav-slide a {
position: relative;
padding: 18px 28px;
font-family: 'Syncopate', sans-serif;
font-size: 9px;
font-weight: 700;
letter-spacing: 0.22em;
text-transform: uppercase;
text-decoration: none;
color: rgba(150,180,220,0.55);
transition: color 0.3s ease;
white-space: nowrap;
cursor: pointer;
user-select: none;
}
.nn-nav .nav-slide a:hover { color: rgba(200,230,255,0.85); }
.nn-nav .nav-slide a.active {
color: #00e6ff;
text-shadow: 0 0 8px rgba(0,230,255,0.8), 0 0 20px rgba(0,230,255,0.4);
}
.nn-nav .nav-slide .indicator {
position: absolute;
bottom: 0;
height: 2px;
background: #00e6ff;
box-shadow: 0 0 8px #00e6ff, 0 0 20px rgba(0,230,255,0.6), 0 0 40px rgba(0,230,255,0.3);
transition: left 0.35s cubic-bezier(0.23, 1, 0.32, 1), width 0.35s cubic-bezier(0.23, 1, 0.32, 1);
pointer-events: none;
}
.nn-nav .nav-slide::before,
.nn-nav .nav-slide::after {
content: '';
position: absolute;
width: 6px;
height: 6px;
border-color: rgba(0,230,255,0.5);
border-style: solid;
}
.nn-nav .nav-slide::before { top: -1px; left: -1px; border-width: 1.5px 0 0 1.5px; }
.nn-nav .nav-slide::after { bottom: -1px; right: -1px; border-width: 0 1.5px 1.5px 0; }
/* NAV 2 — PILL */
.nn-nav .nav-pills {
position: relative;
display: flex;
gap: 8px;
background: rgba(6,6,18,0.95);
border: 1px solid rgba(191,95,255,0.15);
border-radius: 50px;
padding: 6px;
box-shadow: 0 0 40px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,0,0,0.3);
}
.nn-nav .nav-pills a {
position: relative;
padding: 11px 26px;
border-radius: 50px;
font-family: 'Syncopate', sans-serif;
font-size: 8.5px;
font-weight: 700;
letter-spacing: 0.18em;
text-transform: uppercase;
text-decoration: none;
color: rgba(170,150,210,0.55);
transition: all 0.3s ease;
cursor: pointer;
user-select: none;
z-index: 1;
}
.nn-nav .nav-pills a:hover { color: rgba(210,180,255,0.85); }
.nn-nav .nav-pills a.active {
color: #fff;
text-shadow: 0 0 6px rgba(191,95,255,0.9);
}
.nn-nav .nav-pills .pill-bg {
position: absolute;
border-radius: 50px;
background: rgba(191,95,255,0.18);
border: 1px solid rgba(191,95,255,0.5);
box-shadow: 0 0 14px rgba(191,95,255,0.35), inset 0 0 10px rgba(191,95,255,0.07);
transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
pointer-events: none;
z-index: 0;
}
/* NAV 3 — SIDEBAR */
.nn-nav .nav-sidebar {
position: relative;
display: flex;
flex-direction: column;
background: rgba(6,6,20,0.9);
border: 1px solid rgba(255,45,120,0.12);
width: 220px;
padding: 6px;
box-shadow: 0 0 40px rgba(0,0,0,0.5), 4px 0 30px rgba(255,45,120,0.05);
}
.nn-nav .nav-sidebar a {
display: flex;
align-items: center;
gap: 14px;
padding: 13px 16px;
font-family: 'Jost', sans-serif;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.12em;
text-transform: uppercase;
text-decoration: none;
color: rgba(180,150,180,0.5);
transition: all 0.25s ease;
cursor: pointer;
user-select: none;
position: relative;
z-index: 1;
}
.nn-nav .nav-sidebar a:hover { color: rgba(255,180,210,0.85); }
.nn-nav .nav-sidebar a.active {
color: #ff2d78;
text-shadow: 0 0 8px rgba(255,45,120,0.7);
}
.nn-nav .nav-sidebar a .icon {
width: 16px;
height: 16px;
flex-shrink: 0;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
opacity: 0.7;
transition: opacity 0.25s;
}
.nn-nav .nav-sidebar a.active .icon {
opacity: 1;
filter: drop-shadow(0 0 4px rgba(255,45,120,0.6));
}
.nn-nav .nav-sidebar .side-indicator {
position: absolute;
left: 0;
width: 2px;
background: #ff2d78;
box-shadow: 0 0 8px #ff2d78, 0 0 20px rgba(255,45,120,0.5);
transition: top 0.35s cubic-bezier(0.23, 1, 0.32, 1), height 0.35s cubic-bezier(0.23, 1, 0.32, 1);
pointer-events: none;
}
.nn-nav .nav-sidebar .row-bg {
position: absolute;
left: 0;
right: 0;
background: rgba(255,45,120,0.07);
border-right: 1px solid rgba(255,45,120,0.2);
transition: top 0.35s cubic-bezier(0.23, 1, 0.32, 1), height 0.35s cubic-bezier(0.23, 1, 0.32, 1);
pointer-events: none;
z-index: 0;
}
@media (max-width: 600px) {
.nn-nav .nav-slide { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
.nn-nav .nav-slide .indicator,
.nn-nav .nav-pills .pill-bg,
.nn-nav .nav-sidebar .side-indicator,
.nn-nav .nav-sidebar .row-bg { transition: none !important; }
}
```
**JS:**
```js
(() => {
// Scoped nav delegator — replaces the source mock's three globally
// referenced setActive/setActivePill/setActiveSide functions with a
// single delegator that derives state from the clicked link's
// nearest [data-nn-nav] container. Multiple instances coexist with
// no global handlers or element-id collisions.
const root = document.querySelector('.nn-nav');
if (!root) return;
function paint(nav) {
const kind = nav.dataset.navKind;
const active = nav.querySelector('a.active') || nav.querySelector('a');
if (!active) return;
if (kind === 'slide') {
const ind = nav.querySelector('[data-nav-indicator]');
if (!ind) return;
ind.style.left = active.offsetLeft + 'px';
ind.style.width = active.offsetWidth + 'px';
} else if (kind === 'pill') {
const pill = nav.querySelector('[data-nav-pill]');
if (!pill) return;
pill.style.left = active.offsetLeft + 'px';
pill.style.top = active.offsetTop + 'px';
pill.style.width = active.offsetWidth + 'px';
pill.style.height = active.offsetHeight + 'px';
} else if (kind === 'side') {
const ind = nav.querySelector('[data-nav-indicator]');
const bg = nav.querySelector('[data-nav-rowbg]');
if (ind) { ind.style.top = active.offsetTop + 'px'; ind.style.height = active.offsetHeight + 'px'; }
if (bg) { bg.style.top = active.offsetTop + 'px'; bg.style.height = active.offsetHeight + 'px'; }
}
}
function paintAll() {
root.querySelectorAll('[data-nn-nav]').forEach(paint);
}
// Initial paint — need layout to be settled, so do a microtask + rAF.
paintAll();
requestAnimationFrame(paintAll);
root.addEventListener('click', (e) => {
const link = e.target.closest('[data-nav-item]');
if (!link) return;
e.preventDefault();
const nav = link.closest('[data-nn-nav]');
if (!nav) return;
nav.querySelectorAll('a').forEach(a => a.classList.remove('active'));
link.classList.add('active');
paint(nav);
});
// Repaint on resize (offsets can change with breakpoint shifts).
let resizeTimer;
window.addEventListener('resize', () => {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(paintAll, 100);
});
})();
```
### 07. Neon Flickering Sign
**Type:** Pure CSS
**Description:** Three distinct broken-sign CSS techniques side-by-side — a whole-word fault on "OPEN BAR", per-letter staggered animations on "NIGHTLIF" with two dead-bulb characters, and a vintage amber "Grand Hotel" with mechanical hum. A whole-word "OPEN BAR" fault using precise @keyframes percentage gaps (95% lit, 1–2 frames dark, repeat at irregular intervals so the rhythm never feels mechanical), a per-letter staggered system on "NIGHTLIF" where each character runs its own timing — including two "dead bulb" letters that only occasionally sputter to life — and a missing E gap exposing the broken-tube reality, and a vintage amber "Grand Hotel" script in Yellowtail with a slow mechanical hum (skewX drift) layered over fault cuts. Pink/cyan/amber ambient floor light pools bleed up from below to sell the dirty-wall context. Boogaloo + Yellowtail + Permanent Marker. Best for vintage bar/restaurant sites, dive-bar branding, retrowave horror, neo-noir film promo.
**HTML:**
```html
OPEN BAR
N
I
G
H
T
L
I
F
Grand Hotel
```
**CSS:**
```css
/* ─── 07 Neon Flickering Sign — three broken-sign techniques ───── */
@import url('https://fonts.googleapis.com/css2?family=Boogaloo&family=Yellowtail&family=Permanent+Marker&display=swap');
.nn-flk {
position: relative;
width: 100%;
min-height: 720px;
background: #07050f;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nn-flk *,
.nn-flk *::before,
.nn-flk *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Dirty wall texture — was body::before fixed; scoped. */
.nn-flk::before {
content: '';
position: absolute;
inset: 0;
background-image:
repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.008) 3px, rgba(255,255,255,0.008) 4px),
repeating-linear-gradient(90deg, transparent, transparent 8px, rgba(0,0,0,0.04) 8px, rgba(0,0,0,0.04) 9px);
pointer-events: none;
z-index: 0;
}
/* Ambient floor light pools — were position:fixed; scoped. */
.nn-flk .glow-pool {
position: absolute;
bottom: 0;
border-radius: 50%;
filter: blur(60px);
pointer-events: none;
opacity: 0.18;
z-index: 0;
}
.nn-flk .glow-pool.pink { width: 300px; height: 80px; left: 12%; background: #ff2d78; animation: nn-flk-poolpulse 5s 0s ease-in-out infinite; }
.nn-flk .glow-pool.cyan { width: 340px; height: 80px; left: 42%; background: #00eeff; animation: nn-flk-poolpulse 6s 1s ease-in-out infinite; }
.nn-flk .glow-pool.amber { width: 280px; height: 80px; right: 10%; background: #ffd200; animation: nn-flk-poolpulse 7s 2s ease-in-out infinite; }
@keyframes nn-flk-poolpulse { 0%, 100% { opacity: 0.18; } 50% { opacity: 0.08; } }
.nn-flk .scene {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 50px;
padding: 60px 20px;
}
.nn-flk .sign {
font-family: 'Boogaloo', cursive;
letter-spacing: 0.08em;
user-select: none;
}
/* SIGN 1 — whole-word flicker */
.nn-flk .sign-bar {
font-size: 96px;
color: #ff2d78;
text-shadow:
0 0 4px #fff,
0 0 10px #fff,
0 0 20px #ff2d78,
0 0 40px #ff2d78,
0 0 80px #ff2d78,
0 0 120px #c0003a;
animation: nn-flk-sign 6s linear infinite;
}
@keyframes nn-flk-sign {
0%, 9%, 11%, 30%, 32%, 64%, 70%, 72%, 100% {
text-shadow:
0 0 4px #fff,
0 0 10px #fff,
0 0 20px #ff2d78,
0 0 40px #ff2d78,
0 0 80px #ff2d78,
0 0 120px #c0003a;
color: #ff2d78;
opacity: 1;
}
10% { opacity: 0.08; text-shadow: none; color: rgba(255,45,120,0.15); }
31% { opacity: 0.12; text-shadow: none; color: rgba(255,45,120,0.2); }
65%, 71% { opacity: 0.06; text-shadow: none; color: rgba(255,45,120,0.1); }
}
/* SIGN 2 — per-letter staggered fault */
.nn-flk .sign-word {
display: flex;
gap: 4px;
font-size: 80px;
}
.nn-flk .letter {
display: inline-block;
color: #00eeff;
text-shadow:
0 0 4px #fff,
0 0 12px #00eeff,
0 0 28px #00eeff,
0 0 56px #0088aa,
0 0 100px #0055ff;
}
.nn-flk .letter:nth-child(1) { animation: nn-flk-buzz 4.5s 0.0s infinite; }
.nn-flk .letter:nth-child(2) { animation: nn-flk-buzz 5.2s 0.8s infinite; }
.nn-flk .letter:nth-child(3) { animation: nn-flk-dead 7.0s 1.4s infinite; }
.nn-flk .letter:nth-child(4) { animation: nn-flk-buzz 3.8s 0.3s infinite; }
.nn-flk .letter:nth-child(5) { animation: nn-flk-buzz 6.1s 2.1s infinite; }
.nn-flk .letter:nth-child(6) { animation: nn-flk-stutter 4.0s 0.5s infinite; }
.nn-flk .letter:nth-child(7) { animation: nn-flk-buzz 5.7s 1.0s infinite; }
.nn-flk .letter:nth-child(8) { animation: nn-flk-dead 9.0s 3.2s infinite; }
@keyframes nn-flk-buzz {
0%, 95%, 100% {
opacity: 1;
text-shadow:
0 0 4px #fff,
0 0 12px #00eeff,
0 0 28px #00eeff,
0 0 56px #0088aa;
}
96% { opacity: 0.1; text-shadow: none; }
97% { opacity: 1; text-shadow: 0 0 12px #00eeff, 0 0 28px #00eeff; }
98% { opacity: 0.05; text-shadow: none; }
99% { opacity: 1; text-shadow: 0 0 12px #00eeff, 0 0 28px #00eeff; }
}
@keyframes nn-flk-dead {
0%, 40%, 100% { opacity: 0.08; color: rgba(0,238,255,0.12); text-shadow: none; }
41%, 52% { opacity: 1; color: #00eeff; text-shadow: 0 0 12px #00eeff, 0 0 28px #00eeff, 0 0 56px #0088aa; }
53%, 58% { opacity: 0.08; text-shadow: none; color: rgba(0,238,255,0.12); }
59%, 62% { opacity: 0.9; color: #00eeff; text-shadow: 0 0 10px #00eeff; }
63% { opacity: 0.08; text-shadow: none; color: rgba(0,238,255,0.12); }
}
@keyframes nn-flk-stutter {
0%, 85%, 100% {
opacity: 1;
text-shadow:
0 0 4px #fff,
0 0 12px #00eeff,
0 0 28px #00eeff,
0 0 56px #0088aa;
}
86% { opacity: 0.2; text-shadow: none; }
87% { opacity: 1; text-shadow: 0 0 12px #00eeff; }
88% { opacity: 0.2; text-shadow: none; }
89% { opacity: 1; text-shadow: 0 0 12px #00eeff; }
90% { opacity: 0.2; text-shadow: none; }
91% { opacity: 1; text-shadow: 0 0 28px #00eeff, 0 0 56px #0088aa; }
}
/* SIGN 3 — vintage amber Grand Hotel */
.nn-flk .sign-hotel {
font-family: 'Yellowtail', cursive;
font-size: 72px;
color: #ffd200;
text-shadow:
0 0 4px #fff,
0 0 10px #ffd200,
0 0 22px #ffd200,
0 0 42px #ff9500,
0 0 80px rgba(255,150,0,0.6);
animation: nn-flk-hum 8s ease-in-out infinite, nn-flk-hotelfault 11s linear infinite;
transform-origin: center;
}
@keyframes nn-flk-hum {
0%, 100% { transform: none; }
25% { transform: skewX(0.3deg); }
75% { transform: skewX(-0.2deg); }
}
@keyframes nn-flk-hotelfault {
0%, 20%, 22%, 60%, 100% {
color: #ffd200;
text-shadow:
0 0 4px #fff,
0 0 10px #ffd200,
0 0 22px #ffd200,
0 0 42px #ff9500,
0 0 80px rgba(255,150,0,0.6);
opacity: 1;
}
21% { color: rgba(255,210,0,0.1); text-shadow: none; opacity: 0.1; }
61%, 63% { opacity: 0.12; color: rgba(255,210,0,0.15); text-shadow: none; }
62% { opacity: 1; color: #ffd200; text-shadow: 0 0 10px #ffd200, 0 0 22px #ffd200; }
}
@media (max-width: 640px) {
.nn-flk .sign-bar { font-size: 56px; }
.nn-flk .sign-word { font-size: 48px; }
.nn-flk .sign-hotel { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
.nn-flk .sign-bar,
.nn-flk .letter,
.nn-flk .sign-hotel,
.nn-flk .glow-pool { animation: none !important; }
}
```
### 08. Neon Cyberpunk Palette
**Type:** Pure CSS
**Description:** A complete design-token showcase for a pink/blue cyberpunk palette — five glowing swatch chips, three italic display headlines, three button variants, and an animated gradient-border card showing the actual CSS custom-property variable list inside. Five glowing swatch chips along the top (cyan #00DBDE, pink #FC00FF, electric blue #0057FF, violet #8B00FF, plus a wide cyan→violet→pink dual-tone gradient). The middle row stacks three italic display headlines — "ELECTRIC" in cyan, "VOLTAGE" in pink, "CYBERPUNK" as a tri-stop gradient — alongside three button variants (cyan pulse, pink-bordered with text-shadow, dual-tone gradient CTA). The bottom card uses mask-composite to draw an animated gradient border (cyan→violet→pink cycling through three rotations) around a Share Tech Mono token list that reads like the actual CSS variable definitions: `--neon-cyan: #00dbde;` etc. Every glow on the page resolves to one of the six CSS custom properties defined at the top. Exo 2 + Share Tech Mono. Best for design system showcases, cyberpunk style guides, branding pages, dev-portfolio palette demos.
**HTML:**
```html
ELECTRIC
VOLTAGE
CYBERPUNK
◈ Connect Cyan
◈ Engage Pink
◈ Dual Tone CTA
CSS Custom Properties — Cyberpunk Palette
--neon-cyan : #00dbde ;
--neon-pink : #fc00ff ;
--neon-blue : #0057ff ;
--neon-violet : #8b00ff ;
--glow-cyan : 0 0 6px #fff, 0 0 14px var(--neon-cyan)...
--glow-pink : 0 0 6px #fff, 0 0 14px var(--neon-pink)...
```
**CSS:**
```css
/* ─── 08 Neon Cyberpunk Palette — design token showcase ────────── */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,300;0,700;0,900;1,900&family=Share+Tech+Mono&display=swap');
/* Tokens scoped to .nn-pal — NOT :root — so they don't leak to host. */
.nn-pal {
--nn-pal-cyan: #00dbde;
--nn-pal-pink: #fc00ff;
--nn-pal-blue: #0057ff;
--nn-pal-violet: #8b00ff;
--nn-pal-bg: #050510;
--nn-pal-surface: rgba(12, 8, 28, 0.9);
--nn-pal-glow-cyan: 0 0 6px #fff, 0 0 14px var(--nn-pal-cyan), 0 0 32px var(--nn-pal-cyan), 0 0 64px rgba(0,219,222,0.5);
--nn-pal-glow-pink: 0 0 6px #fff, 0 0 14px var(--nn-pal-pink), 0 0 32px var(--nn-pal-pink), 0 0 64px rgba(252,0,255,0.5);
--nn-pal-tshadow-cyan: 0 0 4px #fff, 0 0 10px var(--nn-pal-cyan), 0 0 22px var(--nn-pal-cyan), 0 0 44px rgba(0,219,222,0.7);
--nn-pal-tshadow-pink: 0 0 4px #fff, 0 0 10px var(--nn-pal-pink), 0 0 22px var(--nn-pal-pink), 0 0 44px rgba(252,0,255,0.7);
position: relative;
width: 100%;
min-height: 780px;
background: var(--nn-pal-bg);
font-family: 'Exo 2', sans-serif;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nn-pal *,
.nn-pal *::before,
.nn-pal *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Diagonal gradient wash — was body::before fixed; scoped. */
.nn-pal::before {
content: '';
position: absolute;
inset: 0;
background:
radial-gradient(ellipse 55% 55% at 10% 50%, rgba(0,219,222,0.07) 0%, transparent 70%),
radial-gradient(ellipse 55% 55% at 90% 50%, rgba(252,0,255,0.07) 0%, transparent 70%),
linear-gradient(135deg, rgba(0,87,255,0.04) 0%, transparent 50%, rgba(139,0,255,0.04) 100%);
pointer-events: none;
z-index: 0;
}
.nn-pal .stage {
position: relative;
z-index: 1;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 32px 48px;
padding: 50px 60px;
max-width: 860px;
width: 100%;
}
.nn-pal .swatch-row {
grid-column: 1 / -1;
display: flex;
gap: 16px;
align-items: center;
}
.nn-pal .swatch { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.nn-pal .swatch-wide { flex: 2; }
.nn-pal .swatch-chip {
height: 44px;
border-radius: 2px;
position: relative;
overflow: hidden;
}
.nn-pal .swatch-chip::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 50%);
}
.nn-pal .chip-cyan { background: var(--nn-pal-cyan); box-shadow: 0 0 20px rgba(0,219,222,0.7), 0 0 50px rgba(0,219,222,0.3); }
.nn-pal .chip-pink { background: var(--nn-pal-pink); box-shadow: 0 0 20px rgba(252,0,255,0.7), 0 0 50px rgba(252,0,255,0.3); }
.nn-pal .chip-blue { background: var(--nn-pal-blue); box-shadow: 0 0 20px rgba(0,87,255,0.7), 0 0 50px rgba(0,87,255,0.3); }
.nn-pal .chip-violet { background: var(--nn-pal-violet); box-shadow: 0 0 20px rgba(139,0,255,0.7), 0 0 50px rgba(139,0,255,0.3); }
.nn-pal .chip-dual {
background: linear-gradient(90deg, var(--nn-pal-cyan), var(--nn-pal-violet), var(--nn-pal-pink));
box-shadow: 0 0 20px rgba(0,219,222,0.5), 0 0 50px rgba(252,0,255,0.4);
}
.nn-pal .swatch-hex {
font-family: 'Share Tech Mono', monospace;
font-size: 10px;
letter-spacing: 0.1em;
color: rgba(200,200,240,0.55);
text-align: center;
}
.nn-pal .text-block { display: flex; flex-direction: column; gap: 12px; }
.nn-pal .headline-cyan {
font-size: 44px;
font-weight: 900;
font-style: italic;
letter-spacing: -0.02em;
color: var(--nn-pal-cyan);
text-shadow: var(--nn-pal-tshadow-cyan);
line-height: 1;
}
.nn-pal .headline-pink {
font-size: 44px;
font-weight: 900;
font-style: italic;
letter-spacing: -0.02em;
color: var(--nn-pal-pink);
text-shadow: var(--nn-pal-tshadow-pink);
line-height: 1;
}
.nn-pal .headline-dual {
font-size: 38px;
font-weight: 900;
letter-spacing: 0.06em;
background: linear-gradient(90deg, var(--nn-pal-cyan) 0%, var(--nn-pal-violet) 50%, var(--nn-pal-pink) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
filter: drop-shadow(0 0 8px rgba(0,219,222,0.6)) drop-shadow(0 0 18px rgba(252,0,255,0.5));
}
.nn-pal .btn-group { display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.nn-pal .gbtn {
padding: 14px 28px;
font-family: 'Exo 2', sans-serif;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.16em;
text-transform: uppercase;
border: none;
cursor: pointer;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
}
.nn-pal .gbtn-cyan {
background: transparent;
color: var(--nn-pal-cyan);
border: 1.5px solid var(--nn-pal-cyan);
text-shadow: 0 0 8px rgba(0,219,222,0.8);
box-shadow: var(--nn-pal-glow-cyan);
animation: nn-pal-pulsecyan 2.5s ease-in-out infinite;
}
@keyframes nn-pal-pulsecyan {
0%, 100% { box-shadow: 0 0 8px rgba(0,219,222,0.4), 0 0 24px rgba(0,219,222,0.2); }
50% { box-shadow: 0 0 18px rgba(0,219,222,0.75), 0 0 50px rgba(0,219,222,0.35); }
}
.nn-pal .gbtn-pink {
background: linear-gradient(90deg, rgba(252,0,255,0.15), rgba(139,0,255,0.15));
color: #fff;
border: 1.5px solid var(--nn-pal-pink);
text-shadow: 0 0 8px rgba(252,0,255,0.8);
box-shadow: var(--nn-pal-glow-pink);
}
.nn-pal .gbtn-dual {
background: linear-gradient(90deg, var(--nn-pal-cyan), var(--nn-pal-violet), var(--nn-pal-pink));
color: #000;
border: none;
box-shadow: 0 0 24px rgba(0,219,222,0.5), 0 0 50px rgba(252,0,255,0.35);
font-weight: 900;
}
.nn-pal .card-dual {
grid-column: 1 / -1;
position: relative;
padding: 28px 32px;
background: var(--nn-pal-surface);
overflow: hidden;
}
.nn-pal .card-dual::before {
content: '';
position: absolute;
inset: 0;
padding: 1.5px;
background: linear-gradient(135deg, var(--nn-pal-cyan), var(--nn-pal-violet), var(--nn-pal-pink));
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
animation: nn-pal-bordercycle 4s linear infinite;
}
@keyframes nn-pal-bordercycle {
0% { background: linear-gradient(135deg, var(--nn-pal-cyan), var(--nn-pal-violet), var(--nn-pal-pink)); }
33% { background: linear-gradient(135deg, var(--nn-pal-pink), var(--nn-pal-cyan), var(--nn-pal-violet)); }
66% { background: linear-gradient(135deg, var(--nn-pal-violet), var(--nn-pal-pink), var(--nn-pal-cyan)); }
100% { background: linear-gradient(135deg, var(--nn-pal-cyan), var(--nn-pal-violet), var(--nn-pal-pink)); }
}
.nn-pal .card-dual-inner {
display: flex;
align-items: center;
justify-content: space-between;
gap: 24px;
}
.nn-pal .card-label {
font-size: 10px;
font-weight: 700;
letter-spacing: 0.22em;
text-transform: uppercase;
color: rgba(200,200,240,0.35);
margin-bottom: 12px;
}
.nn-pal .token-list {
font-family: 'Share Tech Mono', monospace;
font-size: 11px;
line-height: 2;
color: rgba(200,200,240,0.65);
}
.nn-pal .token-list .var-name { color: var(--nn-pal-cyan); }
.nn-pal .token-list .var-val { color: var(--nn-pal-pink); }
.nn-pal .token-list .var-comment { color: rgba(150,150,200,0.4); }
@media (max-width: 720px) {
.nn-pal .stage { grid-template-columns: 1fr; }
.nn-pal .swatch-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
.nn-pal .gbtn-cyan,
.nn-pal .card-dual::before { animation: none !important; }
}
```
### 09. Tailwind Neon Config
**Type:** Pure CSS
**Description:** A demo of what a Tailwind theme.extend neon config looks like in practice — built in plain CSS so it runs anywhere, but visually identical to the Tailwind output. Four buttons reading `shadow-neon-cyan` / `text-shadow-neon-pink` / etc, three cards each showing one accent (cyan / pink / violet) with the corresponding Tailwind class name printed inline so readers can copy the exact strings. The bottom block is the syntax-highlighted tailwind.config.js theme.extend object: five boxShadow entries, five textShadow entries, plus a tiny plugin that wires textShadow as utilities (`text-shadow-neon-cyan` etc). Token colours match the visible demo above. Inter + Fira Code. Best for Tailwind tutorials, design-system READMEs, dev blogs explaining theme.extend, copy-pasteable config snippets.
**HTML:**
```html
◈ Neon Cyan
◈ Neon Pink
◈ Neon Amber
◈ Neon Green
Cyan Card
Use shadow-neon-cyan for border glow and
text-shadow-neon-cyan for text.
class="shadow-neon-cyan text-shadow-neon-cyan"
Pink Card
Use shadow-neon-pink for border glow and
text-shadow-neon-pink for text.
class="shadow-neon-pink text-shadow-neon-pink"
Violet Card
Use shadow-neon-violet for border glow and
text-shadow-neon-violet.
class="shadow-neon-violet text-shadow-neon-violet"
tailwind.config.js — theme.extend
theme: {
extend: {
boxShadow : {
'neon-cyan' : '0 0 5px #fff, 0 0 12px #00dbde, 0 0 28px #00dbde...' ,
'neon-pink' : '0 0 5px #fff, 0 0 12px #fc00ff, 0 0 28px #fc00ff...' ,
'neon-amber' : '0 0 5px #fff, 0 0 12px #ffb300, 0 0 28px #ffb300...' ,
'neon-green' : '0 0 5px #fff, 0 0 12px #00ff94, 0 0 28px #00ff94...' ,
},
textShadow : {
'neon-cyan' : '0 0 4px #fff, 0 0 10px #00dbde, 0 0 22px #00dbde...' ,
'neon-pink' : '0 0 4px #fff, 0 0 10px #fc00ff, 0 0 22px #fc00ff...' ,
}
}
}
```
**CSS:**
```css
/* ─── 09 Tailwind Neon Config — theme.extend showcase ──────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fira+Code:wght@400;500&display=swap');
.nn-twl {
position: relative;
width: 100%;
min-height: 780px;
background: #06060f;
font-family: 'Inter', sans-serif;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nn-twl *,
.nn-twl *::before,
.nn-twl *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Cyan grid backdrop */
.nn-twl::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(0,219,222,0.04) 1px, transparent 1px),
linear-gradient(90deg, rgba(0,219,222,0.04) 1px, transparent 1px);
background-size: 44px 44px;
pointer-events: none;
z-index: 0;
}
.nn-twl .stage {
position: relative;
z-index: 1;
width: 100%;
max-width: 760px;
padding: 40px;
display: flex;
flex-direction: column;
gap: 40px;
}
/* Buttons */
.nn-twl .btn-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.nn-twl .twl-btn {
padding: 12px 28px;
background: transparent;
font-family: 'Inter', sans-serif;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.16em;
text-transform: uppercase;
border: 1px solid;
cursor: pointer;
transition: all 0.3s ease;
}
.nn-twl .twl-btn.cyan {
color: #00dbde;
border-color: #00dbde;
text-shadow: 0 0 4px #fff, 0 0 10px #00dbde, 0 0 22px #00dbde, 0 0 44px rgba(0,219,222,0.7);
box-shadow: 0 0 5px #fff, 0 0 12px #00dbde, 0 0 28px #00dbde, 0 0 56px rgba(0,219,222,0.5);
}
.nn-twl .twl-btn.cyan:hover { background: rgba(0,219,222,0.1); box-shadow: 0 0 28px #00dbde, 0 0 70px rgba(0,219,222,0.4); }
.nn-twl .twl-btn.pink {
color: #fc00ff;
border-color: #fc00ff;
text-shadow: 0 0 4px #fff, 0 0 10px #fc00ff, 0 0 22px #fc00ff, 0 0 44px rgba(252,0,255,0.7);
box-shadow: 0 0 5px #fff, 0 0 12px #fc00ff, 0 0 28px #fc00ff, 0 0 56px rgba(252,0,255,0.5);
}
.nn-twl .twl-btn.pink:hover { background: rgba(252,0,255,0.1); box-shadow: 0 0 28px #fc00ff, 0 0 70px rgba(252,0,255,0.4); }
.nn-twl .twl-btn.amber {
color: #ffb300;
border-color: #ffb300;
text-shadow: 0 0 4px #fff, 0 0 10px #ffb300, 0 0 22px #ffb300, 0 0 44px rgba(255,179,0,0.7);
box-shadow: 0 0 5px #fff, 0 0 12px #ffb300, 0 0 28px #ffb300, 0 0 56px rgba(255,179,0,0.5);
}
.nn-twl .twl-btn.amber:hover { background: rgba(255,179,0,0.1); }
.nn-twl .twl-btn.green {
color: #00ff94;
border-color: #00ff94;
text-shadow: 0 0 4px #fff, 0 0 10px #00ff94, 0 0 22px #00ff94, 0 0 44px rgba(0,255,148,0.7);
box-shadow: 0 0 5px #fff, 0 0 12px #00ff94, 0 0 28px #00ff94, 0 0 56px rgba(0,255,148,0.5);
}
.nn-twl .twl-btn.green:hover { background: rgba(0,255,148,0.1); }
/* Cards */
.nn-twl .card-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.nn-twl .twl-card {
background: #0a0a1e;
padding: 20px;
display: flex;
flex-direction: column;
gap: 12px;
border: 1px solid;
}
.nn-twl .twl-card.cyan { border-color: rgba(0,219,222,0.2); box-shadow: 0 0 5px #fff, 0 0 12px #00dbde, 0 0 28px #00dbde, 0 0 56px rgba(0,219,222,0.5), inset 0 0 14px rgba(0,219,222,0.25); }
.nn-twl .twl-card.pink { border-color: rgba(252,0,255,0.2); box-shadow: 0 0 5px #fff, 0 0 12px #fc00ff, 0 0 28px #fc00ff, 0 0 56px rgba(252,0,255,0.5), inset 0 0 14px rgba(252,0,255,0.25); }
.nn-twl .twl-card.violet { border-color: rgba(139,0,255,0.2); box-shadow: 0 0 5px #fff, 0 0 12px #8b00ff, 0 0 28px #8b00ff, 0 0 56px rgba(139,0,255,0.5); }
.nn-twl .twl-card .card-title {
font-size: 13px;
font-weight: 700;
letter-spacing: 0.18em;
text-transform: uppercase;
}
.nn-twl .twl-card.cyan .card-title { color: #00dbde; text-shadow: 0 0 4px #fff, 0 0 10px #00dbde, 0 0 22px #00dbde; }
.nn-twl .twl-card.pink .card-title { color: #fc00ff; text-shadow: 0 0 4px #fff, 0 0 10px #fc00ff, 0 0 22px #fc00ff; }
.nn-twl .twl-card.violet .card-title { color: #8b00ff; text-shadow: 0 0 4px #fff, 0 0 10px #8b00ff, 0 0 22px #8b00ff; }
.nn-twl .twl-card .card-body {
font-size: 12px;
line-height: 1.55;
color: rgba(255,255,255,0.5);
}
.nn-twl .twl-card .card-body code {
font-family: 'Fira Code', ui-monospace, monospace;
font-size: 11px;
}
.nn-twl .twl-card.cyan .card-body code { color: #00dbde; }
.nn-twl .twl-card.pink .card-body code { color: #fc00ff; }
.nn-twl .twl-card.violet .card-body code { color: #8b00ff; }
.nn-twl .twl-card .card-rule { height: 1px; }
.nn-twl .twl-card.cyan .card-rule { background: linear-gradient(90deg, transparent, rgba(0,219,222,0.4), transparent); }
.nn-twl .twl-card.pink .card-rule { background: linear-gradient(90deg, transparent, rgba(252,0,255,0.4), transparent); }
.nn-twl .twl-card.violet .card-rule { background: linear-gradient(90deg, transparent, rgba(139,0,255,0.4), transparent); }
.nn-twl .twl-card .card-code {
font-family: 'Fira Code', ui-monospace, monospace;
font-size: 10px;
line-height: 1.6;
color: rgba(255,255,255,0.25);
}
/* Config block */
.nn-twl .config-block {
position: relative;
background: #080818;
border: 1px solid rgba(255,255,255,0.07);
padding: 24px;
overflow: hidden;
}
.nn-twl .config-top,
.nn-twl .config-bottom {
position: absolute;
left: 0;
right: 0;
height: 1px;
}
.nn-twl .config-top { top: 0; background: linear-gradient(90deg, transparent, rgba(0,219,222,0.5), transparent); }
.nn-twl .config-bottom { bottom: 0; background: linear-gradient(90deg, transparent, rgba(252,0,255,0.5), transparent); }
.nn-twl .config-label {
font-size: 10px;
font-weight: 600;
letter-spacing: 0.2em;
text-transform: uppercase;
color: rgba(0,219,222,0.6);
margin-bottom: 16px;
}
.nn-twl .config-pre {
font-family: 'Fira Code', ui-monospace, monospace;
font-size: 11px;
line-height: 1.8;
color: rgba(255,255,255,0.7);
overflow-x: auto;
white-space: pre;
}
.nn-twl .tw-mute { color: rgba(255,255,255,0.3); }
.nn-twl .tw-key { color: rgba(0,219,222,0.8); }
.nn-twl .tw-name { color: rgba(252,0,255,0.8); }
.nn-twl .tw-val { color: rgba(255,179,0,0.7); }
@media (max-width: 720px) {
.nn-twl .card-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.nn-twl .twl-btn { transition: none !important; }
}
```
### 10. Neon SVG Icons
**Type:** Pure CSS
**Description:** Six non-rectangular SVG icons each glowing with stacked CSS filter: drop-shadow() — the glow hugs every contour with no rectangular halo, plus a side-by-side comparison of box-shadow vs drop-shadow showing the failure mode. Shield (cyan), lightning bolt (pink), hexagon with center circle (amber), 10-point star (green), crosshair/target (violet), and warning triangle (red). Each item has a pulse ring that expands on hover and a stronger 4-layer drop-shadow stack that fires on hover. The bottom comparison panel puts the same star side-by-side: left uses `box-shadow` (glows the bounding rectangle, looks broken), right uses `filter: drop-shadow()` (traces the actual alpha geometry). The whole demo is the textbook proof that drop-shadow is the only correct choice for non-rect SVG glow. DM Mono + Syne. Best for icon-library demos, cyberpunk dashboards, security/IoT UIs, dev blog posts about CSS filters.
**HTML:**
```html
filter: drop-shadow() — shape-aware neon glow
box-shadow vs filter: drop-shadow()
✕ box-shadow — rectangular glow
box-shadow glows the element's bounding rectangle — a square halo appears around non-rect shapes.
✓ filter: drop-shadow() — shape-hugging
filter: drop-shadow() traces the actual alpha shape — glow wraps perfectly around every contour.
```
**CSS:**
```css
/* ─── 10 Neon SVG Icons — drop-shadow contour glow showcase ────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Syne:wght@700;800&display=swap');
.nn-ico {
position: relative;
width: 100%;
min-height: 720px;
background: #050512;
font-family: 'Syne', sans-serif;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nn-ico *,
.nn-ico *::before,
.nn-ico *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Violet grid backdrop */
.nn-ico::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(150,100,255,0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(150,100,255,0.03) 1px, transparent 1px);
background-size: 36px 36px;
pointer-events: none;
z-index: 0;
}
.nn-ico .stage {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
gap: 52px;
padding: 50px 60px;
align-items: center;
max-width: 820px;
width: 100%;
}
.nn-ico .section-label {
font-family: 'DM Mono', monospace;
font-size: 9px;
letter-spacing: 0.25em;
text-transform: uppercase;
color: rgba(180,150,255,0.4);
text-align: center;
display: flex;
align-items: center;
gap: 14px;
width: 100%;
}
.nn-ico .section-label::before,
.nn-ico .section-label::after {
content: '';
flex: 1;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(180,150,255,0.2), transparent);
}
.nn-ico .icon-grid {
display: flex;
gap: 36px;
flex-wrap: wrap;
justify-content: center;
}
.nn-ico .icon-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
cursor: pointer;
}
.nn-ico .icon-wrap {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 80px;
height: 80px;
transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.nn-ico .icon-wrap:hover { transform: scale(1.14); }
.nn-ico .icon-svg {
width: 52px;
height: 52px;
transition: filter 0.3s ease;
}
.nn-ico .icon-cyan .icon-svg { filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px #00dbde) drop-shadow(0 0 22px #00dbde) drop-shadow(0 0 44px rgba(0,219,222,0.55)); }
.nn-ico .icon-pink .icon-svg { filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px #fc00ff) drop-shadow(0 0 22px #fc00ff) drop-shadow(0 0 44px rgba(252,0,255,0.55)); }
.nn-ico .icon-amber .icon-svg { filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px #ffb300) drop-shadow(0 0 22px #ffb300) drop-shadow(0 0 44px rgba(255,179,0,0.55)); }
.nn-ico .icon-green .icon-svg { filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px #00ff94) drop-shadow(0 0 22px #00ff94) drop-shadow(0 0 44px rgba(0,255,148,0.55)); }
.nn-ico .icon-violet .icon-svg { filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px #bf5fff) drop-shadow(0 0 22px #bf5fff) drop-shadow(0 0 44px rgba(191,95,255,0.55)); }
.nn-ico .icon-red .icon-svg { filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px #ff3c3c) drop-shadow(0 0 22px #ff3c3c) drop-shadow(0 0 44px rgba(255,60,60,0.55)); }
.nn-ico .icon-cyan:hover .icon-svg { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 18px #00dbde) drop-shadow(0 0 40px #00dbde) drop-shadow(0 0 80px rgba(0,219,222,0.7)); }
.nn-ico .icon-pink:hover .icon-svg { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 18px #fc00ff) drop-shadow(0 0 40px #fc00ff) drop-shadow(0 0 80px rgba(252,0,255,0.7)); }
.nn-ico .icon-amber:hover .icon-svg { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 18px #ffb300) drop-shadow(0 0 40px #ffb300) drop-shadow(0 0 80px rgba(255,179,0,0.7)); }
.nn-ico .icon-green:hover .icon-svg { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 18px #00ff94) drop-shadow(0 0 40px #00ff94) drop-shadow(0 0 80px rgba(0,255,148,0.7)); }
.nn-ico .icon-violet:hover .icon-svg { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 18px #bf5fff) drop-shadow(0 0 40px #bf5fff) drop-shadow(0 0 80px rgba(191,95,255,0.7)); }
.nn-ico .icon-red:hover .icon-svg { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 18px #ff3c3c) drop-shadow(0 0 40px #ff3c3c) drop-shadow(0 0 80px rgba(255,60,60,0.7)); }
.nn-ico .icon-name {
font-family: 'DM Mono', monospace;
font-size: 9px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: rgba(200,200,240,0.4);
}
.nn-ico .icon-ring {
position: absolute;
inset: 0;
border-radius: 50%;
border: 1px solid;
opacity: 0;
transform: scale(0.8);
transition: all 0.4s ease;
}
.nn-ico .icon-cyan .icon-ring { border-color: #00dbde; }
.nn-ico .icon-pink .icon-ring { border-color: #fc00ff; }
.nn-ico .icon-amber .icon-ring { border-color: #ffb300; }
.nn-ico .icon-green .icon-ring { border-color: #00ff94; }
.nn-ico .icon-violet .icon-ring { border-color: #bf5fff; }
.nn-ico .icon-red .icon-ring { border-color: #ff3c3c; }
.nn-ico .icon-wrap:hover .icon-ring { opacity: 0.5; transform: scale(1); }
.nn-ico .compare-panel {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
width: 100%;
}
.nn-ico .compare-card {
background: rgba(10,10,26,0.9);
border: 1px solid rgba(255,255,255,0.06);
padding: 24px 22px;
display: flex;
flex-direction: column;
gap: 16px;
}
.nn-ico .compare-title {
font-family: 'DM Mono', monospace;
font-size: 9px;
letter-spacing: 0.2em;
text-transform: uppercase;
}
.nn-ico .compare-title.bad { color: rgba(255,60,60,0.6); }
.nn-ico .compare-title.good { color: rgba(0,255,148,0.6); }
.nn-ico .compare-demo { display: flex; align-items: center; gap: 20px; }
.nn-ico .bad-icon-wrap {
position: relative;
width: 56px;
height: 56px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 0 8px #fc00ff, 0 0 20px rgba(252,0,255,0.5), 0 0 40px rgba(252,0,255,0.25);
}
.nn-ico .bad-icon-wrap svg { width: 40px; height: 40px; }
.nn-ico .good-icon-wrap {
width: 56px;
height: 56px;
display: flex;
align-items: center;
justify-content: center;
filter:
drop-shadow(0 0 4px #fff)
drop-shadow(0 0 10px #00ff94)
drop-shadow(0 0 22px #00ff94)
drop-shadow(0 0 44px rgba(0,255,148,0.5));
}
.nn-ico .good-icon-wrap svg { width: 40px; height: 40px; }
.nn-ico .compare-text { flex: 1; }
.nn-ico .compare-text p {
font-family: 'DM Mono', monospace;
font-size: 10px;
line-height: 1.7;
color: rgba(190,190,230,0.55);
}
.nn-ico .compare-text code { color: rgba(255,179,0,0.85); }
.nn-ico .compare-text .highlight-bad { color: rgba(255,80,80,0.85); }
.nn-ico .compare-text .highlight-good { color: rgba(0,255,148,0.85); }
@media (max-width: 640px) {
.nn-ico .compare-panel { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.nn-ico .icon-wrap,
.nn-ico .icon-svg,
.nn-ico .icon-ring { transition: none !important; }
}
```
### 11. Infinite Neon Grid
**Type:** CSS + JS
**Description:** A pure-CSS infinite synthwave floor grid with perfectly seamless looping — dual-frequency cyan + pink lines on a perspective-rotated plane, a 100-star JS-injected starfield, dual-color horizon glow, two floating HUD panels, and a flickering "GRIDZONE" title. Dual-frequency background-image lines (70px minor cyan + 350px major pink) on a `rotateX(58deg)` plane with `perspective: 280px`. A `background-position: 0→70px` keyframe at constant speed advances the grid one minor cell per cycle, which means the loop wraps invisibly. Layered with a 100-star procedurally generated starfield, a dual-color cyan/pink horizon glow bar (with vertical bleed for atmosphere), four side/bottom fade masks to cover the viewport edges, two floating HUD readout panels (GRID ONLINE / SIGNAL 94%), a center-aligned flickering "GRIDZONE / SECTOR 7 ONLINE" title, and four corner brackets framing the scene. Audiowide + Oxanium. Best for synthwave/vaporwave heros, gaming UIs, retro-futuristic landing pages, cyberpunk product demos.
**HTML:**
```html
GRID ONLINE
LAT 24.6°N
ALT ⚠ LOW
SIGNAL 94%
SYNC LOCK
NODE 7/12
GRIDZONE
SECTOR 7 · ONLINE
```
**CSS:**
```css
/* ─── 11 Infinite Neon Grid — seamless 3D perspective floor ────── */
@import url('https://fonts.googleapis.com/css2?family=Audiowide&family=Oxanium:wght@800&display=swap');
.nn-grd {
position: relative;
width: 100%;
min-height: 600px;
background: #04000e;
font-family: 'Audiowide', cursive;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nn-grd *,
.nn-grd *::before,
.nn-grd *::after { box-sizing: border-box; margin: 0; padding: 0; }
.nn-grd .scene {
position: relative;
width: 800px;
max-width: 100%;
height: 520px;
overflow: hidden;
}
.nn-grd .sky {
position: absolute;
top: 0; left: 0; right: 0;
height: 55%;
background: linear-gradient(180deg,
#04000e 0%,
#0d0020 40%,
#1a003a 80%,
#220050 100%
);
}
.nn-grd .stars { position: absolute; inset: 0 0 45% 0; overflow: hidden; }
.nn-grd .star {
position: absolute;
background: white;
border-radius: 50%;
animation: nn-grd-twinkle var(--d, 2s) var(--dl, 0s) ease-in-out infinite alternate;
}
@keyframes nn-grd-twinkle {
from { opacity: var(--min, 0.25); }
to { opacity: 1; transform: scale(1.5); }
}
.nn-grd .horizon {
position: absolute;
left: -20%;
right: -20%;
top: 52%;
height: 6px;
background: linear-gradient(90deg,
transparent 0%,
rgba(0,255,210,0.4) 15%,
#00fff2 35%,
#ff00ff 50%,
#00fff2 65%,
rgba(0,255,210,0.4) 85%,
transparent 100%
);
box-shadow:
0 0 24px rgba(0,255,240,0.8),
0 0 60px rgba(0,255,240,0.4),
0 0 120px rgba(0,200,255,0.2),
0 -8px 30px rgba(0,255,240,0.15),
0 8px 30px rgba(0,255,240,0.15);
z-index: 5;
animation: nn-grd-horizon 3s ease-in-out infinite;
}
@keyframes nn-grd-horizon {
0%, 100% { opacity: 1; filter: blur(0px); }
50% { opacity: 0.85; filter: blur(0.5px); }
}
.nn-grd .grid-stage {
position: absolute;
bottom: 0;
left: 0;
right: 0;
top: 53%;
perspective: 280px;
perspective-origin: 50% 0%;
overflow: hidden;
}
.nn-grd .grid-plane {
position: absolute;
top: 0;
left: -30%;
right: -30%;
height: 280%;
transform-origin: top center;
transform: rotateX(58deg);
background-image:
linear-gradient(rgba(0,255,230,0.9) 2px, transparent 2px),
linear-gradient(90deg, rgba(0,255,230,0.9) 2px, transparent 2px),
linear-gradient(rgba(255,0,240,0.4) 3px, transparent 3px),
linear-gradient(90deg, rgba(255,0,240,0.4) 3px, transparent 3px);
background-size:
70px 70px,
70px 70px,
350px 350px,
350px 350px;
background-position: 0 0, 0 0, 0 0, 0 0;
animation: nn-grd-move 1.2s linear infinite;
}
@keyframes nn-grd-move {
from { background-position: 0 0, 0 0, 0 0, 0 0; }
to { background-position: 0 70px, 0 70px, 0 70px, 0 70px; }
}
.nn-grd .grid-fade-h {
position: absolute;
bottom: 0; left: 0; right: 0;
height: 40%;
background: linear-gradient(180deg, transparent, #04000e 100%);
pointer-events: none;
z-index: 2;
}
.nn-grd .grid-fade-v {
position: absolute;
inset: 0;
background: linear-gradient(90deg,
rgba(4,0,14,0.92) 0%,
transparent 18%,
transparent 82%,
rgba(4,0,14,0.92) 100%
);
pointer-events: none;
z-index: 2;
}
.nn-grd .hud-panel {
position: absolute;
border: 1px solid;
padding: 8px 14px;
font-size: 9px;
letter-spacing: 0.18em;
text-transform: uppercase;
z-index: 10;
backdrop-filter: blur(4px);
animation: nn-grd-hud 4s ease-in-out infinite;
}
.nn-grd .hud-left {
left: 24px;
top: 30%;
border-color: rgba(0,255,230,0.35);
color: rgba(0,255,230,0.7);
background: rgba(0,40,40,0.4);
box-shadow: 0 0 14px rgba(0,255,230,0.15), inset 0 0 10px rgba(0,255,230,0.05);
animation-delay: 0s;
}
.nn-grd .hud-right {
right: 24px;
top: 30%;
border-color: rgba(255,0,240,0.35);
color: rgba(255,0,240,0.7);
background: rgba(40,0,40,0.4);
box-shadow: 0 0 14px rgba(255,0,240,0.15), inset 0 0 10px rgba(255,0,240,0.05);
animation-delay: 1.5s;
}
@keyframes nn-grd-hud {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-5px); }
}
.nn-grd .hud-row { display: flex; justify-content: space-between; gap: 20px; line-height: 2; }
.nn-grd .hud-val { font-family: 'Audiowide', cursive; }
.nn-grd .hud-val.ok { color: #00fff2; text-shadow: 0 0 6px #00fff2; }
.nn-grd .hud-val.warn { color: #ff0090; text-shadow: 0 0 6px #ff0090; }
.nn-grd .center-title {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-bottom: 80px;
z-index: 8;
pointer-events: none;
}
.nn-grd .title-main {
font-family: 'Oxanium', sans-serif;
font-size: 60px;
font-weight: 800;
letter-spacing: 0.22em;
color: #fff;
text-shadow:
0 0 6px #fff,
0 0 16px #00fff2,
0 0 36px #00fff2,
0 0 72px rgba(0,200,255,0.6),
0 0 120px rgba(0,150,255,0.3);
animation: nn-grd-flicker 7s ease-in-out infinite;
}
@keyframes nn-grd-flicker {
0%, 92%, 100% { opacity: 1; }
93% { opacity: 0.08; }
94% { opacity: 1; }
96% { opacity: 0.1; }
97% { opacity: 1; }
}
.nn-grd .title-sub {
font-family: 'Audiowide', cursive;
font-size: 11px;
letter-spacing: 0.6em;
color: rgba(0,255,240,0.65);
text-shadow: 0 0 10px rgba(0,255,240,0.5);
margin-top: 6px;
}
.nn-grd .bracket {
position: absolute;
width: 22px;
height: 22px;
border-color: rgba(0,255,230,0.5);
border-style: solid;
z-index: 10;
}
.nn-grd .bracket-tl { top: 12px; left: 12px; border-width: 1.5px 0 0 1.5px; }
.nn-grd .bracket-tr { top: 12px; right: 12px; border-width: 1.5px 1.5px 0 0; }
.nn-grd .bracket-bl { bottom: 12px; left: 12px; border-width: 0 0 1.5px 1.5px; }
.nn-grd .bracket-br { bottom: 12px; right: 12px; border-width: 0 1.5px 1.5px 0; }
@media (max-width: 720px) {
.nn-grd .scene { height: 400px; }
.nn-grd .title-main { font-size: 40px; }
.nn-grd .hud-panel { font-size: 8px; padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) {
.nn-grd .star,
.nn-grd .grid-plane,
.nn-grd .horizon,
.nn-grd .hud-panel,
.nn-grd .title-main { animation: none !important; }
}
```
**JS:**
```js
(() => {
// Scoped star injection — finds the stars container inside .nn-grd
// only. Multiple instances on the same page each populate their
// own starfield independently.
const root = document.querySelector('.nn-grd');
if (!root) return;
const stars = root.querySelector('[data-nn-grd-stars]');
if (!stars || stars.childElementCount > 0) return;
for (let i = 0; i < 100; i++) {
const s = document.createElement('div');
s.className = 'star';
const sz = Math.random() * 2 + 0.5;
s.style.cssText =
'width:' + sz + 'px;' +
'height:' + sz + 'px;' +
'left:' + (Math.random() * 100) + '%;' +
'top:' + (Math.random() * 100) + '%;' +
'--d:' + (Math.random() * 2.5 + 1).toFixed(2) + 's;' +
'--dl:' + (Math.random() * 3).toFixed(2) + 's;' +
'--min:' + (Math.random() * 0.2 + 0.1).toFixed(2) + ';';
stars.appendChild(s);
}
})();
```
### 12. Rainbow Neon Text
**Type:** Pure CSS
**Description:** Five distinct CSS rainbow text techniques stacked side-by-side — hue-rotate gradient spin, sliding background-position, per-letter HSL stagger, outline-only stroke, and a pure text-shadow cycle with no gradient-clip at all. (1) `SPECTRUM` uses `filter: hue-rotate(0→360deg)` on a gradient-clipped text — the whole rainbow spins without layout thrashing. (2) `CHROMATIC` uses `background-position: 0→300%` slide on a 300%-wide rainbow gradient — the gradient itself moves across the letters. (3) `RAINBOW` uses per-letter `--h` CSS variable with `hsl(var(--h), 100%, 65%)` and staggered animation-delay — each character occupies its own hue band of the spectrum. (4) `VOLTAGE` is an outline-only version using `-webkit-text-stroke: 2px transparent` with the gradient clipped to the stroke instead of the fill. (5) `◈ PURE GLOW ◈` uses zero gradient-clip — just a 6-keyframe text-shadow cycle hitting hard colour stops (red→orange→yellow→green→blue→violet). Plus two ambient hue-rotating blobs in the corners. Dela Gothic One + Righteous + Teko. Best for hero animations, music/festival branding, gaming title cards, pride-themed surfaces.
**HTML:**
```html
SPECTRUM
CHROMATIC
R
A
I
N
B
O
W
VOLTAGE
◈ PURE GLOW ◈
```
**CSS:**
```css
/* ─── 12 Rainbow Neon Text — five gradient-cycling techniques ──── */
@import url('https://fonts.googleapis.com/css2?family=Dela+Gothic+One&family=Righteous&family=Teko:wght@700&display=swap');
.nn-rnb {
position: relative;
width: 100%;
min-height: 780px;
background: #040410;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nn-rnb *,
.nn-rnb *::before,
.nn-rnb *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Vignette — was body::after fixed; scoped. */
.nn-rnb::after {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(ellipse 70% 70% at 50% 50%, transparent 40%, rgba(4,4,16,0.7) 100%);
pointer-events: none;
z-index: 0;
}
/* Ambient hue-rotating blobs */
.nn-rnb .ambient {
position: absolute;
border-radius: 50%;
filter: blur(90px);
pointer-events: none;
z-index: 0;
animation: nn-rnb-ambient 8s linear infinite;
}
.nn-rnb .ambient-1 { width: 400px; height: 300px; top: -80px; left: -80px; background: rgba(255,0,128,0.06); }
.nn-rnb .ambient-2 { width: 350px; height: 250px; bottom: -60px; right: -60px; background: rgba(0,200,255,0.06); animation-delay: 4s; }
@keyframes nn-rnb-ambient {
from { filter: blur(90px) hue-rotate(0deg); }
to { filter: blur(90px) hue-rotate(360deg); }
}
.nn-rnb .stage {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 40px;
padding: 50px 60px;
}
/* 1 — hue-rotate cycle */
.nn-rnb .rainbow-hue {
font-family: 'Dela Gothic One', sans-serif;
font-size: 88px;
letter-spacing: 0.04em;
line-height: 1;
background: linear-gradient(90deg,
#ff0080, #ff4500, #ffcc00,
#00ff94, #00ccff, #8b00ff, #ff0080
);
background-size: 200% auto;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
animation: nn-rnb-hue 4s linear infinite;
filter: drop-shadow(0 0 8px rgba(255,0,128,0.7)) drop-shadow(0 0 20px rgba(255,0,128,0.4));
}
@keyframes nn-rnb-hue {
from { filter: hue-rotate(0deg) drop-shadow(0 0 10px rgba(255,0,128,0.8)) drop-shadow(0 0 26px rgba(255,0,128,0.4)); }
to { filter: hue-rotate(360deg) drop-shadow(0 0 10px rgba(0,200,255,0.8)) drop-shadow(0 0 26px rgba(0,200,255,0.4)); }
}
/* 2 — sliding gradient */
.nn-rnb .rainbow-slide {
font-family: 'Righteous', cursive;
font-size: 60px;
letter-spacing: 0.12em;
line-height: 1;
background: linear-gradient(90deg,
#ff0080 0%,
#ff4500 12%,
#ffcc00 25%,
#00ff94 38%,
#00ccff 50%,
#8b00ff 62%,
#ff0080 75%,
#ff4500 88%,
#ffcc00 100%
);
background-size: 300% auto;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
animation: nn-rnb-slide 3.5s linear infinite;
filter: drop-shadow(0 0 6px rgba(255,100,0,0.6));
}
@keyframes nn-rnb-slide {
0% { background-position: 0% center; }
100% { background-position: 300% center; }
}
/* 3 — per-letter stagger + hue */
.nn-rnb .rainbow-letters {
display: flex;
gap: 2px;
font-family: 'Teko', sans-serif;
font-size: 72px;
font-weight: 700;
letter-spacing: 0.06em;
line-height: 1;
}
.nn-rnb .rl {
display: inline-block;
-webkit-text-fill-color: transparent;
background: linear-gradient(180deg, #ffffff 0%, hsl(var(--h), 100%, 65%) 100%);
-webkit-background-clip: text;
background-clip: text;
filter: drop-shadow(0 0 6px hsl(var(--h), 100%, 60%))
drop-shadow(0 0 18px hsl(var(--h), 100%, 50%));
animation: nn-rnb-letter 2s ease-in-out infinite alternate;
animation-delay: calc(var(--i) * 0.12s);
--h: calc(var(--i) * 28);
}
@keyframes nn-rnb-letter {
from { filter: drop-shadow(0 0 4px hsl(var(--h),100%,60%)) drop-shadow(0 0 12px hsl(var(--h),100%,50%)); }
to { filter: drop-shadow(0 0 8px hsl(var(--h),100%,70%)) drop-shadow(0 0 26px hsl(var(--h),100%,55%)) drop-shadow(0 0 50px hsl(var(--h),100%,40%)); }
}
/* 4 — outline only */
.nn-rnb .rainbow-outline {
font-family: 'Dela Gothic One', sans-serif;
font-size: 56px;
letter-spacing: 0.08em;
-webkit-text-fill-color: transparent;
-webkit-text-stroke: 2px transparent;
background: linear-gradient(90deg,
#ff0080, #ff4500, #ffcc00,
#00ff94, #00ccff, #8b00ff, #ff0080
);
background-size: 200% auto;
-webkit-background-clip: text;
background-clip: text;
animation: nn-rnb-slide 5s linear infinite;
filter:
drop-shadow(0 0 4px rgba(255,0,128,0.5))
drop-shadow(0 0 12px rgba(0,200,255,0.4));
}
/* 5 — text-shadow-only cycle */
.nn-rnb .rainbow-shadow {
font-family: 'Righteous', cursive;
font-size: 40px;
letter-spacing: 0.28em;
color: #fff;
animation: nn-rnb-shadow 6s linear infinite;
}
@keyframes nn-rnb-shadow {
0% { text-shadow: 0 0 4px #fff, 0 0 12px #ff0080, 0 0 28px #ff0080, 0 0 56px rgba(255,0,128,0.5); }
16% { text-shadow: 0 0 4px #fff, 0 0 12px #ff6600, 0 0 28px #ff6600, 0 0 56px rgba(255,102,0,0.5); }
33% { text-shadow: 0 0 4px #fff, 0 0 12px #ffcc00, 0 0 28px #ffcc00, 0 0 56px rgba(255,204,0,0.5); }
50% { text-shadow: 0 0 4px #fff, 0 0 12px #00ff94, 0 0 28px #00ff94, 0 0 56px rgba(0,255,148,0.5); }
66% { text-shadow: 0 0 4px #fff, 0 0 12px #00ccff, 0 0 28px #00ccff, 0 0 56px rgba(0,204,255,0.5); }
83% { text-shadow: 0 0 4px #fff, 0 0 12px #8b00ff, 0 0 28px #8b00ff, 0 0 56px rgba(139,0,255,0.5); }
100% { text-shadow: 0 0 4px #fff, 0 0 12px #ff0080, 0 0 28px #ff0080, 0 0 56px rgba(255,0,128,0.5); }
}
@media (max-width: 640px) {
.nn-rnb .rainbow-hue { font-size: 56px; }
.nn-rnb .rainbow-slide { font-size: 40px; }
.nn-rnb .rainbow-letters { font-size: 46px; }
.nn-rnb .rainbow-outline { font-size: 36px; }
.nn-rnb .rainbow-shadow { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
.nn-rnb .rainbow-hue,
.nn-rnb .rainbow-slide,
.nn-rnb .rl,
.nn-rnb .rainbow-outline,
.nn-rnb .rainbow-shadow,
.nn-rnb .ambient { animation: none !important; }
}
```
---
## 13 CSS Neumorphism & Soft UI Designs
URL: https://codefronts.com/design-styles/css-neumorphism/
Description: 13 hand-coded CSS neumorphism (soft-UI) widgets — meditation timer, vinyl music player, smart-home panel, button anatomy lab, audio mixing console, form studio, dark teal IoT hub, champagne finance dashboard with animated credit card, ripple-animated calculator, asymmetric weather grid with live clock, pure-CSS form controls showcase, rose parchment profile + testimonial layout, and a dark-mode neon system hub with glowing neumorphism. Fully interactive, palette-scoped, accessible.
Demo count: 13
### 01. Breathe
**Type:** CSS + JS
**Description:** A warm sand-toned neumorphic wellness widget built around a breathing orb. Pulsing concentric-ring progress arc in terracotta gradient, three expanding pulse rings tied to the inhale/exhale cycle, animated phase-label transitions (Inhale → Hold → Exhale → Rest), a live countdown timer, cycle-progress dots, and preset duration pills. Cormorant Garamond for editorial calm. Best for meditation apps, wellness brands, mindfulness tools.
**HTML:**
```html
Inhale slowly
5 min
10 min
20 min
```
**CSS:**
```css
/* ─── 01 Breathe — sand-toned meditation timer ──────────────────────
All :root vars from the source mock are scoped to .nm-bre so this
demo's warm sand palette never leaks. Body styles (centering,
background) are moved to the wrapper too. */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300&family=Jost:wght@200;300;400&display=swap');
.nm-bre {
--nm-bre-bg: #e8e0d8;
--nm-bre-shadow-dark: #c4bdb5;
--nm-bre-shadow-light: #ffffff;
--nm-bre-text-primary: #6b6260;
--nm-bre-text-muted: #a09896;
--nm-bre-accent: #c4856a;
--nm-bre-accent-soft: #d9a08a;
position: relative;
width: 100%;
min-height: 720px;
background: var(--nm-bre-bg);
font-family: 'Jost', system-ui, sans-serif;
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nm-bre *,
.nm-bre *::before,
.nm-bre *::after { box-sizing: border-box; }
/* The inner card holds the neumorphic shadow */
.nm-bre .card {
position: relative;
width: 100%;
max-width: 420px;
background: var(--nm-bre-bg);
border-radius: 40px;
padding: 50px 40px 44px;
box-shadow:
12px 12px 28px var(--nm-bre-shadow-dark),
-10px -10px 24px var(--nm-bre-shadow-light);
}
.nm-bre .ambient {
position: absolute;
width: 80px;
height: 80px;
border-radius: 50%;
top: -20px;
right: -20px;
background: radial-gradient(circle, rgba(196, 133, 106, 0.12), transparent 70%);
pointer-events: none;
}
/* Phase label */
.nm-bre .phase-label {
text-align: center;
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 13px;
font-weight: 300;
letter-spacing: 4px;
text-transform: uppercase;
color: var(--nm-bre-text-muted);
transition: opacity 0.8s;
}
/* Orb */
.nm-bre .orb-wrap {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 32px;
}
.nm-bre .ring-track {
width: 220px;
height: 220px;
border-radius: 50%;
background: var(--nm-bre-bg);
box-shadow:
8px 8px 18px var(--nm-bre-shadow-dark),
-7px -7px 16px var(--nm-bre-shadow-light);
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.nm-bre .ring-track svg {
position: absolute;
top: 0; left: 0;
width: 100%; height: 100%;
transform: rotate(-90deg);
}
.nm-bre .ring-track svg circle.track {
fill: none;
stroke: var(--nm-bre-shadow-dark);
stroke-width: 3;
opacity: 0.4;
}
.nm-bre .ring-track svg circle.progress {
fill: none;
stroke: url(#nm-bre-grad);
stroke-width: 3;
stroke-linecap: round;
stroke-dasharray: 628;
stroke-dashoffset: 628;
animation: nm-bre-ring 16s linear infinite;
}
@keyframes nm-bre-ring {
0% { stroke-dashoffset: 628; }
50% { stroke-dashoffset: 0; }
100% { stroke-dashoffset: 628; }
}
.nm-bre .orb-inner {
width: 160px;
height: 160px;
border-radius: 50%;
background: radial-gradient(circle at 38% 38%, #f2ebe4, #ddd5cc);
box-shadow:
inset 5px 5px 12px var(--nm-bre-shadow-dark),
inset -4px -4px 10px var(--nm-bre-shadow-light);
display: flex;
align-items: center;
justify-content: center;
position: relative;
z-index: 1;
}
.nm-bre .pulse-ring {
position: absolute;
border-radius: 50%;
border: 1.5px solid var(--nm-bre-accent-soft);
opacity: 0;
animation: nm-bre-pulse 8s ease-in-out infinite;
}
.nm-bre .pulse-ring:nth-of-type(1) { width: 90px; height: 90px; animation-delay: 0s; }
.nm-bre .pulse-ring:nth-of-type(2) { width: 120px; height: 120px; animation-delay: 2s; }
.nm-bre .pulse-ring:nth-of-type(3) { width: 150px; height: 150px; animation-delay: 4s; }
@keyframes nm-bre-pulse {
0% { transform: scale(0.7); opacity: 0; }
30% { opacity: 0.5; }
100% { transform: scale(1.4); opacity: 0; }
}
.nm-bre .orb-symbol {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 38px;
font-weight: 300;
color: var(--nm-bre-text-primary);
letter-spacing: -1px;
animation: nm-bre-breathe 8s ease-in-out infinite;
user-select: none;
}
@keyframes nm-bre-breathe {
0%, 100% { transform: scale(1); opacity: 0.7; }
50% { transform: scale(1.06); opacity: 1; }
}
/* Timer */
.nm-bre .timer-display { text-align: center; margin-bottom: 26px; }
.nm-bre .timer-display .time {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 52px;
font-weight: 300;
color: var(--nm-bre-text-primary);
letter-spacing: -1px;
line-height: 1;
}
.nm-bre .timer-display .sub {
font-size: 10px;
font-weight: 300;
letter-spacing: 3px;
text-transform: uppercase;
color: var(--nm-bre-text-muted);
margin-top: 6px;
}
/* Cycle dots */
.nm-bre .cycles {
display: flex;
justify-content: center;
gap: 10px;
margin-bottom: 30px;
}
.nm-bre .cycle-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--nm-bre-bg);
box-shadow:
2px 2px 5px var(--nm-bre-shadow-dark),
-2px -2px 4px var(--nm-bre-shadow-light);
transition: all 0.4s;
}
.nm-bre .cycle-dot.done {
background: var(--nm-bre-accent-soft);
box-shadow:
inset 1px 1px 3px rgba(0, 0, 0, 0.2),
inset -1px -1px 3px rgba(255, 255, 255, 0.4);
}
/* Controls */
.nm-bre .controls {
display: flex;
align-items: center;
justify-content: center;
gap: 24px;
}
.nm-bre .btn-sm {
width: 46px;
height: 46px;
border-radius: 50%;
border: none;
background: var(--nm-bre-bg);
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
box-shadow:
5px 5px 12px var(--nm-bre-shadow-dark),
-4px -4px 10px var(--nm-bre-shadow-light);
color: var(--nm-bre-text-muted);
font-size: 14px;
transition: all 0.2s;
}
.nm-bre .btn-sm:active {
box-shadow:
inset 3px 3px 8px var(--nm-bre-shadow-dark),
inset -2px -2px 6px var(--nm-bre-shadow-light);
}
.nm-bre .btn-main {
width: 68px;
height: 68px;
border-radius: 50%;
border: none;
background: var(--nm-bre-bg);
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
box-shadow:
8px 8px 18px var(--nm-bre-shadow-dark),
-7px -7px 16px var(--nm-bre-shadow-light);
color: var(--nm-bre-accent);
font-size: 22px;
transition: all 0.2s;
position: relative;
}
.nm-bre .btn-main::after {
content: '';
position: absolute;
inset: 4px;
border-radius: 50%;
background: linear-gradient(135deg, #f0e9e2, #dcd4cc);
z-index: 0;
}
.nm-bre .btn-main svg { position: relative; z-index: 1; }
.nm-bre .btn-main:active {
box-shadow:
inset 4px 4px 10px var(--nm-bre-shadow-dark),
inset -3px -3px 8px var(--nm-bre-shadow-light);
}
/* Presets */
.nm-bre .presets {
display: flex;
justify-content: center;
gap: 8px;
}
.nm-bre .preset-pill {
padding: 6px 16px;
border-radius: 20px;
border: none;
background: var(--nm-bre-bg);
font-family: 'Jost', system-ui, sans-serif;
font-size: 10px;
font-weight: 300;
letter-spacing: 2px;
text-transform: uppercase;
color: var(--nm-bre-text-muted);
cursor: pointer;
box-shadow:
3px 3px 8px var(--nm-bre-shadow-dark),
-2px -2px 6px var(--nm-bre-shadow-light);
transition: all 0.2s;
}
.nm-bre .preset-pill.active {
color: var(--nm-bre-accent);
box-shadow:
inset 2px 2px 5px var(--nm-bre-shadow-dark),
inset -2px -2px 4px var(--nm-bre-shadow-light);
}
@media (prefers-reduced-motion: reduce) {
.nm-bre .ring-track svg circle.progress,
.nm-bre .pulse-ring,
.nm-bre .orb-symbol { animation: none; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.nm-bre');
if (!root) return;
const phases = ['Inhale slowly', 'Hold gently', 'Exhale softly', 'Rest'];
const durations = [4000, 2000, 6000, 2000];
let phaseIdx = 0;
const phaseLabel = root.querySelector('#nm-bre-phase');
function nextPhase() {
phaseIdx = (phaseIdx + 1) % phases.length;
if (phaseLabel) {
phaseLabel.style.opacity = 0;
setTimeout(() => {
phaseLabel.textContent = phases[phaseIdx];
phaseLabel.style.opacity = 1;
}, 400);
}
setTimeout(nextPhase, durations[phaseIdx]);
}
setTimeout(nextPhase, durations[0]);
let totalSecs = 300;
let timerInterval = null;
let running = false;
const timerEl = root.querySelector('#nm-bre-timer');
const playBtn = root.querySelector('#nm-bre-play');
const fmt = (s) => String(Math.floor(s / 60)).padStart(2, '0') + ':' + String(s % 60).padStart(2, '0');
const playIcon = ' ';
const pauseIcon = ' ';
if (playBtn) playBtn.addEventListener('click', () => {
running = !running;
if (running) {
playBtn.innerHTML = pauseIcon;
timerInterval = setInterval(() => {
if (totalSecs > 0) {
totalSecs--;
if (timerEl) timerEl.textContent = fmt(totalSecs);
} else {
clearInterval(timerInterval);
running = false;
playBtn.innerHTML = playIcon;
}
}, 1000);
} else {
clearInterval(timerInterval);
playBtn.innerHTML = playIcon;
}
});
root.querySelectorAll('.preset-pill').forEach(btn => {
btn.addEventListener('click', () => {
root.querySelector('.preset-pill.active')?.classList.remove('active');
btn.classList.add('active');
const mins = parseInt(btn.dataset.mins, 10) || 5;
totalSecs = mins * 60;
if (timerEl) timerEl.textContent = fmt(totalSecs);
if (running) {
clearInterval(timerInterval);
running = false;
if (playBtn) playBtn.innerHTML = playIcon;
}
});
});
})();
```
### 02. Vinyl Player
**Type:** CSS + JS
**Description:** A deep-slate dark-neumorphic music player with a spinning vinyl disc featuring real grooves via repeating-radial-gradient. Includes an 18-bar animated EQ visualizer synced to playback state, arc progress scrubber with glowing gradient thumb, tonearm SVG, amber accent label, and a full transport control set (shuffle, prev, play/pause, next, loop). DM Serif Display for warm sophistication. Best for music apps, podcast platforms, audio dashboards.
**HTML:**
```html
Midnight Reverie
Aurelia Voss · Late Hours
```
**CSS:**
```css
/* ─── 02 Vinyl Player — dark-slate dark-neumorphic music widget ───── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@300;400&display=swap');
.nm-vin {
--nm-vin-bg: #1e2230;
--nm-vin-neu-dark: #141720;
--nm-vin-neu-light: #282e40;
--nm-vin-text-primary: #d0d4e0;
--nm-vin-text-muted: #606880;
--nm-vin-accent: #e0a86c;
--nm-vin-accent2: #7c6cdb;
--nm-vin-inset: #1b1f2d;
position: relative;
width: 100%;
min-height: 720px;
background: var(--nm-vin-bg);
font-family: 'DM Mono', ui-monospace, monospace;
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nm-vin *,
.nm-vin *::before,
.nm-vin *::after { box-sizing: border-box; }
/* The inner card holds the dark neumorphic shadow */
.nm-vin .card {
position: relative;
width: 100%;
max-width: 400px;
background: var(--nm-vin-bg);
border-radius: 36px;
padding: 40px 34px 36px;
box-shadow:
14px 14px 32px var(--nm-vin-neu-dark),
-10px -10px 28px var(--nm-vin-neu-light);
overflow: hidden;
}
/* Glows — contained inside the card */
.nm-vin .glow {
position: absolute;
width: 200px;
height: 200px;
border-radius: 50%;
background: radial-gradient(circle, rgba(124, 108, 219, 0.08), transparent 70%);
top: -60px;
right: -40px;
pointer-events: none;
}
.nm-vin .glow2 {
position: absolute;
width: 160px;
height: 160px;
border-radius: 50%;
background: radial-gradient(circle, rgba(224, 168, 108, 0.07), transparent 70%);
bottom: -40px;
left: -30px;
pointer-events: none;
}
/* Vinyl disc */
.nm-vin .disc-wrap {
display: flex;
justify-content: center;
position: relative;
}
.nm-vin .disc-outer {
width: 200px;
height: 200px;
border-radius: 50%;
background: var(--nm-vin-bg);
box-shadow:
10px 10px 24px var(--nm-vin-neu-dark),
-8px -8px 20px var(--nm-vin-neu-light);
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.nm-vin .disc {
width: 170px;
height: 170px;
border-radius: 50%;
background:
repeating-radial-gradient(circle at 50% 50%,
transparent 0px, transparent 3px,
rgba(255, 255, 255, 0.02) 3px, rgba(255, 255, 255, 0.02) 4px
),
conic-gradient(from 0deg,
#1a1d2a 0deg, #242838 90deg, #1a1d2a 180deg, #242838 270deg, #1a1d2a 360deg
);
box-shadow:
inset 4px 4px 12px rgba(0, 0, 0, 0.6),
inset -3px -3px 8px rgba(255, 255, 255, 0.04);
display: flex;
align-items: center;
justify-content: center;
animation: nm-vin-spin 4s linear infinite;
animation-play-state: paused;
}
.nm-vin .disc.playing { animation-play-state: running; }
@keyframes nm-vin-spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.nm-vin .disc-label {
width: 62px;
height: 62px;
border-radius: 50%;
background: linear-gradient(135deg, var(--nm-vin-accent), #c4863a);
box-shadow:
inset 2px 2px 6px rgba(0, 0, 0, 0.3),
inset -1px -1px 3px rgba(255, 255, 255, 0.2);
display: flex;
align-items: center;
justify-content: center;
font-size: 22px;
color: #1a1d2a;
}
/* Tonearm */
.nm-vin .tonearm-wrap {
position: absolute;
top: -8px;
right: -8px;
width: 70px;
height: 80px;
}
.nm-vin .tonearm-wrap svg {
filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.6));
}
/* Track info */
.nm-vin .track-info { text-align: center; margin-bottom: 22px; }
.nm-vin .track-title {
font-family: 'DM Serif Display', Georgia, serif;
font-size: 22px;
color: var(--nm-vin-text-primary);
margin-bottom: 5px;
letter-spacing: -0.3px;
}
.nm-vin .track-artist {
font-size: 10px;
font-weight: 300;
letter-spacing: 3px;
text-transform: uppercase;
color: var(--nm-vin-text-muted);
}
/* Progress bar */
.nm-vin .progress-wrap { margin-bottom: 22px; position: relative; }
.nm-vin .progress-track {
height: 4px;
border-radius: 2px;
background: var(--nm-vin-inset);
box-shadow:
inset 2px 2px 4px var(--nm-vin-neu-dark),
inset -1px -1px 3px rgba(255, 255, 255, 0.04);
position: relative;
cursor: pointer;
}
.nm-vin .progress-fill {
height: 100%;
width: 38%;
border-radius: 2px;
background: linear-gradient(90deg, var(--nm-vin-accent2), var(--nm-vin-accent));
position: relative;
}
.nm-vin .progress-thumb {
width: 12px;
height: 12px;
border-radius: 50%;
background: var(--nm-vin-bg);
box-shadow:
2px 2px 6px var(--nm-vin-neu-dark),
-1px -1px 4px var(--nm-vin-neu-light);
position: absolute;
right: -6px;
top: -4px;
}
.nm-vin .progress-times {
display: flex;
justify-content: space-between;
margin-top: 8px;
}
.nm-vin .progress-times span {
font-size: 9px;
color: var(--nm-vin-text-muted);
letter-spacing: 1px;
}
/* EQ bars */
.nm-vin .eq-wrap {
display: flex;
align-items: flex-end;
justify-content: center;
gap: 4px;
height: 30px;
margin-bottom: 24px;
}
.nm-vin .eq-bar {
display: block;
width: 4px;
border-radius: 2px;
background: linear-gradient(to top, var(--nm-vin-accent2), var(--nm-vin-accent));
animation: nm-vin-eq 0.6s ease-in-out infinite alternate;
opacity: 0.7;
}
.nm-vin .eq-bar:nth-child(1) { height: 40%; animation-duration: 0.5s; animation-delay: 0.0s; }
.nm-vin .eq-bar:nth-child(2) { height: 70%; animation-duration: 0.7s; animation-delay: 0.1s; }
.nm-vin .eq-bar:nth-child(3) { height: 90%; animation-duration: 0.4s; animation-delay: 0.2s; }
.nm-vin .eq-bar:nth-child(4) { height: 60%; animation-duration: 0.6s; animation-delay: 0.05s; }
.nm-vin .eq-bar:nth-child(5) { height: 100%; animation-duration: 0.8s; animation-delay: 0.15s; }
.nm-vin .eq-bar:nth-child(6) { height: 75%; animation-duration: 0.5s; animation-delay: 0.25s; }
.nm-vin .eq-bar:nth-child(7) { height: 50%; animation-duration: 0.7s; animation-delay: 0.1s; }
.nm-vin .eq-bar:nth-child(8) { height: 85%; animation-duration: 0.4s; animation-delay: 0.3s; }
.nm-vin .eq-bar:nth-child(9) { height: 60%; animation-duration: 0.6s; animation-delay: 0.0s; }
.nm-vin .eq-bar:nth-child(10) { height: 35%; animation-duration: 0.5s; animation-delay: 0.2s; }
.nm-vin .eq-bar:nth-child(11) { height: 80%; animation-duration: 0.9s; animation-delay: 0.05s; }
.nm-vin .eq-bar:nth-child(12) { height: 55%; animation-duration: 0.6s; animation-delay: 0.15s; }
.nm-vin .eq-bar:nth-child(13) { height: 45%; animation-duration: 0.4s; animation-delay: 0.25s; }
.nm-vin .eq-bar:nth-child(14) { height: 70%; animation-duration: 0.7s; animation-delay: 0.1s; }
.nm-vin .eq-bar:nth-child(15) { height: 90%; animation-duration: 0.5s; animation-delay: 0.35s; }
.nm-vin .eq-bar:nth-child(16) { height: 65%; animation-duration: 0.8s; animation-delay: 0.0s; }
.nm-vin .eq-bar:nth-child(17) { height: 40%; animation-duration: 0.6s; animation-delay: 0.2s; }
.nm-vin .eq-bar:nth-child(18) { height: 55%; animation-duration: 0.4s; animation-delay: 0.1s; }
@keyframes nm-vin-eq {
0% { transform: scaleY(0.3); }
100% { transform: scaleY(1); }
}
.nm-vin .eq-wrap.paused .eq-bar { animation-play-state: paused; }
/* Controls */
.nm-vin .controls {
display: flex;
align-items: center;
justify-content: center;
gap: 18px;
}
.nm-vin .ctrl-btn {
border: none;
background: var(--nm-vin-bg);
border-radius: 50%;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--nm-vin-text-muted);
transition: all 0.15s;
}
.nm-vin .ctrl-btn.sm {
width: 40px;
height: 40px;
box-shadow:
4px 4px 10px var(--nm-vin-neu-dark),
-3px -3px 8px var(--nm-vin-neu-light);
font-size: 12px;
}
.nm-vin .ctrl-btn.sm:active {
box-shadow:
inset 2px 2px 6px var(--nm-vin-neu-dark),
inset -1px -1px 4px var(--nm-vin-neu-light);
color: var(--nm-vin-accent);
}
.nm-vin .ctrl-btn.lg {
width: 62px;
height: 62px;
box-shadow:
7px 7px 16px var(--nm-vin-neu-dark),
-6px -6px 14px var(--nm-vin-neu-light);
color: var(--nm-vin-accent);
font-size: 20px;
}
.nm-vin .ctrl-btn.lg:active {
box-shadow:
inset 3px 3px 8px var(--nm-vin-neu-dark),
inset -2px -2px 6px var(--nm-vin-neu-light);
}
/* Volume */
.nm-vin .volume-row {
display: flex;
align-items: center;
gap: 12px;
}
.nm-vin .vol-icon { color: var(--nm-vin-text-muted); font-size: 11px; }
.nm-vin .vol-track {
flex: 1;
height: 4px;
border-radius: 2px;
background: var(--nm-vin-inset);
box-shadow:
inset 2px 2px 4px var(--nm-vin-neu-dark),
inset -1px -1px 3px rgba(255, 255, 255, 0.04);
position: relative;
}
.nm-vin .vol-fill {
height: 100%;
width: 62%;
border-radius: 2px;
background: linear-gradient(90deg, var(--nm-vin-accent2), var(--nm-vin-accent));
}
@media (prefers-reduced-motion: reduce) {
.nm-vin .disc,
.nm-vin .eq-bar { animation: none; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.nm-vin');
if (!root) return;
let playing = false;
const disc = root.querySelector('#nm-vin-disc');
const eqWrap = root.querySelector('#nm-vin-eq');
const playBtn = root.querySelector('#nm-vin-play');
const pFill = root.querySelector('#nm-vin-fill');
const elapsedEl = root.querySelector('#nm-vin-elapsed');
let elapsed = 88;
const total = 232;
let interval = null;
const fmt = (s) => Math.floor(s / 60) + ':' + String(s % 60).padStart(2, '0');
const playIcon = ' ';
const pauseIcon = ' ';
if (playBtn) playBtn.addEventListener('click', () => {
playing = !playing;
if (disc) disc.classList.toggle('playing', playing);
if (playing) {
eqWrap?.classList.remove('paused');
playBtn.innerHTML = pauseIcon;
interval = setInterval(() => {
elapsed = Math.min(elapsed + 1, total);
if (pFill) pFill.style.width = (elapsed / total * 100) + '%';
if (elapsedEl) elapsedEl.textContent = fmt(elapsed);
if (elapsed >= total) { clearInterval(interval); playing = false; }
}, 1000);
} else {
eqWrap?.classList.add('paused');
clearInterval(interval);
playBtn.innerHTML = playIcon;
}
});
})();
```
### 03. Nexus
**Type:** CSS + JS
**Description:** A cool blue-gray light-neumorphic room control dashboard. Features a live arc-dial temperature control with +/− buttons, a 2×2 device card grid (each with inset toggle switches, active color-stripe headers, and individual accent colors), room selector pills, and a security status bar with pulsing indicator dots. Every device card is fully toggleable. Syne typeface for a clean modern edge. Best for smart-home apps, IoT dashboards, control panels.
**HTML:**
```html
Living Room
Bedroom
Kitchen
Office
Climate Control
Humidity 48% · Feels 23°
−
+
💡
Main Light
On · 70%
❄️
Air Purifier
Running
📺
Smart TV
Off
🔊
Speaker
Playing
Security System
All Clear · Armed
```
**CSS:**
```css
/* ─── 03 Nexus — cool blue-gray smart home control panel ─────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;700&family=Syne+Mono&display=swap');
.nm-nex {
--nm-nex-bg: #dce4ee;
--nm-nex-dark: #b8c4d2;
--nm-nex-light: #ffffff;
--nm-nex-text: #5a6880;
--nm-nex-text-dim: #96a4b8;
--nm-nex-on: #5b8def;
--nm-nex-warm: #f0a855;
--nm-nex-green: #5bb87e;
--nm-nex-red: #e07070;
--nm-nex-inset: #d4dce8;
position: relative;
width: 100%;
min-height: 720px;
background: var(--nm-nex-bg);
font-family: 'Syne', system-ui, sans-serif;
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nm-nex *,
.nm-nex *::before,
.nm-nex *::after { box-sizing: border-box; }
/* The inner card holds the neumorphic shadow */
.nm-nex .card {
position: relative;
width: 100%;
max-width: 440px;
background: var(--nm-nex-bg);
border-radius: 36px;
padding: 36px 34px 34px;
box-shadow:
14px 14px 30px var(--nm-nex-dark),
-12px -12px 26px var(--nm-nex-light);
}
/* Room pills */
.nm-nex .room-row {
display: flex;
gap: 8px;
margin-bottom: 26px;
overflow-x: auto;
scrollbar-width: none;
}
.nm-nex .room-row::-webkit-scrollbar { display: none; }
.nm-nex .room-pill {
flex-shrink: 0;
padding: 7px 16px;
border-radius: 20px;
border: none;
background: var(--nm-nex-bg);
font-family: 'Syne', system-ui, sans-serif;
font-size: 11px;
font-weight: 500;
letter-spacing: 0.5px;
color: var(--nm-nex-text-dim);
cursor: pointer;
box-shadow:
4px 4px 10px var(--nm-nex-dark),
-3px -3px 8px var(--nm-nex-light);
transition: all 0.2s;
}
.nm-nex .room-pill.active {
background: var(--nm-nex-on);
color: #fff;
box-shadow:
4px 4px 12px rgba(91, 141, 239, 0.35),
-2px -2px 6px rgba(255, 255, 255, 0.5),
inset 1px 1px 3px rgba(255, 255, 255, 0.2);
}
/* Temp dial */
.nm-nex .temp-section {
display: flex;
align-items: center;
gap: 20px;
margin-bottom: 22px;
background: var(--nm-nex-bg);
border-radius: 24px;
padding: 18px;
box-shadow:
inset 5px 5px 12px var(--nm-nex-dark),
inset -4px -4px 10px var(--nm-nex-light);
}
.nm-nex .dial-wrap {
position: relative;
width: 90px;
height: 90px;
flex-shrink: 0;
}
.nm-nex .dial-wrap svg {
width: 100%;
height: 100%;
transform: rotate(-220deg);
}
.nm-nex .dial-wrap svg .track {
fill: none;
stroke: var(--nm-nex-dark);
stroke-width: 5;
stroke-linecap: round;
opacity: 0.5;
}
.nm-nex .dial-wrap svg .fill {
fill: none;
stroke: url(#nm-nex-tempgrad);
stroke-width: 5;
stroke-linecap: round;
stroke-dasharray: 220;
stroke-dashoffset: 55;
transition: stroke-dashoffset 0.5s;
}
.nm-nex .dial-center {
position: absolute;
inset: 14px;
border-radius: 50%;
background: var(--nm-nex-bg);
box-shadow:
3px 3px 8px var(--nm-nex-dark),
-2px -2px 6px var(--nm-nex-light);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.nm-nex .dial-val {
font-family: 'Syne Mono', ui-monospace, monospace;
font-size: 18px;
color: var(--nm-nex-text);
line-height: 1;
}
.nm-nex .dial-unit {
font-size: 8px;
color: var(--nm-nex-text-dim);
letter-spacing: 1px;
}
.nm-nex .temp-info { flex: 1; }
.nm-nex .temp-label {
font-size: 12px;
font-weight: 700;
color: var(--nm-nex-text);
margin-bottom: 4px;
letter-spacing: 0.5px;
}
.nm-nex .temp-sub {
font-size: 10px;
color: var(--nm-nex-text-dim);
margin-bottom: 14px;
}
.nm-nex .temp-btns { display: flex; gap: 8px; }
.nm-nex .adj-btn {
width: 30px;
height: 30px;
border-radius: 50%;
border: none;
background: var(--nm-nex-bg);
cursor: pointer;
font-size: 16px;
color: var(--nm-nex-text);
display: inline-flex;
align-items: center;
justify-content: center;
box-shadow:
3px 3px 7px var(--nm-nex-dark),
-2px -2px 5px var(--nm-nex-light);
transition: all 0.15s;
font-weight: 500;
font-family: inherit;
}
.nm-nex .adj-btn:active {
box-shadow:
inset 2px 2px 5px var(--nm-nex-dark),
inset -1px -1px 4px var(--nm-nex-light);
color: var(--nm-nex-on);
}
/* Device grid */
.nm-nex .devices-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 14px;
margin-bottom: 20px;
}
.nm-nex .device-card {
background: var(--nm-nex-bg);
border: 0;
border-radius: 20px;
padding: 18px 16px;
box-shadow:
6px 6px 14px var(--nm-nex-dark),
-5px -5px 12px var(--nm-nex-light);
cursor: pointer;
transition: all 0.2s;
position: relative;
overflow: hidden;
text-align: left;
font-family: inherit;
}
.nm-nex .device-card.active::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 3px;
border-radius: 20px 20px 0 0;
background: var(--device-color, var(--nm-nex-on));
}
.nm-nex .device-icon {
width: 36px;
height: 36px;
border-radius: 12px;
background: var(--nm-nex-bg);
display: inline-flex;
align-items: center;
justify-content: center;
margin-bottom: 12px;
font-size: 16px;
box-shadow:
3px 3px 8px var(--nm-nex-dark),
-2px -2px 6px var(--nm-nex-light);
transition: all 0.2s;
}
.nm-nex .device-card.active .device-icon {
background: var(--device-color, var(--nm-nex-on));
box-shadow:
2px 2px 6px rgba(0, 0, 0, 0.15),
inset 1px 1px 3px rgba(255, 255, 255, 0.25);
color: #fff;
}
.nm-nex .device-name {
font-size: 11px;
font-weight: 700;
color: var(--nm-nex-text);
margin-bottom: 2px;
letter-spacing: 0.3px;
}
.nm-nex .device-status {
font-size: 9px;
color: var(--nm-nex-text-dim);
letter-spacing: 0.5px;
font-family: 'Syne Mono', ui-monospace, monospace;
}
.nm-nex .device-card.active .device-status { color: var(--device-color, var(--nm-nex-on)); }
/* Toggle switch */
.nm-nex .toggle {
position: absolute;
top: 16px;
right: 14px;
width: 28px;
height: 16px;
border-radius: 8px;
background: var(--nm-nex-bg);
box-shadow:
inset 2px 2px 5px var(--nm-nex-dark),
inset -1px -1px 4px var(--nm-nex-light);
cursor: pointer;
transition: all 0.2s;
}
.nm-nex .toggle::after {
content: '';
position: absolute;
width: 11px;
height: 11px;
border-radius: 50%;
background: var(--nm-nex-text-dim);
top: 2.5px;
left: 3px;
transition: all 0.25s;
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}
.nm-nex .device-card.active .toggle {
background: var(--device-color, var(--nm-nex-on));
box-shadow:
inset 1px 1px 3px rgba(0, 0, 0, 0.25),
inset -1px -1px 2px rgba(255, 255, 255, 0.2);
}
.nm-nex .device-card.active .toggle::after {
left: calc(100% - 14px);
background: #fff;
}
/* Security row */
.nm-nex .security-row {
background: var(--nm-nex-bg);
border-radius: 18px;
padding: 16px 18px;
box-shadow:
inset 4px 4px 10px var(--nm-nex-dark),
inset -3px -3px 8px var(--nm-nex-light);
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.nm-nex .sec-left { display: flex; align-items: center; gap: 12px; }
.nm-nex .sec-icon {
width: 36px;
height: 36px;
border-radius: 12px;
background: var(--nm-nex-bg);
box-shadow:
3px 3px 7px var(--nm-nex-dark),
-2px -2px 5px var(--nm-nex-light);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 16px;
color: var(--nm-nex-green);
}
.nm-nex .sec-title {
font-size: 12px;
font-weight: 700;
color: var(--nm-nex-text);
margin-bottom: 2px;
}
.nm-nex .sec-sub {
font-size: 9px;
color: var(--nm-nex-green);
font-family: 'Syne Mono', ui-monospace, monospace;
letter-spacing: 0.5px;
}
.nm-nex .status-dots { display: flex; gap: 5px; }
.nm-nex .sdot {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--nm-nex-bg);
box-shadow:
1px 1px 3px var(--nm-nex-dark),
-1px -1px 2px var(--nm-nex-light);
}
.nm-nex .sdot.green {
background: var(--nm-nex-green);
box-shadow: 0 0 6px rgba(91, 184, 126, 0.5);
}
.nm-nex .sdot.pulse { animation: nm-nex-dot 2s ease-in-out infinite; }
@keyframes nm-nex-dot {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
@media (prefers-reduced-motion: reduce) {
.nm-nex .sdot.pulse { animation: none; }
.nm-nex .dial-wrap svg .fill { transition: none; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.nm-nex');
if (!root) return;
const statusMap = {
light: { on: 'On · 70%', off: 'Off' },
air: { on: 'Running', off: 'Off' },
tv: { on: 'On', off: 'Off' },
speaker: { on: 'Playing', off: 'Off' },
};
root.querySelectorAll('.device-card').forEach(card => {
card.addEventListener('click', () => {
card.classList.toggle('active');
const key = card.dataset.nmNexDevice;
const status = card.querySelector('.device-status');
const labels = statusMap[key];
if (status && labels) {
status.textContent = card.classList.contains('active') ? labels.on : labels.off;
}
});
});
let temp = 22;
const tempVal = root.querySelector('#nm-nex-tempval');
const dialFill = root.querySelector('#nm-nex-dialfill');
root.querySelectorAll('[data-nm-nex-adj]').forEach(btn => {
btn.addEventListener('click', () => {
const delta = parseInt(btn.dataset.nmNexAdj, 10) || 0;
temp = Math.max(16, Math.min(30, temp + delta));
if (tempVal) tempVal.textContent = temp;
if (dialFill) {
const pct = (temp - 16) / 14;
dialFill.style.strokeDashoffset = String(220 - pct * 220);
}
});
});
root.querySelectorAll('.room-pill').forEach(p => {
p.addEventListener('click', () => {
root.querySelectorAll('.room-pill').forEach(o => {
o.classList.remove('active');
o.setAttribute('aria-selected', 'false');
});
p.classList.add('active');
p.setAttribute('aria-selected', 'true');
});
});
})();
```
### 04. Soft UI Button Lab
**Type:** CSS + JS
**Description:** A cool-slate showcase panel demonstrating the full neumorphic vocabulary. Section 1 shows the three core shadow states (resting, hover-lifted, pressed-inset) side-by-side with live box-shadow code snippets beneath each. Section 2 is a shapes row — pill, accent-filled, ghost outline, icon squares, FAB, danger, success, plus a spinner-loading state. Section 3 has draggable toggles, neumorphic checkboxes, and a segmented radio control. Syne + DM Sans typefaces. Best for design-system docs, button libraries, component galleries.
**HTML:**
```html
01 — Shadow State Anatomy
Button
○ Resting
box-shadow:
8px 8px 18px #a3b1c6, -8px -8px 18px #ffffff;
Extruded. Light from top-left, dark bottom-right.
Button
↑ Hover / Lift
box-shadow:
12px 12px 26px #a3b1c6, -12px -12px 26px #ffffff;
Shadows grow — surface rises.
Button
⬤ Pressed
box-shadow:
inset 6px 6px 14px #a3b1c6, inset -6px -6px 14px #fff;
Inverted inset — surface sinks in.
02 — Shapes & Variants
Default
Pill Shape
★ Primary
Outline
✏️
🔍
⚙
▪
+
Delete
Confirm
Loading…
03 — Toggles · Radios · Checks
Enabled
Dark Mode
Notifications
✓
Completed
Add to cart
Daily
Weekly
Monthly
```
**CSS:**
```css
/* ─── 04 Soft UI Button Lab — cool slate showcase panel ───────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');
.nm-btn {
--nm-btn-bg: #e0e5ec;
--nm-btn-sd: #a3b1c6;
--nm-btn-sl: #ffffff;
--nm-btn-ib: #d6dce7;
--nm-btn-acc: #6c5ce7;
--nm-btn-ac2: #a29bfe;
--nm-btn-txt: #4a5568;
--nm-btn-txt2: #1a202c;
--nm-btn-r: 16px;
--nm-btn-neu-out: 8px 8px 18px var(--nm-btn-sd), -8px -8px 18px var(--nm-btn-sl);
--nm-btn-neu-in: inset 6px 6px 14px var(--nm-btn-sd), inset -6px -6px 14px var(--nm-btn-sl);
--nm-btn-neu-sm: 5px 5px 12px var(--nm-btn-sd), -5px -5px 12px var(--nm-btn-sl);
--nm-btn-neu-sm-in: inset 4px 4px 9px var(--nm-btn-sd), inset -4px -4px 9px var(--nm-btn-sl);
position: relative;
width: 100%;
min-height: 760px;
background: var(--nm-btn-bg);
font-family: 'DM Sans', system-ui, sans-serif;
color: var(--nm-btn-txt);
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nm-btn *,
.nm-btn *::before,
.nm-btn *::after { box-sizing: border-box; }
.nm-btn .card {
position: relative;
width: 100%;
max-width: 860px;
background: var(--nm-btn-bg);
border-radius: 40px;
padding: 48px 44px;
box-shadow: 22px 22px 54px var(--nm-btn-sd), -22px -22px 54px var(--nm-btn-sl);
display: flex;
flex-direction: column;
gap: 40px;
}
.nm-btn .sec-tag {
font-family: 'Syne', system-ui, sans-serif;
font-size: 9px;
font-weight: 700;
letter-spacing: 3px;
text-transform: uppercase;
color: var(--nm-btn-txt);
opacity: 0.6;
margin-bottom: 20px;
}
/* Section 1 — Three states */
.nm-btn .states-row {
display: flex;
gap: 40px;
align-items: flex-start;
flex-wrap: wrap;
}
.nm-btn .state-demo {
flex: 1;
min-width: 180px;
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.nm-btn .state-label {
font-family: 'Syne', system-ui, sans-serif;
font-size: 11px;
font-weight: 600;
letter-spacing: 1px;
text-transform: uppercase;
color: var(--nm-btn-txt);
opacity: 0.7;
}
.nm-btn .btn-resting {
background: var(--nm-btn-bg);
border: none;
cursor: pointer;
padding: 16px 40px;
border-radius: var(--nm-btn-r);
font-family: 'Syne', system-ui, sans-serif;
font-size: 15px;
font-weight: 600;
color: var(--nm-btn-txt2);
box-shadow: var(--nm-btn-neu-out);
transition: box-shadow 0.2s ease, transform 0.15s ease;
letter-spacing: 0.3px;
user-select: none;
}
.nm-btn .btn-resting:hover {
box-shadow: 10px 10px 22px var(--nm-btn-sd), -10px -10px 22px var(--nm-btn-sl);
transform: translateY(-1px);
}
.nm-btn .btn-resting:active {
box-shadow: var(--nm-btn-neu-in);
transform: translateY(0);
}
.nm-btn .btn-hover-state,
.nm-btn .btn-pressed-state {
background: var(--nm-btn-bg);
border: none;
cursor: pointer;
padding: 16px 40px;
border-radius: var(--nm-btn-r);
font-family: 'Syne', system-ui, sans-serif;
font-size: 15px;
font-weight: 600;
color: var(--nm-btn-txt2);
letter-spacing: 0.3px;
}
.nm-btn .btn-hover-state {
box-shadow: 12px 12px 26px var(--nm-btn-sd), -12px -12px 26px var(--nm-btn-sl);
transform: translateY(-1px);
}
.nm-btn .btn-pressed-state {
box-shadow: var(--nm-btn-neu-in);
}
.nm-btn .shadow-diagram {
width: 100%;
max-width: 196px;
background: var(--nm-btn-ib);
border-radius: 12px;
padding: 12px;
box-shadow: var(--nm-btn-neu-sm-in);
font-family: 'DM Sans', ui-monospace, monospace;
font-size: 9px;
color: var(--nm-btn-txt);
line-height: 1.6;
}
.nm-btn .shadow-diagram code {
display: block;
font-size: 8px;
color: var(--nm-btn-acc);
opacity: 0.9;
margin-top: 4px;
line-height: 1.5;
}
/* Section 2 — Shapes */
.nm-btn .shapes-row {
display: flex;
gap: 16px;
align-items: center;
flex-wrap: wrap;
}
.nm-btn .btn-pill {
background: var(--nm-btn-bg);
border: none;
cursor: pointer;
padding: 14px 32px;
border-radius: 100px;
font-family: 'Syne', system-ui, sans-serif;
font-size: 13px;
font-weight: 600;
color: var(--nm-btn-txt2);
box-shadow: var(--nm-btn-neu-sm);
transition: all 0.18s ease;
letter-spacing: 0.3px;
}
.nm-btn .btn-pill:hover {
box-shadow: 7px 7px 16px var(--nm-btn-sd), -7px -7px 16px var(--nm-btn-sl);
transform: translateY(-1px);
}
.nm-btn .btn-pill:active {
box-shadow: var(--nm-btn-neu-sm-in);
transform: scale(0.98);
}
.nm-btn .btn-accent {
border: none;
cursor: pointer;
padding: 14px 32px;
border-radius: 100px;
font-family: 'Syne', system-ui, sans-serif;
font-size: 13px;
font-weight: 700;
color: #fff;
background: linear-gradient(145deg, var(--nm-btn-acc), #5040cc);
box-shadow: 8px 8px 18px rgba(108, 92, 231, 0.4), -4px -4px 12px var(--nm-btn-sl);
transition: all 0.18s ease;
letter-spacing: 0.3px;
}
.nm-btn .btn-accent:hover {
transform: translateY(-2px);
box-shadow: 10px 14px 24px rgba(108, 92, 231, 0.45), -4px -4px 12px var(--nm-btn-sl);
}
.nm-btn .btn-accent:active {
box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.25);
transform: scale(0.97);
}
.nm-btn .btn-sq {
background: var(--nm-btn-bg);
border: none;
cursor: pointer;
width: 52px;
height: 52px;
border-radius: 14px;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 20px;
box-shadow: var(--nm-btn-neu-sm);
transition: all 0.15s ease;
color: var(--nm-btn-txt2);
}
.nm-btn .btn-sq:hover {
box-shadow: 7px 7px 16px var(--nm-btn-sd), -7px -7px 16px var(--nm-btn-sl);
}
.nm-btn .btn-sq:active {
box-shadow: var(--nm-btn-neu-sm-in);
}
.nm-btn .btn-circle {
background: var(--nm-btn-bg);
border: none;
cursor: pointer;
width: 56px;
height: 56px;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 20px;
box-shadow: var(--nm-btn-neu-sm);
transition: all 0.15s ease;
color: var(--nm-btn-txt2);
}
.nm-btn .btn-circle:hover {
box-shadow: 7px 7px 16px var(--nm-btn-sd), -7px -7px 16px var(--nm-btn-sl);
transform: scale(1.05);
}
.nm-btn .btn-circle:active {
box-shadow: var(--nm-btn-neu-sm-in);
transform: scale(0.97);
}
.nm-btn .btn-fab {
background: var(--nm-btn-bg);
border: none;
cursor: pointer;
width: 72px;
height: 72px;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 26px;
box-shadow: 12px 12px 28px var(--nm-btn-sd), -12px -12px 28px var(--nm-btn-sl);
transition: all 0.2s ease;
color: var(--nm-btn-txt2);
}
.nm-btn .btn-fab:hover {
box-shadow: 14px 14px 32px var(--nm-btn-sd), -14px -14px 32px var(--nm-btn-sl);
transform: scale(1.05);
}
.nm-btn .btn-fab:active {
box-shadow: inset 8px 8px 18px var(--nm-btn-sd), inset -8px -8px 18px var(--nm-btn-sl);
}
.nm-btn .btn-ghost {
background: var(--nm-btn-bg);
border: none;
cursor: pointer;
padding: 13px 28px;
border-radius: 100px;
font-family: 'Syne', system-ui, sans-serif;
font-size: 13px;
font-weight: 600;
color: var(--nm-btn-acc);
box-shadow: var(--nm-btn-neu-sm), inset 0 0 0 2px rgba(108, 92, 231, 0.3);
transition: all 0.18s ease;
letter-spacing: 0.3px;
}
.nm-btn .btn-ghost:hover {
box-shadow: 7px 7px 16px var(--nm-btn-sd), -7px -7px 16px var(--nm-btn-sl), inset 0 0 0 2px rgba(108, 92, 231, 0.6);
}
.nm-btn .btn-ghost:active {
box-shadow: inset 4px 4px 9px var(--nm-btn-sd), inset -4px -4px 9px var(--nm-btn-sl), inset 0 0 0 2px rgba(108, 92, 231, 0.5);
}
.nm-btn .btn-danger,
.nm-btn .btn-success {
border: none;
cursor: pointer;
padding: 13px 24px;
border-radius: 14px;
font-family: 'Syne', system-ui, sans-serif;
font-size: 13px;
font-weight: 600;
background: var(--nm-btn-bg);
box-shadow: var(--nm-btn-neu-sm);
transition: all 0.15s;
}
.nm-btn .btn-danger { color: #c0392b; }
.nm-btn .btn-success { color: #27ae60; }
.nm-btn .btn-danger:hover,
.nm-btn .btn-success:hover {
box-shadow: 7px 7px 16px var(--nm-btn-sd), -7px -7px 16px var(--nm-btn-sl);
}
.nm-btn .btn-danger:active,
.nm-btn .btn-success:active {
box-shadow: var(--nm-btn-neu-sm-in);
}
.nm-btn .btn-loading {
background: var(--nm-btn-bg);
border: none;
cursor: pointer;
padding: 14px 32px;
border-radius: 100px;
font-family: 'Syne', system-ui, sans-serif;
font-size: 13px;
font-weight: 600;
color: var(--nm-btn-txt);
box-shadow: var(--nm-btn-neu-in);
display: inline-flex;
align-items: center;
gap: 10px;
letter-spacing: 0.3px;
}
.nm-btn .spinner {
display: inline-block;
width: 14px;
height: 14px;
border-radius: 50%;
border: 2px solid var(--nm-btn-sd);
border-top-color: var(--nm-btn-acc);
animation: nm-btn-spin 0.8s linear infinite;
}
@keyframes nm-btn-spin {
to { transform: rotate(360deg); }
}
/* Section 3 — Toggles */
.nm-btn .toggles-row {
display: flex;
gap: 28px;
align-items: center;
flex-wrap: wrap;
}
.nm-btn .toggle-wrap {
display: flex;
align-items: center;
gap: 12px;
}
.nm-btn .toggle {
position: relative;
width: 64px;
height: 34px;
cursor: pointer;
background: transparent;
border: 0;
padding: 0;
}
.nm-btn .toggle-track {
position: absolute;
inset: 0;
border-radius: 17px;
background: var(--nm-btn-bg);
box-shadow: var(--nm-btn-neu-sm-in);
transition: all 0.3s ease;
}
.nm-btn .toggle-thumb {
position: absolute;
top: 4px;
left: 4px;
width: 26px;
height: 26px;
border-radius: 50%;
background: var(--nm-btn-bg);
box-shadow: var(--nm-btn-neu-sm);
transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
}
.nm-btn .toggle.on .toggle-thumb {
left: 34px;
background: linear-gradient(145deg, var(--nm-btn-acc), #5040cc);
box-shadow: 4px 4px 10px rgba(108, 92, 231, 0.4), -2px -2px 6px var(--nm-btn-sl);
}
.nm-btn .toggle-lbl {
font-size: 13px;
font-weight: 500;
color: var(--nm-btn-txt2);
}
.nm-btn .btn-check {
display: inline-flex;
align-items: center;
gap: 12px;
background: var(--nm-btn-bg);
border: none;
cursor: pointer;
padding: 12px 22px;
border-radius: 14px;
box-shadow: var(--nm-btn-neu-sm);
transition: all 0.15s ease;
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 13px;
font-weight: 500;
color: var(--nm-btn-txt2);
}
.nm-btn .btn-check-box {
width: 22px;
height: 22px;
border-radius: 7px;
background: var(--nm-btn-bg);
box-shadow: var(--nm-btn-neu-sm-in);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 13px;
color: transparent;
transition: all 0.2s ease;
flex-shrink: 0;
}
.nm-btn .btn-check.checked .btn-check-box {
background: linear-gradient(145deg, var(--nm-btn-acc), #5040cc);
box-shadow: 3px 3px 8px rgba(108, 92, 231, 0.4);
color: #fff;
}
.nm-btn .btn-check:hover {
box-shadow: 7px 7px 16px var(--nm-btn-sd), -7px -7px 16px var(--nm-btn-sl);
}
.nm-btn .radio-group {
display: inline-flex;
background: var(--nm-btn-bg);
border-radius: 14px;
padding: 5px;
box-shadow: var(--nm-btn-neu-sm-in);
gap: 4px;
}
.nm-btn .radio-opt {
border: none;
cursor: pointer;
padding: 9px 18px;
border-radius: 10px;
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 12px;
font-weight: 500;
color: var(--nm-btn-txt);
background: transparent;
transition: all 0.2s ease;
}
.nm-btn .radio-opt.active {
background: var(--nm-btn-bg);
box-shadow: var(--nm-btn-neu-sm);
color: var(--nm-btn-acc);
font-weight: 600;
}
.nm-btn .divider {
height: 1px;
background: linear-gradient(to right, transparent, var(--nm-btn-sd), transparent);
opacity: 0.4;
}
@media (prefers-reduced-motion: reduce) {
.nm-btn .spinner { animation: none; }
.nm-btn .toggle-thumb,
.nm-btn .btn-resting,
.nm-btn .btn-pill,
.nm-btn .btn-accent,
.nm-btn .btn-fab,
.nm-btn .btn-circle,
.nm-btn .btn-sq { transition: none; }
}
@media (max-width: 720px) {
.nm-btn .card { padding: 32px 22px; }
.nm-btn .states-row { gap: 24px; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.nm-btn');
if (!root) return;
root.querySelectorAll('[data-nm-btn-toggle]').forEach(btn => {
btn.addEventListener('click', () => {
const on = btn.classList.toggle('on');
btn.setAttribute('aria-pressed', String(on));
});
});
root.querySelectorAll('[data-nm-btn-check]').forEach(btn => {
btn.addEventListener('click', () => {
const checked = btn.classList.toggle('checked');
const box = btn.querySelector('.btn-check-box');
if (box) box.textContent = checked ? '✓' : '';
});
});
root.querySelectorAll('.radio-group').forEach(group => {
group.querySelectorAll('[data-nm-btn-radio]').forEach(opt => {
opt.addEventListener('click', () => {
group.querySelectorAll('.radio-opt').forEach(o => o.classList.remove('active'));
opt.classList.add('active');
});
});
});
})();
```
### 05. Audio Control Suite
**Type:** CSS + JS
**Description:** A warm-parchment audio mixing console. Interactive range-input scrubber overlaid on a 49-bar waveform that lights up burnt-gold as you drag through the track. The center volume knob is mouse-draggable with SVG tick marks rendered around its perimeter. Five vertical EQ faders are individually draggable with live dB labels (32Hz, 250Hz, 1kHz, 4kHz, 16kHz). Six rotary mini knobs along the bottom row control Bass, Treble, Reverb, Delay, Width, Drive. Playfair Display + Space Mono. Best for music production tools, DAW dashboards, audio plugins.
**HTML:**
```html
```
**CSS:**
```css
/* ─── 05 Audio Control Suite — warm parchment audio console ───────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;1,400&family=Space+Mono:wght@400;700&display=swap');
.nm-aud {
--nm-aud-bg: #f0e6d3;
--nm-aud-sd: #d0c0a0;
--nm-aud-sl: #fffaf0;
--nm-aud-ib: #e8ddc8;
--nm-aud-acc: #c8783a;
--nm-aud-ac2: #e0a858;
--nm-aud-ac3: #8a4a20;
--nm-aud-txt: #7a6a58;
--nm-aud-txt2:#2a1e10;
position: relative;
width: 100%;
min-height: 760px;
background: var(--nm-aud-bg);
font-family: 'Space Mono', ui-monospace, monospace;
color: var(--nm-aud-txt);
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nm-aud *,
.nm-aud *::before,
.nm-aud *::after { box-sizing: border-box; }
.nm-aud .card {
position: relative;
width: 100%;
max-width: 860px;
background: var(--nm-aud-bg);
border-radius: 44px;
padding: 44px 40px 38px;
box-shadow: 24px 24px 56px var(--nm-aud-sd), -24px -24px 56px var(--nm-aud-sl);
display: flex;
flex-direction: column;
gap: 30px;
}
/* Track header */
.nm-aud .track-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
flex-wrap: wrap;
}
.nm-aud .track-title {
font-family: 'Playfair Display', Georgia, serif;
font-size: 26px;
font-weight: 700;
color: var(--nm-aud-txt2);
letter-spacing: -0.5px;
}
.nm-aud .track-sub {
font-size: 11px;
color: var(--nm-aud-txt);
margin-top: 4px;
letter-spacing: 0.5px;
}
.nm-aud .track-bpm {
background: var(--nm-aud-bg);
border-radius: 12px;
padding: 10px 18px;
box-shadow: inset 5px 5px 10px var(--nm-aud-sd), inset -5px -5px 10px var(--nm-aud-sl);
font-size: 11px;
color: var(--nm-aud-txt);
}
.nm-aud .track-bpm span {
color: var(--nm-aud-acc);
font-weight: 700;
font-size: 15px;
}
/* Waveform */
.nm-aud .waveform-row {
display: flex;
align-items: center;
gap: 3px;
height: 36px;
margin-bottom: 6px;
}
.nm-aud .wf-bar {
flex: 1;
border-radius: 2px;
background: linear-gradient(to top, var(--nm-aud-sd), var(--nm-aud-ib));
opacity: 0.45;
min-height: 3px;
}
.nm-aud .wf-bar.played {
background: linear-gradient(to top, var(--nm-aud-acc), var(--nm-aud-ac2));
opacity: 0.7;
}
/* Scrubber */
.nm-aud .scrubber-wrap { position: relative; }
.nm-aud .scrubber-label-row {
display: flex;
justify-content: space-between;
font-size: 10px;
color: var(--nm-aud-txt);
margin-bottom: 10px;
letter-spacing: 0.5px;
}
.nm-aud .scrubber-track {
width: 100%;
height: 10px;
border-radius: 5px;
background: var(--nm-aud-ib);
box-shadow: inset 5px 5px 10px var(--nm-aud-sd), inset -5px -5px 10px var(--nm-aud-sl);
position: relative;
cursor: pointer;
}
.nm-aud .scrubber-fill {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 38%;
border-radius: 5px;
background: linear-gradient(90deg, var(--nm-aud-ac3), var(--nm-aud-acc), var(--nm-aud-ac2));
pointer-events: none;
}
.nm-aud .scrubber-glow {
position: absolute;
top: -4px;
left: 0;
height: 18px;
width: 38%;
border-radius: 9px;
background: linear-gradient(90deg, transparent, rgba(200, 120, 58, 0.3));
filter: blur(6px);
pointer-events: none;
}
.nm-aud .scrubber {
position: absolute;
top: -4px;
left: 0;
width: 100%;
height: 18px;
opacity: 0;
cursor: pointer;
margin: 0;
z-index: 10;
}
.nm-aud .scrubber-thumb {
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
width: 26px;
height: 26px;
border-radius: 50%;
background: var(--nm-aud-bg);
box-shadow: 5px 5px 12px var(--nm-aud-sd), -5px -5px 12px var(--nm-aud-sl);
left: 38%;
pointer-events: none;
transition: box-shadow 0.15s;
}
.nm-aud .scrubber-thumb::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 10px;
height: 10px;
border-radius: 50%;
background: linear-gradient(145deg, var(--nm-aud-acc), var(--nm-aud-ac2));
box-shadow: 0 0 6px rgba(200, 120, 58, 0.5);
}
/* Main controls grid */
.nm-aud .main-controls {
display: grid;
grid-template-columns: 1fr auto 1fr;
gap: 28px;
align-items: center;
}
/* Play controls */
.nm-aud .play-controls {
display: flex;
gap: 12px;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
}
.nm-aud .ctrl {
background: var(--nm-aud-bg);
border: none;
cursor: pointer;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
box-shadow: 7px 7px 15px var(--nm-aud-sd), -7px -7px 15px var(--nm-aud-sl);
transition: all 0.15s ease;
color: var(--nm-aud-txt2);
font-size: 16px;
}
.nm-aud .ctrl:active {
box-shadow: inset 4px 4px 10px var(--nm-aud-sd), inset -4px -4px 10px var(--nm-aud-sl);
}
.nm-aud .ctrl:hover { transform: scale(1.05); }
.nm-aud .ctrl-sm { width: 42px; height: 42px; }
.nm-aud .ctrl-md { width: 52px; height: 52px; font-size: 18px; }
.nm-aud .ctrl-play {
width: 66px;
height: 66px;
font-size: 22px;
background: linear-gradient(145deg, var(--nm-aud-acc), var(--nm-aud-ac3));
color: #fffaf0;
box-shadow: 10px 10px 22px rgba(200, 120, 58, 0.4), -6px -6px 16px var(--nm-aud-sl);
}
.nm-aud .ctrl-play:hover { transform: scale(1.05); }
.nm-aud .ctrl-play:active {
box-shadow: inset 6px 6px 14px rgba(0, 0, 0, 0.2);
transform: scale(0.97);
}
/* Volume knob */
.nm-aud .vol-knob-wrap {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.nm-aud .vol-knob {
width: 110px;
height: 110px;
border-radius: 50%;
background: var(--nm-aud-bg);
box-shadow: 14px 14px 32px var(--nm-aud-sd), -14px -14px 32px var(--nm-aud-sl);
position: relative;
cursor: grab;
user-select: none;
}
.nm-aud .vol-knob:active { cursor: grabbing; }
.nm-aud .vol-knob-inner {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 70px;
height: 70px;
border-radius: 50%;
background: var(--nm-aud-ib);
box-shadow: inset 6px 6px 14px var(--nm-aud-sd), inset -6px -6px 14px var(--nm-aud-sl);
}
.nm-aud .vol-knob-dot {
position: absolute;
top: 12px;
left: 50%;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--nm-aud-acc);
transform: translateX(-50%);
transform-origin: 3px 43px;
box-shadow: 0 0 8px var(--nm-aud-acc);
transition: transform 0.05s;
}
.nm-aud .vol-tick-svg { position: absolute; inset: 0; }
.nm-aud .mini-lbl {
font-size: 9px;
letter-spacing: 2px;
text-transform: uppercase;
color: var(--nm-aud-txt);
}
.nm-aud .vol-val {
font-size: 20px;
font-weight: 700;
color: var(--nm-aud-txt2);
margin-top: -6px;
font-family: 'Space Mono', monospace;
}
/* EQ faders */
.nm-aud .eq-wrap {
display: flex;
gap: 14px;
align-items: flex-end;
justify-content: flex-end;
}
.nm-aud .fader-group {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
}
.nm-aud .fader {
position: relative;
width: 28px;
height: 110px;
}
.nm-aud .fader-track {
position: absolute;
left: 50%;
top: 0;
transform: translateX(-50%);
width: 8px;
height: 100%;
border-radius: 4px;
background: var(--nm-aud-ib);
box-shadow: inset 3px 3px 7px var(--nm-aud-sd), inset -3px -3px 7px var(--nm-aud-sl);
}
.nm-aud .fader-fill {
position: absolute;
left: 50%;
transform: translateX(-50%);
width: 8px;
bottom: 0;
border-radius: 4px;
background: linear-gradient(to top, var(--nm-aud-ac3), var(--nm-aud-acc), var(--nm-aud-ac2));
}
.nm-aud .fader-thumb {
position: absolute;
left: 50%;
transform: translateX(-50%);
width: 28px;
height: 20px;
border-radius: 6px;
background: var(--nm-aud-bg);
box-shadow: 4px 4px 8px var(--nm-aud-sd), -4px -4px 8px var(--nm-aud-sl);
cursor: ns-resize;
display: flex;
align-items: center;
justify-content: center;
}
.nm-aud .fader-thumb::before {
content: '';
display: block;
width: 14px;
height: 2px;
border-radius: 1px;
background: var(--nm-aud-sd);
box-shadow: 0 -4px 0 var(--nm-aud-sd), 0 4px 0 var(--nm-aud-sd);
}
.nm-aud .fader-lbl {
font-size: 8px;
letter-spacing: 1.5px;
text-transform: uppercase;
color: var(--nm-aud-txt);
}
.nm-aud .fader-val {
font-size: 10px;
font-weight: 700;
color: var(--nm-aud-acc);
}
/* Mini knobs */
.nm-aud .knobs-row {
display: flex;
gap: 18px;
align-items: center;
justify-content: center;
padding-top: 8px;
border-top: 1px solid rgba(160, 140, 110, 0.2);
flex-wrap: wrap;
}
.nm-aud .mini-knob-group {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
}
.nm-aud .mini-knob {
width: 56px;
height: 56px;
border-radius: 50%;
background: var(--nm-aud-bg);
box-shadow: 9px 9px 20px var(--nm-aud-sd), -9px -9px 20px var(--nm-aud-sl);
position: relative;
cursor: grab;
}
.nm-aud .mini-knob:active { cursor: grabbing; }
.nm-aud .mini-knob-inner {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 36px;
height: 36px;
border-radius: 50%;
background: var(--nm-aud-ib);
box-shadow: inset 3px 3px 7px var(--nm-aud-sd), inset -3px -3px 7px var(--nm-aud-sl);
}
.nm-aud .mini-knob-dot {
position: absolute;
top: 6px;
left: 50%;
width: 5px;
height: 5px;
border-radius: 50%;
background: var(--nm-aud-acc);
transform: translateX(-50%);
transform-origin: 2.5px 22px;
box-shadow: 0 0 5px var(--nm-aud-acc);
}
.nm-aud .mini-val {
font-size: 11px;
font-weight: 700;
color: var(--nm-aud-txt2);
font-family: 'Space Mono', monospace;
}
@media (max-width: 760px) {
.nm-aud .card { padding: 32px 22px; }
.nm-aud .main-controls { grid-template-columns: 1fr; }
.nm-aud .eq-wrap { justify-content: center; }
.nm-aud .play-controls { justify-content: center; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.nm-aud');
if (!root) return;
// ─── Waveform ───
const waveRow = root.querySelector('[data-nm-aud-wave]');
const waveHeights = [6,10,18,14,24,20,32,28,36,30,40,34,42,38,48,52,44,50,40,46,38,42,32,36,28,30,22,26,18,20,14,16,10,12,8,10,14,18,22,28,32,36,30,24,20,16,12,8,6];
let scrubberPct = 0.38;
waveHeights.forEach((h, i) => {
const bar = document.createElement('div');
bar.className = 'wf-bar' + (i < waveHeights.length * scrubberPct ? ' played' : '');
bar.style.height = Math.max(3, h * 0.7) + 'px';
waveRow.appendChild(bar);
});
// ─── Scrubber ───
const input = root.querySelector('[data-nm-aud-scrub]');
const fill = root.querySelector('[data-nm-aud-fill]');
const glow = root.querySelector('[data-nm-aud-glow]');
const thumb = root.querySelector('[data-nm-aud-thumb]');
const timeNow = root.querySelector('[data-nm-aud-time-now]');
const totalSec = 227;
function updateScrubber(val) {
const pct = val / 100;
fill.style.width = (pct * 100) + '%';
glow.style.width = (pct * 100) + '%';
thumb.style.left = (pct * 100) + '%';
const sec = Math.round(pct * totalSec);
timeNow.textContent = Math.floor(sec / 60) + ':' + String(sec % 60).padStart(2, '0');
waveRow.querySelectorAll('.wf-bar').forEach((b, i) => {
b.classList.toggle('played', i < waveHeights.length * pct);
});
}
input.addEventListener('input', () => updateScrubber(+input.value));
// ─── Volume Knob ───
const volKnob = root.querySelector('[data-nm-aud-volknob]');
const volDot = root.querySelector('[data-nm-aud-voldot]');
const volVal = root.querySelector('[data-nm-aud-volval]');
const volTicks = root.querySelector('[data-nm-aud-volticks]');
let volAngle = -45;
let volDragging = false, volStartY = 0, volStartAngle = -45;
// Tick marks
const svgNS = 'http://www.w3.org/2000/svg';
for (let t = 0; t <= 20; t++) {
const frac = t / 20;
const ang = -225 + frac * 270;
const rad = ang * Math.PI / 180;
const r1 = 54, r2 = t % 5 === 0 ? 48 : 51;
const line = document.createElementNS(svgNS, 'line');
line.setAttribute('x1', String(60 + r1 * Math.cos(rad)));
line.setAttribute('y1', String(60 + r1 * Math.sin(rad)));
line.setAttribute('x2', String(60 + r2 * Math.cos(rad)));
line.setAttribute('y2', String(60 + r2 * Math.sin(rad)));
line.setAttribute('stroke', frac < 0.72 ? '#c8783a' : '#d0c0a0');
line.setAttribute('stroke-width', t % 5 === 0 ? '2' : '1');
line.setAttribute('stroke-linecap', 'round');
line.setAttribute('opacity', frac < 0.72 ? '0.8' : '0.4');
volTicks.appendChild(line);
}
function setVol(angle) {
volAngle = Math.max(-140, Math.min(140, angle));
volDot.style.transform = 'translateX(-50%) rotate(' + volAngle + 'deg)';
const pct = Math.round((volAngle + 140) / 280 * 100);
volVal.textContent = pct;
}
setVol(-45);
volKnob.addEventListener('mousedown', e => {
volDragging = true; volStartY = e.clientY; volStartAngle = volAngle;
document.body.style.cursor = 'grabbing';
e.preventDefault();
});
document.addEventListener('mousemove', e => {
if (!volDragging) return;
setVol(volStartAngle - (e.clientY - volStartY) * 1.2);
});
document.addEventListener('mouseup', () => {
if (volDragging) { volDragging = false; document.body.style.cursor = ''; }
});
// ─── EQ Faders ───
const eqData = [
{ lbl: '32Hz', val: 68 },
{ lbl: '250Hz', val: 55 },
{ lbl: '1kHz', val: 80 },
{ lbl: '4kHz', val: 62 },
{ lbl: '16kHz', val: 44 },
];
const eqWrap = root.querySelector('[data-nm-aud-eq]');
eqData.forEach(({ lbl, val }) => {
const h = 110;
const fillH = Math.round(val / 100 * h);
const g = document.createElement('div');
g.className = 'fader-group';
g.innerHTML =
'' + (val >= 50 ? '+' : '') + (val - 50) + '
' +
'' +
'' + lbl + '
';
eqWrap.appendChild(g);
const thumb2 = g.querySelector('.fader-thumb');
const fill2 = g.querySelector('.fader-fill');
const valEl = g.querySelector('.fader-val');
let dragging = false, startY2 = 0, startPct = val / 100;
thumb2.addEventListener('mousedown', e => {
dragging = true; startY2 = e.clientY;
startPct = parseInt(fill2.style.height, 10) / h;
document.body.style.cursor = 'ns-resize';
e.preventDefault();
});
document.addEventListener('mousemove', e => {
if (!dragging) return;
const delta = (startY2 - e.clientY) / h;
const pct = Math.max(0, Math.min(1, startPct + delta));
const fh = Math.round(pct * h);
fill2.style.height = fh + 'px';
thumb2.style.bottom = (fh - 10) + 'px';
const v = Math.round(pct * 100);
valEl.textContent = (v >= 50 ? '+' : '') + (v - 50);
});
document.addEventListener('mouseup', () => {
if (dragging) { dragging = false; document.body.style.cursor = ''; }
});
});
// ─── Mini Knobs ───
const knobData = [
{ lbl: 'Bass', val: -20 },
{ lbl: 'Treble', val: 30 },
{ lbl: 'Reverb', val: -5 },
{ lbl: 'Delay', val: 15 },
{ lbl: 'Width', val: 50 },
{ lbl: 'Drive', val: -30 },
];
const knobsRow = root.querySelector('[data-nm-aud-knobs]');
knobData.forEach(({ lbl, val }) => {
const g = document.createElement('div');
g.className = 'mini-knob-group';
g.innerHTML =
'' +
'' + lbl + '
' +
'' + (val > 0 ? '+' : '') + val + '
';
knobsRow.appendChild(g);
const dot = g.querySelector('.mini-knob-dot');
const valEl2 = g.querySelector('.mini-val');
let angle = val;
dot.style.transform = 'translateX(-50%) rotate(' + angle + 'deg)';
let drag = false, sy = 0, sa = angle;
g.querySelector('.mini-knob').addEventListener('mousedown', e => {
drag = true; sy = e.clientY; sa = angle;
document.body.style.cursor = 'grabbing';
e.preventDefault();
});
document.addEventListener('mousemove', e => {
if (!drag) return;
angle = Math.max(-140, Math.min(140, sa - (e.clientY - sy) * 1.5));
dot.style.transform = 'translateX(-50%) rotate(' + angle + 'deg)';
const v = Math.round(angle);
valEl2.textContent = (v > 0 ? '+' : '') + v;
});
document.addEventListener('mouseup', () => {
if (drag) { drag = false; document.body.style.cursor = ''; }
});
});
// ─── Play toggle ───
let playing = false;
const playBtn = root.querySelector('[data-nm-aud-play]');
playBtn.addEventListener('click', () => {
playing = !playing;
playBtn.textContent = playing ? '⏸' : '▶';
});
})();
```
### 06. Sunken Form Studio
**Type:** CSS + JS
**Description:** A sage-mist neumorphic form panel. Every input is a sunken pocket via deep inset shadows. Section 1: a pill search bar with active-clear button + filter chips. Section 2: a 2-column field grid demonstrating neutral / valid (green ring) / invalid (red ring) states, a password field with show/hide toggle + 4-segment strength bar, a styled native select, and a textarea. Section 3: neumorphic checkboxes and a radio group. Email field runs real blur validation. Mulish + DM Mono. Best for sign-up flows, settings pages, profile editors.
**HTML:**
```html
01 — Search Input
⌕
✕
All
Buttons
Cards
Sliders
Forms
Dark Mode
02 — Text Input Fields
Country
🇺🇸 United States
🇬🇧 United Kingdom
🇩🇪 Germany
🇯🇵 Japan
▾
Bio / Description
03 — Checkboxes & Radios
✓
Email notifications
Receive weekly digest
✓
Push notifications
On mobile & desktop
Marketing emails
Product updates & offers
Starter plan
Free forever · 3 projects
Pro plan
$12/mo · Unlimited
Enterprise
Custom pricing · SSO
Create Account →
Cancel
SSL secured · No spam
```
**CSS:**
```css
/* ─── 06 Sunken Form Studio — sage mist neumorphic forms ───────────── */
@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');
.nm-frm {
--nm-frm-bg: #eaf0ee;
--nm-frm-sd: #c8d4cc;
--nm-frm-sl: #f8fff8;
--nm-frm-ib: #e2ece6;
--nm-frm-acc: #3a7d54;
--nm-frm-ac2: #5aaf7a;
--nm-frm-ac3: #2a5c3c;
--nm-frm-txt: #5a6e62;
--nm-frm-txt2:#1a3028;
--nm-frm-err: #c05050;
--nm-frm-warn:#c09040;
--nm-frm-r: 16px;
--nm-frm-neu-in: inset 6px 6px 14px var(--nm-frm-sd), inset -6px -6px 14px var(--nm-frm-sl);
--nm-frm-neu-sm: 5px 5px 12px var(--nm-frm-sd), -5px -5px 12px var(--nm-frm-sl);
--nm-frm-neu-sm-in: inset 4px 4px 9px var(--nm-frm-sd), inset -4px -4px 9px var(--nm-frm-sl);
position: relative;
width: 100%;
min-height: 880px;
background: var(--nm-frm-bg);
font-family: 'Mulish', system-ui, sans-serif;
color: var(--nm-frm-txt);
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nm-frm *,
.nm-frm *::before,
.nm-frm *::after { box-sizing: border-box; }
.nm-frm .card {
position: relative;
width: 100%;
max-width: 820px;
background: var(--nm-frm-bg);
border-radius: 40px;
padding: 44px 40px;
box-shadow: 22px 22px 54px var(--nm-frm-sd), -22px -22px 54px var(--nm-frm-sl);
display: flex;
flex-direction: column;
gap: 28px;
}
.nm-frm .sec-tag {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 9px;
font-weight: 500;
letter-spacing: 3px;
text-transform: uppercase;
color: var(--nm-frm-txt);
opacity: 0.55;
margin-bottom: 16px;
}
/* Search */
.nm-frm .search-wrap { position: relative; }
.nm-frm .search-field {
width: 100%;
height: 56px;
border: none;
outline: none;
border-radius: 28px;
background: var(--nm-frm-bg);
box-shadow: var(--nm-frm-neu-in);
padding: 0 56px 0 52px;
font-family: 'Mulish', system-ui, sans-serif;
font-size: 15px;
font-weight: 500;
color: var(--nm-frm-txt2);
transition: box-shadow 0.25s ease;
}
.nm-frm .search-field::placeholder { color: var(--nm-frm-txt); opacity: 0.5; }
.nm-frm .search-field:focus {
box-shadow: inset 7px 7px 16px var(--nm-frm-sd), inset -7px -7px 16px var(--nm-frm-sl),
0 0 0 2px rgba(58, 125, 84, 0.2);
}
.nm-frm .search-icon {
position: absolute;
left: 20px;
top: 50%;
transform: translateY(-50%);
font-size: 20px;
pointer-events: none;
color: var(--nm-frm-txt);
opacity: 0.5;
}
.nm-frm .search-clear {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
background: var(--nm-frm-bg);
border: none;
cursor: pointer;
width: 30px;
height: 30px;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
box-shadow: var(--nm-frm-neu-sm);
color: var(--nm-frm-txt);
font-size: 14px;
transition: all 0.15s;
opacity: 0;
}
.nm-frm .search-field:not(:placeholder-shown) ~ .search-clear { opacity: 1; }
.nm-frm .search-clear:hover { box-shadow: 6px 6px 14px var(--nm-frm-sd), -6px -6px 14px var(--nm-frm-sl); }
.nm-frm .search-clear:active { box-shadow: var(--nm-frm-neu-sm-in); }
.nm-frm .search-chips {
display: flex;
gap: 8px;
margin-top: 14px;
flex-wrap: wrap;
}
.nm-frm .chip {
background: var(--nm-frm-bg);
border: none;
cursor: pointer;
padding: 8px 16px;
border-radius: 20px;
font-family: 'Mulish', system-ui, sans-serif;
font-size: 12px;
font-weight: 600;
color: var(--nm-frm-txt);
box-shadow: var(--nm-frm-neu-sm);
transition: all 0.15s;
}
.nm-frm .chip:hover { box-shadow: 6px 6px 14px var(--nm-frm-sd), -6px -6px 14px var(--nm-frm-sl); color: var(--nm-frm-acc); }
.nm-frm .chip:active { box-shadow: var(--nm-frm-neu-sm-in); }
.nm-frm .chip.active { box-shadow: var(--nm-frm-neu-sm-in); color: var(--nm-frm-acc); font-weight: 700; }
/* Field grid */
.nm-frm .field-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
.nm-frm .field-wrap {
display: flex;
flex-direction: column;
gap: 8px;
}
.nm-frm .field-wrap.full { grid-column: 1 / -1; }
.nm-frm .field-label {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.8px;
text-transform: uppercase;
color: var(--nm-frm-txt);
opacity: 0.7;
font-family: 'DM Mono', ui-monospace, monospace;
}
.nm-frm .neu-input {
width: 100%;
border: none;
outline: none;
border-radius: var(--nm-frm-r);
background: var(--nm-frm-bg);
box-shadow: var(--nm-frm-neu-in);
padding: 14px 18px;
font-family: 'Mulish', system-ui, sans-serif;
font-size: 14px;
font-weight: 500;
color: var(--nm-frm-txt2);
transition: box-shadow 0.22s ease, color 0.2s;
}
.nm-frm .neu-input::placeholder { color: var(--nm-frm-txt); opacity: 0.45; }
.nm-frm .neu-input:focus {
box-shadow: inset 7px 7px 16px var(--nm-frm-sd), inset -7px -7px 16px var(--nm-frm-sl),
0 0 0 2.5px rgba(58, 125, 84, 0.25);
color: var(--nm-frm-txt2);
}
.nm-frm .neu-input.valid { box-shadow: var(--nm-frm-neu-in), 0 0 0 2px rgba(58, 125, 84, 0.4); }
.nm-frm .neu-input.invalid { box-shadow: var(--nm-frm-neu-in), 0 0 0 2px rgba(192, 80, 80, 0.45); }
.nm-frm .input-icon-wrap { position: relative; }
.nm-frm .input-icon-wrap .neu-input { padding-left: 44px; }
.nm-frm .input-icon-wrap .i-icon {
position: absolute;
left: 16px;
top: 50%;
transform: translateY(-50%);
font-size: 16px;
pointer-events: none;
opacity: 0.5;
}
.nm-frm .input-icon-wrap .i-badge {
position: absolute;
right: 14px;
top: 50%;
transform: translateY(-50%);
font-size: 14px;
cursor: pointer;
opacity: 0.5;
transition: opacity 0.15s;
background: transparent;
border: 0;
padding: 4px;
}
.nm-frm .input-icon-wrap .i-badge:hover { opacity: 0.9; }
.nm-frm .field-hint {
font-size: 11px;
color: var(--nm-frm-txt);
opacity: 0.65;
padding-left: 4px;
}
.nm-frm .field-hint.error { color: var(--nm-frm-err); opacity: 1; }
.nm-frm .field-hint.success { color: var(--nm-frm-acc); opacity: 1; }
.nm-frm .neu-textarea {
width: 100%;
min-height: 88px;
border: none;
outline: none;
resize: none;
border-radius: var(--nm-frm-r);
background: var(--nm-frm-bg);
box-shadow: var(--nm-frm-neu-in);
padding: 16px 18px;
font-family: 'Mulish', system-ui, sans-serif;
font-size: 14px;
font-weight: 500;
color: var(--nm-frm-txt2);
line-height: 1.6;
transition: box-shadow 0.22s ease;
}
.nm-frm .neu-textarea::placeholder { color: var(--nm-frm-txt); opacity: 0.45; }
.nm-frm .neu-textarea:focus {
box-shadow: inset 7px 7px 16px var(--nm-frm-sd), inset -7px -7px 16px var(--nm-frm-sl),
0 0 0 2.5px rgba(58, 125, 84, 0.25);
}
.nm-frm .select-wrap { position: relative; }
.nm-frm .neu-select {
width: 100%;
border: none;
outline: none;
appearance: none;
-webkit-appearance: none;
border-radius: var(--nm-frm-r);
background: var(--nm-frm-bg);
box-shadow: var(--nm-frm-neu-in);
padding: 14px 42px 14px 18px;
font-family: 'Mulish', system-ui, sans-serif;
font-size: 14px;
font-weight: 500;
color: var(--nm-frm-txt2);
cursor: pointer;
transition: box-shadow 0.22s ease;
}
.nm-frm .neu-select:focus {
box-shadow: inset 7px 7px 16px var(--nm-frm-sd), inset -7px -7px 16px var(--nm-frm-sl),
0 0 0 2.5px rgba(58, 125, 84, 0.25);
}
.nm-frm .select-arrow {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
font-size: 12px;
pointer-events: none;
color: var(--nm-frm-txt);
opacity: 0.6;
}
/* Strength bar */
.nm-frm .strength-bar {
display: flex;
gap: 5px;
margin-top: 4px;
}
.nm-frm .str-seg {
flex: 1;
height: 4px;
border-radius: 2px;
background: var(--nm-frm-sd);
opacity: 0.4;
transition: all 0.3s ease;
}
.nm-frm .str-seg.fill-weak { background: var(--nm-frm-err); opacity: 1; }
.nm-frm .str-seg.fill-mid { background: var(--nm-frm-warn); opacity: 1; }
.nm-frm .str-seg.fill-strong { background: var(--nm-frm-acc); opacity: 1; }
/* Checks & radios */
.nm-frm .check-radio-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
}
.nm-frm .cr-group {
display: flex;
flex-direction: column;
gap: 12px;
}
.nm-frm .cr-item {
display: flex;
align-items: center;
gap: 12px;
cursor: pointer;
user-select: none;
background: transparent;
border: 0;
padding: 0;
text-align: left;
font-family: inherit;
}
.nm-frm .cr-box {
width: 24px;
height: 24px;
border-radius: 7px;
background: var(--nm-frm-bg);
box-shadow: var(--nm-frm-neu-sm-in);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 14px;
color: transparent;
flex-shrink: 0;
transition: all 0.2s ease;
}
.nm-frm .cr-circle {
width: 24px;
height: 24px;
border-radius: 50%;
background: var(--nm-frm-bg);
box-shadow: var(--nm-frm-neu-sm-in);
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: all 0.2s ease;
position: relative;
}
.nm-frm .cr-circle::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0);
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--nm-frm-acc);
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 0 6px rgba(58, 125, 84, 0.5);
}
.nm-frm .cr-item.checked .cr-box {
background: linear-gradient(145deg, var(--nm-frm-acc), var(--nm-frm-ac3));
box-shadow: 3px 3px 7px rgba(58, 125, 84, 0.4), -2px -2px 5px var(--nm-frm-sl);
color: #fff;
}
.nm-frm .cr-item.checked .cr-circle::after { transform: translate(-50%, -50%) scale(1); }
.nm-frm .cr-text {
font-size: 13px;
font-weight: 500;
color: var(--nm-frm-txt2);
}
.nm-frm .cr-text small {
display: block;
font-size: 11px;
color: var(--nm-frm-txt);
font-weight: 400;
margin-top: 1px;
}
/* Submit row */
.nm-frm .submit-row {
display: flex;
gap: 14px;
align-items: center;
flex-wrap: wrap;
}
.nm-frm .btn-submit {
border: none;
cursor: pointer;
padding: 14px 36px;
border-radius: 100px;
font-family: 'Mulish', system-ui, sans-serif;
font-size: 14px;
font-weight: 700;
color: #fff;
background: linear-gradient(145deg, var(--nm-frm-acc), var(--nm-frm-ac3));
box-shadow: 10px 10px 22px rgba(42, 92, 60, 0.35), -5px -5px 14px var(--nm-frm-sl);
transition: all 0.18s ease;
letter-spacing: 0.3px;
}
.nm-frm .btn-submit:hover {
transform: translateY(-2px);
box-shadow: 12px 16px 28px rgba(42, 92, 60, 0.4), -5px -5px 14px var(--nm-frm-sl);
}
.nm-frm .btn-submit:active {
box-shadow: inset 5px 5px 12px rgba(0, 0, 0, 0.2);
transform: scale(0.98);
}
.nm-frm .btn-cancel {
border: none;
cursor: pointer;
padding: 14px 30px;
border-radius: 100px;
font-family: 'Mulish', system-ui, sans-serif;
font-size: 14px;
font-weight: 600;
color: var(--nm-frm-txt);
background: var(--nm-frm-bg);
box-shadow: var(--nm-frm-neu-sm);
transition: all 0.15s;
}
.nm-frm .btn-cancel:hover { box-shadow: 7px 7px 16px var(--nm-frm-sd), -7px -7px 16px var(--nm-frm-sl); }
.nm-frm .btn-cancel:active { box-shadow: var(--nm-frm-neu-sm-in); }
.nm-frm .form-note {
font-size: 11px;
color: var(--nm-frm-txt);
opacity: 0.6;
margin-left: auto;
font-family: 'DM Mono', ui-monospace, monospace;
}
.nm-frm .div-line {
height: 1px;
background: linear-gradient(to right, transparent, var(--nm-frm-sd), transparent);
opacity: 0.5;
}
@media (max-width: 720px) {
.nm-frm .card { padding: 32px 22px; }
.nm-frm .field-grid,
.nm-frm .check-radio-row { grid-template-columns: 1fr; }
.nm-frm .form-note { margin-left: 0; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.nm-frm');
if (!root) return;
// Search filter chips
root.querySelectorAll('[data-nm-frm-chip]').forEach(c => {
c.addEventListener('click', () => {
root.querySelectorAll('[data-nm-frm-chip]').forEach(o => o.classList.remove('active'));
c.classList.add('active');
});
});
// Clear search button
const search = root.querySelector('[data-nm-frm-search]');
const clear = root.querySelector('[data-nm-frm-clear]');
if (clear && search) {
clear.addEventListener('click', () => {
search.value = '';
search.dispatchEvent(new Event('input'));
search.focus();
});
}
// Password show/hide toggle
const pwInput = root.querySelector('[data-nm-frm-pw]');
const pwToggle = root.querySelector('[data-nm-frm-pw-toggle]');
if (pwInput && pwToggle) {
pwToggle.addEventListener('click', () => {
const showing = pwInput.type === 'text';
pwInput.type = showing ? 'password' : 'text';
pwToggle.textContent = showing ? '👁' : '🙈';
});
}
// Email blur validation
const email = root.querySelector('[data-nm-frm-email]');
if (email) {
email.addEventListener('blur', () => {
const valid = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email.value);
email.classList.toggle('valid', valid);
email.classList.toggle('invalid', !valid);
const hint = email.closest('.field-wrap').querySelector('.field-hint');
if (hint) {
hint.classList.toggle('success', valid);
hint.classList.toggle('error', !valid);
hint.textContent = valid ? '✓ Valid email.' : '✕ Please enter a valid email.';
}
});
}
// Checkboxes
root.querySelectorAll('[data-nm-frm-check]').forEach(item => {
item.addEventListener('click', () => {
const checked = item.classList.toggle('checked');
const box = item.querySelector('.cr-box');
if (box) box.textContent = checked ? '✓' : '';
});
});
// Radios — exclusive selection within a group
root.querySelectorAll('[data-nm-frm-radio]').forEach(item => {
item.addEventListener('click', () => {
const group = item.closest('.cr-group');
if (!group) return;
group.querySelectorAll('[data-nm-frm-radio]').forEach(o => o.classList.remove('checked'));
item.classList.add('checked');
});
});
})();
```
### 07. Smart IoT Control Panel
**Type:** CSS + JS
**Description:** The first dark-neumorphic widget in the collection — deep charcoal with glowing teal accents. Left column: 3-ring embossed power button that glows on activation, a live status readout, and 4 scene presets. Center: full thermostat arc-dial with SVG tick marks in a teal-to-amber gradient, live ± temperature buttons, 4 mode chips (Cool/Heat/Fan/Auto), and 3 interactive sliders (brightness, fan speed, humidity). Right column: 6 device toggle cards with animated pill switches that emit a teal glow when on. Five draggable mini rotary dials along the bottom row. Rajdhani + Share Tech Mono. Best for smart-home hubs, IoT dashboards, building automation.
**HTML:**
```html
Hub Status
Devices
8 / 10
Network
5G ▮▮▮▮
Energy
2.4 kW
Scenes
🌅 Morning
🌇 Evening
🎬 Movie
🌙 Sleep
Climate Control
−
+
❄️ Cool
🔥 Heat
💨 Fan
⚡ Auto
Devices
💡
Ceiling Light
Living Room
🌡️
Thermostat
Whole Home
🔊
Speakers
Kitchen
🔒
Front Door
Entrance
🌿
Air Purifier
Bedroom
📷
Security Cam
Garage
```
**CSS:**
```css
/* ─── 07 Smart IoT Control Panel — dark teal smart-home hub ──────── */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Share+Tech+Mono&display=swap');
.nm-iot {
--nm-iot-bg: #1e2530;
--nm-iot-sd: #101520;
--nm-iot-sl: #2e3a48;
--nm-iot-ib: #1a2028;
--nm-iot-t1: #00cec9;
--nm-iot-t2: #00b5b0;
--nm-iot-amb: #fdcb6e;
--nm-iot-grn: #55efc4;
--nm-iot-txt: #7a90a8;
--nm-iot-t2x: #c0d8f0;
--nm-iot-neu: 10px 10px 24px var(--nm-iot-sd), -8px -8px 20px var(--nm-iot-sl);
--nm-iot-neu-in: inset 8px 8px 18px var(--nm-iot-sd), inset -6px -6px 14px var(--nm-iot-sl);
--nm-iot-neu-sm: 6px 6px 14px var(--nm-iot-sd), -5px -5px 12px var(--nm-iot-sl);
--nm-iot-neu-sm-in: inset 5px 5px 10px var(--nm-iot-sd), inset -4px -4px 8px var(--nm-iot-sl);
position: relative;
width: 100%;
min-height: 880px;
background: var(--nm-iot-bg);
font-family: 'Rajdhani', system-ui, sans-serif;
color: var(--nm-iot-txt);
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nm-iot *,
.nm-iot *::before,
.nm-iot *::after { box-sizing: border-box; }
.nm-iot .card {
position: relative;
width: 100%;
max-width: 860px;
background: var(--nm-iot-bg);
border-radius: 40px;
padding: 40px 36px;
box-shadow: 20px 20px 50px var(--nm-iot-sd), -16px -16px 40px var(--nm-iot-sl);
display: grid;
grid-template-columns: 220px 1fr 200px;
grid-template-rows: auto auto;
gap: 24px;
}
.nm-iot .tag {
font-size: 9px;
font-weight: 600;
letter-spacing: 3.5px;
text-transform: uppercase;
color: var(--nm-iot-txt);
opacity: 0.45;
margin-bottom: 14px;
font-family: 'Share Tech Mono', ui-monospace, monospace;
}
/* Left column */
.nm-iot .left-col {
display: flex;
flex-direction: column;
gap: 20px;
grid-row: 1 / 3;
}
.nm-iot .power-stage {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.nm-iot .power-ring {
width: 130px;
height: 130px;
border-radius: 50%;
background: var(--nm-iot-bg);
box-shadow: var(--nm-iot-neu);
position: relative;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: box-shadow 0.3s ease;
border: 0;
padding: 0;
}
.nm-iot .power-ring::before {
content: '';
position: absolute;
inset: 10px;
border-radius: 50%;
background: var(--nm-iot-bg);
box-shadow: var(--nm-iot-neu-sm-in);
}
.nm-iot .power-ring::after {
content: '';
position: absolute;
inset: 20px;
border-radius: 50%;
background: var(--nm-iot-bg);
box-shadow: var(--nm-iot-neu-sm);
}
.nm-iot .power-icon {
position: relative;
z-index: 10;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
}
.nm-iot .power-icon svg { width: 100%; height: 100%; }
.nm-iot .power-ring.on { box-shadow: var(--nm-iot-neu-in); }
.nm-iot .power-ring.on .power-arc { stroke: var(--nm-iot-t1); filter: drop-shadow(0 0 8px var(--nm-iot-t1)); }
.nm-iot .power-ring.on .power-line { stroke: var(--nm-iot-t1); filter: drop-shadow(0 0 8px var(--nm-iot-t1)); }
.nm-iot .power-arc {
stroke: var(--nm-iot-txt);
stroke-width: 2.5;
fill: none;
stroke-linecap: round;
transition: stroke 0.4s, filter 0.4s;
}
.nm-iot .power-line {
stroke: var(--nm-iot-txt);
stroke-width: 2.5;
stroke-linecap: round;
transition: stroke 0.4s, filter 0.4s;
}
.nm-iot .power-status {
font-family: 'Share Tech Mono', ui-monospace, monospace;
font-size: 11px;
letter-spacing: 2.5px;
text-transform: uppercase;
color: var(--nm-iot-txt);
transition: color 0.3s;
}
.nm-iot .power-status.on {
color: var(--nm-iot-t1);
text-shadow: 0 0 10px var(--nm-iot-t1);
}
.nm-iot .status-bar {
width: 100%;
background: var(--nm-iot-ib);
border-radius: 12px;
padding: 14px;
box-shadow: var(--nm-iot-neu-in);
display: flex;
flex-direction: column;
gap: 8px;
}
.nm-iot .status-row {
display: flex;
justify-content: space-between;
align-items: center;
}
.nm-iot .status-key { font-size: 11px; color: var(--nm-iot-txt); letter-spacing: 0.5px; }
.nm-iot .status-val {
font-family: 'Share Tech Mono', ui-monospace, monospace;
font-size: 12px;
color: var(--nm-iot-t2x);
}
.nm-iot .status-dot {
width: 7px;
height: 7px;
border-radius: 50%;
flex-shrink: 0;
background: var(--nm-iot-txt);
}
.nm-iot .status-dot.on {
background: var(--nm-iot-grn);
box-shadow: 0 0 6px var(--nm-iot-grn);
}
.nm-iot .scene-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.nm-iot .scene-btn {
background: var(--nm-iot-bg);
border: none;
cursor: pointer;
border-radius: 14px;
padding: 14px 10px 12px;
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
box-shadow: var(--nm-iot-neu-sm);
transition: all 0.2s ease;
font-family: 'Rajdhani', system-ui, sans-serif;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.5px;
color: var(--nm-iot-txt);
text-transform: uppercase;
}
.nm-iot .scene-btn.active {
box-shadow: var(--nm-iot-neu-sm-in);
color: var(--nm-iot-t1);
}
.nm-iot .scene-icon { font-size: 20px; line-height: 1; }
/* Center column */
.nm-iot .center-col {
display: flex;
flex-direction: column;
gap: 22px;
}
.nm-iot .thermo-wrap {
background: var(--nm-iot-bg);
border-radius: 28px;
padding: 26px 20px 20px;
box-shadow: var(--nm-iot-neu);
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.nm-iot .thermo-ring-wrap {
position: relative;
width: 200px;
height: 200px;
}
.nm-iot .thermo-ring-wrap svg {
width: 100%;
height: 100%;
transform: rotate(-135deg);
}
.nm-iot .thermo-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
pointer-events: none;
}
.nm-iot .temp-big {
font-size: 54px;
font-weight: 700;
color: var(--nm-iot-t2x);
line-height: 1;
letter-spacing: -2px;
font-family: 'Share Tech Mono', ui-monospace, monospace;
}
.nm-iot .temp-unit { font-size: 20px; color: var(--nm-iot-t1); }
.nm-iot .temp-label {
font-size: 9px;
letter-spacing: 3px;
text-transform: uppercase;
color: var(--nm-iot-txt);
margin-top: 4px;
font-family: 'Share Tech Mono', ui-monospace, monospace;
}
.nm-iot .temp-adj { display: flex; gap: 14px; }
.nm-iot .adj {
width: 44px;
height: 44px;
background: var(--nm-iot-bg);
border: none;
cursor: pointer;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 20px;
font-weight: 300;
color: var(--nm-iot-t2x);
box-shadow: var(--nm-iot-neu-sm);
transition: all 0.15s;
font-family: 'Rajdhani', system-ui, sans-serif;
}
.nm-iot .adj:active {
box-shadow: var(--nm-iot-neu-sm-in);
color: var(--nm-iot-t1);
}
.nm-iot .mode-row { display: flex; gap: 6px; width: 100%; }
.nm-iot .mode-chip {
flex: 1;
background: var(--nm-iot-bg);
border: none;
cursor: pointer;
border-radius: 12px;
padding: 10px 4px;
font-family: 'Rajdhani', system-ui, sans-serif;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.5px;
text-transform: uppercase;
color: var(--nm-iot-txt);
box-shadow: var(--nm-iot-neu-sm);
transition: all 0.2s;
display: flex;
flex-direction: column;
align-items: center;
gap: 3px;
}
.nm-iot .mode-chip.active {
box-shadow: var(--nm-iot-neu-sm-in);
color: var(--nm-iot-t1);
}
.nm-iot .mode-emoji { font-size: 14px; }
/* Sliders */
.nm-iot .sliders-wrap {
display: flex;
flex-direction: column;
gap: 14px;
}
.nm-iot .slider-row {
display: flex;
flex-direction: column;
gap: 8px;
}
.nm-iot .slider-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.nm-iot .slider-name {
font-size: 12px;
font-weight: 600;
color: var(--nm-iot-t2x);
letter-spacing: 0.5px;
}
.nm-iot .slider-value {
font-family: 'Share Tech Mono', ui-monospace, monospace;
font-size: 12px;
color: var(--nm-iot-t1);
}
.nm-iot .slider-track {
width: 100%;
height: 8px;
border-radius: 4px;
background: var(--nm-iot-ib);
box-shadow: var(--nm-iot-neu-sm-in);
position: relative;
cursor: pointer;
}
.nm-iot .slider-fill {
height: 100%;
border-radius: 4px;
background: linear-gradient(90deg, var(--nm-iot-t2), var(--nm-iot-t1));
position: relative;
}
.nm-iot .slider-glow {
position: absolute;
inset: -3px 0;
border-radius: 6px;
background: inherit;
filter: blur(5px);
opacity: 0.4;
}
.nm-iot .slider-thumb {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 20px;
height: 20px;
border-radius: 50%;
background: var(--nm-iot-bg);
box-shadow: var(--nm-iot-neu-sm);
cursor: grab;
}
.nm-iot .slider-thumb::after {
content: '';
position: absolute;
inset: 5px;
border-radius: 50%;
background: var(--nm-iot-t1);
box-shadow: 0 0 6px var(--nm-iot-t1);
}
.nm-iot .hslider {
position: absolute;
inset: -6px 0;
width: 100%;
height: 20px;
opacity: 0;
cursor: pointer;
z-index: 10;
margin: 0;
}
/* Right column */
.nm-iot .right-col {
display: flex;
flex-direction: column;
gap: 12px;
grid-row: 1 / 3;
}
.nm-iot .toggle-card {
background: var(--nm-iot-bg);
border: 0;
border-radius: 20px;
padding: 14px 12px;
box-shadow: var(--nm-iot-neu-sm);
display: flex;
align-items: center;
gap: 12px;
cursor: pointer;
transition: all 0.2s ease;
font-family: inherit;
text-align: left;
}
.nm-iot .toggle-card.on { box-shadow: var(--nm-iot-neu-sm-in); }
.nm-iot .toggle-card-icon {
width: 36px;
height: 36px;
border-radius: 12px;
background: var(--nm-iot-bg);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 16px;
box-shadow: var(--nm-iot-neu-sm);
transition: all 0.3s;
flex-shrink: 0;
}
.nm-iot .toggle-card.on .toggle-card-icon {
box-shadow: var(--nm-iot-neu-sm-in);
filter: drop-shadow(0 0 6px var(--nm-iot-t1));
}
.nm-iot .toggle-info {
flex: 1;
display: flex;
flex-direction: column;
}
.nm-iot .toggle-device {
font-size: 13px;
font-weight: 600;
color: var(--nm-iot-t2x);
}
.nm-iot .toggle-room {
font-size: 10px;
color: var(--nm-iot-txt);
margin-top: 2px;
letter-spacing: 0.3px;
}
.nm-iot .pill-sw {
width: 44px;
height: 24px;
border-radius: 12px;
background: var(--nm-iot-ib);
box-shadow: var(--nm-iot-neu-sm-in);
position: relative;
flex-shrink: 0;
transition: all 0.3s;
display: inline-block;
}
.nm-iot .pill-thumb {
position: absolute;
top: 3px;
left: 3px;
width: 18px;
height: 18px;
border-radius: 50%;
background: var(--nm-iot-bg);
box-shadow: var(--nm-iot-neu-sm);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nm-iot .toggle-card.on .pill-sw { background: rgba(0, 206, 201, 0.12); }
.nm-iot .toggle-card.on .pill-thumb {
left: 23px;
background: var(--nm-iot-t1);
box-shadow: 0 0 8px var(--nm-iot-t1), 3px 3px 6px var(--nm-iot-sd);
}
/* Bottom: mini dials */
.nm-iot .bottom-row {
grid-column: 2 / 3;
display: flex;
gap: 14px;
align-items: center;
flex-wrap: wrap;
}
.nm-iot .mini-dial-group {
flex: 1;
min-width: 60px;
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
}
.nm-iot .mini-dial {
width: 64px;
height: 64px;
border-radius: 50%;
background: var(--nm-iot-bg);
box-shadow: var(--nm-iot-neu-sm);
position: relative;
cursor: grab;
user-select: none;
}
.nm-iot .mini-dial:active { cursor: grabbing; }
.nm-iot .mini-dial-inner {
position: absolute;
inset: 10px;
border-radius: 50%;
background: var(--nm-iot-ib);
box-shadow: var(--nm-iot-neu-sm-in);
}
.nm-iot .mini-dial-dot {
position: absolute;
top: 8px;
left: 50%;
width: 5px;
height: 5px;
border-radius: 50%;
background: var(--nm-iot-t1);
box-shadow: 0 0 6px var(--nm-iot-t1);
transform: translateX(-50%);
transform-origin: 2.5px 24px;
}
.nm-iot .mini-dial-lbl {
font-size: 10px;
font-weight: 600;
color: var(--nm-iot-txt);
letter-spacing: 1px;
text-transform: uppercase;
}
.nm-iot .mini-dial-val {
font-family: 'Share Tech Mono', ui-monospace, monospace;
font-size: 12px;
color: var(--nm-iot-t1);
margin-top: -4px;
}
@media (max-width: 880px) {
.nm-iot .card {
grid-template-columns: 1fr;
grid-template-rows: auto;
}
.nm-iot .left-col,
.nm-iot .right-col,
.nm-iot .bottom-row { grid-row: auto; grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
.nm-iot .power-ring,
.nm-iot .power-arc,
.nm-iot .power-line,
.nm-iot .pill-thumb,
.nm-iot .toggle-card-icon { transition: none; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.nm-iot');
if (!root) return;
// Power
const powerRing = root.querySelector('[data-nm-iot-power]');
const status = root.querySelector('[data-nm-iot-status]');
if (powerRing) powerRing.addEventListener('click', () => {
const on = !powerRing.classList.contains('on');
powerRing.classList.toggle('on', on);
status?.classList.toggle('on', on);
if (status) status.textContent = on ? 'SYSTEM ON' : 'STANDBY';
});
// Temp dial
let temp = 22;
const tempEl = root.querySelector('[data-nm-iot-temp]');
const arc = root.querySelector('[data-nm-iot-thermo-arc]');
root.querySelectorAll('[data-nm-iot-temp-adj]').forEach(btn => {
btn.addEventListener('click', () => {
const d = parseInt(btn.dataset.nmIotTempAdj, 10) || 0;
temp = Math.max(16, Math.min(32, temp + d));
if (tempEl) tempEl.innerHTML = temp + '° ';
const pct = (temp - 16) / 16;
if (arc) arc.setAttribute('stroke-dasharray', (pct * 260) + ' 360');
});
});
// Mode chips
root.querySelectorAll('[data-nm-iot-mode]').forEach(chip => {
chip.addEventListener('click', () => {
root.querySelectorAll('[data-nm-iot-mode]').forEach(c => c.classList.remove('active'));
chip.classList.add('active');
});
});
// Scene buttons
root.querySelectorAll('[data-nm-iot-scene]').forEach(btn => {
btn.addEventListener('click', () => {
root.querySelectorAll('[data-nm-iot-scene]').forEach(s => s.classList.remove('active'));
btn.classList.add('active');
});
});
// Sliders
root.querySelectorAll('[data-nm-iot-slider]').forEach(input => {
const key = input.dataset.nmIotSlider;
const suffix = input.dataset.suffix || '';
const fill = root.querySelector('[data-nm-iot-slider-fill="' + key + '"]');
const thumb = root.querySelector('[data-nm-iot-slider-thumb="' + key + '"]');
const val = root.querySelector('[data-nm-iot-slider-val="' + key + '"]');
input.addEventListener('input', () => {
const pct = (input.value - input.min) / (input.max - input.min) * 100;
if (fill) fill.style.width = pct + '%';
if (thumb) thumb.style.left = 'calc(' + pct + '% - 10px)';
if (val) val.textContent = parseInt(input.value, 10) + suffix;
});
});
// Tick marks on thermostat
const ticks = root.querySelector('[data-nm-iot-ticks]');
if (ticks && !ticks.children.length) {
const svgNS = 'http://www.w3.org/2000/svg';
for (let t = 0; t <= 20; t++) {
const a = Math.PI * (-225 + t * 13.5) / 180;
const r1 = 96, r2 = t % 5 === 0 ? 88 : 92;
const line = document.createElementNS(svgNS, 'line');
line.setAttribute('x1', String(100 + r1 * Math.cos(a)));
line.setAttribute('y1', String(100 + r1 * Math.sin(a)));
line.setAttribute('x2', String(100 + r2 * Math.cos(a)));
line.setAttribute('y2', String(100 + r2 * Math.sin(a)));
line.setAttribute('stroke', t / 20 < 0.68 ? '#00cec9' : '#2e3a48');
line.setAttribute('stroke-width', t % 5 === 0 ? '2.5' : '1.5');
line.setAttribute('stroke-linecap', 'round');
ticks.appendChild(line);
}
}
// Device toggles
root.querySelectorAll('[data-nm-iot-device]').forEach(card => {
card.addEventListener('click', () => card.classList.toggle('on'));
});
// Mini dials — render + drag
const dialSpec = [
{ lbl: 'Color Temp', start: -60, min: 2700, max: 6500, unit: 'K' },
{ lbl: 'Ambience', start: 30, min: 0, max: 100, unit: '%' },
{ lbl: 'Eco Limit', start: -10, min: 0, max: 100, unit: '%' },
{ lbl: 'Sleep Delay', start: 80, min: 0, max: 60, unit: 'm' },
{ lbl: 'Noise Gate', start: -90, min: 20, max: 80, unit: 'dB' },
];
const dialsRow = root.querySelector('[data-nm-iot-dials]');
dialSpec.forEach(({ lbl, start, min, max, unit }) => {
const pct = (start + 140) / 280;
const initVal = Math.round(min + pct * (max - min));
const g = document.createElement('div');
g.className = 'mini-dial-group';
g.innerHTML =
'' +
'' + lbl + '
' +
'' + initVal + unit + '
';
dialsRow.appendChild(g);
const dial = g.querySelector('.mini-dial');
const dot = g.querySelector('.mini-dial-dot');
const valEl = g.querySelector('.mini-dial-val');
let angle = start, dragging = false, sy = 0, sa = start;
dial.addEventListener('mousedown', e => {
dragging = true; sy = e.clientY; sa = angle;
document.body.style.cursor = 'grabbing';
e.preventDefault();
});
document.addEventListener('mousemove', e => {
if (!dragging) return;
angle = Math.max(-140, Math.min(140, sa - (e.clientY - sy) * 1.5));
dot.style.transform = 'translateX(-50%) rotate(' + angle + 'deg)';
const p = (angle + 140) / 280;
const v = Math.round(min + p * (max - min));
valEl.textContent = v + unit;
});
document.addEventListener('mouseup', () => {
if (dragging) { dragging = false; document.body.style.cursor = ''; }
});
});
})();
```
### 08. Aurum Finance Dashboard
**Type:** Pure CSS
**Description:** A champagne-toned luxury banking dashboard. The centerpiece is a dark gradient credit card with an animated gold shimmer sweep, an EMV chip with PCB-line detail, masked card-number dots, and a 3D tilt effect on hover. Left column: total balance with up/down change indicator, three stat tiles (Income / Spent / Saved). Right column: three-layer concentric spending ring chart, four category bars, four transactions with debit/credit color coding, and five quick-action buttons including a gold-filled primary CTA. Cormorant Garamond serif for the luxury banking tone. Best for fintech apps, wealth dashboards, banking UIs.
**HTML:**
```html
Your Card
Total Balance
$ 48,290.50
▲ +$1,240.00 this month
Spending Overview
→
Send
←
Request
+
Top Up
⇄
Transfer
📄
Statement
```
**CSS:**
```css
/* ─── 08 Aurum Finance Dashboard — champagne luxury banking ───────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Josefin+Sans:wght@300;400;600&display=swap');
.nm-fin {
--nm-fin-bg: #ede8df;
--nm-fin-sd: #cdc8bc;
--nm-fin-sl: #fff8f0;
--nm-fin-ib: #e5e0d6;
--nm-fin-gld: #c9a84c;
--nm-fin-gl2: #e8c870;
--nm-fin-gl3: #9a7a2c;
--nm-fin-txt: #7a7268;
--nm-fin-txt2:#2a2018;
--nm-fin-red: #c05858;
--nm-fin-grn: #4a8a5a;
--nm-fin-neu: 10px 10px 24px var(--nm-fin-sd), -10px -10px 24px var(--nm-fin-sl);
--nm-fin-neu-in: inset 7px 7px 16px var(--nm-fin-sd), inset -7px -7px 16px var(--nm-fin-sl);
--nm-fin-neu-sm: 6px 6px 14px var(--nm-fin-sd), -6px -6px 14px var(--nm-fin-sl);
--nm-fin-neu-sm-in: inset 4px 4px 10px var(--nm-fin-sd), inset -4px -4px 10px var(--nm-fin-sl);
position: relative;
width: 100%;
min-height: 940px;
background: var(--nm-fin-bg);
font-family: 'Josefin Sans', system-ui, sans-serif;
color: var(--nm-fin-txt);
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nm-fin *,
.nm-fin *::before,
.nm-fin *::after { box-sizing: border-box; }
.nm-fin .card {
position: relative;
width: 100%;
max-width: 860px;
background: var(--nm-fin-bg);
border-radius: 44px;
padding: 40px 36px;
box-shadow: 22px 22px 54px var(--nm-fin-sd), -22px -22px 54px var(--nm-fin-sl);
display: grid;
grid-template-columns: 340px 1fr;
gap: 28px;
}
.nm-fin .tag {
font-size: 9px;
font-weight: 600;
letter-spacing: 3.5px;
text-transform: uppercase;
color: var(--nm-fin-txt);
opacity: 0.5;
margin-bottom: 16px;
}
.nm-fin .left-col,
.nm-fin .right-col {
display: flex;
flex-direction: column;
gap: 22px;
}
/* Credit card */
.nm-fin .card-wrap {
position: relative;
perspective: 800px;
}
.nm-fin .credit-card {
width: 100%;
height: 200px;
border-radius: 22px;
position: relative;
overflow: hidden;
cursor: pointer;
transform-style: preserve-3d;
transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 16px 16px 36px rgba(0, 0, 0, 0.28), -8px -8px 20px rgba(255, 255, 255, 0.06);
}
.nm-fin .card-wrap:hover .credit-card { transform: rotateY(6deg) rotateX(-3deg); }
.nm-fin .card-face {
position: absolute;
inset: 0;
background: linear-gradient(135deg, #1a1628 0%, #2a2040 40%, #1e1430 70%, #2e2848 100%);
}
.nm-fin .card-face::before {
content: '';
position: absolute;
inset: 0;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
mix-blend-mode: overlay;
opacity: 0.5;
}
.nm-fin .card-shimmer {
position: absolute;
top: -50%;
left: -60%;
width: 50%;
height: 200%;
background: linear-gradient(105deg,
transparent 0%,
rgba(201, 168, 76, 0.04) 40%,
rgba(232, 200, 112, 0.12) 50%,
rgba(201, 168, 76, 0.04) 60%,
transparent 100%);
transform: skewX(-15deg);
animation: nm-fin-shimmer 4s ease-in-out infinite;
}
@keyframes nm-fin-shimmer {
0%, 100% { left: -60%; }
50% { left: 110%; }
}
.nm-fin .card-content {
position: absolute;
inset: 0;
padding: 22px 26px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.nm-fin .card-bank {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 22px;
font-weight: 700;
color: rgba(255, 255, 255, 0.95);
letter-spacing: 2px;
display: flex;
align-items: center;
justify-content: space-between;
}
.nm-fin .card-bank-sub {
font-family: 'Josefin Sans', system-ui, sans-serif;
font-size: 8px;
letter-spacing: 4px;
color: rgba(201, 168, 76, 0.8);
text-transform: uppercase;
margin-top: 2px;
}
.nm-fin .contactless { width: 24px; height: 24px; opacity: 0.7; }
.nm-fin .chip-wrap { display: flex; align-items: center; gap: 16px; }
.nm-fin .chip {
width: 44px;
height: 34px;
border-radius: 6px;
background: linear-gradient(145deg, #e8c870, #b88a30, #e0c060, #c8a040);
position: relative;
overflow: hidden;
box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4), 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.nm-fin .chip::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 26px;
height: 20px;
border: 1.5px solid rgba(180, 140, 40, 0.6);
border-radius: 3px;
}
.nm-fin .chip::after {
content: '';
position: absolute;
top: 50%;
left: 0;
right: 0;
height: 1px;
background: rgba(180, 140, 40, 0.5);
transform: translateY(-50%);
}
.nm-fin .chip-lines {
position: absolute;
top: 0;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 1.5px;
background: rgba(180, 140, 40, 0.5);
}
.nm-fin .card-nfc {
opacity: 0.5;
font-size: 18px;
color: rgba(201, 168, 76, 0.8);
}
.nm-fin .card-number {
font-family: 'Josefin Sans', system-ui, sans-serif;
font-size: 17px;
font-weight: 300;
letter-spacing: 4px;
color: rgba(255, 255, 255, 0.85);
display: flex;
gap: 18px;
}
.nm-fin .card-number .masked {
letter-spacing: 3px;
color: rgba(201, 168, 76, 0.6);
}
.nm-fin .card-footer {
display: flex;
justify-content: space-between;
align-items: flex-end;
}
.nm-fin .card-holder-label,
.nm-fin .card-expiry-label {
font-size: 8px;
letter-spacing: 2.5px;
text-transform: uppercase;
color: rgba(201, 168, 76, 0.5);
margin-bottom: 3px;
}
.nm-fin .card-expiry-label { text-align: right; }
.nm-fin .card-holder-name,
.nm-fin .card-expiry-val {
font-family: 'Josefin Sans', system-ui, sans-serif;
font-size: 13px;
font-weight: 600;
letter-spacing: 2px;
color: rgba(255, 255, 255, 0.9);
text-transform: uppercase;
}
.nm-fin .card-expiry-val { text-align: right; }
.nm-fin .visa-logo {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 26px;
font-style: italic;
font-weight: 700;
color: rgba(255, 255, 255, 0.9);
letter-spacing: -1px;
}
/* Balance card */
.nm-fin .balance-card {
background: var(--nm-fin-bg);
border-radius: 24px;
padding: 20px 22px;
box-shadow: var(--nm-fin-neu-in);
}
.nm-fin .balance-label {
font-size: 9px;
letter-spacing: 3px;
text-transform: uppercase;
color: var(--nm-fin-txt);
margin-bottom: 8px;
}
.nm-fin .balance-amount {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 38px;
font-weight: 700;
color: var(--nm-fin-txt2);
letter-spacing: -1px;
line-height: 1;
}
.nm-fin .balance-amount .currency { font-size: 22px; color: var(--nm-fin-gld); }
.nm-fin .balance-cents { font-size: 22px; color: var(--nm-fin-txt); }
.nm-fin .balance-change {
font-size: 12px;
font-weight: 600;
margin-top: 6px;
color: var(--nm-fin-grn);
display: flex;
align-items: center;
gap: 6px;
}
.nm-fin .balance-change-sub { color: var(--nm-fin-txt); font-weight: 400; }
/* Stat trio */
.nm-fin .stat-trio { display: flex; gap: 12px; }
.nm-fin .stat-tile {
flex: 1;
background: var(--nm-fin-bg);
border-radius: 18px;
padding: 14px 12px;
box-shadow: var(--nm-fin-neu-sm);
text-align: center;
}
.nm-fin .stat-icon { font-size: 18px; margin-bottom: 6px; }
.nm-fin .stat-val {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 20px;
font-weight: 700;
color: var(--nm-fin-txt2);
}
.nm-fin .stat-val-grn { color: var(--nm-fin-grn); }
.nm-fin .stat-val-red { color: var(--nm-fin-red); }
.nm-fin .stat-val-gld { color: var(--nm-fin-gld); }
.nm-fin .stat-name {
font-size: 9px;
letter-spacing: 2px;
text-transform: uppercase;
color: var(--nm-fin-txt);
margin-top: 2px;
}
/* Right column: spending rings */
.nm-fin .spend-card {
background: var(--nm-fin-bg);
border-radius: 24px;
padding: 20px;
box-shadow: var(--nm-fin-neu);
display: flex;
gap: 20px;
align-items: center;
}
.nm-fin .ring-wrap {
position: relative;
width: 88px;
height: 88px;
flex-shrink: 0;
}
.nm-fin .ring-wrap svg { width: 100%; height: 100%; }
.nm-fin .ring-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
.nm-fin .ring-pct {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 18px;
font-weight: 700;
color: var(--nm-fin-txt2);
}
.nm-fin .ring-sub {
font-size: 8px;
letter-spacing: 1px;
text-transform: uppercase;
color: var(--nm-fin-txt);
}
.nm-fin .spend-info { flex: 1; }
.nm-fin .spend-cats { display: flex; flex-direction: column; gap: 8px; }
.nm-fin .cat-row { display: flex; align-items: center; gap: 10px; }
.nm-fin .cat-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
.nm-fin .cat-dot-gld { background: var(--nm-fin-gld); }
.nm-fin .cat-dot-red { background: var(--nm-fin-red); }
.nm-fin .cat-dot-grn { background: var(--nm-fin-grn); }
.nm-fin .cat-dot-txt { background: var(--nm-fin-txt); }
.nm-fin .cat-name {
font-size: 12px;
font-weight: 600;
color: var(--nm-fin-txt2);
flex: 1;
}
.nm-fin .cat-bar-wrap {
flex: 2;
height: 5px;
border-radius: 3px;
background: var(--nm-fin-ib);
box-shadow: var(--nm-fin-neu-sm-in);
}
.nm-fin .cat-bar { height: 100%; border-radius: 3px; }
.nm-fin .cat-bar-gld { background: var(--nm-fin-gld); }
.nm-fin .cat-bar-red { background: var(--nm-fin-red); }
.nm-fin .cat-bar-grn { background: var(--nm-fin-grn); }
.nm-fin .cat-bar-txt { background: var(--nm-fin-txt); }
.nm-fin .cat-amt {
font-size: 11px;
color: var(--nm-fin-txt);
font-weight: 600;
font-family: 'Josefin Sans', system-ui, sans-serif;
width: 50px;
text-align: right;
}
/* Transactions */
.nm-fin .tx-card {
background: var(--nm-fin-bg);
border-radius: 24px;
padding: 20px;
box-shadow: var(--nm-fin-neu);
flex: 1;
}
.nm-fin .tx-list { display: flex; flex-direction: column; gap: 2px; }
.nm-fin .tx-item {
display: flex;
align-items: center;
gap: 14px;
padding: 10px 12px;
border-radius: 14px;
transition: all 0.2s;
cursor: pointer;
}
.nm-fin .tx-item:hover {
background: var(--nm-fin-ib);
box-shadow: var(--nm-fin-neu-sm-in);
}
.nm-fin .tx-icon-wrap {
width: 38px;
height: 38px;
border-radius: 12px;
background: var(--nm-fin-bg);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 18px;
box-shadow: var(--nm-fin-neu-sm);
flex-shrink: 0;
}
.nm-fin .tx-meta { flex: 1; }
.nm-fin .tx-name {
font-size: 13px;
font-weight: 600;
color: var(--nm-fin-txt2);
}
.nm-fin .tx-date {
font-size: 10px;
color: var(--nm-fin-txt);
margin-top: 2px;
letter-spacing: 0.3px;
}
.nm-fin .tx-amount { text-align: right; }
.nm-fin .tx-val {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 16px;
font-weight: 700;
}
.nm-fin .tx-val.debit { color: var(--nm-fin-red); }
.nm-fin .tx-val.credit { color: var(--nm-fin-grn); }
.nm-fin .tx-cat {
font-size: 9px;
color: var(--nm-fin-txt);
letter-spacing: 1px;
text-transform: uppercase;
margin-top: 2px;
}
/* Quick actions */
.nm-fin .actions-row { display: flex; gap: 10px; flex-wrap: wrap; }
.nm-fin .action-btn {
flex: 1;
min-width: 80px;
background: var(--nm-fin-bg);
border: none;
cursor: pointer;
border-radius: 18px;
padding: 14px 10px 12px;
box-shadow: var(--nm-fin-neu-sm);
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
transition: all 0.18s ease;
font-family: 'Josefin Sans', system-ui, sans-serif;
}
.nm-fin .action-btn:hover {
box-shadow: 8px 8px 18px var(--nm-fin-sd), -8px -8px 18px var(--nm-fin-sl);
transform: translateY(-1px);
}
.nm-fin .action-btn:active {
box-shadow: var(--nm-fin-neu-sm-in);
transform: scale(0.97);
}
.nm-fin .action-icon { font-size: 20px; }
.nm-fin .action-name {
font-size: 10px;
font-weight: 600;
letter-spacing: 1.5px;
text-transform: uppercase;
color: var(--nm-fin-txt);
}
.nm-fin .action-btn.accent {
background: linear-gradient(145deg, var(--nm-fin-gld), var(--nm-fin-gl3));
box-shadow: 8px 8px 18px rgba(180, 130, 40, 0.3), -6px -6px 14px var(--nm-fin-sl);
}
.nm-fin .action-btn.accent .action-name,
.nm-fin .action-btn.accent .action-icon { color: rgba(255, 248, 220, 0.9); }
.nm-fin .action-btn.accent:active { box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.2); }
@media (max-width: 880px) {
.nm-fin .card { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.nm-fin .card-shimmer,
.nm-fin .credit-card,
.nm-fin .action-btn { transition: none; animation: none; }
.nm-fin .card-wrap:hover .credit-card { transform: none; }
}
```
### 09. Soft UI Calculator
**Type:** CSS + JS
**Description:** A warm-cream desk calculator where every button is a fully extruded neumorphic circle with a CSS specular shine highlight at the top-left. Pressing triggers an inset shadow flip plus a ripple-ring animation expanding outward. The display is a deep-inset panel with a scanline grid overlay and smooth font-size scaling for long numbers. Operator keys (÷ × − +) are styled in burnt amber, function keys (AC ± %) in slate-gray with a slightly recessed background. The = key spans two columns as a pill-shaped amber gradient. Full keyboard input support — type numbers, operators, Enter, Escape directly. Space Mono numerals + Nunito keys. Best for calculator tools, finance widgets, conversion utilities.
**HTML:**
```html
MC
MR
M−
M+
MS
AC
±
%
÷
7
8
9
×
4
5
6
−
1
2
3
+
0
.
=
```
**CSS:**
```css
/* ─── 09 Soft UI Calculator — warm cream desk calculator ──────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Nunito:wght@400;600;700;800&display=swap');
.nm-clc {
--nm-clc-bg: #f0ebe0;
--nm-clc-sd: #d2cdc0;
--nm-clc-sl: #fffefc;
--nm-clc-ib: #e6e1d6;
--nm-clc-op: #c8783a;
--nm-clc-op2: #a05828;
--nm-clc-fn: #5a6e7a;
--nm-clc-txt: #6a6058;
--nm-clc-txt2:#1a1510;
--nm-clc-neu: 9px 9px 20px var(--nm-clc-sd), -9px -9px 20px var(--nm-clc-sl);
--nm-clc-neu-in: inset 7px 7px 16px var(--nm-clc-sd), inset -7px -7px 16px var(--nm-clc-sl);
--nm-clc-neu-sm: 6px 6px 13px var(--nm-clc-sd), -6px -6px 13px var(--nm-clc-sl);
--nm-clc-neu-sm-in: inset 5px 5px 11px var(--nm-clc-sd), inset -5px -5px 11px var(--nm-clc-sl);
position: relative;
width: 100%;
min-height: 820px;
background: var(--nm-clc-bg);
font-family: 'Nunito', system-ui, sans-serif;
color: var(--nm-clc-txt);
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nm-clc *,
.nm-clc *::before,
.nm-clc *::after { box-sizing: border-box; }
.nm-clc .card {
position: relative;
width: 100%;
max-width: 400px;
background: var(--nm-clc-bg);
border-radius: 40px;
padding: 36px 32px 32px;
box-shadow: 20px 20px 50px var(--nm-clc-sd), -20px -20px 50px var(--nm-clc-sl);
display: flex;
flex-direction: column;
gap: 24px;
}
.nm-clc .card::before {
content: '';
position: absolute;
inset: 0;
border-radius: 40px;
background: radial-gradient(ellipse at 20% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
pointer-events: none;
}
/* Display */
.nm-clc .display-wrap {
background: var(--nm-clc-bg);
border-radius: 24px;
padding: 22px 22px 18px;
box-shadow: var(--nm-clc-neu-in);
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 8px;
min-height: 110px;
justify-content: flex-end;
position: relative;
overflow: hidden;
}
.nm-clc .display-wrap::before {
content: '';
position: absolute;
inset: 0;
background: repeating-linear-gradient(
0deg, transparent 0px, transparent 2px,
rgba(0, 0, 0, 0.012) 2px, rgba(0, 0, 0, 0.012) 3px
);
border-radius: 24px;
pointer-events: none;
}
.nm-clc .display-expr {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 13px;
color: var(--nm-clc-txt);
opacity: 0.65;
min-height: 18px;
letter-spacing: 0.5px;
text-align: right;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
}
.nm-clc .display-result {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 42px;
font-weight: 700;
color: var(--nm-clc-txt2);
letter-spacing: -1.5px;
line-height: 1;
transition: transform 0.15s ease, color 0.15s ease;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: right;
width: 100%;
}
.nm-clc .display-result.flash {
color: var(--nm-clc-op);
transform: scale(1.02);
}
@keyframes nm-clc-slide {
from { transform: translateY(6px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.nm-clc .display-result.fresh { animation: nm-clc-slide 0.18s ease-out; }
/* Memory row */
.nm-clc .mem-row {
display: flex;
gap: 10px;
justify-content: center;
}
.nm-clc .mem-key {
flex: 1;
padding: 10px 0;
background: var(--nm-clc-bg);
border: none;
cursor: pointer;
border-radius: 14px;
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 11px;
font-weight: 700;
color: var(--nm-clc-fn);
box-shadow: var(--nm-clc-neu-sm);
transition: all 0.12s;
letter-spacing: 0.5px;
}
.nm-clc .mem-key:hover { box-shadow: 7px 7px 16px var(--nm-clc-sd), -7px -7px 16px var(--nm-clc-sl); }
.nm-clc .mem-key:active {
box-shadow: var(--nm-clc-neu-sm-in);
color: var(--nm-clc-op);
}
/* Keypad */
.nm-clc .keypad {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 12px;
}
.nm-clc .key {
aspect-ratio: 1;
background: var(--nm-clc-bg);
border: none;
cursor: pointer;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
font-family: 'Nunito', system-ui, sans-serif;
font-size: 18px;
font-weight: 700;
color: var(--nm-clc-txt2);
box-shadow: var(--nm-clc-neu-sm);
transition: box-shadow 0.12s ease, transform 0.1s ease, color 0.15s;
user-select: none;
position: relative;
outline: none;
}
.nm-clc .key::before {
content: '';
position: absolute;
top: 12%;
left: 15%;
width: 30%;
height: 25%;
border-radius: 50%;
background: rgba(255, 255, 255, 0.55);
filter: blur(3px);
pointer-events: none;
}
.nm-clc .key:hover {
box-shadow: 8px 8px 18px var(--nm-clc-sd), -8px -8px 18px var(--nm-clc-sl);
transform: translateY(-1px);
}
.nm-clc .key:active,
.nm-clc .key.pressed {
box-shadow: var(--nm-clc-neu-sm-in);
transform: scale(0.94);
color: var(--nm-clc-op);
}
.nm-clc .key.fn {
background: var(--nm-clc-ib);
font-size: 14px;
font-weight: 800;
color: var(--nm-clc-fn);
box-shadow: var(--nm-clc-neu-sm);
}
.nm-clc .key.fn:active,
.nm-clc .key.fn.pressed {
box-shadow: var(--nm-clc-neu-sm-in);
color: var(--nm-clc-op);
}
.nm-clc .key.op {
background: var(--nm-clc-bg);
color: var(--nm-clc-op);
font-size: 22px;
}
.nm-clc .key.op::after {
content: '';
position: absolute;
inset: 6px;
border-radius: 50%;
border: 1.5px solid rgba(200, 120, 58, 0.15);
pointer-events: none;
}
.nm-clc .key.op:active,
.nm-clc .key.op.pressed {
color: var(--nm-clc-op2);
box-shadow: var(--nm-clc-neu-sm-in);
}
.nm-clc .key.eq {
grid-column: span 2;
border-radius: 32px;
aspect-ratio: unset;
padding: 0 24px;
height: 64px;
background: linear-gradient(145deg, var(--nm-clc-op), var(--nm-clc-op2));
color: #fff8f0;
font-size: 22px;
box-shadow: 8px 8px 18px rgba(180, 90, 30, 0.35), -5px -5px 14px var(--nm-clc-sl);
}
.nm-clc .key.eq::before { display: none; }
.nm-clc .key.eq:active,
.nm-clc .key.eq.pressed {
box-shadow: inset 5px 5px 14px rgba(0, 0, 0, 0.22);
transform: scale(0.97);
color: rgba(255, 248, 240, 0.85);
}
.nm-clc .key.zero {
grid-column: span 2;
border-radius: 32px;
aspect-ratio: unset;
padding: 0 24px;
height: 64px;
justify-content: flex-start;
}
@keyframes nm-clc-ripple {
0% { transform: scale(0.95); opacity: 0.6; }
100% { transform: scale(1.6); opacity: 0; }
}
.nm-clc .key.rippling::after {
content: '';
position: absolute;
inset: 0;
border-radius: inherit;
border: 2px solid var(--nm-clc-op);
animation: nm-clc-ripple 0.35s ease-out forwards;
pointer-events: none;
}
.nm-clc .key.op.rippling::after {
animation: nm-clc-ripple 0.35s ease-out forwards;
border: 2px solid var(--nm-clc-op);
}
@media (prefers-reduced-motion: reduce) {
.nm-clc .display-result,
.nm-clc .key { transition: none; animation: none; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.nm-clc');
if (!root) return;
let display = '0';
let operand = null;
let operator = null;
let waitingForOperand = false;
let memory = 0;
const resultEl = root.querySelector('[data-nm-clc-result]');
const exprEl = root.querySelector('[data-nm-clc-expr]');
function updateDisplay(val, newExpr) {
const len = String(val).length;
resultEl.style.fontSize = len > 10 ? '26px' : len > 7 ? '34px' : '42px';
resultEl.classList.remove('fresh');
void resultEl.offsetWidth;
resultEl.classList.add('fresh');
resultEl.textContent = val;
if (newExpr !== undefined) exprEl.textContent = newExpr;
}
function compute() {
const cur = parseFloat(display);
let result;
switch (operator) {
case '+': result = operand + cur; break;
case '-': result = operand - cur; break;
case '*': result = operand * cur; break;
case '/': result = cur !== 0 ? operand / cur : 'Error'; break;
}
if (result === 'Error') {
display = 'Error';
} else {
display = parseFloat(result.toFixed(10)).toString();
if (display.length > 12) display = parseFloat(result.toExponential(4)).toString();
}
operand = parseFloat(display);
waitingForOperand = true;
updateDisplay(display);
}
function ripple(action) {
const btn = root.querySelector('[data-nm-clc-key="' + action + '"]');
if (!btn) return;
btn.classList.add('pressed', 'rippling');
setTimeout(() => btn.classList.remove('pressed', 'rippling'), 200);
}
function action(act) {
ripple(act);
if (/^\d$/.test(act)) {
if (waitingForOperand) {
display = act;
waitingForOperand = false;
} else {
display = display === '0' ? act : display + act;
}
if (display.length > 12) return;
updateDisplay(display, display);
return;
}
switch (act) {
case '.':
if (!display.includes('.')) { display += '.'; updateDisplay(display); }
break;
case 'AC':
display = '0'; operand = null; operator = null; waitingForOperand = false;
resultEl.classList.add('flash');
setTimeout(() => resultEl.classList.remove('flash'), 250);
updateDisplay('0', '');
break;
case '+/-':
display = String(-parseFloat(display));
updateDisplay(display);
break;
case '%':
display = String(parseFloat(display) / 100);
updateDisplay(display);
break;
case '/': case '*': case '-': case '+':
if (operator && !waitingForOperand) compute();
operand = parseFloat(display);
operator = act;
waitingForOperand = true;
updateDisplay(display, display + ' ' + (act === '*' ? '×' : act === '/' ? '÷' : act === '-' ? '−' : act));
break;
case '=':
if (operator && !waitingForOperand) {
compute();
operator = null;
resultEl.classList.add('flash');
setTimeout(() => resultEl.classList.remove('flash'), 200);
exprEl.textContent = '';
}
break;
}
}
// Click handlers
root.querySelectorAll('[data-nm-clc-key]').forEach(btn => {
btn.addEventListener('click', () => action(btn.dataset.nmClcKey));
});
// Memory handlers
root.querySelectorAll('[data-nm-clc-mem]').forEach(btn => {
btn.addEventListener('click', () => {
const op = btn.dataset.nmClcMem;
switch (op) {
case 'MC': memory = 0; break;
case 'MR': display = String(memory); waitingForOperand = false; updateDisplay(display); break;
case 'M+': memory += parseFloat(display); break;
case 'M-': memory -= parseFloat(display); break;
case 'MS': memory = parseFloat(display); break;
}
});
});
// Keyboard support
document.addEventListener('keydown', e => {
// Only if the focused element is inside our root, or no input is focused
const ae = document.activeElement;
const inField = ae && (ae.tagName === 'INPUT' || ae.tagName === 'TEXTAREA' || ae.tagName === 'SELECT');
if (inField && !root.contains(ae)) return;
const map = {
'0':'0','1':'1','2':'2','3':'3','4':'4','5':'5','6':'6','7':'7','8':'8','9':'9',
'.':'.', 'Enter':'=', '=':'=',
'+':'+', '-':'-', '*':'*', '/':'/',
'Backspace':'AC', 'Escape':'AC', '%':'%'
};
if (map[e.key]) { e.preventDefault(); action(map[e.key]); }
});
})();
```
### 10. Sky Widgets
**Type:** CSS + JS
**Description:** Five asymmetric weather widgets in a sky-mist palette. A main weather card spans two rows with a floating-animated weather emoji, 5-day forecast pills with mini fill bars, and a live stats strip. A real-time clock widget renders both digital (hours/minutes/seconds) and an analog face with CSS-positioned hands updating every second. A sunrise arc traces a gold SVG path with a glowing sun dot at the current position. A semicircular humidity gauge and a wide air-quality widget with five individual pollutant bars round out the bottom row. Nunito + Space Mono. Best for weather apps, dashboard widgets, IoT environmental sensors.
**HTML:**
```html
San Francisco
California, USA · 37.7°N
☀
18°
Partly Cloudy
Feels like 16° · Wind 14 km/h NW
```
**CSS:**
```css
/* ─── 10 Sky Widgets — sky mist weather dashboard ─────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');
.nm-sky {
--nm-sky-bg: #e8f0f8;
--nm-sky-sd: #c4ccd8;
--nm-sky-sl: #f8fdff;
--nm-sky-ib: #dce5f0;
--nm-sky-sun: #f6c94e;
--nm-sky-sky: #5b9ec9;
--nm-sky-sky2:#3a7ea8;
--nm-sky-warm:#e07b50;
--nm-sky-mnt: #78bda8;
--nm-sky-txt: #6a7a8a;
--nm-sky-txt2:#1a2a38;
--nm-sky-r: 22px;
--nm-sky-neu: 10px 10px 24px var(--nm-sky-sd), -10px -10px 24px var(--nm-sky-sl);
--nm-sky-neu-sm: 6px 6px 14px var(--nm-sky-sd), -6px -6px 14px var(--nm-sky-sl);
--nm-sky-neu-sm-in: inset 5px 5px 10px var(--nm-sky-sd), inset -5px -5px 10px var(--nm-sky-sl);
position: relative;
width: 100%;
min-height: 900px;
background: var(--nm-sky-bg);
font-family: 'Nunito', system-ui, sans-serif;
color: var(--nm-sky-txt);
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nm-sky *,
.nm-sky *::before,
.nm-sky *::after { box-sizing: border-box; }
.nm-sky .card {
position: relative;
width: 100%;
max-width: 860px;
background: var(--nm-sky-bg);
border-radius: 40px;
padding: 24px;
box-shadow: 24px 24px 58px var(--nm-sky-sd), -24px -24px 58px var(--nm-sky-sl);
display: grid;
grid-template-columns: 340px 1fr 1fr;
grid-template-rows: auto auto auto;
gap: 18px;
}
.nm-sky .widget {
background: var(--nm-sky-bg);
border-radius: var(--nm-sky-r);
box-shadow: var(--nm-sky-neu);
padding: 22px;
position: relative;
overflow: hidden;
}
.nm-sky .widget::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 60%;
height: 40%;
background: radial-gradient(ellipse, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
border-radius: 50%;
pointer-events: none;
}
/* Widget 1 — Main */
.nm-sky .w-main {
grid-column: 1;
grid-row: 1 / 3;
padding: 26px 24px;
display: flex;
flex-direction: column;
gap: 18px;
}
.nm-sky .city-row {
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.nm-sky .city-name {
font-size: 22px;
font-weight: 800;
color: var(--nm-sky-txt2);
letter-spacing: -0.5px;
}
.nm-sky .city-country {
font-size: 12px;
color: var(--nm-sky-txt);
font-weight: 500;
margin-top: 2px;
}
.nm-sky .live-dot {
display: flex;
align-items: center;
gap: 6px;
font-size: 10px;
font-weight: 700;
letter-spacing: 1.5px;
text-transform: uppercase;
color: var(--nm-sky-mnt);
}
.nm-sky .dot-pulse {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--nm-sky-mnt);
animation: nm-sky-pulse 2s ease-in-out infinite;
}
@keyframes nm-sky-pulse {
0%, 100% { box-shadow: 0 0 0 0 rgba(120, 189, 168, 0.5); }
50% { box-shadow: 0 0 0 8px rgba(120, 189, 168, 0); }
}
.nm-sky .temp-block {
display: flex;
align-items: center;
gap: 16px;
}
.nm-sky .weather-icon-wrap {
width: 80px;
height: 80px;
border-radius: 50%;
background: var(--nm-sky-bg);
box-shadow: var(--nm-sky-neu-sm);
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
flex-shrink: 0;
}
.nm-sky .weather-icon-wrap::after {
content: '';
position: absolute;
inset: 8px;
border-radius: 50%;
background: var(--nm-sky-ib);
box-shadow: var(--nm-sky-neu-sm-in);
}
.nm-sky .weather-emoji {
font-size: 32px;
position: relative;
z-index: 2;
animation: nm-sky-float 3s ease-in-out infinite;
}
@keyframes nm-sky-float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-5px); }
}
.nm-sky .temp-value {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 58px;
font-weight: 700;
color: var(--nm-sky-txt2);
line-height: 1;
letter-spacing: -3px;
}
.nm-sky .temp-deg { font-size: 26px; color: var(--nm-sky-sky); }
.nm-sky .temp-cond {
font-size: 15px;
font-weight: 700;
color: var(--nm-sky-txt2);
margin-top: 2px;
}
.nm-sky .temp-feel {
font-size: 11px;
color: var(--nm-sky-txt);
margin-top: 4px;
font-weight: 500;
}
.nm-sky .stats-strip {
display: flex;
background: var(--nm-sky-ib);
border-radius: 16px;
box-shadow: var(--nm-sky-neu-sm-in);
overflow: hidden;
}
.nm-sky .stat-cell {
flex: 1;
padding: 14px 8px;
text-align: center;
border-right: 1px solid rgba(150, 170, 190, 0.2);
}
.nm-sky .stat-cell:last-child { border-right: none; }
.nm-sky .stat-icon { font-size: 16px; margin-bottom: 5px; }
.nm-sky .stat-val {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 13px;
font-weight: 700;
color: var(--nm-sky-txt2);
}
.nm-sky .stat-nm {
font-size: 9px;
color: var(--nm-sky-txt);
text-transform: uppercase;
letter-spacing: 1px;
margin-top: 2px;
}
.nm-sky .forecast-row { display: flex; gap: 6px; }
.nm-sky .fc-day {
flex: 1;
background: var(--nm-sky-bg);
border-radius: 14px;
box-shadow: var(--nm-sky-neu-sm);
padding: 10px 4px;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
cursor: pointer;
transition: all 0.2s;
}
.nm-sky .fc-day:hover {
box-shadow: 8px 8px 18px var(--nm-sky-sd), -8px -8px 18px var(--nm-sky-sl);
transform: translateY(-2px);
}
.nm-sky .fc-day.today { box-shadow: var(--nm-sky-neu-sm-in); }
.nm-sky .fc-day-name {
font-size: 9px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
color: var(--nm-sky-txt);
}
.nm-sky .fc-icon { font-size: 16px; }
.nm-sky .fc-hi { font-size: 12px; font-weight: 800; color: var(--nm-sky-txt2); }
.nm-sky .fc-lo { font-size: 10px; color: var(--nm-sky-txt); }
.nm-sky .fc-day.today .fc-day-name { color: var(--nm-sky-sky); }
.nm-sky .fc-bar-wrap {
width: 4px;
height: 24px;
background: var(--nm-sky-ib);
border-radius: 2px;
box-shadow: inset 1px 1px 3px var(--nm-sky-sd), inset -1px -1px 3px var(--nm-sky-sl);
position: relative;
}
.nm-sky .fc-bar {
position: absolute;
bottom: 0;
left: 0;
right: 0;
border-radius: 2px;
background: linear-gradient(to top, var(--nm-sky-sky2), var(--nm-sky-sky));
}
.nm-sky .fc-day.today .fc-bar { background: linear-gradient(to top, var(--nm-sky-sky2), var(--nm-sky-sun)); }
/* Widget 2 — Clock */
.nm-sky .w-clock {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
padding: 24px 18px;
}
.nm-sky .clock-display {
background: var(--nm-sky-ib);
border-radius: 18px;
padding: 16px 20px;
box-shadow: var(--nm-sky-neu-sm-in);
text-align: center;
}
.nm-sky .clock-time {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 32px;
font-weight: 700;
color: var(--nm-sky-txt2);
letter-spacing: -1px;
line-height: 1;
}
.nm-sky .clock-sec { color: var(--nm-sky-sky); }
.nm-sky .clock-date {
font-size: 11px;
font-weight: 600;
color: var(--nm-sky-txt);
margin-top: 6px;
letter-spacing: 0.3px;
}
.nm-sky .clock-ampm {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 11px;
font-weight: 700;
color: var(--nm-sky-sky);
letter-spacing: 2px;
text-transform: uppercase;
}
.nm-sky .analog-wrap { position: relative; width: 76px; height: 76px; }
.nm-sky .analog-face {
width: 76px;
height: 76px;
border-radius: 50%;
background: var(--nm-sky-bg);
box-shadow: var(--nm-sky-neu-sm);
position: relative;
}
.nm-sky .analog-inner {
position: absolute;
inset: 8px;
border-radius: 50%;
background: var(--nm-sky-ib);
box-shadow: var(--nm-sky-neu-sm-in);
}
.nm-sky .hand {
position: absolute;
bottom: 50%;
left: 50%;
transform-origin: bottom center;
border-radius: 3px;
}
.nm-sky .hand-h { width: 3px; height: 18px; margin-left: -1.5px; background: var(--nm-sky-txt2); }
.nm-sky .hand-m { width: 2px; height: 24px; margin-left: -1px; background: var(--nm-sky-sky); }
.nm-sky .hand-s { width: 1px; height: 26px; margin-left: -0.5px; background: var(--nm-sky-sun); }
.nm-sky .center-dot {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--nm-sky-sky);
z-index: 10;
box-shadow: 0 0 4px var(--nm-sky-sky);
}
/* Widget 3 — UV + Sunrise */
.nm-sky .w-uv {
display: flex;
flex-direction: column;
gap: 14px;
}
.nm-sky .uv-ring-wrap { display: flex; align-items: center; gap: 14px; }
.nm-sky .ring-sm {
position: relative;
width: 68px;
height: 68px;
flex-shrink: 0;
}
.nm-sky .ring-sm svg { width: 100%; height: 100%; }
.nm-sky .ring-sm-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
.nm-sky .ring-sm-val {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 16px;
font-weight: 700;
color: var(--nm-sky-txt2);
line-height: 1;
}
.nm-sky .ring-sm-val-warm { color: var(--nm-sky-warm); }
.nm-sky .ring-sm-sub {
font-size: 8px;
text-transform: uppercase;
letter-spacing: 1px;
color: var(--nm-sky-txt);
}
.nm-sky .uv-info { flex: 1; }
.nm-sky .uv-level {
font-size: 14px;
font-weight: 800;
color: var(--nm-sky-txt2);
}
.nm-sky .uv-advice {
font-size: 11px;
color: var(--nm-sky-txt);
margin-top: 3px;
line-height: 1.4;
}
.nm-sky .sunrise-arc { position: relative; }
.nm-sky .sun-arc-svg { width: 100%; display: block; }
.nm-sky .sun-times {
display: flex;
justify-content: space-between;
font-size: 11px;
font-weight: 700;
color: var(--nm-sky-txt);
margin-top: 4px;
}
/* Widget 4 — Humidity */
.nm-sky .w-humidity {
display: flex;
flex-direction: column;
gap: 14px;
}
.nm-sky .hum-label {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 2px;
color: var(--nm-sky-txt);
}
.nm-sky .hum-arc-wrap { position: relative; }
.nm-sky .hum-arc-wrap svg { width: 100%; }
.nm-sky .hum-center {
position: absolute;
bottom: 6px;
left: 50%;
transform: translateX(-50%);
text-align: center;
}
.nm-sky .hum-pct {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 22px;
font-weight: 700;
color: var(--nm-sky-txt2);
}
.nm-sky .hum-unit { font-size: 10px; color: var(--nm-sky-sky); font-weight: 700; }
.nm-sky .hum-desc {
font-size: 12px;
color: var(--nm-sky-txt);
font-weight: 600;
text-align: center;
}
/* Widget 5 — Air Quality */
.nm-sky .w-air {
grid-column: 2 / 4;
display: flex;
align-items: center;
gap: 18px;
}
.nm-sky .aqi-chip {
width: 76px;
height: 76px;
border-radius: 50%;
background: var(--nm-sky-bg);
box-shadow: var(--nm-sky-neu);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-shrink: 0;
position: relative;
}
.nm-sky .aqi-chip::after {
content: '';
position: absolute;
inset: 8px;
border-radius: 50%;
background: var(--nm-sky-ib);
box-shadow: var(--nm-sky-neu-sm-in);
}
.nm-sky .aqi-num {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 20px;
font-weight: 700;
color: var(--nm-sky-mnt);
z-index: 2;
line-height: 1;
position: relative;
}
.nm-sky .aqi-lbl {
font-size: 8px;
text-transform: uppercase;
letter-spacing: 1px;
color: var(--nm-sky-txt);
z-index: 2;
margin-top: 2px;
position: relative;
}
.nm-sky .aqi-bars { flex: 1; }
.nm-sky .aqi-title {
font-size: 13px;
font-weight: 800;
color: var(--nm-sky-txt2);
margin-bottom: 8px;
}
.nm-sky .aqi-scale {
display: flex;
gap: 4px;
height: 10px;
border-radius: 5px;
overflow: hidden;
}
.nm-sky .aqi-seg { border-radius: 3px; }
.nm-sky .aqi-seg-1 { background: var(--nm-sky-mnt); flex: 2; }
.nm-sky .aqi-seg-2 { background: var(--nm-sky-sun); flex: 2; }
.nm-sky .aqi-seg-3 { background: var(--nm-sky-warm); flex: 1.5; }
.nm-sky .aqi-seg-4 { background: #d04040; flex: 1.5; }
.nm-sky .aqi-seg-5 { background: #8040c0; flex: 1; }
.nm-sky .pollutants { display: flex; gap: 12px; margin-top: 10px; }
.nm-sky .poll-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
}
.nm-sky .poll-bar-bg {
width: 28px;
height: 36px;
border-radius: 6px;
background: var(--nm-sky-ib);
box-shadow: var(--nm-sky-neu-sm-in);
position: relative;
overflow: hidden;
}
.nm-sky .poll-bar {
position: absolute;
bottom: 0;
left: 0;
right: 0;
border-radius: 4px;
background: linear-gradient(to top, var(--nm-sky-sky2), var(--nm-sky-sky));
}
.nm-sky .poll-bar-mnt { background: linear-gradient(to top, var(--nm-sky-mnt), #a0ddc8); }
.nm-sky .poll-bar-sun { background: linear-gradient(to top, var(--nm-sky-sun), #f8e090); }
.nm-sky .poll-bar-warm { background: linear-gradient(to top, var(--nm-sky-warm), #f0a880); }
.nm-sky .poll-name {
font-size: 9px;
font-weight: 700;
color: var(--nm-sky-txt);
letter-spacing: 0.5px;
}
.nm-sky .poll-val {
font-size: 10px;
font-weight: 800;
color: var(--nm-sky-txt2);
font-family: 'Space Mono', ui-monospace, monospace;
}
@media (max-width: 880px) {
.nm-sky .card {
grid-template-columns: 1fr;
}
.nm-sky .w-main { grid-row: auto; }
.nm-sky .w-air { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
.nm-sky .weather-emoji,
.nm-sky .dot-pulse { animation: none; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.nm-sky');
if (!root) return;
const clock = root.querySelector('[data-nm-sky-clock]');
const dateEl = root.querySelector('[data-nm-sky-date]');
const ampm = root.querySelector('[data-nm-sky-ampm]');
const handH = root.querySelector('[data-nm-sky-handh]');
const handM = root.querySelector('[data-nm-sky-handm]');
const handS = root.querySelector('[data-nm-sky-hands]');
function update() {
const now = new Date();
const h = now.getHours(), m = now.getMinutes(), s = now.getSeconds();
const ap = h >= 12 ? 'PM' : 'AM';
const h12 = h % 12 || 12;
if (clock) clock.innerHTML = String(h12).padStart(2, '0') + ':' + String(m).padStart(2, '0') + ':' + String(s).padStart(2, '0') + ' ';
if (ampm) ampm.textContent = ap;
const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
if (dateEl) dateEl.textContent = days[now.getDay()] + ', ' + months[now.getMonth()] + ' ' + now.getDate() + ', ' + now.getFullYear();
const sdeg = s * 6;
const mdeg = m * 6 + s * 0.1;
const hdeg = (h % 12) * 30 + m * 0.5;
if (handH) handH.style.transform = 'rotate(' + hdeg + 'deg)';
if (handM) handM.style.transform = 'rotate(' + mdeg + 'deg)';
if (handS) handS.style.transform = 'rotate(' + sdeg + 'deg)';
}
update();
setInterval(update, 1000);
})();
```
### 11. Soft UI Form Controls
**Type:** Pure CSS
**Description:** A pure-CSS showcase of soft-UI form controls with zero JavaScript. Style A: concave dimple radios — a sunken circle with a dot that bounces in using cubic-bezier(0.34, 1.56, 0.64, 1) spring easing on :checked. Style B: horizontal pill-select groups + a vertical icon pill variant — both invert from inset-track to extruded-active on :checked. Style C: card radios with a floating badge that fills from gray to indigo and reveals a white center dot. Checkboxes mirror the pattern — dimple box with CSS-drawn checkmark (border-right + border-bottom), stamp pills with animated tick circles, and card checkboxes with a green gradient fill. Raleway + DM Mono. Best for design-system docs, form pattern libraries, settings panels.
**HTML:**
```html
Radio Buttons
Custom CSS · No JavaScript
Checkboxes
Pure CSS inset · accent fill transition
```
**CSS:**
```css
/* ─── 11 Soft UI Form Controls — pure CSS showcase ───────────────── */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');
.nm-ctl {
--nm-ctl-bg: #f0ebe2;
--nm-ctl-sd: #d0cbbf;
--nm-ctl-sl: #fffdf8;
--nm-ctl-ib: #e8e2d8;
--nm-ctl-acc: #5c6bc0;
--nm-ctl-ac2: #8c9ce0;
--nm-ctl-ac3: #3a4a9a;
--nm-ctl-grn: #4a8a68;
--nm-ctl-txt: #6a6258;
--nm-ctl-txt2:#1a1510;
--nm-ctl-neu-sm: 5px 5px 12px var(--nm-ctl-sd), -5px -5px 12px var(--nm-ctl-sl);
--nm-ctl-neu-sm-in: inset 4px 4px 9px var(--nm-ctl-sd), inset -4px -4px 9px var(--nm-ctl-sl);
position: relative;
width: 100%;
min-height: 880px;
background: var(--nm-ctl-bg);
font-family: 'Raleway', system-ui, sans-serif;
color: var(--nm-ctl-txt);
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nm-ctl *,
.nm-ctl *::before,
.nm-ctl *::after { box-sizing: border-box; }
.nm-ctl .card {
position: relative;
width: 100%;
max-width: 860px;
background: var(--nm-ctl-bg);
border-radius: 40px;
padding: 40px 36px;
box-shadow: 20px 20px 50px var(--nm-ctl-sd), -20px -20px 50px var(--nm-ctl-sl);
display: flex;
flex-direction: column;
gap: 32px;
}
.nm-ctl .sec { display: flex; flex-direction: column; gap: 16px; }
.nm-ctl .sec-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.nm-ctl .sec-title { font-size: 14px; font-weight: 800; color: var(--nm-ctl-txt2); letter-spacing: 0.3px; }
.nm-ctl .sec-tag {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 9px;
letter-spacing: 3px;
text-transform: uppercase;
color: var(--nm-ctl-txt);
opacity: 0.5;
}
.nm-ctl .sub-tag {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 9px;
letter-spacing: 2px;
text-transform: uppercase;
color: var(--nm-ctl-txt);
opacity: 0.5;
margin-bottom: 4px;
}
.nm-ctl .controls-row { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.nm-ctl .col-stack { display: flex; flex-direction: column; gap: 12px; }
.nm-ctl .col-stack-flex { flex: 1; min-width: 180px; }
.nm-ctl .div-line {
height: 1px;
background: linear-gradient(to right, transparent, var(--nm-ctl-sd), transparent);
opacity: 0.5;
}
/* Style A — Classic radio */
.nm-ctl .radio-classic { display: flex; flex-direction: column; gap: 12px; min-width: 160px; }
.nm-ctl .rc-item {
display: flex;
align-items: center;
gap: 13px;
cursor: pointer;
user-select: none;
}
.nm-ctl .rc-input { position: absolute; opacity: 0; pointer-events: none; }
.nm-ctl .rc-circle {
width: 26px;
height: 26px;
border-radius: 50%;
background: var(--nm-ctl-bg);
box-shadow: var(--nm-ctl-neu-sm-in);
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: box-shadow 0.2s ease;
position: relative;
}
.nm-ctl .rc-circle::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0);
width: 11px;
height: 11px;
border-radius: 50%;
background: var(--nm-ctl-acc);
box-shadow: 0 0 8px rgba(92, 107, 192, 0.5);
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nm-ctl .rc-input:checked ~ .rc-circle::after { transform: translate(-50%, -50%) scale(1); }
.nm-ctl .rc-input:checked ~ .rc-circle { box-shadow: var(--nm-ctl-neu-sm); }
.nm-ctl .rc-label {
display: flex;
flex-direction: column;
font-size: 13px;
font-weight: 600;
color: var(--nm-ctl-txt2);
transition: color 0.2s;
line-height: 1.3;
}
.nm-ctl .rc-item:hover .rc-label { color: var(--nm-ctl-acc); }
.nm-ctl .rc-sublabel { font-size: 10px; color: var(--nm-ctl-txt); font-weight: 400; margin-top: 1px; }
/* Style B — Pill group */
.nm-ctl .pill-group {
display: flex;
background: var(--nm-ctl-ib);
border-radius: 20px;
padding: 5px;
box-shadow: var(--nm-ctl-neu-sm-in);
gap: 4px;
}
.nm-ctl .pill-input { position: absolute; opacity: 0; pointer-events: none; }
.nm-ctl .pill-label {
flex: 1;
padding: 9px 14px;
border-radius: 15px;
font-size: 12px;
font-weight: 700;
color: var(--nm-ctl-txt);
cursor: pointer;
text-align: center;
transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
white-space: nowrap;
}
.nm-ctl .pill-input:checked + .pill-label {
background: var(--nm-ctl-bg);
box-shadow: var(--nm-ctl-neu-sm);
color: var(--nm-ctl-acc);
}
.nm-ctl .pill-group-v {
display: flex;
flex-direction: column;
background: var(--nm-ctl-ib);
border-radius: 18px;
padding: 5px;
box-shadow: var(--nm-ctl-neu-sm-in);
gap: 4px;
min-width: 160px;
}
.nm-ctl .pill-label-v {
padding: 9px 14px;
border-radius: 13px;
font-size: 12px;
font-weight: 700;
color: var(--nm-ctl-txt);
cursor: pointer;
transition: all 0.22s;
display: flex;
align-items: center;
gap: 10px;
}
.nm-ctl .pill-input:checked + .pill-label-v {
background: var(--nm-ctl-bg);
box-shadow: var(--nm-ctl-neu-sm);
color: var(--nm-ctl-acc);
}
.nm-ctl .pill-icon { font-size: 16px; }
/* Style C — Card radio */
.nm-ctl .card-radio-group { display: flex; gap: 12px; flex-wrap: wrap; }
.nm-ctl .card-input { position: absolute; opacity: 0; pointer-events: none; }
.nm-ctl .card-label {
flex: 1;
background: var(--nm-ctl-bg);
border-radius: 18px;
padding: 16px 12px;
box-shadow: var(--nm-ctl-neu-sm);
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
transition: all 0.22s ease;
min-width: 100px;
position: relative;
}
.nm-ctl .card-label:hover {
transform: translateY(-2px);
box-shadow: 8px 8px 20px var(--nm-ctl-sd), -8px -8px 20px var(--nm-ctl-sl);
}
.nm-ctl .card-input:checked + .card-label { box-shadow: var(--nm-ctl-neu-sm-in); }
.nm-ctl .card-label::before {
content: '';
position: absolute;
top: 10px;
right: 10px;
width: 18px;
height: 18px;
border-radius: 50%;
background: var(--nm-ctl-bg);
box-shadow: var(--nm-ctl-neu-sm-in);
transition: all 0.2s;
}
.nm-ctl .card-input:checked + .card-label::before {
background: var(--nm-ctl-acc);
box-shadow: 0 0 8px rgba(92, 107, 192, 0.4);
}
.nm-ctl .card-label::after {
content: '';
position: absolute;
top: 14px;
right: 14px;
width: 10px;
height: 10px;
border-radius: 50%;
background: #fff;
transform: scale(0);
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nm-ctl .card-input:checked + .card-label::after { transform: scale(1); }
.nm-ctl .card-icon { font-size: 24px; }
.nm-ctl .card-title { font-size: 12px; font-weight: 800; color: var(--nm-ctl-txt2); letter-spacing: 0.3px; }
.nm-ctl .card-desc { font-size: 10px; color: var(--nm-ctl-txt); text-align: center; line-height: 1.4; }
.nm-ctl .card-price {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 13px;
font-weight: 700;
color: var(--nm-ctl-acc);
margin-top: 2px;
}
/* Checkboxes Style A — classic box */
.nm-ctl .check-classic { display: flex; flex-direction: column; gap: 12px; min-width: 180px; }
.nm-ctl .cb-item {
display: flex;
align-items: center;
gap: 13px;
cursor: pointer;
user-select: none;
}
.nm-ctl .cb-input { position: absolute; opacity: 0; pointer-events: none; }
.nm-ctl .cb-box {
width: 24px;
height: 24px;
border-radius: 8px;
background: var(--nm-ctl-bg);
box-shadow: var(--nm-ctl-neu-sm-in);
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: all 0.2s ease;
overflow: hidden;
position: relative;
}
.nm-ctl .cb-check {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
transform: scale(0) rotate(20deg);
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nm-ctl .cb-check::before {
content: '';
width: 5px;
height: 9px;
border-right: 2.5px solid #fff;
border-bottom: 2.5px solid #fff;
transform: rotate(45deg);
margin-top: -4px;
}
.nm-ctl .cb-input:checked ~ .cb-box {
background: linear-gradient(145deg, var(--nm-ctl-acc), var(--nm-ctl-ac3));
box-shadow: 3px 3px 8px rgba(92, 107, 192, 0.35), -2px -2px 6px var(--nm-ctl-sl);
}
.nm-ctl .cb-input:checked ~ .cb-box .cb-check { transform: scale(1) rotate(0deg); }
.nm-ctl .cb-txt {
font-size: 13px;
font-weight: 600;
color: var(--nm-ctl-txt2);
transition: color 0.2s;
line-height: 1.3;
}
.nm-ctl .cb-item:hover .cb-txt { color: var(--nm-ctl-acc); }
/* Checkboxes Style B — stamp pill */
.nm-ctl .stamp-group { display: flex; gap: 10px; flex-wrap: wrap; }
.nm-ctl .stamp-input { position: absolute; opacity: 0; pointer-events: none; }
.nm-ctl .stamp-label {
padding: 9px 16px;
border-radius: 100px;
font-size: 12px;
font-weight: 700;
color: var(--nm-ctl-txt);
cursor: pointer;
background: var(--nm-ctl-bg);
box-shadow: var(--nm-ctl-neu-sm);
transition: all 0.2s ease;
display: inline-flex;
align-items: center;
gap: 7px;
user-select: none;
}
.nm-ctl .stamp-label:hover { transform: translateY(-1px); color: var(--nm-ctl-acc); }
.nm-ctl .stamp-input:checked + .stamp-label {
box-shadow: var(--nm-ctl-neu-sm-in);
color: var(--nm-ctl-acc);
font-weight: 800;
}
.nm-ctl .stamp-tick {
width: 16px;
height: 16px;
border-radius: 50%;
background: var(--nm-ctl-bg);
box-shadow: var(--nm-ctl-neu-sm-in);
display: inline-flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
flex-shrink: 0;
}
.nm-ctl .stamp-input:checked + .stamp-label .stamp-tick {
background: var(--nm-ctl-acc);
box-shadow: 0 0 6px rgba(92, 107, 192, 0.4);
color: #fff;
font-size: 10px;
}
.nm-ctl .stamp-input:checked + .stamp-label .stamp-tick::after { content: '\2713'; }
/* Checkboxes Style C — card check */
.nm-ctl .card-check-group { display: flex; flex-direction: column; gap: 10px; min-width: 240px; }
.nm-ctl .cc-input { position: absolute; opacity: 0; pointer-events: none; }
.nm-ctl .cc-label {
background: var(--nm-ctl-bg);
border-radius: 16px;
padding: 13px 16px;
box-shadow: var(--nm-ctl-neu-sm);
cursor: pointer;
display: flex;
align-items: center;
gap: 14px;
transition: all 0.2s;
user-select: none;
}
.nm-ctl .cc-label:hover { box-shadow: 7px 7px 16px var(--nm-ctl-sd), -7px -7px 16px var(--nm-ctl-sl); }
.nm-ctl .cc-input:checked + .cc-label { box-shadow: var(--nm-ctl-neu-sm-in); }
.nm-ctl .cc-sq {
width: 22px;
height: 22px;
border-radius: 7px;
background: var(--nm-ctl-bg);
box-shadow: var(--nm-ctl-neu-sm-in);
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: all 0.2s;
position: relative;
overflow: hidden;
}
.nm-ctl .cc-input:checked + .cc-label .cc-sq {
background: linear-gradient(145deg, var(--nm-ctl-grn), #2a6a48);
box-shadow: 2px 2px 6px rgba(74, 138, 104, 0.4);
}
.nm-ctl .cc-sq-inner {
transform: scale(0);
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
font-size: 12px;
color: #fff;
}
.nm-ctl .cc-input:checked + .cc-label .cc-sq-inner { transform: scale(1); }
.nm-ctl .cc-text {
flex: 1;
display: flex;
flex-direction: column;
}
.nm-ctl .cc-name { font-size: 13px; font-weight: 700; color: var(--nm-ctl-txt2); }
.nm-ctl .cc-detail { font-size: 10px; color: var(--nm-ctl-txt); margin-top: 2px; }
.nm-ctl .cc-badge {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 10px;
font-weight: 700;
color: var(--nm-ctl-txt);
padding: 3px 8px;
background: var(--nm-ctl-ib);
border-radius: 8px;
box-shadow: var(--nm-ctl-neu-sm-in);
}
@media (prefers-reduced-motion: reduce) {
.nm-ctl .rc-circle::after,
.nm-ctl .pill-label,
.nm-ctl .pill-label-v,
.nm-ctl .card-label,
.nm-ctl .card-label::after,
.nm-ctl .cb-box,
.nm-ctl .cb-check,
.nm-ctl .stamp-label,
.nm-ctl .cc-label,
.nm-ctl .cc-sq-inner { transition: none; animation: none; }
}
```
### 12. Aurum Profile & Testimonial
**Type:** Pure CSS
**Description:** A rose-parchment profile layout. The main profile card uses a triple-layer avatar mount: outer extruded ring → inset groove ring → gradient avatar, so the portrait feels poured into the background rather than placed on top. A pulsing green presence indicator adds life. Deeply inset stats strip, individually extruded tag pills, five social hover-lift buttons, and a gradient follow CTA. A large pull-quote testimonial sits beside it with a decorative 120px ghost quotation mark. Four mini connection cards below each have their own embedded circular avatar and a neumorphic connect button. Playfair Display + DM Sans. Best for portfolios, team pages, social profiles.
**HTML:**
```html
🧑🎨
Jordan Ellis
Senior Product Designer · Figma
"Crafting interfaces that feel as good as they look. Obsessed with depth, texture, and the tiny details that make users pause."
Neumorphism
Design Systems
Motion
Accessibility
𝕏
🏀
in
♥
Bē
+ Follow Jordan
★
★
★
★
★
The level of craft in Jordan's work is unmatched. The neumorphic design system they built for our fintech product reduced user confusion by 40% — every shadow, every depth cue was deliberate. It genuinely feels like holding a physical object.
👩💼
Priya Nair
VP of Design · Verse Finance
🧑💻
Lena Park
UI Engineer · Stripe
6 mutual connections
+ Connect
👨🎨
Marc Osei
Motion Designer · Apple
12 mutual connections
+ Connect
👩🔬
Aiko Tanaka
UX Researcher · Google
3 mutual connections
+ Connect
🧑💼
Dele Owusu
Product Lead · Notion
8 mutual connections
+ Connect
```
**CSS:**
```css
/* ─── 12 Aurum Profile & Testimonial — rose parchment ──────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400;1,500&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');
.nm-prf {
--nm-prf-bg: #f0e8e4;
--nm-prf-sd: #d4c8c4;
--nm-prf-sl: #fff8f6;
--nm-prf-ib: #e8deda;
--nm-prf-acc: #c4786a;
--nm-prf-ac2: #e09a8c;
--nm-prf-ac3: #9a5048;
--nm-prf-lav: #9a6880;
--nm-prf-lv2: #c0a0b8;
--nm-prf-tl: #5a8a88;
--nm-prf-txt: #7a6a68;
--nm-prf-txt2:#2a1a18;
--nm-prf-neu: 10px 10px 24px var(--nm-prf-sd), -10px -10px 24px var(--nm-prf-sl);
--nm-prf-neu-sm: 6px 6px 14px var(--nm-prf-sd), -6px -6px 14px var(--nm-prf-sl);
--nm-prf-neu-sm-in: inset 4px 4px 10px var(--nm-prf-sd), inset -4px -4px 10px var(--nm-prf-sl);
position: relative;
width: 100%;
min-height: 900px;
background: var(--nm-prf-bg);
font-family: 'DM Sans', system-ui, sans-serif;
color: var(--nm-prf-txt);
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nm-prf *,
.nm-prf *::before,
.nm-prf *::after { box-sizing: border-box; }
.nm-prf .card {
position: relative;
width: 100%;
max-width: 860px;
display: grid;
grid-template-columns: 290px 1fr;
grid-template-rows: auto auto;
gap: 20px;
padding: 36px;
background: var(--nm-prf-bg);
border-radius: 44px;
box-shadow: 22px 22px 54px var(--nm-prf-sd), -22px -22px 54px var(--nm-prf-sl);
}
/* Profile card */
.nm-prf .profile-card {
grid-row: 1 / 3;
background: var(--nm-prf-bg);
border-radius: 28px;
box-shadow: var(--nm-prf-neu);
padding: 32px 24px;
display: flex;
flex-direction: column;
align-items: center;
gap: 18px;
position: relative;
}
.nm-prf .profile-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 50%;
border-radius: 28px 28px 0 0;
background: radial-gradient(ellipse at 50% -10%, rgba(196, 120, 106, 0.12) 0%, transparent 70%);
pointer-events: none;
}
.nm-prf .avatar-mount {
width: 120px;
height: 120px;
border-radius: 50%;
background: var(--nm-prf-bg);
box-shadow: var(--nm-prf-neu);
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
flex-shrink: 0;
}
.nm-prf .avatar-ring {
position: absolute;
inset: 8px;
border-radius: 50%;
background: var(--nm-prf-ib);
box-shadow: var(--nm-prf-neu-sm-in);
}
.nm-prf .avatar-img {
width: 84px;
height: 84px;
border-radius: 50%;
background: linear-gradient(145deg, var(--nm-prf-ac2), var(--nm-prf-lav));
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 36px;
position: relative;
z-index: 2;
user-select: none;
box-shadow: 0 4px 12px rgba(154, 80, 72, 0.2);
}
.nm-prf .avatar-status {
position: absolute;
bottom: 10px;
right: 10px;
width: 18px;
height: 18px;
border-radius: 50%;
background: #6ab87a;
box-shadow: 0 0 0 3px var(--nm-prf-bg), 0 0 8px rgba(106, 184, 122, 0.5);
z-index: 10;
animation: nm-prf-status-pulse 2.5s ease-in-out infinite;
}
@keyframes nm-prf-status-pulse {
0%, 100% { box-shadow: 0 0 0 3px var(--nm-prf-bg), 0 0 6px rgba(106, 184, 122, 0.4); }
50% { box-shadow: 0 0 0 3px var(--nm-prf-bg), 0 0 14px rgba(106, 184, 122, 0.7); }
}
.nm-prf .profile-id { text-align: center; position: relative; }
.nm-prf .profile-name {
font-family: 'Playfair Display', Georgia, serif;
font-size: 22px;
font-weight: 700;
color: var(--nm-prf-txt2);
letter-spacing: -0.5px;
}
.nm-prf .profile-role {
font-size: 13px;
color: var(--nm-prf-acc);
font-weight: 500;
letter-spacing: 0.3px;
margin-top: 2px;
}
.nm-prf .profile-bio {
font-size: 12px;
color: var(--nm-prf-txt);
text-align: center;
line-height: 1.7;
font-style: italic;
padding: 0 4px;
position: relative;
}
.nm-prf .stats-strip {
width: 100%;
background: var(--nm-prf-ib);
border-radius: 18px;
box-shadow: var(--nm-prf-neu-sm-in);
display: flex;
position: relative;
}
.nm-prf .stat-cell {
flex: 1;
padding: 12px 8px;
text-align: center;
border-right: 1px solid rgba(180, 160, 155, 0.2);
}
.nm-prf .stat-cell:last-child { border-right: none; }
.nm-prf .stat-n {
font-family: 'Playfair Display', Georgia, serif;
font-size: 18px;
font-weight: 700;
color: var(--nm-prf-txt2);
}
.nm-prf .stat-l {
font-size: 9px;
text-transform: uppercase;
letter-spacing: 1.5px;
color: var(--nm-prf-txt);
margin-top: 2px;
}
.nm-prf .tag-row {
display: flex;
gap: 6px;
flex-wrap: wrap;
justify-content: center;
position: relative;
}
.nm-prf .tag {
background: var(--nm-prf-bg);
border-radius: 100px;
padding: 6px 12px;
font-size: 10px;
font-weight: 600;
color: var(--nm-prf-txt);
box-shadow: var(--nm-prf-neu-sm);
transition: all 0.15s;
}
.nm-prf .tag:hover {
box-shadow: 7px 7px 16px var(--nm-prf-sd), -7px -7px 16px var(--nm-prf-sl);
color: var(--nm-prf-acc);
}
.nm-prf .socials { display: flex; gap: 10px; position: relative; }
.nm-prf .social-btn {
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--nm-prf-bg);
border: none;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 15px;
color: var(--nm-prf-txt2);
box-shadow: var(--nm-prf-neu-sm);
transition: all 0.18s ease;
}
.nm-prf .social-btn:hover {
transform: translateY(-2px);
box-shadow: 8px 8px 18px var(--nm-prf-sd), -8px -8px 18px var(--nm-prf-sl);
}
.nm-prf .social-btn:active { box-shadow: var(--nm-prf-neu-sm-in); transform: scale(0.94); }
.nm-prf .follow-btn {
width: 100%;
border: none;
cursor: pointer;
padding: 13px;
border-radius: 100px;
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 13px;
font-weight: 700;
color: #fff;
letter-spacing: 0.5px;
background: linear-gradient(145deg, var(--nm-prf-acc), var(--nm-prf-ac3));
box-shadow: 8px 8px 18px rgba(154, 80, 72, 0.35), -5px -5px 14px var(--nm-prf-sl);
transition: all 0.18s;
position: relative;
}
.nm-prf .follow-btn:hover {
transform: translateY(-2px);
box-shadow: 10px 14px 24px rgba(154, 80, 72, 0.4), -5px -5px 14px var(--nm-prf-sl);
}
.nm-prf .follow-btn:active {
box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.2);
transform: scale(0.98);
}
/* Testimonial card */
.nm-prf .testimonial-card {
background: var(--nm-prf-bg);
border-radius: 24px;
box-shadow: var(--nm-prf-neu);
padding: 24px 22px;
display: flex;
flex-direction: column;
gap: 16px;
position: relative;
overflow: hidden;
}
.nm-prf .testimonial-card::before {
content: '"';
position: absolute;
top: -10px;
left: 18px;
font-family: 'Playfair Display', Georgia, serif;
font-size: 120px;
font-weight: 700;
color: var(--nm-prf-acc);
opacity: 0.08;
line-height: 1;
pointer-events: none;
}
.nm-prf .stars { display: flex; gap: 4px; }
.nm-prf .star { font-size: 14px; color: var(--nm-prf-acc); }
.nm-prf .quote-text {
font-family: 'Playfair Display', Georgia, serif;
font-size: 15px;
font-style: italic;
color: var(--nm-prf-txt2);
line-height: 1.7;
letter-spacing: 0.2px;
}
.nm-prf .quote-author { display: flex; align-items: center; gap: 14px; }
.nm-prf .q-avatar {
width: 44px;
height: 44px;
border-radius: 50%;
background: var(--nm-prf-bg);
box-shadow: var(--nm-prf-neu-sm);
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
flex-shrink: 0;
}
.nm-prf .q-avatar::after {
content: '';
position: absolute;
inset: 5px;
border-radius: 50%;
background: var(--nm-prf-ib);
box-shadow: var(--nm-prf-neu-sm-in);
}
.nm-prf .q-avatar-img {
position: relative;
z-index: 2;
width: 30px;
height: 30px;
border-radius: 50%;
background: linear-gradient(145deg, var(--nm-prf-lv2), var(--nm-prf-tl));
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 14px;
}
.nm-prf .q-name { font-weight: 700; font-size: 13px; color: var(--nm-prf-txt2); }
.nm-prf .q-role { font-size: 11px; color: var(--nm-prf-txt); margin-top: 2px; }
.nm-prf .q-company { color: var(--nm-prf-acc); font-weight: 600; }
/* Connection cards */
.nm-prf .connections-row { display: flex; gap: 12px; flex-wrap: wrap; }
.nm-prf .conn-card {
flex: 1;
min-width: 130px;
background: var(--nm-prf-bg);
border-radius: 20px;
box-shadow: var(--nm-prf-neu-sm);
padding: 16px 12px;
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
cursor: pointer;
transition: all 0.2s;
}
.nm-prf .conn-card:hover {
transform: translateY(-2px);
box-shadow: 8px 8px 20px var(--nm-prf-sd), -8px -8px 20px var(--nm-prf-sl);
}
.nm-prf .conn-card:active { box-shadow: var(--nm-prf-neu-sm-in); }
.nm-prf .conn-avatar {
width: 52px;
height: 52px;
border-radius: 50%;
background: var(--nm-prf-bg);
box-shadow: var(--nm-prf-neu-sm);
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
}
.nm-prf .conn-avatar::after {
content: '';
position: absolute;
inset: 5px;
border-radius: 50%;
background: var(--nm-prf-ib);
box-shadow: var(--nm-prf-neu-sm-in);
}
.nm-prf .conn-avatar-img {
position: relative;
z-index: 2;
width: 36px;
height: 36px;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 16px;
}
.nm-prf .conn-avatar-img-1 { background: linear-gradient(145deg, var(--nm-prf-ac2), var(--nm-prf-acc)); }
.nm-prf .conn-avatar-img-2 { background: linear-gradient(145deg, var(--nm-prf-lv2), var(--nm-prf-lav)); }
.nm-prf .conn-avatar-img-3 { background: linear-gradient(145deg, #a0c8c0, var(--nm-prf-tl)); }
.nm-prf .conn-avatar-img-4 { background: linear-gradient(145deg, #d0b880, #b09060); }
.nm-prf .conn-name { font-size: 12px; font-weight: 700; color: var(--nm-prf-txt2); text-align: center; }
.nm-prf .conn-role { font-size: 10px; color: var(--nm-prf-txt); text-align: center; }
.nm-prf .conn-mutual {
font-size: 9px;
color: var(--nm-prf-txt);
text-align: center;
font-weight: 500;
letter-spacing: 0.3px;
}
.nm-prf .conn-add {
padding: 6px 14px;
border-radius: 100px;
background: var(--nm-prf-bg);
border: none;
cursor: pointer;
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 11px;
font-weight: 700;
color: var(--nm-prf-acc);
box-shadow: var(--nm-prf-neu-sm);
transition: all 0.15s;
}
.nm-prf .conn-add:hover { box-shadow: 6px 6px 12px var(--nm-prf-sd), -6px -6px 12px var(--nm-prf-sl); }
.nm-prf .conn-add:active { box-shadow: var(--nm-prf-neu-sm-in); }
@media (max-width: 720px) {
.nm-prf .card { grid-template-columns: 1fr; }
.nm-prf .profile-card { grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
.nm-prf .avatar-status { animation: none; }
.nm-prf .social-btn,
.nm-prf .follow-btn,
.nm-prf .tag,
.nm-prf .conn-card { transition: none; }
}
```
### 13. Dark Mode Neumorphism
**Type:** CSS + JS
**Description:** The exact dark-neumorphic formula in action — deep navy with shadow 15% darker / highlight 10% lighter. Three concentric system-monitor rings glow with neon teal, electric violet, and hot pink using filter:drop-shadow layered beneath feGaussianBlur SVG filters. Notifications use colored left-border glows that bleed into the card surface. A live JS clock in teal with luminous text-shadow. An embedded code-snippet widget explains the exact CSS variable formula. A music disc uses repeating-radial-gradient grooves. The bottom metrics grid shows four neon accent colors with sparkline bars, each with a matching box-shadow glow. Exo 2 + JetBrains Mono. Best for dev dashboards, gamer interfaces, futuristic admin panels.
**HTML:**
```html
System Monitor · Dark Neu Formula
Notifications · Glow Accent Borders
🚀
Deploy Successful
v2.4.1 is live on production. 0 errors, 3ms build time.
2 min ago
💡
Design review ready
Jordan shared "Neumorphic System v3" for your feedback.
18 min ago
⚠️
RAM threshold exceeded
Process usage above 80%. Consider closing Chrome tabs.
42 min ago
📦
Dependency update
12 packages ready to update. Run npm audit for details.
1 hr ago
--sd: #0e1425 ;
--sl: #263050 ;
box-shadow:
10px 10px 26px var(--sd),
-8px -8px 20px var(--sl);
Neon Dusk
Phantom Circuit · 2026
1:48 4:22
⏮
⏸
⏭
```
**CSS:**
```css
/* ─── 13 Dark Mode Neumorphism — neon system hub ──────────────── */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');
.nm-drk {
--nm-drk-bg: #1a2035;
--nm-drk-sd: #0e1425;
--nm-drk-sl: #263050;
--nm-drk-ib: #161d2e;
--nm-drk-t1: #00f5d4;
--nm-drk-t2: #00c8ac;
--nm-drk-vt: #bd93f9;
--nm-drk-pk: #ff79c6;
--nm-drk-amb: #ffb86c;
--nm-drk-grn: #50fa7b;
--nm-drk-red: #ff5555;
--nm-drk-txt: #6d8aae;
--nm-drk-txt2:#cdd9f0;
--nm-drk-neu: 10px 10px 26px var(--nm-drk-sd), -8px -8px 20px var(--nm-drk-sl);
--nm-drk-neu-in: inset 8px 8px 18px var(--nm-drk-sd), inset -6px -6px 14px var(--nm-drk-sl);
--nm-drk-neu-sm: 6px 6px 14px var(--nm-drk-sd), -5px -5px 12px var(--nm-drk-sl);
--nm-drk-neu-sm-in: inset 5px 5px 11px var(--nm-drk-sd), inset -4px -4px 9px var(--nm-drk-sl);
position: relative;
width: 100%;
min-height: 1000px;
background: var(--nm-drk-bg);
font-family: 'Exo 2', system-ui, sans-serif;
color: var(--nm-drk-txt);
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
overflow: hidden;
box-sizing: border-box;
}
.nm-drk *,
.nm-drk *::before,
.nm-drk *::after { box-sizing: border-box; }
.nm-drk .card {
position: relative;
width: 100%;
max-width: 860px;
background: var(--nm-drk-bg);
border-radius: 44px;
padding: 36px 32px;
box-shadow: 22px 22px 54px var(--nm-drk-sd), -18px -18px 44px var(--nm-drk-sl);
display: grid;
grid-template-columns: 1fr 1fr 200px;
grid-template-rows: auto auto;
gap: 20px;
}
.nm-drk .tag {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 8px;
letter-spacing: 3px;
text-transform: uppercase;
color: var(--nm-drk-txt);
opacity: 0.5;
margin-bottom: 14px;
}
/* System monitor */
.nm-drk .sys-card {
background: var(--nm-drk-bg);
border-radius: 24px;
box-shadow: var(--nm-drk-neu);
padding: 22px 18px;
display: flex;
flex-direction: column;
gap: 16px;
}
.nm-drk .rings-cluster {
display: flex;
gap: 12px;
justify-content: center;
align-items: center;
}
.nm-drk .mon-ring {
position: relative;
width: 100px;
height: 100px;
}
.nm-drk .mon-ring-2 { width: 84px; height: 84px; }
.nm-drk .mon-ring-3 { width: 70px; height: 70px; }
.nm-drk .mon-ring svg { width: 100%; height: 100%; }
.nm-drk .mon-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
.nm-drk .mon-val {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 16px;
font-weight: 700;
color: var(--nm-drk-txt2);
line-height: 1;
}
.nm-drk .mon-val-t1 { color: var(--nm-drk-t1); text-shadow: 0 0 12px rgba(0, 245, 212, 0.5); }
.nm-drk .mon-val-vt { color: var(--nm-drk-vt); text-shadow: 0 0 10px rgba(189, 147, 249, 0.5); font-size: 13px; }
.nm-drk .mon-val-pk { color: var(--nm-drk-pk); text-shadow: 0 0 10px rgba(255, 121, 198, 0.5); font-size: 12px; }
.nm-drk .mon-sub {
font-size: 8px;
letter-spacing: 2px;
text-transform: uppercase;
color: var(--nm-drk-txt);
margin-top: 3px;
}
.nm-drk .sys-metrics { display: flex; gap: 8px; }
.nm-drk .metric-chip {
flex: 1;
background: var(--nm-drk-ib);
border-radius: 12px;
padding: 10px 8px;
box-shadow: var(--nm-drk-neu-sm-in);
text-align: center;
}
.nm-drk .mc-val {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 14px;
font-weight: 700;
color: var(--nm-drk-txt2);
}
.nm-drk .mc-val-t1 { color: var(--nm-drk-t1); }
.nm-drk .mc-val-amb { color: var(--nm-drk-amb); }
.nm-drk .mc-val-vt { color: var(--nm-drk-vt); }
.nm-drk .mc-label {
font-size: 9px;
letter-spacing: 1.5px;
color: var(--nm-drk-txt);
text-transform: uppercase;
margin-top: 3px;
}
.nm-drk .proc-list { display: flex; flex-direction: column; gap: 6px; }
.nm-drk .proc-item {
display: flex;
align-items: center;
gap: 10px;
background: var(--nm-drk-ib);
border-radius: 10px;
padding: 7px 10px;
box-shadow: var(--nm-drk-neu-sm-in);
}
.nm-drk .proc-name {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 10px;
color: var(--nm-drk-txt2);
flex: 1;
}
.nm-drk .proc-bar-bg {
flex: 2;
height: 4px;
border-radius: 2px;
background: var(--nm-drk-bg);
overflow: hidden;
}
.nm-drk .proc-bar { height: 100%; border-radius: 2px; }
.nm-drk .proc-bar-t1 { background: linear-gradient(90deg, var(--nm-drk-t2), var(--nm-drk-t1)); }
.nm-drk .proc-bar-vt { background: linear-gradient(90deg, #8050c8, var(--nm-drk-vt)); }
.nm-drk .proc-bar-pk { background: linear-gradient(90deg, #c050a0, var(--nm-drk-pk)); }
.nm-drk .proc-pct {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 10px;
color: var(--nm-drk-txt);
width: 30px;
text-align: right;
}
.nm-drk .proc-pct-t1 { color: var(--nm-drk-t1); }
.nm-drk .proc-pct-vt { color: var(--nm-drk-vt); }
.nm-drk .proc-pct-pk { color: var(--nm-drk-pk); }
/* Notifications */
.nm-drk .notif-card {
background: var(--nm-drk-bg);
border-radius: 24px;
box-shadow: var(--nm-drk-neu);
padding: 22px 18px;
display: flex;
flex-direction: column;
gap: 10px;
}
.nm-drk .notif-item {
background: var(--nm-drk-bg);
border-radius: 14px;
padding: 12px 12px;
box-shadow: var(--nm-drk-neu-sm);
display: flex;
gap: 10px;
align-items: flex-start;
cursor: pointer;
transition: all 0.2s;
position: relative;
overflow: hidden;
}
.nm-drk .notif-item::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 3px;
height: 100%;
border-radius: 0 2px 2px 0;
}
.nm-drk .notif-item.nt-t1::before { background: var(--nm-drk-t1); box-shadow: 0 0 8px var(--nm-drk-t1); }
.nm-drk .notif-item.nt-vt::before { background: var(--nm-drk-vt); box-shadow: 0 0 8px var(--nm-drk-vt); }
.nm-drk .notif-item.nt-pk::before { background: var(--nm-drk-pk); box-shadow: 0 0 8px var(--nm-drk-pk); }
.nm-drk .notif-item.nt-amb::before { background: var(--nm-drk-amb); box-shadow: 0 0 8px var(--nm-drk-amb); }
.nm-drk .notif-item:hover {
box-shadow: 8px 8px 18px var(--nm-drk-sd), -8px -8px 18px var(--nm-drk-sl);
transform: translateX(2px);
}
.nm-drk .notif-icon-wrap {
width: 32px;
height: 32px;
border-radius: 10px;
background: var(--nm-drk-bg);
box-shadow: var(--nm-drk-neu-sm);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 14px;
flex-shrink: 0;
}
.nm-drk .notif-body { flex: 1; }
.nm-drk .notif-title { font-size: 11px; font-weight: 700; color: var(--nm-drk-txt2); }
.nm-drk .notif-msg { font-size: 10px; color: var(--nm-drk-txt); margin-top: 3px; line-height: 1.4; }
.nm-drk .notif-time {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 9px;
color: var(--nm-drk-txt);
margin-top: 4px;
}
.nm-drk .notif-badge {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
margin-top: 4px;
}
.nm-drk .notif-badge.nt-t1 { background: var(--nm-drk-t1); box-shadow: 0 0 6px var(--nm-drk-t1); }
.nm-drk .notif-badge.nt-vt { background: var(--nm-drk-vt); box-shadow: 0 0 6px var(--nm-drk-vt); }
.nm-drk .notif-badge.nt-pk { background: var(--nm-drk-pk); box-shadow: 0 0 6px var(--nm-drk-pk); }
.nm-drk .notif-badge.nt-read { background: var(--nm-drk-txt); opacity: 0.3; }
/* Right sidebar */
.nm-drk .side-col {
grid-row: 1 / 3;
display: flex;
flex-direction: column;
gap: 18px;
}
.nm-drk .clock-card {
background: var(--nm-drk-bg);
border-radius: 22px;
box-shadow: var(--nm-drk-neu);
padding: 18px 14px;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.nm-drk .clock-face {
background: var(--nm-drk-ib);
border-radius: 14px;
box-shadow: var(--nm-drk-neu-sm-in);
padding: 12px 16px;
text-align: center;
width: 100%;
}
.nm-drk .clock-hr {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 30px;
font-weight: 700;
color: var(--nm-drk-t1);
letter-spacing: -1px;
line-height: 1;
text-shadow: 0 0 20px rgba(0, 245, 212, 0.4);
}
.nm-drk .clock-sec-txt {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 11px;
color: var(--nm-drk-txt);
letter-spacing: 1px;
margin-top: 3px;
}
.nm-drk .glow-tip {
background: var(--nm-drk-ib);
border-radius: 12px;
box-shadow: var(--nm-drk-neu-sm-in);
padding: 10px;
width: 100%;
}
.nm-drk .glow-code {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 8px;
line-height: 1.8;
color: var(--nm-drk-txt);
}
.nm-drk .glow-code .key { color: var(--nm-drk-vt); }
.nm-drk .glow-code .val { color: var(--nm-drk-t1); }
.nm-drk .glow-code .comment { color: var(--nm-drk-txt); opacity: 0.5; }
.nm-drk .music-card {
background: var(--nm-drk-bg);
border-radius: 22px;
box-shadow: var(--nm-drk-neu);
padding: 18px 14px;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
flex: 1;
}
.nm-drk .music-disc {
width: 80px;
height: 80px;
border-radius: 50%;
background: var(--nm-drk-bg);
box-shadow: var(--nm-drk-neu-sm);
position: relative;
animation: nm-drk-spin 6s linear infinite;
}
@keyframes nm-drk-spin { to { transform: rotate(360deg); } }
.nm-drk .music-card.paused .music-disc { animation-play-state: paused; }
.nm-drk .music-disc::before {
content: '';
position: absolute;
inset: 8px;
border-radius: 50%;
background: radial-gradient(circle at 40% 35%, #2a1e3a 0%, #1a1428 50%, #0e0a18 100%);
box-shadow: var(--nm-drk-neu-sm-in);
}
.nm-drk .music-disc::after {
content: '';
position: absolute;
inset: 0;
border-radius: 50%;
background: repeating-radial-gradient(circle at center,
transparent 0%, transparent 5px,
rgba(189, 147, 249, 0.06) 5px, rgba(189, 147, 249, 0.06) 6px);
}
.nm-drk .disc-label {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 18px;
height: 18px;
border-radius: 50%;
background: var(--nm-drk-bg);
box-shadow: var(--nm-drk-neu-sm);
z-index: 2;
}
.nm-drk .music-info { text-align: center; }
.nm-drk .music-title { font-size: 12px; font-weight: 700; color: var(--nm-drk-txt2); }
.nm-drk .music-artist { font-size: 10px; color: var(--nm-drk-txt); margin-top: 2px; }
.nm-drk .mini-progress {
width: 100%;
height: 3px;
border-radius: 2px;
background: var(--nm-drk-ib);
box-shadow: var(--nm-drk-neu-sm-in);
}
.nm-drk .mini-prog-fill {
height: 100%;
width: 42%;
border-radius: 2px;
background: linear-gradient(90deg, var(--nm-drk-vt), var(--nm-drk-t1));
box-shadow: 0 0 6px rgba(0, 245, 212, 0.3);
}
.nm-drk .music-times {
display: flex;
justify-content: space-between;
width: 100%;
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 9px;
color: var(--nm-drk-txt);
}
.nm-drk .music-controls { display: flex; gap: 10px; align-items: center; }
.nm-drk .mc-btn {
width: 32px;
height: 32px;
background: var(--nm-drk-bg);
border: none;
cursor: pointer;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: var(--nm-drk-txt2);
box-shadow: var(--nm-drk-neu-sm);
transition: all 0.15s;
}
.nm-drk .mc-btn:active { box-shadow: var(--nm-drk-neu-sm-in); }
.nm-drk .mc-play {
width: 42px;
height: 42px;
font-size: 16px;
background: linear-gradient(145deg, var(--nm-drk-vt), #8050c8);
color: #fff;
border: 0;
border-radius: 50%;
cursor: pointer;
box-shadow: 6px 6px 14px rgba(140, 80, 200, 0.4), -4px -4px 10px var(--nm-drk-sl);
}
.nm-drk .mc-play:active { box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.3); }
/* Metrics grid */
.nm-drk .metrics-grid {
grid-column: 1 / 3;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 12px;
}
.nm-drk .metric-card {
background: var(--nm-drk-bg);
border-radius: 20px;
box-shadow: var(--nm-drk-neu-sm);
padding: 18px 14px;
display: flex;
flex-direction: column;
gap: 8px;
cursor: pointer;
transition: all 0.2s;
}
.nm-drk .metric-card:hover {
box-shadow: 8px 8px 20px var(--nm-drk-sd), -8px -8px 20px var(--nm-drk-sl);
transform: translateY(-1px);
}
.nm-drk .mc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.nm-drk .mc-icon-wrap {
width: 34px;
height: 34px;
border-radius: 12px;
background: var(--nm-drk-bg);
box-shadow: var(--nm-drk-neu-sm);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 15px;
}
.nm-drk .mc-trend {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 10px;
font-weight: 700;
}
.nm-drk .mc-trend.up { color: var(--nm-drk-grn); }
.nm-drk .mc-trend.down { color: var(--nm-drk-red); }
.nm-drk .mc-trend-hot { color: var(--nm-drk-pk); }
.nm-drk .mc-big {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 24px;
font-weight: 700;
color: var(--nm-drk-txt2);
line-height: 1;
letter-spacing: -1px;
}
.nm-drk .mc-big-t1 { color: var(--nm-drk-t1); text-shadow: 0 0 14px rgba(0, 245, 212, 0.3); }
.nm-drk .mc-big-amb { color: var(--nm-drk-amb); text-shadow: 0 0 14px rgba(255, 184, 108, 0.3); }
.nm-drk .mc-big-vt { color: var(--nm-drk-vt); text-shadow: 0 0 14px rgba(189, 147, 249, 0.3); }
.nm-drk .mc-big-pk { color: var(--nm-drk-pk); text-shadow: 0 0 14px rgba(255, 121, 198, 0.3); }
.nm-drk .mc-unit { font-size: 12px; color: var(--nm-drk-txt); }
.nm-drk .mc-name {
font-size: 9px;
letter-spacing: 1.5px;
text-transform: uppercase;
color: var(--nm-drk-txt);
}
.nm-drk .sparkline {
display: flex;
align-items: flex-end;
gap: 3px;
height: 26px;
}
.nm-drk .spark-bar {
flex: 1;
border-radius: 2px;
min-height: 3px;
opacity: 0.6;
transition: opacity 0.15s;
}
.nm-drk .metric-card:hover .spark-bar { opacity: 1; }
.nm-drk .spark-bar.last { opacity: 1; }
@media (max-width: 880px) {
.nm-drk .card {
grid-template-columns: 1fr;
grid-template-rows: auto;
}
.nm-drk .side-col,
.nm-drk .metrics-grid { grid-row: auto; grid-column: auto; }
.nm-drk .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
.nm-drk .music-disc { animation: none; }
.nm-drk .notif-item,
.nm-drk .metric-card { transition: none; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.nm-drk');
if (!root) return;
// Clock
const clockHr = root.querySelector('[data-nm-drk-clock]');
const clockSec = root.querySelector('[data-nm-drk-sec]');
function updateClock() {
const now = new Date();
const h = now.getHours() % 12 || 12;
const m = String(now.getMinutes()).padStart(2, '0');
const s = String(now.getSeconds()).padStart(2, '0');
const ap = now.getHours() >= 12 ? 'PM' : 'AM';
if (clockHr) clockHr.textContent = h + ':' + m;
if (clockSec) clockSec.textContent = ':' + s + ' ' + ap;
}
updateClock();
setInterval(updateClock, 1000);
// Music toggle
let playing = true;
const musicCard = root.querySelector('[data-nm-drk-music]');
const playBtn = root.querySelector('[data-nm-drk-play]');
if (playBtn) playBtn.addEventListener('click', () => {
playing = !playing;
musicCard?.classList.toggle('paused', !playing);
playBtn.textContent = playing ? '⏸' : '▶';
});
// Sparklines
const sparkColors = ['#00f5d4', '#ffb86c', '#bd93f9', '#ff79c6'];
const sparkRgb = ['0,245,212', '255,184,108', '189,147,249', '255,121,198'];
const sparkData = [
[14, 22, 18, 30, 26, 38, 28, 40, 34, 42, 38, 44],
[20, 28, 24, 20, 32, 22, 30, 26, 28, 22, 24, 20],
[8, 14, 12, 20, 16, 24, 20, 28, 22, 26, 24, 28],
[18, 22, 24, 28, 32, 30, 34, 38, 42, 44, 48, 52],
];
root.querySelectorAll('[data-nm-drk-spark]').forEach(el => {
const idx = parseInt(el.dataset.nmDrkSpark, 10);
const data = sparkData[idx];
const color = sparkColors[idx];
const rgb = sparkRgb[idx];
const max = Math.max(...data);
data.forEach((v, i) => {
const bar = document.createElement('div');
bar.className = 'spark-bar' + (i === data.length - 1 ? ' last' : '');
bar.style.height = Math.max(3, v / max * 26) + 'px';
bar.style.background = color;
bar.style.boxShadow = '0 0 4px rgba(' + rgb + ',0.5)';
el.appendChild(bar);
});
});
// Animate system rings — gentle ebb-and-flow
setInterval(() => {
root.querySelectorAll('[data-nm-drk-ring]').forEach(arc => {
const totalDash = parseInt(arc.getAttribute('stroke-dasharray').split(' ')[1], 10);
const pct = 0.35 + Math.random() * 0.5;
const filled = Math.round(pct * (totalDash * 0.9));
arc.setAttribute('stroke-dasharray', filled + ' ' + totalDash);
});
}, 3000);
})();
```
---
## 15 CSS Number Counter Animations
URL: https://codefronts.com/motion/css-number-counter-animations/
Description: 15 animated number counter examples — count-up stats, flip-digit play counters, fundraising arc meters, product launch countdowns, CO₂ impact dashboards, uptime SLA monitors, stock tickers, fitness rings and full design-language KPI dashboards. Tiny requestAnimationFrame easing in pure JS, the chrome around each counter in pure CSS. Copy, paste, ship.
Demo count: 15
### 01. Fundraising Arc Meter
**Type:** CSS + JS
**Description:** Warm dark card with a half-circle arc that fills from left to right as the raised amount counts up. Fraunces serif numerals, amber gradient stroke, donor avatar stack. Built for nonprofit campaign pages and crowdfunding widgets.
**HTML:**
```html
Reforestation Fund · 2026
0 % of goal reached
2,841 donors have contributed this month alone
```
**CSS:**
```css
.cnc-fund { display: grid; place-items: center; padding: 32px 16px; background: #f2ede6; font-family: 'Epilogue', sans-serif; }
.cnc-fund *, .cnc-fund *::before, .cnc-fund *::after { box-sizing: border-box; }
.cnc-fund-card {
width: 360px;
background: #1c1208;
border-radius: 28px;
padding: 48px 40px 40px;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
overflow: hidden;
}
.cnc-fund-card::before {
content: '';
position: absolute;
inset: 0;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
pointer-events: none;
opacity: 0.4;
}
.cnc-fund-eyebrow { font-size: 9px; letter-spacing: 4px; text-transform: uppercase; color: #c8893a; margin-bottom: 36px; font-weight: 400; }
.cnc-fund-arc-wrap { position: relative; width: 240px; height: 130px; margin-bottom: 12px; }
.cnc-fund-arc-wrap svg { overflow: visible; }
.cnc-fund-arc-bg { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 12; stroke-linecap: round; }
.cnc-fund-arc-fill { fill: none; stroke: url(#cnc-fund-arcGrad); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 534; stroke-dashoffset: 534; animation: cnc-fund-arcDraw 2.2s cubic-bezier(0.22,1,0.36,1) forwards 0.4s; filter: drop-shadow(0 0 12px rgba(255,160,50,0.6)); }
@keyframes cnc-fund-arcDraw { to { stroke-dashoffset: 117; } }
.cnc-fund-arc-center { position: absolute; bottom: 0; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; }
.cnc-fund-big-num { font-family: 'Fraunces', serif; font-size: 64px; font-weight: 700; color: #fff; line-height: 1; letter-spacing: -2px; }
.cnc-fund-big-num sup { font-size: 0.35em; font-weight: 300; vertical-align: super; letter-spacing: 0; color: #c8893a; }
.cnc-fund-pct-label { font-size: 11px; color: rgba(255,255,255,0.3); letter-spacing: 3px; text-transform: uppercase; margin-top: 6px; }
.cnc-fund-divider { width: 100%; height: 1px; background: rgba(255,255,255,0.08); margin: 32px 0 24px; }
.cnc-fund-goal-row { width: 100%; display: flex; justify-content: space-between; align-items: baseline; }
.cnc-fund-goal-col { display: flex; flex-direction: column; gap: 4px; }
.cnc-fund-goal-col-right { text-align: right; }
.cnc-fund-goal-label { font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: rgba(255,255,255,0.25); }
.cnc-fund-goal-val { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 300; font-style: italic; color: #fff; letter-spacing: -0.5px; }
.cnc-fund-donors { margin-top: 28px; display: flex; align-items: center; gap: 12px; }
.cnc-fund-avatar-stack { display: flex; }
.cnc-fund-av { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #1c1208; margin-left: -8px; font-size: 13px; display: flex; align-items: center; justify-content: center; background: #2e1e0a; }
.cnc-fund-av:first-child { margin-left: 0; }
.cnc-fund-donors-text { font-size: 11px; color: rgba(255,255,255,0.35); line-height: 1.4; }
.cnc-fund-donors-text strong { color: #c8893a; font-weight: 400; }
.cnc-fund-card > * { opacity: 0; animation: cnc-fund-up 0.6s ease forwards; }
.cnc-fund-eyebrow { animation-delay: 0.0s; }
.cnc-fund-arc-wrap { animation-delay: 0.1s; }
.cnc-fund-pct-label { animation-delay: 0.2s; }
.cnc-fund-divider { animation-delay: 0.3s; }
.cnc-fund-goal-row { animation-delay: 0.4s; }
.cnc-fund-donors { animation-delay: 0.5s; }
@keyframes cnc-fund-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
.cnc-fund-card > *, .cnc-fund-arc-fill { animation: none; opacity: 1; stroke-dashoffset: 117; }
}
```
**JS:**
```js
(function () {
var root = document.querySelector('.cnc-fund');
if (!root) return;
function easeOut(t) { return 1 - Math.pow(1 - t, 4); }
root.querySelectorAll('.cnc-num[data-target]').forEach(function (el) {
var target = parseFloat(el.dataset.target);
var duration = 2200;
var start = performance.now();
function tick(now) {
var t = Math.min((now - start) / duration, 1);
var v = easeOut(t) * target;
el.textContent = Math.round(v).toLocaleString();
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
});
})();
```
### 02. Podcast Flip Counter
**Type:** CSS + JS
**Description:** Six mechanical digit tiles that flip individually as the play count climbs to 847,312. Animated red soundwave bars pulse below, a live listener badge blinks at the bottom. Drop-in for podcast show pages and media play milestones.
**HTML:**
```html
The Deep Dive · Episode 312
Total Plays · All Time
● LIVE · 312 listening now
```
**CSS:**
```css
.cnc-pod { display: grid; place-items: center; padding: 48px 16px; background: #0e0e0e; font-family: 'Syne Mono', monospace; }
.cnc-pod *, .cnc-pod *::before, .cnc-pod *::after { box-sizing: border-box; }
.cnc-pod-block { width: 560px; text-align: center; padding: 24px; font-family: 'Syne Mono', monospace; opacity: 0; animation: cnc-pod-fadeIn 0.5s ease 0.1s forwards; }
.cnc-pod-show-name { font-family: 'Syne', sans-serif; font-size: 11px; letter-spacing: 6px; text-transform: uppercase; color: #555; margin-bottom: 52px; font-weight: 700; }
.cnc-pod-flip-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 8px; }
.cnc-pod-flip-digit { width: 72px; height: 96px; background: #171717; border-radius: 10px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 0 #000, 0 0 0 1px rgba(255,255,255,0.04); }
.cnc-pod-flip-digit::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,0.6); z-index: 10; }
.cnc-pod-digit-val { font-family: 'Syne', sans-serif; font-size: 72px; font-weight: 800; color: #fff; line-height: 1; letter-spacing: -2px; user-select: none; }
.cnc-pod-flip-digit.is-flip .cnc-pod-digit-val { animation: cnc-pod-flipNum 0.22s ease-in-out; }
@keyframes cnc-pod-flipNum { 0% { transform: scaleY(1); opacity: 1; } 45% { transform: scaleY(0); opacity: 0; } 55% { transform: scaleY(0); opacity: 0; } 100% { transform: scaleY(1); opacity: 1; } }
.cnc-pod-sep { font-family: 'Syne', sans-serif; font-size: 48px; font-weight: 800; color: #2a2a2a; line-height: 96px; user-select: none; }
.cnc-pod-unit-label { font-size: 9px; letter-spacing: 5px; text-transform: uppercase; color: #333; margin-top: 28px; }
.cnc-pod-wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 32px; margin: 36px auto 0; }
.cnc-pod-wave-bar { width: 3px; border-radius: 2px; background: #ff3b3b; animation: cnc-pod-wave 1.1s ease-in-out infinite; opacity: 0.7; }
.cnc-pod-wave-bar:nth-child(1) { animation-delay: 0.0s; height: 8px; }
.cnc-pod-wave-bar:nth-child(2) { animation-delay: 0.1s; height: 18px; }
.cnc-pod-wave-bar:nth-child(3) { animation-delay: 0.2s; height: 28px; }
.cnc-pod-wave-bar:nth-child(4) { animation-delay: 0.3s; height: 20px; }
.cnc-pod-wave-bar:nth-child(5) { animation-delay: 0.4s; height: 14px; }
.cnc-pod-wave-bar:nth-child(6) { animation-delay: 0.5s; height: 24px; }
.cnc-pod-wave-bar:nth-child(7) { animation-delay: 0.6s; height: 32px; }
.cnc-pod-wave-bar:nth-child(8) { animation-delay: 0.7s; height: 22px; }
.cnc-pod-wave-bar:nth-child(9) { animation-delay: 0.8s; height: 16px; }
.cnc-pod-wave-bar:nth-child(10) { animation-delay: 0.9s; height: 26px; }
.cnc-pod-wave-bar:nth-child(11) { animation-delay: 1.0s; height: 12px; }
.cnc-pod-wave-bar:nth-child(12) { animation-delay: 0.55s; height: 20px; }
.cnc-pod-wave-bar:nth-child(13) { animation-delay: 0.35s; height: 28px; }
.cnc-pod-wave-bar:nth-child(14) { animation-delay: 0.15s; height: 14px; }
.cnc-pod-wave-bar:nth-child(15) { animation-delay: 0.75s; height: 8px; }
@keyframes cnc-pod-wave { 0%, 100% { transform: scaleY(0.3); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }
.cnc-pod-milestone { margin-top: 32px; display: inline-flex; align-items: center; gap: 10px; background: rgba(255,59,59,0.08); border: 1px solid rgba(255,59,59,0.18); border-radius: 100px; padding: 8px 20px; font-size: 11px; color: #ff3b3b; letter-spacing: 2px; }
.cnc-pod-milestone::before { content: ''; width: 6px; height: 6px; background: #ff3b3b; border-radius: 50%; box-shadow: 0 0 8px #ff3b3b; animation: cnc-pod-blip 1s ease-in-out infinite; }
@keyframes cnc-pod-blip { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
@keyframes cnc-pod-fadeIn { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
.cnc-pod-block, .cnc-pod-wave-bar, .cnc-pod-milestone::before { animation: none; opacity: 1; }
}
```
**JS:**
```js
(function () {
var root = document.querySelector('.cnc-pod');
if (!root) return;
var TARGET = 847312, DURATION = 2600;
var digits = root.querySelectorAll('.cnc-pod-flip-digit');
function setDigits(num) {
var str = String(num).padStart(6, '0');
digits.forEach(function (el, i) {
var span = el.querySelector('.cnc-pod-digit-val');
var newChar = str[i];
if (span.textContent !== newChar) {
span.textContent = newChar;
el.classList.remove('is-flip');
void el.offsetWidth;
el.classList.add('is-flip');
}
});
}
function ease(t) { return 1 - Math.pow(1 - t, 3); }
setTimeout(function () {
var start = performance.now();
function tick(now) {
var t = Math.min((now - start) / DURATION, 1);
setDigits(Math.round(ease(t) * TARGET));
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}, 500);
})();
```
### 03. Product Launch Countdown
**Type:** CSS + JS
**Description:** Ultra-clean white layout with massive Rajdhani numerals ticking down days:hours:minutes:seconds in real time. Colons blink, minimal diagonal background shapes add depth. Drop-in for pre-launch landing pages and feature release announcements.
**HTML:**
```html
Something new is coming
Until Forma Studio 3.0 is live for everyone.
Notify Me
```
**CSS:**
```css
.cnc-cd { display: grid; place-items: center; padding: 32px 16px; background: #fff; overflow: hidden; font-family: 'Quicksand', sans-serif; }
.cnc-cd *, .cnc-cd *::before, .cnc-cd *::after { box-sizing: border-box; }
.cnc-cd-scene { position: relative; text-align: center; padding: 60px 40px; width: 560px; }
.cnc-cd-scene::before { content: ''; position: absolute; top: -40px; right: -80px; width: 320px; height: 320px; background: #f0f0f0; transform: rotate(25deg); border-radius: 40px; z-index: 0; }
.cnc-cd-scene::after { content: ''; position: absolute; bottom: -60px; left: -60px; width: 260px; height: 260px; background: #f6f6f6; transform: rotate(15deg); border-radius: 40px; z-index: 0; }
.cnc-cd-inner { position: relative; z-index: 1; }
.cnc-cd-pre-label { font-size: 10px; letter-spacing: 6px; text-transform: uppercase; color: #bbb; font-weight: 400; margin-bottom: 48px; opacity: 0; animation: cnc-cd-rise 0.5s ease 0.1s forwards; }
.cnc-cd-units { display: flex; justify-content: center; align-items: flex-start; gap: 6px; margin-bottom: 10px; }
.cnc-cd-unit { display: flex; flex-direction: column; align-items: center; opacity: 0; animation: cnc-cd-rise 0.6s cubic-bezier(0.22,1,0.36,1) forwards; }
.cnc-cd-unit:nth-child(1) { animation-delay: 0.2s; }
.cnc-cd-unit:nth-child(2) { animation-delay: 0.3s; }
.cnc-cd-unit:nth-child(3) { animation-delay: 0.4s; }
.cnc-cd-unit:nth-child(4) { animation-delay: 0.5s; }
.cnc-cd-num-block { font-family: 'Rajdhani', sans-serif; font-size: clamp(72px, 14vw, 110px); font-weight: 700; color: #111; line-height: 0.9; letter-spacing: -4px; min-width: 2ch; text-align: center; position: relative; }
.cnc-cd-num-block::after { content: ''; position: absolute; bottom: -6px; left: 10%; right: 10%; height: 2px; background: #111; transform: scaleX(0); transform-origin: left; animation: cnc-cd-lineIn 0.5s ease forwards; }
.cnc-cd-unit:nth-child(1) .cnc-cd-num-block::after { animation-delay: 0.6s; }
.cnc-cd-unit:nth-child(2) .cnc-cd-num-block::after { animation-delay: 0.75s; }
.cnc-cd-unit:nth-child(3) .cnc-cd-num-block::after { animation-delay: 0.9s; }
.cnc-cd-unit:nth-child(4) .cnc-cd-num-block::after { animation-delay: 1.05s; }
@keyframes cnc-cd-lineIn { to { transform: scaleX(1); } }
.cnc-cd-colon { font-family: 'Rajdhani', sans-serif; font-size: clamp(48px, 10vw, 80px); font-weight: 300; color: #ddd; line-height: 0.9; padding-top: 4px; opacity: 0; animation: cnc-cd-rise 0.4s ease 0.25s forwards, cnc-cd-blink 1s step-end infinite 1.5s; }
@keyframes cnc-cd-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }
.cnc-cd-unit-label { font-size: 9px; letter-spacing: 4px; text-transform: uppercase; color: #ccc; font-weight: 400; margin-top: 18px; }
.cnc-cd-tagline { margin-top: 52px; font-size: 13px; color: #aaa; font-weight: 300; letter-spacing: 0.5px; opacity: 0; animation: cnc-cd-rise 0.6s ease 0.8s forwards; }
.cnc-cd-tagline strong { color: #111; font-weight: 600; }
.cnc-cd-btn { display: inline-block; margin-top: 32px; padding: 14px 36px; background: #111; color: #fff; font-family: 'Quicksand', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; border: none; cursor: pointer; border-radius: 0; opacity: 0; animation: cnc-cd-rise 0.6s ease 1.0s forwards; position: relative; overflow: hidden; transition: background 0.2s; }
.cnc-cd-btn::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.1); transform: translateX(-100%); transition: transform 0.3s ease; }
.cnc-cd-btn:hover::after { transform: translateX(0); }
@keyframes cnc-cd-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
.cnc-cd-pre-label, .cnc-cd-unit, .cnc-cd-colon, .cnc-cd-tagline, .cnc-cd-btn, .cnc-cd-num-block::after { animation: none; opacity: 1; transform: none; }
}
```
**JS:**
```js
(function () {
var root = document.querySelector('.cnc-cd');
if (!root) return;
var target = new Date();
target.setDate(target.getDate() + 14);
target.setHours(target.getHours() + 6);
target.setMinutes(target.getMinutes() + 42);
function pad(n) { return String(Math.max(0, n)).padStart(2, '0'); }
var slots = {
d: root.querySelector('[data-cd="d"]'),
h: root.querySelector('[data-cd="h"]'),
m: root.querySelector('[data-cd="m"]'),
s: root.querySelector('[data-cd="s"]'),
};
function update() {
var diff = Math.max(0, target - Date.now());
slots.d.textContent = pad(Math.floor(diff / 86400000));
slots.h.textContent = pad(Math.floor((diff % 86400000) / 3600000));
slots.m.textContent = pad(Math.floor((diff % 3600000) / 60000));
slots.s.textContent = pad(Math.floor((diff % 60000) / 1000));
}
update();
setInterval(update, 1000);
})();
```
### 04. Community Milestone
**Type:** CSS + JS
**Description:** Giant Anton display number counting to 250K with a faint decorative "+" rotating slowly behind it. A scrolling ticker shows new member joins, and a live counter increments randomly to show real-time growth. Built for SaaS landing pages and community social proof.
**HTML:**
```html
```
**CSS:**
```css
.cnc-com { display: grid; place-items: center; padding: 32px 16px; background: #f9f4ee; font-family: 'DM Sans', sans-serif; }
.cnc-com *, .cnc-com *::before, .cnc-com *::after { box-sizing: border-box; }
.cnc-com-block { width: 480px; display: flex; flex-direction: column; align-items: center; padding: 32px; }
.cnc-com-pill { background: #111; color: #f9f4ee; font-size: 10px; letter-spacing: 5px; text-transform: uppercase; font-weight: 400; padding: 8px 20px; border-radius: 100px; margin-bottom: 28px; opacity: 0; animation: cnc-com-drop 0.5s ease 0.0s forwards; }
.cnc-com-counter-wrap { position: relative; text-align: center; opacity: 0; animation: cnc-com-drop 0.6s cubic-bezier(0.22,1,0.36,1) 0.15s forwards; }
.cnc-com-counter-val { font-family: 'Anton', sans-serif; font-size: clamp(96px, 20vw, 160px); line-height: 1; letter-spacing: -4px; color: #111; display: block; position: relative; z-index: 1; }
.cnc-com-counter-suffix { font-family: 'Anton', sans-serif; font-size: 0.45em; color: #d63f00; letter-spacing: -1px; vertical-align: baseline; }
.cnc-com-deco { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: 'Anton', sans-serif; font-size: 260px; color: transparent; -webkit-text-stroke: 1px rgba(0,0,0,0.05); pointer-events: none; user-select: none; line-height: 1; animation: cnc-com-spin 60s linear infinite; z-index: 0; }
@keyframes cnc-com-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.cnc-com-tagline { font-size: 15px; font-weight: 300; color: #888; text-align: center; margin-top: 12px; line-height: 1.6; max-width: 320px; opacity: 0; animation: cnc-com-drop 0.6s ease 0.3s forwards; }
.cnc-com-tagline em { font-style: italic; color: #111; }
.cnc-com-ticker { margin-top: 40px; width: 100%; overflow: hidden; opacity: 0; animation: cnc-com-drop 0.5s ease 0.5s forwards; }
.cnc-com-ticker-inner { display: flex; gap: 0; animation: cnc-com-tickerScroll 16s linear infinite; width: max-content; }
@keyframes cnc-com-tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.cnc-com-tick-item { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-left: 1px solid rgba(0,0,0,0.08); white-space: nowrap; }
.cnc-com-tick-av { width: 24px; height: 24px; border-radius: 50%; background: #ddd; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.cnc-com-tick-text { font-size: 12px; color: #888; }
.cnc-com-tick-text strong { color: #111; font-weight: 400; }
.cnc-com-live-count { margin-top: 24px; display: flex; align-items: center; gap: 8px; opacity: 0; animation: cnc-com-drop 0.5s ease 0.6s forwards; }
.cnc-com-live-dot { width: 7px; height: 7px; background: #d63f00; border-radius: 50%; box-shadow: 0 0 0 0 rgba(214,63,0,0.4); animation: cnc-com-ripple 1.5s ease-out infinite; }
@keyframes cnc-com-ripple { 0% { box-shadow: 0 0 0 0 rgba(214,63,0,0.4); } 70% { box-shadow: 0 0 0 8px rgba(214,63,0,0); } 100% { box-shadow: 0 0 0 0 rgba(214,63,0,0); } }
.cnc-com-live-text { font-size: 12px; color: #aaa; }
.cnc-com-live-text strong { color: #d63f00; font-weight: 400; }
@keyframes cnc-com-drop { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
.cnc-com-pill, .cnc-com-counter-wrap, .cnc-com-tagline, .cnc-com-ticker, .cnc-com-live-count, .cnc-com-deco, .cnc-com-ticker-inner, .cnc-com-live-dot { animation: none; opacity: 1; transform: none; }
}
```
**JS:**
```js
(function () {
var root = document.querySelector('.cnc-com');
if (!root) return;
function ease(t) { return 1 - Math.pow(1 - t, 4); }
var valEl = root.querySelector('.cnc-com-val');
setTimeout(function () {
var start = performance.now(), dur = 2000, target = parseFloat(valEl.dataset.target) || 250;
function tick(now) {
var t = Math.min((now - start) / dur, 1), v = ease(t) * target;
valEl.textContent = v < 100 ? v.toFixed(1) : Math.round(v);
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}, 300);
var liveEl = root.querySelector('.cnc-com-live');
var liveCount = 0;
function tickLive() {
liveCount += Math.floor(Math.random() * 3) + 1;
liveEl.textContent = liveCount.toLocaleString();
setTimeout(tickLive, Math.random() * 1400 + 400);
}
setTimeout(tickLive, 1200);
})();
```
### 05. CO₂ Sustainability Impact
**Type:** CSS + JS
**Description:** Deep forest-green animated mesh gradient background with glowing blobs. A single tonnes counter animates up while equivalent trees, flights and homes calculate live below. A progress strip shows annual target completion. Built for climate tech and ESG reporting.
**HTML:**
```html
Environmental Impact
🌿
by our fleet this year, equivalent to planting a small forest.
```
**CSS:**
```css
.cnc-co2 { min-height: 620px; display: grid; place-items: center; padding: 48px 24px; background: #061208; position: relative; overflow: hidden; font-family: 'Mulish', sans-serif; }
.cnc-co2 *, .cnc-co2 *::before, .cnc-co2 *::after { box-sizing: border-box; }
.cnc-co2-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cnc-co2-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.18; animation: cnc-co2-drift 14s ease-in-out infinite; }
.cnc-co2-blob1 { width: 500px; height: 500px; background: #1a7a2e; top: -100px; left: -100px; animation-delay: 0s; }
.cnc-co2-blob2 { width: 400px; height: 400px; background: #0d5c22; bottom: -80px; right: -80px; animation-delay: -5s; }
.cnc-co2-blob3 { width: 300px; height: 300px; background: #4fc066; top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -10s; opacity: 0.06; }
@keyframes cnc-co2-drift { 0%, 100% { transform: scale(1) translate(0, 0); } 33% { transform: scale(1.1) translate(30px, -20px); } 66% { transform: scale(0.95) translate(-20px, 30px); } }
.cnc-co2-block { position: relative; z-index: 1; text-align: center; padding: 32px; width: 440px; max-width: 100%; }
.cnc-co2-label-top { font-family: 'Unbounded', sans-serif; font-size: 8px; letter-spacing: 5px; text-transform: uppercase; color: rgba(79,192,102,0.5); font-weight: 300; margin-bottom: 40px; opacity: 0; animation: cnc-co2-rise 0.5s ease 0.1s forwards; }
.cnc-co2-icon-ring { width: 72px; height: 72px; border-radius: 50%; border: 1px solid rgba(79,192,102,0.2); display: flex; align-items: center; justify-content: center; margin: 0 auto 32px; font-size: 28px; position: relative; opacity: 0; animation: cnc-co2-rise 0.6s ease 0.2s forwards; box-shadow: 0 0 30px rgba(79,192,102,0.12), inset 0 0 20px rgba(79,192,102,0.05); }
.cnc-co2-icon-ring::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(79,192,102,0.08); }
.cnc-co2-icon-ring svg { position: absolute; inset: -8px; animation: cnc-co2-slowSpin 10s linear infinite; }
@keyframes cnc-co2-slowSpin { to { transform: rotate(360deg); } }
.cnc-co2-count-wrap { opacity: 0; animation: cnc-co2-rise 0.8s cubic-bezier(0.22,1,0.36,1) 0.35s forwards; margin-bottom: 6px; }
.cnc-co2-count-main { font-family: 'Unbounded', sans-serif; font-size: clamp(64px, 14vw, 96px); font-weight: 900; color: #fff; line-height: 1; letter-spacing: -3px; text-shadow: 0 0 60px rgba(79,192,102,0.4); }
.cnc-co2-count-unit { font-family: 'Unbounded', sans-serif; font-size: 18px; font-weight: 300; color: #4fc066; letter-spacing: 2px; margin-top: 6px; text-transform: uppercase; display: block; opacity: 0; animation: cnc-co2-rise 0.5s ease 0.5s forwards; }
.cnc-co2-count-desc { font-size: 13px; color: rgba(255,255,255,0.3); font-weight: 300; margin-top: 24px; line-height: 1.6; max-width: 280px; margin-left: auto; margin-right: auto; opacity: 0; animation: cnc-co2-rise 0.5s ease 0.6s forwards; }
.cnc-co2-strip { margin-top: 40px; opacity: 0; animation: cnc-co2-rise 0.5s ease 0.7s forwards; }
.cnc-co2-strip-head { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.2); margin-bottom: 10px; }
.cnc-co2-strip-track { height: 3px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; }
.cnc-co2-strip-fill { height: 100%; width: 68%; background: linear-gradient(90deg, #1a6b2e, #4fc066); border-radius: 2px; box-shadow: 0 0 10px rgba(79,192,102,0.5); transform: scaleX(0); transform-origin: left; animation: cnc-co2-fillIn 2s ease 0.9s forwards; }
@keyframes cnc-co2-fillIn { to { transform: scaleX(1); } }
.cnc-co2-equiv { margin-top: 28px; display: flex; gap: 20px; justify-content: center; opacity: 0; animation: cnc-co2-rise 0.5s ease 0.85s forwards; }
.cnc-co2-eq-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cnc-co2-eq-icon { font-size: 22px; }
.cnc-co2-eq-val { font-family: 'Unbounded', sans-serif; font-size: 16px; font-weight: 700; color: #4fc066; }
.cnc-co2-eq-label { font-size: 8px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.2); }
@keyframes cnc-co2-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
.cnc-co2-blob, .cnc-co2-label-top, .cnc-co2-icon-ring, .cnc-co2-count-wrap, .cnc-co2-count-unit, .cnc-co2-count-desc, .cnc-co2-strip, .cnc-co2-strip-fill, .cnc-co2-equiv, .cnc-co2-icon-ring svg { animation: none; opacity: 1; transform: none; }
.cnc-co2-strip-fill { transform: scaleX(1); }
}
```
**JS:**
```js
(function () {
var root = document.querySelector('.cnc-co2');
if (!root) return;
function ease(t) { return 1 - Math.pow(1 - t, 3); }
setTimeout(function () {
var start = performance.now(), dur = 2400;
var nums = root.querySelectorAll('.cnc-num[data-target]');
function tick(now) {
var t = Math.min((now - start) / dur, 1), e = ease(t);
nums.forEach(function (el) {
var target = parseFloat(el.dataset.target);
el.textContent = Math.round(e * target).toLocaleString();
});
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}, 400);
})();
```
### 06. Uptime SLA Monitor
**Type:** CSS + JS
**Description:** Stark white industrial card with corner tick marks and JetBrains Mono throughout. Uptime counts from 99.000% up to 99.997% with satisfying precision. Thirty incident-history bars scale up sequentially, color-coded green and yellow. Built for status pages and infrastructure dashboards.
**HTML:**
```html
SYS-MONITOR / API
Operational
Uptime · Rolling 90 Days
Daily incident history · 30 days
30 days ago Today
```
**CSS:**
```css
.cnc-up { display: grid; place-items: center; padding: 32px 16px; background: #f4f4f0; font-family: 'JetBrains Mono', monospace; }
.cnc-up *, .cnc-up *::before, .cnc-up *::after { box-sizing: border-box; }
.cnc-up-block { width: 420px; border: 1px solid #d8d8d0; background: #fff; padding: 48px 44px; position: relative; }
.cnc-up-block::before { content: ''; position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-top: 2px solid #111; border-left: 2px solid #111; }
.cnc-up-block::after { content: ''; position: absolute; bottom: 0; right: 0; width: 12px; height: 12px; border-bottom: 2px solid #111; border-right: 2px solid #111; }
.cnc-up-status-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; opacity: 0; animation: cnc-up-in 0.4s ease 0.0s forwards; }
.cnc-up-status-id { font-size: 9px; letter-spacing: 3px; color: #aaa; text-transform: uppercase; }
.cnc-up-status-badge { font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: #16a34a; display: flex; align-items: center; gap: 6px; }
.cnc-up-badge-dot { width: 6px; height: 6px; background: #16a34a; border-radius: 50%; box-shadow: 0 0 0 0 rgba(22,163,74,0.4); animation: cnc-up-ping 2s ease-out infinite; }
@keyframes cnc-up-ping { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.4); } 70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.cnc-up-uptime-wrap { opacity: 0; animation: cnc-up-in 0.6s cubic-bezier(0.22,1,0.36,1) 0.15s forwards; margin-bottom: 6px; }
.cnc-up-uptime-num { font-size: clamp(72px, 14vw, 100px); font-weight: 700; color: #111; letter-spacing: -3px; line-height: 1; display: flex; align-items: baseline; }
.cnc-up-uptime-suffix { font-size: 0.3em; font-weight: 100; color: #bbb; letter-spacing: 0; margin-left: 2px; }
.cnc-up-uptime-label { font-size: 9px; letter-spacing: 4px; text-transform: uppercase; color: #bbb; font-weight: 100; margin-bottom: 36px; opacity: 0; animation: cnc-up-in 0.4s ease 0.25s forwards; }
.cnc-up-hr { border: none; border-top: 1px solid #ebebeb; margin: 0 0 28px; opacity: 0; animation: cnc-up-in 0.3s ease 0.3s forwards; }
.cnc-up-bars-label { font-size: 8px; letter-spacing: 3px; text-transform: uppercase; color: #bbb; margin-bottom: 12px; opacity: 0; animation: cnc-up-in 0.3s ease 0.35s forwards; }
.cnc-up-bars { display: flex; gap: 3px; align-items: flex-end; height: 32px; margin-bottom: 8px; opacity: 0; animation: cnc-up-in 0.4s ease 0.4s forwards; }
.cnc-up-bar { flex: 1; background: #eee; border-radius: 1px; position: relative; cursor: default; transform: scaleY(0); transform-origin: bottom; animation: cnc-up-barRise 0.5s ease forwards; }
.cnc-up-bar-ok { background: #d1fae5; }
.cnc-up-bar-warn { background: #fef3c7; }
.cnc-up-bar:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #111; color: #fff; font-size: 8px; padding: 3px 7px; white-space: nowrap; letter-spacing: 1px; pointer-events: none; }
.cnc-up-bar:nth-child(1) { animation-delay: 0.42s; height: 100%; }
.cnc-up-bar:nth-child(2) { animation-delay: 0.44s; height: 100%; }
.cnc-up-bar:nth-child(3) { animation-delay: 0.46s; height: 100%; }
.cnc-up-bar:nth-child(4) { animation-delay: 0.48s; height: 100%; }
.cnc-up-bar:nth-child(5) { animation-delay: 0.50s; height: 40%; }
.cnc-up-bar:nth-child(6) { animation-delay: 0.52s; height: 100%; }
.cnc-up-bar:nth-child(7) { animation-delay: 0.54s; height: 100%; }
.cnc-up-bar:nth-child(8) { animation-delay: 0.56s; height: 100%; }
.cnc-up-bar:nth-child(9) { animation-delay: 0.58s; height: 100%; }
.cnc-up-bar:nth-child(10) { animation-delay: 0.60s; height: 100%; }
.cnc-up-bar:nth-child(11) { animation-delay: 0.62s; height: 100%; }
.cnc-up-bar:nth-child(12) { animation-delay: 0.64s; height: 100%; }
.cnc-up-bar:nth-child(13) { animation-delay: 0.66s; height: 100%; }
.cnc-up-bar:nth-child(14) { animation-delay: 0.68s; height: 100%; }
.cnc-up-bar:nth-child(15) { animation-delay: 0.70s; height: 70%; }
.cnc-up-bar:nth-child(16) { animation-delay: 0.72s; height: 100%; }
.cnc-up-bar:nth-child(17) { animation-delay: 0.74s; height: 100%; }
.cnc-up-bar:nth-child(18) { animation-delay: 0.76s; height: 100%; }
.cnc-up-bar:nth-child(19) { animation-delay: 0.78s; height: 100%; }
.cnc-up-bar:nth-child(20) { animation-delay: 0.80s; height: 100%; }
.cnc-up-bar:nth-child(21) { animation-delay: 0.82s; height: 100%; }
.cnc-up-bar:nth-child(22) { animation-delay: 0.84s; height: 100%; }
.cnc-up-bar:nth-child(23) { animation-delay: 0.86s; height: 100%; }
.cnc-up-bar:nth-child(24) { animation-delay: 0.88s; height: 100%; }
.cnc-up-bar:nth-child(25) { animation-delay: 0.90s; height: 100%; }
.cnc-up-bar:nth-child(26) { animation-delay: 0.92s; height: 100%; }
.cnc-up-bar:nth-child(27) { animation-delay: 0.94s; height: 100%; }
.cnc-up-bar:nth-child(28) { animation-delay: 0.96s; height: 100%; }
.cnc-up-bar:nth-child(29) { animation-delay: 0.98s; height: 100%; }
.cnc-up-bar:nth-child(30) { animation-delay: 1.00s; height: 100%; }
@keyframes cnc-up-barRise { to { transform: scaleY(1); } }
.cnc-up-bars-sub { display: flex; justify-content: space-between; font-size: 8px; letter-spacing: 2px; color: #ccc; opacity: 0; animation: cnc-up-in 0.3s ease 0.5s forwards; }
.cnc-up-footer { display: flex; justify-content: space-between; margin-top: 28px; opacity: 0; animation: cnc-up-in 0.4s ease 0.55s forwards; }
.cnc-up-foot-item { display: flex; flex-direction: column; gap: 4px; }
.cnc-up-foot-label { font-size: 8px; letter-spacing: 3px; text-transform: uppercase; color: #ccc; }
.cnc-up-foot-val { font-size: 18px; font-weight: 700; color: #111; letter-spacing: -0.5px; }
@keyframes cnc-up-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
.cnc-up-status-row, .cnc-up-uptime-wrap, .cnc-up-uptime-label, .cnc-up-hr, .cnc-up-bars-label, .cnc-up-bars, .cnc-up-bars-sub, .cnc-up-footer, .cnc-up-bar, .cnc-up-badge-dot { animation: none; opacity: 1; transform: none; }
}
```
**JS:**
```js
(function () {
var root = document.querySelector('.cnc-up');
if (!root) return;
function ease(t) { return 1 - Math.pow(1 - t, 4); }
setTimeout(function () {
var el = root.querySelector('.cnc-up-uptime');
var target = parseFloat(el.dataset.target);
var start = performance.now(), dur = 1800;
function tick(now) {
var t = Math.min((now - start) / dur, 1);
el.textContent = Math.min(99 + ease(t) * (target - 99), target).toFixed(3);
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}, 400);
setTimeout(function () {
var el = root.querySelector('.cnc-up-resp');
var target = parseFloat(el.dataset.target);
var start = performance.now(), dur = 1400;
function tick(now) {
var t = Math.min((now - start) / dur, 1);
el.textContent = Math.round(ease(t) * target);
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}, 600);
})();
```
### 07. Reading Progress Counter
**Type:** CSS + JS
**Description:** Warm parchment card with a thin red progress bar across the top — like a real reading indicator. Lora serif counts up words read, with pages, hours, and minutes remaining below. Twenty chapter dots show exact position. Built for e-reader apps and Substack-style blogs.
**HTML:**
```html
Chapter 14 · The Inheritance
0
words
read so far · 0 % of this book
```
**CSS:**
```css
.cnc-read { display: grid; place-items: center; padding: 32px 16px; background: #f0ebe3; font-family: 'Karla', sans-serif; }
.cnc-read *, .cnc-read *::before, .cnc-read *::after { box-sizing: border-box; }
.cnc-read-card { width: 340px; background: #faf8f4; border-radius: 4px; box-shadow: 0 2px 0 #d6cfc4, 0 12px 48px rgba(0,0,0,0.06); overflow: hidden; position: relative; }
.cnc-read-progress-bar { height: 3px; background: #e8e0d4; position: relative; }
.cnc-read-progress-fill { height: 100%; background: #c1440e; transform: scaleX(0); transform-origin: left; animation: cnc-read-progFill 2.4s cubic-bezier(0.22,1,0.36,1) 0.5s forwards; width: 73%; }
@keyframes cnc-read-progFill { to { transform: scaleX(1); } }
.cnc-read-body { padding: 40px 36px 36px; }
.cnc-read-chapter { font-size: 9px; letter-spacing: 4px; text-transform: uppercase; color: #b8a898; margin-bottom: 20px; font-weight: 400; opacity: 0; animation: cnc-read-fadeUp 0.5s ease 0.1s forwards; }
.cnc-read-count-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; opacity: 0; animation: cnc-read-fadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 0.2s forwards; }
.cnc-read-big { font-family: 'Lora', serif; font-size: 80px; font-weight: 600; color: #1a1410; line-height: 1; letter-spacing: -3px; }
.cnc-read-count-unit { font-family: 'Lora', serif; font-style: italic; font-size: 18px; color: #a09080; font-weight: 400; letter-spacing: 0; padding-bottom: 6px; }
.cnc-read-sublabel { font-size: 11px; color: #b8a898; font-weight: 300; letter-spacing: 0.3px; margin-bottom: 32px; opacity: 0; animation: cnc-read-fadeUp 0.5s ease 0.3s forwards; }
.cnc-read-rule { border: none; border-top: 1px solid #ede7de; margin-bottom: 24px; opacity: 0; animation: cnc-read-fadeUp 0.4s ease 0.35s forwards; }
.cnc-read-stats { display: flex; gap: 0; opacity: 0; animation: cnc-read-fadeUp 0.5s ease 0.4s forwards; }
.cnc-read-stat { flex: 1; border-right: 1px solid #ede7de; padding-right: 16px; margin-right: 16px; }
.cnc-read-stat:last-child { border-right: none; padding-right: 0; margin-right: 0; }
.cnc-read-stat-n { font-family: 'Lora', serif; font-size: 24px; font-weight: 600; color: #1a1410; letter-spacing: -0.5px; line-height: 1; }
.cnc-read-stat-l { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: #b8a898; margin-top: 5px; font-weight: 300; }
.cnc-read-dots { display: flex; gap: 4px; margin-top: 28px; opacity: 0; animation: cnc-read-fadeUp 0.4s ease 0.5s forwards; flex-wrap: wrap; }
.cnc-read-dot { width: 6px; height: 6px; border-radius: 50%; background: #e0d8ce; }
.cnc-read-dot-read { background: #c1440e; }
.cnc-read-dot-current { background: #c1440e; box-shadow: 0 0 0 2px #faf8f4, 0 0 0 3px #c1440e; }
@keyframes cnc-read-fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
.cnc-read-progress-fill, .cnc-read-chapter, .cnc-read-count-row, .cnc-read-sublabel, .cnc-read-rule, .cnc-read-stats, .cnc-read-dots { animation: none; opacity: 1; transform: none; }
.cnc-read-progress-fill { transform: scaleX(0.73); }
}
```
**JS:**
```js
(function () {
var root = document.querySelector('.cnc-read');
if (!root) return;
function ease(t) { return 1 - Math.pow(1 - t, 3); }
setTimeout(function () {
var start = performance.now(), dur = 2000;
var wordsEl = root.querySelector('[data-words]');
var pctEl = root.querySelector('[data-pct]');
var pagesEl = root.querySelector('[data-pages]');
var hrsEl = root.querySelector('[data-hrs]');
var leftEl = root.querySelector('[data-left]');
var wordsTarget = parseFloat(wordsEl.dataset.target);
var pctTarget = parseFloat(pctEl.dataset.target);
var pagesTarget = parseFloat(pagesEl.dataset.target);
var hrsTarget = parseFloat(hrsEl.dataset.target);
var leftTarget = parseFloat(leftEl.dataset.target);
function tick(now) {
var t = Math.min((now - start) / dur, 1), e = ease(t);
wordsEl.textContent = Math.round(e * wordsTarget).toLocaleString();
pctEl.textContent = Math.round(e * pctTarget);
pagesEl.textContent = Math.round(e * pagesTarget);
hrsEl.textContent = (e * hrsTarget).toFixed(1);
leftEl.textContent = Math.round((1 - e) * leftTarget);
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}, 400);
})();
```
### 08. Stock Price Ticker
**Type:** CSS + JS
**Description:** Dark Bloomberg-esque block with a massive Barlow Condensed price counting up to $924.18, a green sparkline drawing itself in, and live decimal micro-flicker. OHLC row counts up simultaneously. Built for fintech apps, portfolio trackers and trading dashboards.
**HTML:**
```html
+0.00
+0.00%
May 19 · 14:32 ET
```
**CSS:**
```css
.cnc-stk { display: grid; place-items: center; padding: 32px 16px; background: #080c10; font-family: 'Barlow', sans-serif; }
.cnc-stk *, .cnc-stk *::before, .cnc-stk *::after { box-sizing: border-box; }
.cnc-stk-block { width: 400px; padding: 48px 40px; position: relative; }
.cnc-stk-block::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px); background-size: 32px 32px; pointer-events: none; }
.cnc-stk-ticker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; position: relative; }
.cnc-stk-ticker-sym { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 5px; color: rgba(255,255,255,0.25); text-transform: uppercase; }
.cnc-stk-market-status { font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: #22c55e; display: flex; align-items: center; gap: 6px; }
.cnc-stk-ms-dot { width: 5px; height: 5px; background: #22c55e; border-radius: 50%; animation: cnc-stk-msBlink 2s ease-in-out infinite; box-shadow: 0 0 6px #22c55e; }
@keyframes cnc-stk-msBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.cnc-stk-price-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; opacity: 0; animation: cnc-stk-appear 0.6s cubic-bezier(0.22,1,0.36,1) 0.1s forwards; }
.cnc-stk-currency { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; font-weight: 300; color: rgba(255,255,255,0.3); margin-top: 10px; }
.cnc-stk-price { font-family: 'Barlow Condensed', sans-serif; font-size: clamp(80px, 16vw, 108px); font-weight: 800; color: #fff; line-height: 1; letter-spacing: -3px; }
.cnc-stk-price-dec { font-size: 0.45em; font-weight: 400; letter-spacing: 0; color: rgba(255,255,255,0.6); align-self: flex-end; padding-bottom: 14px; }
.cnc-stk-change { display: flex; align-items: center; gap: 14px; margin-bottom: 40px; opacity: 0; animation: cnc-stk-appear 0.5s ease 0.25s forwards; }
.cnc-stk-change-val { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 600; letter-spacing: 0.5px; }
.cnc-stk-change-val.cnc-stk-up { color: #22c55e; }
.cnc-stk-change-val.cnc-stk-dn { color: #ef4444; }
.cnc-stk-change-pct { font-size: 13px; padding: 4px 10px; border-radius: 3px; font-family: 'Barlow Condensed', sans-serif; font-weight: 600; letter-spacing: 1px; }
.cnc-stk-change-pct.cnc-stk-up { background: rgba(34,197,94,0.12); color: #22c55e; }
.cnc-stk-change-time { font-size: 10px; color: rgba(255,255,255,0.2); letter-spacing: 1px; margin-left: auto; }
.cnc-stk-spark { margin-bottom: 32px; opacity: 0; animation: cnc-stk-appear 0.5s ease 0.4s forwards; }
.cnc-stk-spark svg { overflow: visible; }
.cnc-stk-spark-line { fill: none; stroke: #22c55e; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: cnc-stk-drawSpark 1.6s ease 0.6s forwards; }
@keyframes cnc-stk-drawSpark { to { stroke-dashoffset: 0; } }
.cnc-stk-ohlc { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,255,255,0.05); padding-top: 24px; opacity: 0; animation: cnc-stk-appear 0.5s ease 0.5s forwards; }
.cnc-stk-ohlc-item { border-right: 1px solid rgba(255,255,255,0.05); padding-right: 16px; }
.cnc-stk-ohlc-item:last-child { border-right: none; }
.cnc-stk-ohlc-label { font-size: 8px; letter-spacing: 3px; text-transform: uppercase; color: rgba(255,255,255,0.2); margin-bottom: 6px; }
.cnc-stk-ohlc-val { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 600; color: rgba(255,255,255,0.7); }
.cnc-stk-ohlc-high { color: #22c55e; }
.cnc-stk-ohlc-low { color: #ef4444; }
@keyframes cnc-stk-flash { 0% { color: #22c55e; } 100% { color: #fff; } }
.cnc-stk-flash { animation: cnc-stk-flash 0.6s ease forwards; }
@keyframes cnc-stk-appear { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
.cnc-stk-ms-dot, .cnc-stk-price-row, .cnc-stk-change, .cnc-stk-spark, .cnc-stk-spark-line, .cnc-stk-ohlc { animation: none; opacity: 1; transform: none; stroke-dashoffset: 0; }
}
```
**JS:**
```js
(function () {
var root = document.querySelector('.cnc-stk');
if (!root) return;
function ease(t) { return 1 - Math.pow(1 - t, 3); }
setTimeout(function () {
var start = performance.now(), dur = 2000;
var intEl = root.querySelector('.cnc-stk-price-int');
var decEl = root.querySelector('.cnc-stk-dec');
var chgAbs = root.querySelector('[data-chg-abs]');
var chgPct = root.querySelector('[data-chg-pct]');
var ohlc = root.querySelectorAll('[data-ohlc]');
var intTarget = parseFloat(intEl.dataset.target);
var decTarget = parseInt(decEl.dataset.target, 10);
var chgAbsTarget = parseFloat(chgAbs.dataset.target);
var chgPctTarget = parseFloat(chgPct.dataset.target);
function tick(now) {
var t = Math.min((now - start) / dur, 1), e = ease(t);
intEl.textContent = Math.floor(e * intTarget).toLocaleString();
decEl.textContent = String(Math.round(e * decTarget)).padStart(2, '0');
chgAbs.textContent = '+' + (e * chgAbsTarget).toFixed(2);
chgPct.textContent = '+' + (e * chgPctTarget).toFixed(2) + '%';
ohlc.forEach(function (el) {
var target = parseFloat(el.dataset.target);
el.textContent = (e * target).toFixed(el.dataset.ohlc === 'vol' ? 1 : 2);
});
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}, 300);
function flicker() {
var el = root.querySelector('.cnc-stk-dec');
var next = Math.max(0, Math.min(99, Math.round(Math.random() * 99)));
el.textContent = String(next).padStart(2, '0');
el.classList.remove('cnc-stk-flash');
void el.offsetWidth;
el.classList.add('cnc-stk-flash');
setTimeout(flicker, 800 + Math.random() * 1200);
}
setTimeout(flicker, 2600);
})();
```
### 09. Fitness Step Counter
**Type:** CSS + JS
**Description:** Warm pastel scene with morphing blob shapes in the background. A circular gradient ring fills to 75% with a bouncing flame at the center. The step count springs up with a playful overshoot. Milestone pills mark 5K and 7.5K as done, 10K actively pulsing. Built for health apps and wearable dashboards.
**HTML:**
```html
Tuesday · May 19
0
Steps Today
```
**CSS:**
```css
.cnc-fit { min-height: 540px; display: grid; place-items: center; padding: 48px 24px; background: #fff4e6; position: relative; overflow: hidden; font-family: 'Nunito', sans-serif; }
.cnc-fit *, .cnc-fit *::before, .cnc-fit *::after { box-sizing: border-box; }
.cnc-fit-shape { position: absolute; pointer-events: none; }
.cnc-fit-s1 { width: 320px; height: 320px; background: #ffe0c2; top: -80px; right: -80px; border-radius: 40% 60% 55% 45%; animation: cnc-fit-morph 10s ease-in-out infinite; }
.cnc-fit-s2 { width: 240px; height: 240px; background: #ffd0f0; bottom: -60px; left: -60px; border-radius: 60% 40% 45% 55%; animation: cnc-fit-morph 14s ease-in-out infinite reverse; }
.cnc-fit-s3 { width: 140px; height: 140px; background: #c8f0e0; top: 30%; right: 5%; border-radius: 55% 45%; animation: cnc-fit-morph 8s ease-in-out infinite; opacity: 0.7; }
@keyframes cnc-fit-morph { 0%, 100% { border-radius: 60% 40% 55% 45%; } 50% { border-radius: 40% 60% 45% 55%; } }
.cnc-fit-block { position: relative; z-index: 1; text-align: center; padding: 32px; width: 420px; max-width: 100%; }
.cnc-fit-day-label { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: #ffaa66; font-weight: 700; margin-bottom: 28px; opacity: 0; animation: cnc-fit-pop 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.0s forwards; }
.cnc-fit-ring-outer { width: 220px; height: 220px; margin: 0 auto 24px; position: relative; opacity: 0; animation: cnc-fit-pop 0.7s cubic-bezier(0.34,1.56,0.64,1) 0.15s forwards; }
.cnc-fit-ring-svg { transform: rotate(-90deg); overflow: visible; }
.cnc-fit-ring-track { fill: none; stroke: #ffe8d0; stroke-width: 14; stroke-linecap: round; }
.cnc-fit-ring-prog { fill: none; stroke: url(#cnc-fit-ringGrad); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 597; stroke-dashoffset: 597; filter: drop-shadow(0 0 8px rgba(255,130,60,0.4)); animation: cnc-fit-ringFill 2s cubic-bezier(0.22,1,0.36,1) 0.5s forwards; }
@keyframes cnc-fit-ringFill { to { stroke-dashoffset: 149; } }
.cnc-fit-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cnc-fit-ring-emoji { font-size: 38px; animation: cnc-fit-bounce 2s ease-in-out infinite; line-height: 1; margin-bottom: 4px; }
@keyframes cnc-fit-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.cnc-fit-ring-num { font-family: 'Righteous', sans-serif; font-size: 32px; color: #222; letter-spacing: -1px; line-height: 1; }
.cnc-fit-ring-unit { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: #ccc; font-weight: 700; margin-top: 3px; }
.cnc-fit-step-num { font-family: 'Righteous', sans-serif; font-size: clamp(64px, 14vw, 88px); color: #1a1a1a; letter-spacing: -2px; line-height: 1; opacity: 0; animation: cnc-fit-pop 0.8s cubic-bezier(0.34,1.56,0.64,1) 0.3s forwards; display: inline-block; }
.cnc-fit-step-label { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: #ccc; font-weight: 700; margin-top: 4px; margin-bottom: 28px; opacity: 0; animation: cnc-fit-pop 0.5s ease 0.45s forwards; }
.cnc-fit-milestones { display: flex; gap: 8px; justify-content: center; opacity: 0; animation: cnc-fit-pop 0.5s ease 0.55s forwards; }
.cnc-fit-ms { padding: 8px 16px; border-radius: 100px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; border: 2px solid transparent; }
.cnc-fit-ms-done { background: #fff; border-color: #22c55e; color: #22c55e; }
.cnc-fit-ms-done::before { content: '✓'; }
.cnc-fit-ms-next { background: #fff; border-color: #e0e0e0; color: #ccc; }
.cnc-fit-ms-active { background: #ff823c; color: #fff; animation: cnc-fit-pulse 1.5s ease-in-out infinite; }
@keyframes cnc-fit-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,130,60,0.4); } 50% { box-shadow: 0 0 0 8px rgba(255,130,60,0); } }
@keyframes cnc-fit-pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
.cnc-fit-shape, .cnc-fit-day-label, .cnc-fit-ring-outer, .cnc-fit-ring-prog, .cnc-fit-ring-emoji, .cnc-fit-step-num, .cnc-fit-step-label, .cnc-fit-milestones, .cnc-fit-ms-active { animation: none; opacity: 1; transform: none; }
.cnc-fit-ring-prog { stroke-dashoffset: 149; }
}
```
**JS:**
```js
(function () {
var root = document.querySelector('.cnc-fit');
if (!root) return;
function ease(t) { return 1 - Math.pow(1 - t, 4); }
setTimeout(function () {
var start = performance.now(), dur = 2200;
var stepsEl = root.querySelector('[data-steps]');
var pctEl = root.querySelector('.cnc-fit-pct');
var GOAL = 10000;
var stepsTarget = parseFloat(stepsEl.dataset.target);
function tick(now) {
var t = Math.min((now - start) / dur, 1), e = ease(t), v = e * stepsTarget;
stepsEl.textContent = Math.round(v).toLocaleString();
pctEl.textContent = Math.round(v / GOAL * 100);
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}, 300);
})();
```
### 10. Brutalist Finance Terminal
**Type:** CSS + JS
**Description:** Raw high-contrast trading-desk dashboard with a live scrolling ticker tape, a featured portfolio counter, scanline overlay and neon-yellow progress bars. IBM Plex Mono and Bebas Neue carry the brutalist tone.
**HTML:**
```html
NASDAQ +2.41% DOW +0.87% S&P500 +1.23%
BTC $68,420 ETH $3,810 GOLD $2,341/oz
VIX 14.2 10Y YIELD 4.38% DXY 104.1
NASDAQ +2.41% DOW +0.87% S&P500 +1.23%
BTC $68,420 ETH $3,810 GOLD $2,341/oz
VIX 14.2 10Y YIELD 4.38% DXY 104.1
01 · Portfolio Value
$
0
Total AUM · All Positions
Updated 0.3s ago · 24h change: +$48,210
▼ SHORT
02 · Drawdown
0
%
Max Drawdown · 30D
▲ LONG
03 · Win Rate
0
%
Closed Trades · YTD
04 · Sharpe Ratio
0
Risk-Adjusted Return
05 · Open Positions
0
Across 14 Exchanges
```
**CSS:**
```css
.cnc-bft {
--bft-black: #0a0a0a;
--bft-white: #f0ede8;
--bft-yellow: #ffe600;
--bft-red: #ff2d2d;
--bft-gray: #1c1c1c;
--bft-mid: #333;
position: relative;
display: flex; align-items: center; justify-content: center;
padding: 40px 20px;
background: var(--bft-black);
color: var(--bft-white);
font-family: 'IBM Plex Mono', monospace;
overflow: hidden;
}
.cnc-bft::before {
content: '';
position: absolute; inset: 0;
background: repeating-linear-gradient(
0deg, transparent, transparent 2px,
rgba(0,0,0,0.15) 2px, rgba(0,0,0,0.15) 4px);
pointer-events: none; z-index: 100;
}
.cnc-bft-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0;
width: 980px;
border: 3px solid var(--bft-white);
}
.cnc-bft-stat {
border: 1.5px solid var(--bft-mid);
padding: 36px 28px 28px;
position: relative; overflow: hidden;
transition: background 0.1s;
}
.cnc-bft-stat:hover { background: var(--bft-gray); }
.cnc-bft-stat::after {
content: ''; position: absolute;
bottom: 0; left: 0; width: 100%; height: 3px;
background: var(--bft-yellow);
transform: scaleX(0); transform-origin: left;
transition: transform 0.4s ease;
}
.cnc-bft-stat:hover::after { transform: scaleX(1); }
.cnc-bft-featured {
grid-column: span 2;
background: var(--bft-yellow);
color: var(--bft-black);
border-color: var(--bft-yellow);
}
.cnc-bft-featured .cnc-bft-label,
.cnc-bft-featured .cnc-bft-sub { color: var(--bft-black); opacity: 0.6; }
.cnc-bft-danger { border-top: 4px solid var(--bft-red); }
.cnc-bft-index {
font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
opacity: 0.35; margin-bottom: 20px; display: block;
}
.cnc-bft-number {
font-family: 'Bebas Neue', sans-serif;
font-size: clamp(56px, 7vw, 88px);
line-height: 1; letter-spacing: -1px;
display: flex; align-items: baseline; gap: 4px;
}
.cnc-bft-featured .cnc-bft-number { font-size: clamp(72px, 9vw, 120px); }
.cnc-bft-prefix, .cnc-bft-suffix {
font-size: 0.38em;
font-family: 'IBM Plex Mono', monospace;
font-weight: 700; letter-spacing: 2px;
align-self: flex-end; padding-bottom: 0.15em;
}
.cnc-bft-label {
font-size: 10px; letter-spacing: 4px; text-transform: uppercase;
opacity: 0.45; margin-top: 12px;
}
.cnc-bft-sub {
font-size: 11px; opacity: 0.35; margin-top: 6px; letter-spacing: 1px;
}
.cnc-bft-badge {
position: absolute; top: 14px; right: 14px;
font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
padding: 3px 8px; border: 1px solid currentColor; opacity: 0.5;
}
.cnc-bft-up { color: #39ff14; }
.cnc-bft-down { color: var(--bft-red); }
.cnc-bft-ticker {
grid-column: span 3;
background: var(--bft-yellow);
color: var(--bft-black);
padding: 8px 0; overflow: hidden; position: relative;
font-size: 11px; letter-spacing: 3px;
text-transform: uppercase; font-weight: 700;
}
.cnc-bft-ticker-inner {
display: flex; gap: 60px;
animation: cnc-bft-ticker 18s linear infinite;
white-space: nowrap; width: max-content;
}
@keyframes cnc-bft-ticker {
from { transform: translateX(0); }
to { transform: translateX(-50%); }
}
.cnc-bft-progress-line {
height: 2px; background: rgba(255,255,255,0.08);
margin-top: 16px; position: relative; overflow: hidden;
}
.cnc-bft-progress-fill {
height: 100%; background: var(--bft-yellow);
animation: cnc-bft-fillBar 1.5s ease forwards;
transform-origin: left; transform: scaleX(0);
}
.cnc-bft-featured .cnc-bft-progress-fill { background: var(--bft-black); }
@keyframes cnc-bft-fillBar { to { transform: scaleX(1); } }
.cnc-bft-stat:nth-child(2) .cnc-bft-progress-fill { animation-delay: 0.3s; width: 73%; }
.cnc-bft-stat:nth-child(3) .cnc-bft-progress-fill { animation-delay: 0.5s; width: 91%; }
.cnc-bft-stat:nth-child(4) .cnc-bft-progress-fill { animation-delay: 0.7s; width: 47%; }
.cnc-bft-stat:nth-child(5) .cnc-bft-progress-fill { animation-delay: 0.9s; width: 85%; }
.cnc-bft-stat:nth-child(6) .cnc-bft-progress-fill { animation-delay: 1.1s; width: 62%; }
@media (prefers-reduced-motion: reduce) {
.cnc-bft-ticker-inner, .cnc-bft-progress-fill { animation: none; }
}
```
**JS:**
```js
(function () {
function easeOut(t) { return 1 - Math.pow(1 - t, 4); }
document.querySelectorAll('.cnc-bft .cnc-num').forEach(function (el) {
var target = parseFloat(el.dataset.target);
var decimals = parseInt(el.dataset.decimals || 0, 10);
var duration = 1800;
var start = performance.now();
function tick(now) {
var t = Math.min((now - start) / duration, 1);
var val = easeOut(t) * target;
el.textContent = decimals > 0
? val.toFixed(decimals)
: Math.floor(val).toLocaleString();
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
});
})();
```
### 11. Bioluminescent Health Tracker
**Type:** CSS + JS
**Description:** Deep-forest dark dashboard with breathing organic blobs, glowing pulse dots and Cormorant Garamond serif numerals. Heart-rate sparklines, sleep-phase bars, VO₂ max trends and a half-page recovery score ring.
**HTML:**
```html
Cardiac
0
bpm
Resting Heart Rate
↓ 3 bpm vs last week
Recovery
0
hrs
Deep Sleep Duration
Aerobic
0
ml/kg
VO₂ Max · Excellent
Nervous System
0
ms
Heart Rate Variability
↑ 12ms vs baseline
Overall Recovery
0
/ 100
Body is ready · Optimal Training Zone
```
**CSS:**
```css
.cnc-bio {
position: relative;
display: flex; align-items: center; justify-content: center;
padding: 60px 24px;
background: #05120f;
font-family: 'DM Sans', sans-serif;
overflow: hidden;
}
.cnc-bio::before {
content: ''; position: absolute;
width: 600px; height: 600px;
background: radial-gradient(circle, rgba(0,255,140,0.06) 0%, transparent 70%);
top: 50%; left: 50%; transform: translate(-50%, -50%);
pointer-events: none;
}
.cnc-bio-container {
display: grid; grid-template-columns: repeat(2, 1fr);
gap: 20px; width: 760px;
}
.cnc-bio-card {
background: rgba(255,255,255,0.025);
border: 1px solid rgba(0,255,140,0.12);
border-radius: 24px; padding: 36px 32px;
position: relative; overflow: hidden;
backdrop-filter: blur(10px);
transition: border-color 0.4s, transform 0.3s;
opacity: 0; animation: cnc-bio-fadeUp 0.7s ease forwards;
}
.cnc-bio-card:hover {
border-color: rgba(0,255,140,0.35);
transform: translateY(-3px);
}
.cnc-bio-card::before {
content: ''; position: absolute;
width: 200px; height: 200px; border-radius: 50%;
filter: blur(60px); opacity: 0.12;
pointer-events: none; bottom: -60px; right: -60px;
animation: cnc-bio-breathe 6s ease-in-out infinite;
}
.cnc-bio-card:nth-child(1)::before { background: #00ff8c; }
.cnc-bio-card:nth-child(2)::before { background: #00c2ff; animation-delay: -2s; }
.cnc-bio-card:nth-child(3)::before { background: #ff6b35; animation-delay: -4s; }
.cnc-bio-card:nth-child(4)::before { background: #b06eff; animation-delay: -1s; }
@keyframes cnc-bio-breathe {
0%, 100% { transform: scale(1); opacity: 0.12; }
50% { transform: scale(1.3); opacity: 0.2; }
}
.cnc-bio-card.cnc-bio-wide {
grid-column: span 2;
display: flex; align-items: center; gap: 48px;
padding: 40px;
}
.cnc-bio-metric-tag {
font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
color: rgba(255,255,255,0.3); margin-bottom: 16px;
display: flex; align-items: center; gap: 8px;
}
.cnc-bio-dot {
width: 6px; height: 6px; border-radius: 50%;
animation: cnc-bio-pulse 2s ease-in-out infinite;
}
@keyframes cnc-bio-pulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.4; transform: scale(0.7); }
}
.cnc-bio-card:nth-child(1) .cnc-bio-dot { background: #00ff8c; box-shadow: 0 0 8px #00ff8c; }
.cnc-bio-card:nth-child(2) .cnc-bio-dot { background: #00c2ff; box-shadow: 0 0 8px #00c2ff; animation-delay: -1s; }
.cnc-bio-card:nth-child(3) .cnc-bio-dot { background: #ff6b35; box-shadow: 0 0 8px #ff6b35; animation-delay: -0.5s; }
.cnc-bio-card:nth-child(4) .cnc-bio-dot { background: #b06eff; box-shadow: 0 0 8px #b06eff; animation-delay: -1.5s; }
.cnc-bio-card.cnc-bio-wide .cnc-bio-dot { background: #00ff8c; box-shadow: 0 0 8px #00ff8c; }
.cnc-bio-number-row {
display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px;
}
.cnc-bio-num {
font-family: 'Cormorant Garamond', serif;
font-weight: 600;
font-size: clamp(52px, 6vw, 72px);
color: #fff; line-height: 1; letter-spacing: -2px;
}
.cnc-bio-wide .cnc-bio-num { font-size: clamp(64px, 8vw, 96px); }
.cnc-bio-unit {
font-family: 'Cormorant Garamond', serif;
font-weight: 300; font-style: italic;
font-size: 1.4em; color: rgba(255,255,255,0.45); letter-spacing: 1px;
}
.cnc-bio-label {
font-size: 13px; color: rgba(255,255,255,0.4);
font-weight: 300; letter-spacing: 0.5px; margin-bottom: 20px;
}
.cnc-bio-ring-wrap {
flex-shrink: 0; position: relative;
width: 130px; height: 130px;
}
.cnc-bio-ring-wrap svg { transform: rotate(-90deg); }
.cnc-bio-ring-bg {
fill: none; stroke: rgba(255,255,255,0.05); stroke-width: 8;
}
.cnc-bio-ring-fill {
fill: none; stroke: #00ff8c; stroke-width: 8; stroke-linecap: round;
stroke-dasharray: 345; stroke-dashoffset: 345;
animation: cnc-bio-ringFill 2s ease forwards 0.5s;
filter: drop-shadow(0 0 8px #00ff8c);
}
@keyframes cnc-bio-ringFill { to { stroke-dashoffset: 69; } }
.cnc-bio-ring-label {
position: absolute; inset: 0;
display: flex; flex-direction: column;
align-items: center; justify-content: center; color: #fff;
}
.cnc-bio-ring-pct {
font-family: 'Cormorant Garamond', serif;
font-size: 28px; font-weight: 600; line-height: 1;
}
.cnc-bio-ring-sub {
font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
color: rgba(255,255,255,0.35); margin-top: 4px;
}
.cnc-bio-wide-text { flex: 1; }
.cnc-bio-bars {
display: flex; flex-direction: column; gap: 10px; margin-top: 18px;
}
.cnc-bio-bar-row { display: flex; align-items: center; gap: 12px; }
.cnc-bio-bar-label {
font-size: 10px; text-transform: uppercase; letter-spacing: 2px;
color: rgba(255,255,255,0.3); width: 28px; flex-shrink: 0;
}
.cnc-bio-bar-track {
flex: 1; height: 4px; background: rgba(255,255,255,0.06);
border-radius: 2px; overflow: hidden;
}
.cnc-bio-bar-fill {
height: 100%; border-radius: 2px;
transform: scaleX(0); transform-origin: left;
animation: cnc-bio-barIn 1.2s ease forwards;
}
.cnc-bio-c1 { background: linear-gradient(90deg, #00ff8c, #00c2ff); animation-delay: 0.8s; }
.cnc-bio-c2 { background: linear-gradient(90deg, #00c2ff, #b06eff); animation-delay: 1.0s; }
.cnc-bio-c3 { background: linear-gradient(90deg, #b06eff, #ff6b35); animation-delay: 1.2s; }
.cnc-bio-c4 { background: linear-gradient(90deg, #ff6b35, #ff2d7a); animation-delay: 1.4s; }
.cnc-bio-c5 { background: linear-gradient(90deg, #00ff8c, #00c2ff); animation-delay: 1.6s; }
.cnc-bio-c6 { background: linear-gradient(90deg, #00c2ff, #b06eff); animation-delay: 1.8s; }
.cnc-bio-c7 { background: linear-gradient(90deg, #b06eff, #00ff8c); animation-delay: 2.0s; }
@keyframes cnc-bio-barIn { to { transform: scaleX(1); } }
.cnc-bio-bar-val {
font-size: 11px; color: rgba(255,255,255,0.35);
width: 32px; text-align: right;
font-variant-numeric: tabular-nums;
}
.cnc-bio-sparkline { margin-top: 20px; }
.cnc-bio-sparkline svg path {
stroke-dasharray: 500; stroke-dashoffset: 500;
animation: cnc-bio-drawLine 2s ease forwards 0.8s;
}
@keyframes cnc-bio-drawLine { to { stroke-dashoffset: 0; } }
.cnc-bio-card:nth-child(1) { animation-delay: 0.0s; }
.cnc-bio-card:nth-child(2) { animation-delay: 0.15s; }
.cnc-bio-card:nth-child(3) { animation-delay: 0.3s; }
.cnc-bio-card:nth-child(4) { animation-delay: 0.45s; }
.cnc-bio-card.cnc-bio-wide { animation-delay: 0.6s; }
@keyframes cnc-bio-fadeUp {
from { opacity: 0; transform: translateY(24px); }
to { opacity: 1; transform: translateY(0); }
}
.cnc-bio-delta {
display: inline-flex; align-items: center; gap: 4px;
font-size: 11px; padding: 3px 10px;
border-radius: 20px; margin-top: 6px;
}
.cnc-bio-delta-up { background: rgba(0,255,140,0.1); color: #00ff8c; }
.cnc-bio-delta-down { background: rgba(255,107,53,0.1); color: #ff6b35; }
@media (prefers-reduced-motion: reduce) {
.cnc-bio-card::before, .cnc-bio-dot, .cnc-bio-bar-fill,
.cnc-bio-ring-fill, .cnc-bio-sparkline svg path, .cnc-bio-card {
animation: none;
}
.cnc-bio-card { opacity: 1; }
}
```
**JS:**
```js
(function () {
function easeOut(t) { return 1 - Math.pow(1 - t, 3); }
var root = document.querySelector('.cnc-bio');
if (!root) return;
var cards = [].slice.call(root.querySelectorAll('.cnc-bio-card'));
root.querySelectorAll('.cnc-num[data-target]').forEach(function (el) {
var target = parseFloat(el.dataset.target);
var decimals = parseInt(el.dataset.decimals || 0, 10);
var duration = 2000;
var idx = cards.indexOf(el.closest('.cnc-bio-card'));
var delay = (idx * 150 + 300);
setTimeout(function () {
var start = performance.now();
function tick(now) {
var t = Math.min((now - start) / duration, 1);
var val = easeOut(t) * target;
el.textContent = decimals > 0 ? val.toFixed(decimals) : Math.round(val);
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}, delay);
});
})();
```
### 12. Art Deco Real Estate
**Type:** CSS + JS
**Description:** Cream parchment dashboard with gold ornamental borders, corner flourishes and diamond dividers. Playfair Display serif numerals animate up to luxury portfolio KPIs and property-type cards with SVG ring charts.
**HTML:**
```html
Q1 2026 · Market Intelligence Report
Luxury Real Estate Portfolio
◆ ◆ ◆
Portfolio
$
0
B
Total Value
Properties
0
Active Listings
Avg. Price
$
0
M
Per Property
◆ ✦ ◆
Residential
0
Units Occupied
Prime
Commercial
0
Active Leases
Trophy
Hospitality
0
Keys Managed
Ultra-Lux
```
**CSS:**
```css
.cnc-deco {
--deco-gold: #c9a84c;
--deco-gold-light: #e8c96b;
--deco-cream: #faf6ee;
--deco-dark: #1a1510;
--deco-ink: #2c2318;
position: relative;
display: flex; align-items: center; justify-content: center;
padding: 60px 24px;
background: var(--deco-cream);
background-image:
radial-gradient(ellipse at top, #ede5d0 0%, transparent 60%),
repeating-linear-gradient(45deg,
transparent, transparent 20px,
rgba(201,168,76,0.04) 20px, rgba(201,168,76,0.04) 21px);
font-family: 'Josefin Sans', sans-serif;
color: var(--deco-ink);
}
.cnc-deco-frame {
width: 900px;
border: 1px solid var(--deco-gold);
padding: 3px; position: relative;
}
.cnc-deco-frame-inner {
border: 1px solid rgba(201,168,76,0.4);
padding: 48px 52px; position: relative;
}
.cnc-deco-corner {
position: absolute; width: 40px; height: 40px;
border-color: var(--deco-gold); border-style: solid;
}
.cnc-deco-tl { top: 10px; left: 10px; border-width: 2px 0 0 2px; }
.cnc-deco-tr { top: 10px; right: 10px; border-width: 2px 2px 0 0; }
.cnc-deco-bl { bottom: 10px; left: 10px; border-width: 0 0 2px 2px; }
.cnc-deco-br { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; }
.cnc-deco-ornament {
display: flex; align-items: center; gap: 16px;
margin: 36px 0; color: var(--deco-gold);
}
.cnc-deco-ornament::before, .cnc-deco-ornament::after {
content: ''; flex: 1; height: 1px;
background: linear-gradient(90deg, transparent, var(--deco-gold), transparent);
}
.cnc-deco-ornament-icon { font-size: 18px; letter-spacing: 8px; }
.cnc-deco-eyebrow {
font-size: 9px; letter-spacing: 6px; text-transform: uppercase;
color: var(--deco-gold); text-align: center;
margin-bottom: 8px; font-weight: 300;
}
.cnc-deco-section-title {
font-family: 'Playfair Display', serif;
font-size: clamp(28px, 4vw, 44px); font-weight: 400;
text-align: center; color: var(--deco-dark);
letter-spacing: -0.5px; margin: 0 0 4px;
}
.cnc-deco-section-title em { font-style: italic; color: var(--deco-gold); }
.cnc-deco-stats-row {
display: grid;
grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
align-items: center; gap: 0; margin-top: 8px;
}
.cnc-deco-divider-v {
width: 1px; height: 80px;
background: linear-gradient(180deg, transparent, var(--deco-gold), transparent);
margin: auto;
}
.cnc-deco-stat {
text-align: center; padding: 24px 12px;
opacity: 0; transform: translateY(16px);
animation: cnc-deco-statIn 0.8s ease forwards;
}
.cnc-deco-stat:nth-child(1) { animation-delay: 0.2s; }
.cnc-deco-stat:nth-child(3) { animation-delay: 0.4s; }
.cnc-deco-stat:nth-child(5) { animation-delay: 0.6s; }
.cnc-deco-stat:nth-child(7) { animation-delay: 0.8s; }
@keyframes cnc-deco-statIn { to { opacity: 1; transform: translateY(0); } }
.cnc-deco-stat-pre {
font-size: 11px; letter-spacing: 4px; text-transform: uppercase;
color: var(--deco-gold); font-weight: 100;
margin-bottom: 8px; display: block;
}
.cnc-deco-stat-num {
font-family: 'Playfair Display', serif;
font-size: clamp(36px, 5vw, 58px); font-weight: 700;
color: var(--deco-dark); line-height: 1; letter-spacing: -1px;
display: flex; justify-content: center; align-items: baseline; gap: 3px;
}
.cnc-deco-stat-sym {
font-family: 'Josefin Sans', sans-serif;
font-size: 0.4em; font-weight: 100; letter-spacing: 2px;
color: var(--deco-gold); align-self: flex-start; margin-top: 6px;
}
.cnc-deco-stat-suf {
font-size: 0.35em; font-weight: 100;
color: var(--deco-gold); letter-spacing: 2px;
}
.cnc-deco-stat-label {
font-size: 9px; letter-spacing: 4px; text-transform: uppercase;
color: rgba(44,35,24,0.4); font-weight: 300;
margin-top: 8px; display: block;
}
.cnc-deco-prop-grid {
display: grid; grid-template-columns: repeat(3, 1fr);
gap: 24px; margin-top: 8px;
}
.cnc-deco-prop-card {
border: 1px solid rgba(201,168,76,0.25);
padding: 28px 24px; position: relative; overflow: hidden;
transition: border-color 0.3s, box-shadow 0.3s;
opacity: 0; animation: cnc-deco-statIn 0.8s ease forwards;
}
.cnc-deco-prop-card:nth-child(1) { animation-delay: 0.3s; }
.cnc-deco-prop-card:nth-child(2) { animation-delay: 0.5s; }
.cnc-deco-prop-card:nth-child(3) { animation-delay: 0.7s; }
.cnc-deco-prop-card::after {
content: ''; position: absolute;
bottom: 0; left: 0; right: 0; height: 2px;
background: linear-gradient(90deg, var(--deco-gold), var(--deco-gold-light), var(--deco-gold));
transform: scaleX(0); transition: transform 0.4s ease;
}
.cnc-deco-prop-card:hover {
border-color: var(--deco-gold);
box-shadow: 0 8px 40px rgba(201,168,76,0.1);
}
.cnc-deco-prop-card:hover::after { transform: scaleX(1); }
.cnc-deco-prop-icon {
font-size: 10px; letter-spacing: 5px; text-transform: uppercase;
color: var(--deco-gold); font-weight: 100;
margin-bottom: 20px; display: block;
}
.cnc-deco-prop-num {
font-family: 'Playfair Display', serif;
font-size: clamp(38px, 5vw, 54px); font-weight: 700;
color: var(--deco-dark); line-height: 1; letter-spacing: -1px;
}
.cnc-deco-prop-num-wrap {
display: flex; align-items: baseline; gap: 4px; margin-bottom: 10px;
}
.cnc-deco-ring-mini {
position: absolute; top: 24px; right: 24px;
}
.cnc-deco-ring-mini svg { transform: rotate(-90deg); }
.cnc-deco-rb { fill: none; stroke: rgba(201,168,76,0.12); stroke-width: 3; }
.cnc-deco-rf {
fill: none; stroke: var(--deco-gold); stroke-width: 3; stroke-linecap: round;
stroke-dasharray: 138; stroke-dashoffset: 138;
transition: stroke-dashoffset 1.6s ease;
}
.cnc-deco-prop-sublabel {
font-size: 9px; letter-spacing: 3px; text-transform: uppercase;
color: rgba(44,35,24,0.35); font-weight: 300;
}
.cnc-deco-prop-bar {
height: 1px; background: rgba(201,168,76,0.15);
margin: 16px 0; position: relative; overflow: hidden;
}
.cnc-deco-prop-bar-fill {
position: absolute; left: 0; top: 0; height: 100%;
background: linear-gradient(90deg, var(--deco-gold), var(--deco-gold-light));
transform: scaleX(0); transform-origin: left;
animation: cnc-deco-barFill 1.5s ease forwards;
}
.cnc-deco-prop-card:nth-child(1) .cnc-deco-prop-bar-fill { animation-delay: 0.8s; width: 85%; }
.cnc-deco-prop-card:nth-child(2) .cnc-deco-prop-bar-fill { animation-delay: 1.0s; width: 62%; }
.cnc-deco-prop-card:nth-child(3) .cnc-deco-prop-bar-fill { animation-delay: 1.2s; width: 91%; }
@keyframes cnc-deco-barFill { to { transform: scaleX(1); } }
.cnc-deco-tag {
display: inline-block;
font-size: 8px; letter-spacing: 3px; text-transform: uppercase;
color: var(--deco-gold); border: 1px solid var(--deco-gold);
padding: 2px 8px; margin-top: 12px; font-weight: 300;
}
@media (prefers-reduced-motion: reduce) {
.cnc-deco-stat, .cnc-deco-prop-card,
.cnc-deco-prop-bar-fill, .cnc-deco-rf { animation: none; transition: none; }
.cnc-deco-stat, .cnc-deco-prop-card { opacity: 1; transform: none; }
}
```
**JS:**
```js
(function () {
function ease(t) { return t < 0.5 ? 4*t*t*t : 1 - Math.pow(-2*t + 2, 3) / 2; }
var root = document.querySelector('.cnc-deco');
if (!root) return;
root.querySelectorAll('.cnc-num[data-target]').forEach(function (el) {
var target = parseFloat(el.dataset.target);
var decimals = parseInt(el.dataset.decimals || 0, 10);
var duration = 1800;
setTimeout(function () {
var start = performance.now();
function tick(now) {
var t = Math.min((now - start) / duration, 1);
var val = ease(t) * target;
el.textContent = decimals > 0
? val.toFixed(decimals)
: Math.round(val).toLocaleString();
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}, 400);
});
root.querySelectorAll('.cnc-deco-rf[data-pct]').forEach(function (rf) {
var pct = parseFloat(rf.dataset.pct) / 100;
var circumference = 2 * Math.PI * 18;
setTimeout(function () {
rf.style.strokeDashoffset = circumference * (1 - pct);
}, 800);
});
})();
```
### 13. Cyberpunk Gaming HUD
**Type:** CSS + JS
**Description:** Pitch-black gaming dashboard with cyan and magenta neon glows, clipped hexagonal panels and Orbitron display font. A glitching player name, animated skill bars with arrow-tip indicators and three oversized kill / win / damage counters.
**HTML:**
```html
Player Profile · Online
NEXUS_V
// APEX · SEASON 12
K/D Ratio
0
Win Rate
0
Headshots
0
Playtime
2,841h
MMR
0
Season XP Progress
Level 847 · Prestige V
0 % to 848
Total Kills
0
+312 this session
Matches Won
0
3W streak active
Damage / Round
0
Top 0.1% global
```
**CSS:**
```css
.cnc-cyber {
--cyber-bg: #070b14;
--cyber-panel: #0d1424;
--cyber-cyan: #00f5ff;
--cyber-magenta: #ff00c8;
--cyber-green: #00ff87;
--cyber-orange: #ff6b00;
--cyber-border: rgba(0,245,255,0.2);
position: relative;
display: flex; align-items: center; justify-content: center;
padding: 40px 20px;
background: var(--cyber-bg);
background-image:
radial-gradient(ellipse at 20% 50%, rgba(0,245,255,0.05) 0%, transparent 50%),
radial-gradient(ellipse at 80% 50%, rgba(255,0,200,0.05) 0%, transparent 50%);
font-family: 'Share Tech Mono', monospace;
color: var(--cyber-cyan);
overflow: hidden;
}
.cnc-cyber::before {
content: ''; position: absolute; inset: 0;
background-image:
linear-gradient(rgba(0,245,255,0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(0,245,255,0.03) 1px, transparent 1px);
background-size: 40px 40px; pointer-events: none;
}
.cnc-cyber-layout {
display: grid;
grid-template-columns: 280px 1fr;
grid-template-rows: auto auto auto;
gap: 12px; width: 960px;
position: relative;
}
.cnc-cyber-panel {
background: var(--cyber-panel);
border: 1px solid var(--cyber-border);
position: relative; overflow: hidden;
clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.cnc-cyber-panel::before {
content: ''; position: absolute; inset: 0;
background: linear-gradient(135deg, rgba(0,245,255,0.03) 0%, transparent 60%);
pointer-events: none;
}
.cnc-cyber-ph {
padding: 10px 16px;
border-bottom: 1px solid var(--cyber-border);
font-family: 'Orbitron', sans-serif;
font-size: 9px; letter-spacing: 3px; text-transform: uppercase;
color: rgba(0,245,255,0.5);
display: flex; align-items: center; gap: 8px;
}
.cnc-cyber-ph::before {
content: ''; width: 6px; height: 6px;
background: var(--cyber-cyan);
box-shadow: 0 0 8px var(--cyber-cyan);
animation: cnc-cyber-blink 1.5s step-end infinite;
}
@keyframes cnc-cyber-blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.1; }
}
.cnc-cyber-profile { grid-row: span 3; padding: 24px 20px; }
.cnc-cyber-avatar {
width: 100px; height: 100px;
margin: 8px auto 20px;
position: relative;
}
.cnc-cyber-avatar-hex {
width: 100%; height: 100%;
clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
background: linear-gradient(135deg, #1a2540, #0d1424);
border: 2px solid var(--cyber-cyan);
display: flex; align-items: center; justify-content: center;
font-size: 36px;
box-shadow: 0 0 20px rgba(0,245,255,0.3), inset 0 0 20px rgba(0,245,255,0.05);
animation: cnc-cyber-hexPulse 3s ease-in-out infinite;
}
@keyframes cnc-cyber-hexPulse {
0%, 100% { box-shadow: 0 0 20px rgba(0,245,255,0.3), inset 0 0 20px rgba(0,245,255,0.05); }
50% { box-shadow: 0 0 40px rgba(0,245,255,0.5), inset 0 0 30px rgba(0,245,255,0.1); }
}
.cnc-cyber-rank-badge {
position: absolute; top: -6px; right: -6px;
background: var(--cyber-magenta); color: #fff;
font-family: 'Orbitron', sans-serif;
font-size: 10px; font-weight: 700;
padding: 3px 7px;
clip-path: polygon(0 0, 100% 0, 100% 70%, 90% 100%, 0 100%);
box-shadow: 0 0 12px var(--cyber-magenta);
}
.cnc-cyber-player-name {
font-family: 'Orbitron', sans-serif;
font-size: 18px; font-weight: 900;
text-align: center; color: #fff;
text-shadow: 0 0 20px var(--cyber-cyan);
letter-spacing: 2px; margin-bottom: 4px;
}
.cnc-cyber-player-tag {
font-size: 11px; color: rgba(0,245,255,0.4);
text-align: center; margin-bottom: 24px; letter-spacing: 1px;
}
.cnc-cyber-stat-row {
display: flex; justify-content: space-between; align-items: center;
padding: 10px 0;
border-bottom: 1px solid rgba(0,245,255,0.08);
}
.cnc-cyber-stat-row-label {
font-size: 10px; color: rgba(0,245,255,0.4);
letter-spacing: 2px; text-transform: uppercase;
}
.cnc-cyber-stat-row-val {
font-size: 15px; color: #fff;
font-family: 'Orbitron', sans-serif; font-weight: 700;
}
.cnc-cyber-cyan { color: var(--cyber-cyan); text-shadow: 0 0 10px var(--cyber-cyan); }
.cnc-cyber-magenta { color: var(--cyber-magenta); text-shadow: 0 0 10px var(--cyber-magenta); }
.cnc-cyber-green { color: var(--cyber-green); text-shadow: 0 0 10px var(--cyber-green); }
.cnc-cyber-big-counter {
padding: 20px 24px;
display: flex; flex-direction: column; justify-content: center;
}
.cnc-cyber-bc-label {
font-size: 9px; letter-spacing: 3px; text-transform: uppercase;
color: rgba(0,245,255,0.4); margin-bottom: 8px;
}
.cnc-cyber-bc-num {
font-family: 'Orbitron', sans-serif;
font-size: clamp(40px, 5vw, 62px); font-weight: 900;
line-height: 1; color: #fff;
text-shadow: 0 0 30px var(--cyber-cyan), 0 0 60px rgba(0,245,255,0.3);
letter-spacing: -1px;
}
.cnc-cyber-magenta-glow { text-shadow: 0 0 30px var(--cyber-magenta), 0 0 60px rgba(255,0,200,0.3); color: var(--cyber-magenta); }
.cnc-cyber-green-glow { text-shadow: 0 0 30px var(--cyber-green), 0 0 60px rgba(0,255,135,0.3); color: var(--cyber-green); }
.cnc-cyber-bc-sub {
font-size: 10px; color: rgba(0,245,255,0.3);
margin-top: 8px; letter-spacing: 1px;
}
.cnc-cyber-skill-grid { padding: 16px 20px; }
.cnc-cyber-skill-item {
display: grid;
grid-template-columns: 80px 1fr 40px;
align-items: center; gap: 12px; margin-bottom: 10px;
}
.cnc-cyber-skill-name {
font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
color: rgba(0,245,255,0.5);
}
.cnc-cyber-skill-bar {
height: 6px; background: rgba(255,255,255,0.05);
position: relative; overflow: visible;
clip-path: polygon(0 0, 100% 0, 100% 100%, 4px 100%);
}
.cnc-cyber-skill-fill {
height: 100%; transform: scaleX(0); transform-origin: left;
animation: cnc-cyber-fillSkill 1.2s ease forwards;
position: relative;
}
.cnc-cyber-skill-fill::after {
content: ''; position: absolute; right: -2px; top: 50%;
transform: translateY(-50%); width: 8px; height: 8px;
background: currentColor;
box-shadow: 0 0 8px currentColor;
clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.cnc-cyber-sf1 { background: var(--cyber-cyan); color: var(--cyber-cyan); width: 94%; animation-delay: 0.4s; }
.cnc-cyber-sf2 { background: var(--cyber-magenta); color: var(--cyber-magenta); width: 87%; animation-delay: 0.55s; }
.cnc-cyber-sf3 { background: var(--cyber-green); color: var(--cyber-green); width: 78%; animation-delay: 0.7s; }
.cnc-cyber-sf4 { background: var(--cyber-orange); color: var(--cyber-orange); width: 91%; animation-delay: 0.85s; }
.cnc-cyber-sf5 { background: var(--cyber-cyan); color: var(--cyber-cyan); width: 65%; animation-delay: 1.0s; }
.cnc-cyber-sf6 { background: var(--cyber-magenta); color: var(--cyber-magenta); width: 82%; animation-delay: 1.15s; }
@keyframes cnc-cyber-fillSkill { to { transform: scaleX(1); } }
.cnc-cyber-skill-pct {
font-size: 11px; text-align: right;
color: rgba(255,255,255,0.5);
}
.cnc-cyber-counter-row {
display: grid; grid-template-columns: repeat(3, 1fr);
gap: 12px; grid-column: 2;
}
.cnc-cyber-xp-panel { padding: 16px 20px; grid-column: 2; }
.cnc-cyber-xp-label {
display: flex; justify-content: space-between;
font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
color: rgba(0,245,255,0.4); margin-bottom: 8px;
}
.cnc-cyber-xp-track {
height: 8px; background: rgba(255,255,255,0.05);
position: relative; overflow: hidden;
clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.cnc-cyber-xp-fill {
height: 100%;
background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-magenta), var(--cyber-green));
transform: scaleX(0); transform-origin: left;
animation: cnc-cyber-xpFill 2s ease forwards 0.5s;
width: 73%;
box-shadow: 0 0 12px var(--cyber-cyan);
}
@keyframes cnc-cyber-xpFill { to { transform: scaleX(1); } }
@keyframes cnc-cyber-glitch {
0%, 90%, 100% { text-shadow: 0 0 30px var(--cyber-cyan); clip-path: none; transform: none; }
92% { clip-path: inset(20% 0 60% 0); transform: translateX(-3px); text-shadow: -2px 0 var(--cyber-magenta); }
94% { clip-path: inset(60% 0 10% 0); transform: translateX(3px); text-shadow: 2px 0 var(--cyber-cyan); }
96% { clip-path: none; transform: none; }
}
.cnc-cyber-glitch { animation: cnc-cyber-glitch 5s infinite; }
@media (prefers-reduced-motion: reduce) {
.cnc-cyber-ph::before, .cnc-cyber-avatar-hex, .cnc-cyber-skill-fill,
.cnc-cyber-xp-fill, .cnc-cyber-glitch { animation: none; }
}
```
**JS:**
```js
(function () {
function ease(t) { return 1 - Math.pow(1 - t, 3); }
var root = document.querySelector('.cnc-cyber');
if (!root) return;
root.querySelectorAll('.cnc-num[data-target]').forEach(function (el) {
var target = parseFloat(el.dataset.target);
var decimals = parseInt(el.dataset.decimals || 0, 10);
var duration = 1600;
setTimeout(function () {
var start = performance.now();
function tick(now) {
var t = Math.min((now - start) / duration, 1);
var val = ease(t) * target;
el.textContent = decimals > 0
? val.toFixed(decimals)
: Math.round(val).toLocaleString();
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}, 200);
});
})();
```
### 14. Swiss SaaS Analytics
**Type:** CSS + JS
**Description:** Off-white editorial dashboard with precise 1px borders and zero decoration. Instrument Serif numerals across a 4-column MRR / users / churn / NPS hero row, an animated revenue bar chart and a D7 / D30 / D90 retention ring.
**HTML:**
```html
Monthly Recurring Revenue
$ 0 M
↑ 18.4% vs Q4 '25
Active Users
0
↑ 12.1% vs Q4 '25
Churn Rate
0 %
↓ 0.3pp vs Q4 '25
NPS Score
0
↑ 4 pts vs Q4 '25
Revenue by Month
USD · 2025–2026
Acquisition Channels
Q1 2026
Organic Search
36.7%
Paid Ads
23.4%
Referral
19.1%
Social
12.5%
Direct
8.2%
Key Metrics
⏱
Avg. Session
Per active user
0 m
Retention Cohorts
0 %
D30 Retention
↑ 5pp vs benchmark
```
**CSS:**
```css
.cnc-swiss {
--swiss-bg: #f7f7f5;
--swiss-ink: #111;
--swiss-mid: #888;
--swiss-faint: #e8e8e4;
--swiss-blue: #2563eb;
display: flex; align-items: center; justify-content: center;
padding: 60px 32px;
background: var(--swiss-bg);
font-family: 'Instrument Sans', sans-serif;
color: var(--swiss-ink);
}
.cnc-swiss-page { width: 1000px; }
.cnc-swiss-meta {
display: flex; justify-content: space-between; align-items: baseline;
margin-bottom: 48px; padding-bottom: 20px;
border-bottom: 1px solid var(--swiss-faint);
}
.cnc-swiss-date-range {
font-size: 12px; color: var(--swiss-mid); letter-spacing: 0.5px;
}
.cnc-swiss-period-tabs {
display: flex; gap: 2px;
background: var(--swiss-faint);
padding: 3px; border-radius: 6px;
}
.cnc-swiss-tab {
font-size: 11px; padding: 4px 12px;
border-radius: 4px; cursor: pointer;
color: var(--swiss-mid); letter-spacing: 0.5px;
transition: background 0.15s, color 0.15s;
}
.cnc-swiss-tab.cnc-swiss-active {
background: #fff; color: var(--swiss-ink);
font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.cnc-swiss-hero-row {
display: grid; grid-template-columns: repeat(4, 1fr);
border: 1px solid var(--swiss-faint);
margin-bottom: 24px;
}
.cnc-swiss-hero-stat {
padding: 32px 28px;
border-right: 1px solid var(--swiss-faint);
position: relative;
transition: background 0.15s;
opacity: 0; animation: cnc-swiss-fadeIn 0.5s ease forwards;
}
.cnc-swiss-hero-stat:last-child { border-right: none; }
.cnc-swiss-hero-stat:hover { background: #fff; }
.cnc-swiss-hero-stat::after {
content: ''; position: absolute;
bottom: 0; left: 28px; right: 28px;
height: 1px; background: var(--swiss-ink);
transform: scaleX(0); transform-origin: left;
transition: transform 0.3s ease;
}
.cnc-swiss-hero-stat:hover::after { transform: scaleX(1); }
.cnc-swiss-hero-stat:nth-child(1) { animation-delay: 0.0s; }
.cnc-swiss-hero-stat:nth-child(2) { animation-delay: 0.08s; }
.cnc-swiss-hero-stat:nth-child(3) { animation-delay: 0.16s; }
.cnc-swiss-hero-stat:nth-child(4) { animation-delay: 0.24s; }
@keyframes cnc-swiss-fadeIn { to { opacity: 1; } }
.cnc-swiss-h-label {
font-size: 11px; color: var(--swiss-mid);
letter-spacing: 0.5px; margin-bottom: 12px; display: block;
}
.cnc-swiss-h-num {
font-family: 'Instrument Serif', serif;
font-size: clamp(36px, 4vw, 56px);
color: var(--swiss-ink); line-height: 1; letter-spacing: -1.5px;
display: flex; align-items: baseline; gap: 4px;
}
.cnc-swiss-h-sym {
font-size: 0.45em;
font-family: 'Instrument Sans', sans-serif;
font-weight: 400; color: var(--swiss-mid); letter-spacing: 0;
}
.cnc-swiss-h-delta {
display: flex; align-items: center; gap: 4px;
margin-top: 10px; font-size: 12px; font-weight: 500;
}
.cnc-swiss-up { color: #16a34a; }
.cnc-swiss-dn { color: #dc2626; }
.cnc-swiss-h-delta-label {
font-size: 11px; color: var(--swiss-mid);
font-weight: 400; margin-left: 2px;
}
.cnc-swiss-content-row {
display: grid; grid-template-columns: 1fr 320px; gap: 24px;
}
.cnc-swiss-left { display: flex; flex-direction: column; gap: 24px; }
.cnc-swiss-right { display: flex; flex-direction: column; gap: 24px; }
.cnc-swiss-box {
border: 1px solid var(--swiss-faint);
background: #fff;
opacity: 0; animation: cnc-swiss-fadeIn 0.5s ease forwards;
}
.cnc-swiss-left .cnc-swiss-box:nth-child(1) { animation-delay: 0.3s; }
.cnc-swiss-left .cnc-swiss-box:nth-child(2) { animation-delay: 0.4s; }
.cnc-swiss-right .cnc-swiss-box:nth-child(1) { animation-delay: 0.35s; }
.cnc-swiss-right .cnc-swiss-box:nth-child(2) { animation-delay: 0.45s; }
.cnc-swiss-box-head {
padding: 16px 20px;
border-bottom: 1px solid var(--swiss-faint);
display: flex; align-items: center; justify-content: space-between;
}
.cnc-swiss-box-title {
font-size: 12px; font-weight: 500;
color: var(--swiss-ink); letter-spacing: 0.3px;
}
.cnc-swiss-box-meta { font-size: 11px; color: var(--swiss-mid); }
.cnc-swiss-chart-area {
padding: 24px 20px 16px;
display: flex; align-items: flex-end; gap: 6px;
height: 180px; position: relative;
}
.cnc-swiss-chart-area::before {
content: ''; position: absolute;
left: 20px; right: 20px; top: 24px; bottom: 32px;
background-image: repeating-linear-gradient(
0deg, transparent, transparent calc(25% - 1px),
var(--swiss-faint) calc(25%), var(--swiss-faint) 25%);
}
.cnc-swiss-bar-wrap {
flex: 1; display: flex; flex-direction: column;
align-items: center; justify-content: flex-end;
gap: 6px; height: 100%; position: relative; z-index: 1;
}
.cnc-swiss-cbar {
width: 100%; background: var(--swiss-ink);
border-radius: 2px 2px 0 0;
transform: scaleY(0); transform-origin: bottom;
animation: cnc-swiss-barUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
min-height: 2px;
}
.cnc-swiss-muted { background: var(--swiss-faint); }
.cnc-swiss-accent { background: var(--swiss-blue); }
.cnc-swiss-bar-label {
font-size: 9px; color: var(--swiss-mid); letter-spacing: 0.5px;
}
.cnc-swiss-bar-wrap:nth-child(1) .cnc-swiss-cbar { animation-delay: 0.05s; }
.cnc-swiss-bar-wrap:nth-child(2) .cnc-swiss-cbar { animation-delay: 0.1s; }
.cnc-swiss-bar-wrap:nth-child(3) .cnc-swiss-cbar { animation-delay: 0.15s; }
.cnc-swiss-bar-wrap:nth-child(4) .cnc-swiss-cbar { animation-delay: 0.2s; }
.cnc-swiss-bar-wrap:nth-child(5) .cnc-swiss-cbar { animation-delay: 0.25s; }
.cnc-swiss-bar-wrap:nth-child(6) .cnc-swiss-cbar { animation-delay: 0.3s; }
.cnc-swiss-bar-wrap:nth-child(7) .cnc-swiss-cbar { animation-delay: 0.35s; }
.cnc-swiss-bar-wrap:nth-child(8) .cnc-swiss-cbar { animation-delay: 0.4s; }
.cnc-swiss-bar-wrap:nth-child(9) .cnc-swiss-cbar { animation-delay: 0.45s; }
.cnc-swiss-bar-wrap:nth-child(10) .cnc-swiss-cbar { animation-delay: 0.5s; }
.cnc-swiss-bar-wrap:nth-child(11) .cnc-swiss-cbar { animation-delay: 0.55s; }
.cnc-swiss-bar-wrap:nth-child(12) .cnc-swiss-cbar { animation-delay: 0.6s; }
@keyframes cnc-swiss-barUp { to { transform: scaleY(1); } }
.cnc-swiss-table { width: 100%; border-collapse: collapse; }
.cnc-swiss-table tr { border-bottom: 1px solid var(--swiss-faint); }
.cnc-swiss-table tr:last-child { border-bottom: none; }
.cnc-swiss-table td {
padding: 12px 20px; font-size: 12px; vertical-align: middle;
}
.cnc-swiss-table td:last-child { text-align: right; font-weight: 500; }
.cnc-swiss-channel-dot {
display: inline-block; width: 8px; height: 8px;
border-radius: 50%; margin-right: 8px;
}
.cnc-swiss-bar-mini { display: flex; align-items: center; gap: 8px; }
.cnc-swiss-mini-track {
width: 80px; height: 3px;
background: var(--swiss-faint); border-radius: 2px; overflow: hidden;
}
.cnc-swiss-mini-fill {
height: 100%; border-radius: 2px;
transform: scaleX(0); transform-origin: left;
animation: cnc-swiss-barXup 1s ease forwards;
}
.cnc-swiss-table tr:nth-child(1) .cnc-swiss-mini-fill { animation-delay: 0.6s; }
.cnc-swiss-table tr:nth-child(2) .cnc-swiss-mini-fill { animation-delay: 0.75s; }
.cnc-swiss-table tr:nth-child(3) .cnc-swiss-mini-fill { animation-delay: 0.9s; }
.cnc-swiss-table tr:nth-child(4) .cnc-swiss-mini-fill { animation-delay: 1.05s; }
.cnc-swiss-table tr:nth-child(5) .cnc-swiss-mini-fill { animation-delay: 1.2s; }
@keyframes cnc-swiss-barXup { to { transform: scaleX(1); } }
.cnc-swiss-kpi-list { padding: 4px 0; }
.cnc-swiss-kpi-item {
display: flex; align-items: center;
padding: 14px 20px;
border-bottom: 1px solid var(--swiss-faint); gap: 12px;
}
.cnc-swiss-kpi-item:last-child { border-bottom: none; }
.cnc-swiss-kpi-icon {
width: 32px; height: 32px;
display: flex; align-items: center; justify-content: center;
font-size: 14px;
background: var(--swiss-faint);
border-radius: 6px; flex-shrink: 0;
}
.cnc-swiss-kpi-text { flex: 1; }
.cnc-swiss-kpi-name { font-size: 12px; font-weight: 500; }
.cnc-swiss-kpi-sub { font-size: 11px; color: var(--swiss-mid); margin-top: 1px; }
.cnc-swiss-kpi-val {
font-family: 'Instrument Serif', serif;
font-size: 22px; letter-spacing: -0.5px;
}
.cnc-swiss-ring-main {
transition: stroke-dashoffset 1.5s ease 0.6s;
}
.cnc-swiss-cohort-bar {
height: 100%; transform: scaleX(0); transform-origin: left;
animation: cnc-swiss-barXup 1s ease forwards;
}
@media (prefers-reduced-motion: reduce) {
.cnc-swiss-hero-stat, .cnc-swiss-box, .cnc-swiss-cbar,
.cnc-swiss-mini-fill, .cnc-swiss-cohort-bar { animation: none; }
.cnc-swiss-hero-stat, .cnc-swiss-box { opacity: 1; }
.cnc-swiss-cbar { transform: scaleY(1); }
.cnc-swiss-mini-fill, .cnc-swiss-cohort-bar { transform: scaleX(1); }
}
```
**JS:**
```js
(function () {
function ease(t) { return 1 - Math.pow(1 - t, 3); }
var root = document.querySelector('.cnc-swiss');
if (!root) return;
root.querySelectorAll('.cnc-num[data-target]').forEach(function (el) {
var target = parseFloat(el.dataset.target);
var decimals = parseInt(el.dataset.decimals || 0, 10);
var duration = 1600;
setTimeout(function () {
var start = performance.now();
function tick(now) {
var t = Math.min((now - start) / duration, 1);
var val = ease(t) * target;
el.textContent = decimals > 0
? val.toFixed(decimals)
: Math.round(val).toLocaleString();
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}, 300);
});
setTimeout(function () {
var ring = root.querySelector('.cnc-swiss-ring-main');
if (ring) ring.style.strokeDashoffset = 220 * (1 - 0.78);
}, 600);
})();
```
### 15. Space Mission Control
**Type:** CSS + JS
**Description:** Three-column dashboard with a rotating orbital SVG, glowing planet, live mission-elapsed-time clock and amber-tinted telemetry. Status dots with blinking error states, a scrolling data feed and crew / comms / thermal counters.
**HTML:**
```html
Thrust Output
0 %
All engines nominal
Velocity
0 km/h
Orbital insertion achieved
[02:14:33] ALT 408.2km · STABLE
[02:14:35] WARN: GYRO-3 DRIFT +0.04°
[02:14:38] THRUSTER B OK 98.4%
[02:14:41] TELEMETRY UPLINK OK
[02:14:44] ORBIT PERIOD 92.4MIN
[02:14:47] SOLAR-B OUTPUT −12%
Mission Control · ISS-NEXUS · Day 47
Altitude · Current Orbit
0
km
Mission Elapsed Time
47:02:14:33
Aboard
0 crew
All crew nominal
Signal Strength
0 %
Uplink: 3 satellites
External Temp
0 °C
Shadow pass cycle
Total Revolutions
0
Next: 47d 3h 22m
```
**CSS:**
```css
.cnc-space {
--space-bg: #020b18;
--space-panel: rgba(8, 28, 55, 0.85);
--space-amber: #ffb400;
--space-amber-dim: rgba(255,180,0,0.5);
--space-teal: #00d4c8;
--space-red: #ff3d3d;
--space-green: #39ff14;
--space-blue: #4da6ff;
--space-border: rgba(0,212,200,0.2);
position: relative;
display: flex; align-items: center; justify-content: center;
padding: 32px 20px;
background: var(--space-bg);
background-image:
radial-gradient(ellipse at 50% 0%, rgba(0,212,200,0.04) 0%, transparent 60%),
radial-gradient(ellipse at 0% 100%, rgba(255,180,0,0.03) 0%, transparent 50%);
font-family: 'Space Mono', monospace;
color: var(--space-teal);
overflow: hidden;
}
.cnc-space::before {
content: ''; position: absolute; inset: 0;
background-image:
radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.6) 0%, transparent 100%),
radial-gradient(1px 1px at 20% 60%, rgba(255,255,255,0.4) 0%, transparent 100%),
radial-gradient(1px 1px at 35% 25%, rgba(255,255,255,0.5) 0%, transparent 100%),
radial-gradient(1px 1px at 50% 80%, rgba(255,255,255,0.3) 0%, transparent 100%),
radial-gradient(1px 1px at 65% 10%, rgba(255,255,255,0.6) 0%, transparent 100%),
radial-gradient(1px 1px at 75% 45%, rgba(255,255,255,0.4) 0%, transparent 100%),
radial-gradient(1px 1px at 85% 70%, rgba(255,255,255,0.5) 0%, transparent 100%),
radial-gradient(1px 1px at 90% 30%, rgba(255,255,255,0.3) 0%, transparent 100%);
pointer-events: none; z-index: 0;
}
.cnc-space-mission {
position: relative; z-index: 1;
width: 1000px;
display: grid;
grid-template-columns: 200px 1fr 200px;
grid-template-rows: auto auto auto;
gap: 10px;
}
.cnc-space-p {
background: var(--space-panel);
border: 1px solid var(--space-border);
backdrop-filter: blur(12px);
position: relative; overflow: hidden;
opacity: 0; animation: cnc-space-panelIn 0.6s ease forwards;
}
.cnc-space-p::after {
content: ''; position: absolute;
top: 0; left: 0; right: 0; height: 1px;
background: linear-gradient(90deg, transparent, var(--space-teal), transparent);
opacity: 0.5;
}
@keyframes cnc-space-panelIn {
from { opacity: 0; transform: scale(0.98); }
to { opacity: 1; transform: scale(1); }
}
.cnc-space-left-col > .cnc-space-p:nth-child(1) { animation-delay: 0.0s; }
.cnc-space-left-col > .cnc-space-p:nth-child(2) { animation-delay: 0.1s; }
.cnc-space-left-col > .cnc-space-p:nth-child(3) { animation-delay: 0.2s; }
.cnc-space-left-col > .cnc-space-p:nth-child(4) { animation-delay: 0.3s; }
.cnc-space-center-main { animation-delay: 0.15s; }
.cnc-space-right-col > .cnc-space-p:nth-child(1) { animation-delay: 0.25s; }
.cnc-space-right-col > .cnc-space-p:nth-child(2) { animation-delay: 0.35s; }
.cnc-space-right-col > .cnc-space-p:nth-child(3) { animation-delay: 0.45s; }
.cnc-space-right-col > .cnc-space-p:nth-child(4) { animation-delay: 0.55s; }
.cnc-space-ph {
padding: 8px 12px;
border-bottom: 1px solid var(--space-border);
font-size: 7px; letter-spacing: 3px; text-transform: uppercase;
color: var(--space-amber);
display: flex; align-items: center; gap: 6px;
}
.cnc-space-ph-dot {
width: 5px; height: 5px; border-radius: 50%;
background: var(--space-amber);
box-shadow: 0 0 6px var(--space-amber);
animation: cnc-space-blinkAmber 2s step-end infinite;
}
@keyframes cnc-space-blinkAmber {
0%, 100% { opacity: 1; }
50% { opacity: 0.2; }
}
.cnc-space-center-main {
grid-column: 2; grid-row: 1 / 4;
padding: 24px;
display: flex; flex-direction: column; gap: 20px;
}
.cnc-space-orbital {
display: flex; justify-content: center; align-items: center;
padding: 16px 0; position: relative;
}
.cnc-space-orbit-svg {
width: 220px; height: 220px;
animation: cnc-space-orbitSpin 30s linear infinite;
position: absolute;
}
@keyframes cnc-space-orbitSpin { to { transform: rotate(360deg); } }
.cnc-space-orbit-svg-inner {
width: 160px; height: 160px;
animation: cnc-space-orbitSpin 20s linear infinite reverse;
position: absolute;
}
.cnc-space-orbit-center {
width: 220px; height: 220px;
display: flex; align-items: center; justify-content: center;
position: relative; z-index: 2;
}
.cnc-space-planet {
width: 80px; height: 80px; border-radius: 50%;
background: radial-gradient(circle at 35% 35%, #4da6ff, #021830);
box-shadow:
0 0 30px rgba(77,166,255,0.4),
inset 0 0 20px rgba(0,0,0,0.5);
}
.cnc-space-readout { text-align: center; }
.cnc-space-readout-label {
font-size: 8px; letter-spacing: 4px; text-transform: uppercase;
color: var(--space-amber); margin-bottom: 6px;
}
.cnc-space-readout-num {
font-family: 'Exo 2', sans-serif;
font-size: clamp(48px, 6vw, 72px); font-weight: 900;
color: #fff; letter-spacing: -2px; line-height: 1;
text-shadow: 0 0 30px var(--space-teal), 0 0 60px rgba(0,212,200,0.3);
display: flex; align-items: baseline; justify-content: center; gap: 6px;
}
.cnc-space-readout-unit {
font-size: 0.3em;
font-family: 'Space Mono', monospace;
font-weight: 400; color: var(--space-teal); letter-spacing: 3px;
}
.cnc-space-telem {
padding: 12px;
display: flex; flex-direction: column; gap: 8px;
}
.cnc-space-telem-row {
display: flex; align-items: center; gap: 8px;
}
.cnc-space-telem-id {
font-size: 7px; letter-spacing: 2px;
color: var(--space-amber-dim); width: 36px; flex-shrink: 0;
}
.cnc-space-telem-track {
flex: 1; height: 3px;
background: rgba(255,255,255,0.05);
position: relative; overflow: hidden;
}
.cnc-space-telem-fill {
height: 100%; transform: scaleX(0); transform-origin: left;
animation: cnc-space-tlFill 1.5s ease forwards;
}
.cnc-space-tc { background: var(--space-teal); animation-delay: 0.8s; }
.cnc-space-ta { background: var(--space-amber); animation-delay: 0.95s; }
.cnc-space-tg { background: var(--space-green); animation-delay: 1.1s; }
.cnc-space-tb { background: var(--space-blue); animation-delay: 1.25s; }
.cnc-space-tr { background: var(--space-red); animation-delay: 1.4s; }
@keyframes cnc-space-tlFill { to { transform: scaleX(1); } }
.cnc-space-telem-val {
font-size: 9px; color: rgba(255,255,255,0.5);
width: 32px; text-align: right; flex-shrink: 0;
}
.cnc-space-side-stat { padding: 12px 14px; }
.cnc-space-ss-label {
font-size: 7px; letter-spacing: 3px;
color: var(--space-amber-dim); text-transform: uppercase;
margin-bottom: 6px;
}
.cnc-space-ss-num {
font-family: 'Exo 2', sans-serif;
font-size: clamp(26px, 3vw, 38px); font-weight: 900;
line-height: 1; letter-spacing: -1px;
}
.cnc-space-teal { color: var(--space-teal); text-shadow: 0 0 16px var(--space-teal); }
.cnc-space-amber { color: var(--space-amber); text-shadow: 0 0 16px var(--space-amber); }
.cnc-space-green { color: var(--space-green); text-shadow: 0 0 16px var(--space-green); }
.cnc-space-red { color: var(--space-red); text-shadow: 0 0 16px var(--space-red); }
.cnc-space-ss-unit {
font-size: 0.35em;
font-family: 'Space Mono', monospace;
font-weight: 400; opacity: 0.5; margin-left: 2px;
}
.cnc-space-ss-sub {
font-size: 8px; color: rgba(255,255,255,0.2);
margin-top: 4px; letter-spacing: 1px;
}
.cnc-space-mission-clock {
text-align: center; padding: 10px;
background: rgba(0,212,200,0.04);
border: 1px solid rgba(0,212,200,0.1);
margin: 0 8px;
}
.cnc-space-clock-label {
font-size: 7px; letter-spacing: 4px;
color: var(--space-amber); margin-bottom: 4px;
}
.cnc-space-clock-time {
font-size: 22px; font-weight: 700;
color: var(--space-teal);
text-shadow: 0 0 12px var(--space-teal);
letter-spacing: 3px;
}
.cnc-space-status-grid {
padding: 10px 12px;
display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.cnc-space-status-item {
display: flex; align-items: center; gap: 6px;
font-size: 7px; letter-spacing: 1px;
color: rgba(255,255,255,0.4);
}
.cnc-space-s-dot {
width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.cnc-space-ok { background: var(--space-green); box-shadow: 0 0 6px var(--space-green); }
.cnc-space-warn { background: var(--space-amber); box-shadow: 0 0 6px var(--space-amber); }
.cnc-space-err {
background: var(--space-red);
box-shadow: 0 0 6px var(--space-red);
animation: cnc-space-blinkAmber 0.8s step-end infinite;
}
.cnc-space-feed {
padding: 10px 12px;
font-size: 7px; letter-spacing: 1px;
overflow: hidden; height: 90px; position: relative;
}
.cnc-space-feed-line {
padding: 3px 0;
border-bottom: 1px solid rgba(0,212,200,0.05);
white-space: nowrap;
animation: cnc-space-feedScroll 12s linear infinite;
}
@keyframes cnc-space-feedScroll {
0% { opacity: 0; }
5%, 85% { opacity: 1; }
100% { opacity: 0; }
}
.cnc-space-fl1 { color: var(--space-teal); animation-delay: 0s; }
.cnc-space-fl2 { color: var(--space-amber); animation-delay: 2s; }
.cnc-space-fl3 { color: var(--space-green); animation-delay: 4s; }
.cnc-space-fl4 { color: rgba(255,255,255,0.4); animation-delay: 6s; }
.cnc-space-fl5 { color: var(--space-teal); animation-delay: 8s; }
.cnc-space-fl6 { color: var(--space-red); animation-delay: 10s; }
.cnc-space-left-col {
grid-column: 1;
display: flex; flex-direction: column; gap: 10px;
}
.cnc-space-right-col {
grid-column: 3;
display: flex; flex-direction: column; gap: 10px;
}
@media (prefers-reduced-motion: reduce) {
.cnc-space-p, .cnc-space-orbit-svg, .cnc-space-orbit-svg-inner,
.cnc-space-telem-fill, .cnc-space-ph-dot, .cnc-space-s-dot.cnc-space-err,
.cnc-space-feed-line { animation: none; }
.cnc-space-p { opacity: 1; }
.cnc-space-telem-fill { transform: scaleX(1); }
}
```
**JS:**
```js
(function () {
function ease(t) { return 1 - Math.pow(1 - t, 3); }
var root = document.querySelector('.cnc-space');
if (!root) return;
root.querySelectorAll('.cnc-num[data-target]').forEach(function (el) {
var target = parseFloat(el.dataset.target);
var decimals = parseInt(el.dataset.decimals || 0, 10);
var duration = 2000;
setTimeout(function () {
var start = performance.now();
function tick(now) {
var t = Math.min((now - start) / duration, 1);
var val = ease(t) * target;
el.textContent = decimals > 0
? val.toFixed(decimals)
: Math.round(val).toLocaleString();
if (t < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
}, 300);
});
var clockEl = root.querySelector('.cnc-space-clock-time');
if (clockEl) {
var baseSec = 47 * 24 * 3600 + 2 * 3600 + 14 * 60 + 33;
var startMs = Date.now();
function updateClock() {
var elapsed = Math.floor((Date.now() - startMs) / 1000);
var total = baseSec + elapsed;
var d = Math.floor(total / 86400);
var h = String(Math.floor((total % 86400) / 3600)).padStart(2, '0');
var m = String(Math.floor((total % 3600) / 60)).padStart(2, '0');
var s = String(total % 60).padStart(2, '0');
clockEl.textContent = d + ':' + h + ':' + m + ':' + s;
}
updateClock();
setInterval(updateClock, 1000);
}
})();
```
---
## 11 CSS Page Transitions
URL: https://codefronts.com/motion/css-page-transitions/
Description: 11 free CSS page transition patterns — fade, slide, scale/zoom, clip-path wipe, blur morph, 3D page turn, ink bleed, triangle shatter, split curtain, matrix rain and brushstroke. Complete interactive demos with copy-paste HTML, CSS and JavaScript.
Demo count: 11
### 01. Fade Transition
**Type:** CSS + JS
**Description:** An elegant crossfade between content panels. Best for dashboards, CMS screens, and tab navigation where the surrounding context stays stable.
**HTML:**
```html
Welcome back
Good morning,Constance.
Your studio has 3 new inquiries and 2 pending approvals. The autumn collection launches in 12 days — everything is on track.
New season ready
🎨
Design Review Due tomorrow
Autumn / Winter 2024
TheCollection
Twelve pieces exploring the tension between restraint and excess. Hand-finished in our Milan atelier using deadstock fabrics sourced from Lyon.
01
Overcoat Noir €2,400 · 4 left
02
Blazer Doré €1,800 · 2 left
03
Trouser Taupe €980 · 8 left
04
Shirt Ivoire €640 · 12 left
Season performance
Analytics& Insights
Revenue is up 22% versus the same period last year. The Overcoat Noir continues to be your strongest performer, accounting for 41% of total sales.
Account
Settings &Preferences
Email Notifications
Receive alerts for new orders and inquiries
Two-factor Authentication
Extra layer of security for your account
Public Profile
Make your studio visible in directory listings
Beta Features
Access experimental features before public launch
```
**CSS:**
```css
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--cream: #f5f0e8;
--ink: #1a1410;
--gold: #c9a84c;
--muted: #8a7e6e;
--card-bg: #fff;
--transition-dur: 600ms;
--transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
}
html, body { height: 100%; font-family: 'DM Sans', sans-serif; background: var(--cream); color: var(--ink); overflow: hidden; }
/* Layout */
.shell {
display: grid;
grid-template-columns: 260px 1fr;
height: 100vh;
}
/* Sidebar nav */
.sidebar {
background: var(--ink);
padding: 48px 32px;
display: flex;
flex-direction: column;
gap: 0;
}
.sidebar-brand {
font-family: 'Cormorant Garamond', serif;
font-size: 22px;
font-weight: 300;
color: var(--cream);
letter-spacing: 0.08em;
margin-bottom: 56px;
line-height: 1.3;
}
.sidebar-brand span { color: var(--gold); }
.nav-label {
font-size: 9px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--muted);
margin-bottom: 16px;
}
.nav-link {
display: flex;
align-items: center;
gap: 12px;
padding: 14px 0;
color: #6b5f50;
text-decoration: none;
font-size: 14px;
font-weight: 400;
letter-spacing: 0.01em;
cursor: pointer;
transition: color 0.25s;
background: none; border-top: none; border-left: none; border-right: none;
border-bottom: 1px solid #2a241c;
width: 100%; text-align: left;
}
.nav-link:hover { color: var(--cream); }
.nav-link.active { color: var(--gold); }
.nav-dot {
width: 6px; height: 6px;
border-radius: 50%;
background: currentColor;
flex-shrink: 0;
}
/* Page stack */
.page-stack {
position: relative;
overflow: hidden;
}
.page {
position: absolute;
inset: 0;
padding: 64px 72px;
overflow-y: auto;
opacity: 0;
pointer-events: none;
transition: opacity var(--transition-dur) var(--transition-ease);
will-change: opacity;
}
.page.active {
opacity: 1;
pointer-events: auto;
}
/* Page content styles */
.page-eyebrow {
font-size: 10px;
letter-spacing: 0.25em;
text-transform: uppercase;
color: var(--gold);
margin-bottom: 20px;
}
.page-title {
font-family: 'Cormorant Garamond', serif;
font-size: clamp(36px, 5vw, 64px);
font-weight: 300;
line-height: 1.1;
color: var(--ink);
margin-bottom: 28px;
}
.page-title em { font-style: italic; color: var(--muted); }
.page-body {
font-size: 15px;
line-height: 1.8;
color: var(--muted);
max-width: 540px;
margin-bottom: 48px;
}
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 20px;
max-width: 680px;
}
.card {
background: white;
border-radius: 4px;
overflow: hidden;
box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.card-img {
height: 130px;
display: flex;
align-items: center;
justify-content: center;
font-size: 40px;
}
.card-info { padding: 16px; }
.card-info h3 { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.card-info p { font-size: 12px; color: var(--muted); }
/* Stats page */
.stat-row {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
max-width: 600px;
margin-bottom: 40px;
}
.stat-box {
background: white;
border-radius: 4px;
padding: 28px 24px;
box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.stat-num {
font-family: 'Cormorant Garamond', serif;
font-size: 48px;
font-weight: 300;
color: var(--ink);
line-height: 1;
margin-bottom: 8px;
}
.stat-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
/* Settings page */
.setting-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px 0;
border-bottom: 1px solid #e8e2d8;
max-width: 520px;
}
.setting-label { font-size: 14px; }
.setting-desc { font-size: 12px; color: var(--muted); margin-top: 4px; }
.toggle {
width: 44px; height: 24px;
background: #d1c9bc;
border-radius: 12px;
position: relative;
cursor: pointer;
transition: background 0.3s;
flex-shrink: 0;
}
.toggle.on { background: var(--gold); }
.toggle::after {
content: '';
position: absolute;
width: 18px; height: 18px;
background: white;
border-radius: 50%;
top: 3px; left: 3px;
transition: transform 0.3s;
box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle.on::after { transform: translateX(20px); }
/* Badge */
.badge {
display: inline-block;
padding: 4px 12px;
border-radius: 2px;
font-size: 10px;
letter-spacing: 0.12em;
text-transform: uppercase;
background: var(--gold);
color: white;
margin-bottom: 32px;
}
/* Mobile */
@media (max-width: 640px) {
.shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
.sidebar { padding: 24px 20px; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
.sidebar-brand { margin-bottom: 0; font-size: 18px; flex: 1; }
.nav-label { display: none; }
.nav-link { padding: 10px 16px; border: 1px solid #2a241c; border-radius: 20px; font-size: 12px; }
.page { padding: 32px 24px; }
.stat-row { grid-template-columns: 1fr 1fr; }
.card-grid { grid-template-columns: 1fr 1fr; }
}
```
**JS:**
```js
const links = document.querySelectorAll('.nav-link');
const pages = document.querySelectorAll('.page');
links.forEach(link => {
link.addEventListener('click', () => {
const target = link.dataset.target;
links.forEach(l => l.classList.remove('active'));
link.classList.add('active');
pages.forEach(page => {
if (page.id === target) {
page.classList.add('active');
} else {
page.classList.remove('active');
}
});
});
});
```
### 02. Slide Transition
**Type:** CSS + JS
**Description:** A directional slide that communicates sequence. The spatial metaphor helps users follow linear flows like onboarding and multi-step wizards.
**HTML:**
```html
⚡
01 / 04
Welcome to Flux
The creative workspace that adapts to how you think — not the other way around.
AI-powered
Real-time sync
Offline first
🧠
02 / 04
Ideas that connect
Flux maps relationships between your thoughts automatically. Watch patterns emerge as you work.
Knowledge graph
Smart links
🔒
03 / 04
Your data, yours
End-to-end encrypted. Zero-knowledge architecture. We literally cannot read your notes — and we wouldn't want to.
E2E encrypted
Zero-knowledge
GDPR ready
🚀
04 / 04
Ready to launch
You're all set. Create your workspace and start building something extraordinary today.
Free 14-day trial
No card needed
```
**CSS:**
```css
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #0a0a0f;
--surface: #13131a;
--border: #1e1e2e;
--text: #e8e8f0;
--muted: #5c5c78;
--accent-1: #6c63ff;
--accent-2: #ff6584;
--accent-3: #43e97b;
--accent-4: #ffd700;
--slide-dur: 500ms;
--slide-ease: cubic-bezier(0.77, 0, 0.175, 1);
}
html, body {
height: 100%; background: var(--bg);
font-family: 'Syne', sans-serif;
color: var(--text);
overflow: hidden;
}
/* Scene — centers the phone */
.scene {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background:
radial-gradient(ellipse 60% 40% at 20% 20%, rgba(108,99,255,0.12) 0%, transparent 60%),
radial-gradient(ellipse 60% 40% at 80% 80%, rgba(255,101,132,0.08) 0%, transparent 60%),
var(--bg);
padding: 24px;
}
.phone {
width: 340px;
height: 680px;
background: var(--surface);
border-radius: 44px;
border: 1px solid var(--border);
overflow: hidden;
position: relative;
box-shadow:
0 0 0 1px rgba(255,255,255,0.04),
0 40px 80px rgba(0,0,0,0.6),
inset 0 1px 0 rgba(255,255,255,0.08);
flex-shrink: 0;
}
/* Notch */
.phone::before {
content: '';
position: absolute;
top: 16px; left: 50%;
transform: translateX(-50%);
width: 110px; height: 30px;
background: var(--bg);
border-radius: 20px;
z-index: 10;
}
/* Slide viewport */
.slider-viewport {
position: absolute;
inset: 0;
overflow: hidden;
}
.slider-track {
display: flex;
height: 100%;
transition: transform var(--slide-dur) var(--slide-ease);
will-change: transform;
}
.slide {
min-width: 340px;
height: 100%;
display: flex;
flex-direction: column;
padding: 80px 28px 40px;
position: relative;
overflow: hidden;
}
/* Individual slide themes */
.slide-1 { background: linear-gradient(160deg, #0d0d1a 0%, #1a0d2e 100%); }
.slide-2 { background: linear-gradient(160deg, #0d1a15 0%, #0d1a2e 100%); }
.slide-3 { background: linear-gradient(160deg, #1a0d0d 0%, #2e1a0d 100%); }
.slide-4 { background: linear-gradient(160deg, #0d1a1a 0%, #0d2e1a 100%); }
/* Background orbs */
.slide::after {
content: '';
position: absolute;
width: 280px; height: 280px;
border-radius: 50%;
bottom: -80px; right: -80px;
opacity: 0.15;
filter: blur(60px);
pointer-events: none;
}
.slide-1::after { background: var(--accent-1); }
.slide-2::after { background: var(--accent-3); }
.slide-3::after { background: var(--accent-2); }
.slide-4::after { background: var(--accent-4); }
/* Slide content */
.slide-icon {
width: 72px; height: 72px;
border-radius: 20px;
display: flex;
align-items: center;
justify-content: center;
font-size: 34px;
margin-bottom: 32px;
flex-shrink: 0;
}
.slide-1 .slide-icon { background: rgba(108,99,255,0.2); box-shadow: 0 0 0 1px rgba(108,99,255,0.4); }
.slide-2 .slide-icon { background: rgba(67,233,123,0.15); box-shadow: 0 0 0 1px rgba(67,233,123,0.3); }
.slide-3 .slide-icon { background: rgba(255,101,132,0.15); box-shadow: 0 0 0 1px rgba(255,101,132,0.3); }
.slide-4 .slide-icon { background: rgba(255,215,0,0.15); box-shadow: 0 0 0 1px rgba(255,215,0,0.3); }
.slide-step {
font-family: 'Syne Mono', monospace;
font-size: 11px;
letter-spacing: 0.15em;
color: var(--muted);
margin-bottom: 16px;
}
.slide-title {
font-size: 28px;
font-weight: 800;
line-height: 1.15;
margin-bottom: 16px;
color: var(--text);
}
.slide-1 .accent { color: var(--accent-1); }
.slide-2 .accent { color: var(--accent-3); }
.slide-3 .accent { color: var(--accent-2); }
.slide-4 .accent { color: var(--accent-4); }
.slide-body {
font-size: 14px;
line-height: 1.75;
color: var(--muted);
margin-bottom: 32px;
font-weight: 400;
}
/* Feature pills */
.pill-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 32px;
}
.pill {
padding: 6px 14px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.02em;
border: 1px solid rgba(255,255,255,0.1);
color: var(--muted);
}
/* Bottom controls */
.slide-footer {
margin-top: auto;
display: flex;
flex-direction: column;
gap: 16px;
}
.dots {
display: flex;
gap: 6px;
justify-content: center;
}
.dot {
height: 4px;
border-radius: 2px;
background: rgba(255,255,255,0.15);
transition: width 0.3s var(--slide-ease), background 0.3s;
}
.dot.active { background: white; }
.dot-1 { width: 24px; }
.dot-2, .dot-3, .dot-4 { width: 8px; }
.btn-row { display: flex; gap: 12px; }
.btn {
flex: 1;
height: 52px;
border-radius: 14px;
border: none;
font-family: 'Syne', sans-serif;
font-size: 14px;
font-weight: 700;
letter-spacing: 0.02em;
cursor: pointer;
transition: opacity 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn-ghost {
background: rgba(255,255,255,0.06);
color: var(--muted);
border: 1px solid rgba(255,255,255,0.08);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-primary {
background: white;
color: #0a0a0f;
}
.btn-primary:hover { opacity: 0.9; }
.btn-finish {
width: 100%;
height: 52px;
border-radius: 14px;
border: none;
font-family: 'Syne', sans-serif;
font-size: 15px;
font-weight: 700;
background: linear-gradient(135deg, var(--accent-4), #ffaa00);
color: #0a0a0f;
cursor: pointer;
display: none;
}
@media (max-width: 420px) {
.phone { width: 100%; height: 100vh; border-radius: 0; }
.scene { padding: 0; }
}
```
**JS:**
```js
const track = document.getElementById('track');
const slideWidth = 340;
let current = 0;
const total = 4;
function goTo(idx) {
current = Math.max(0, Math.min(total - 1, idx));
track.style.transform = `translateX(-${current * slideWidth}px)`;
}
function next() { goTo(current + 1); }
function prev() { goTo(current - 1); }
function skip() { goTo(total - 1); }
// Touch/swipe support
let startX = 0;
track.addEventListener('touchstart', e => { startX = e.touches[0].clientX; }, { passive: true });
track.addEventListener('touchend', e => {
const dx = e.changedTouches[0].clientX - startX;
if (dx < -40) next();
if (dx > 40) prev();
});
```
### 03. Scale / Zoom Transition
**Type:** CSS + JS
**Description:** A card expands to reveal more detail. The zoom-in metaphor intuitively signals drilling deeper into content without a full page load.
**HTML:**
```html
```
**CSS:**
```css
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #f2ede4;
--card-bg: #fff;
--ink: #1c1814;
--muted: #8c8278;
--detail-dur: 480ms;
--detail-ease: cubic-bezier(0.32, 0.72, 0, 1);
}
html, body {
min-height: 100%; font-family: 'Cabinet Grotesk', sans-serif;
background: var(--bg); color: var(--ink);
}
/* Header */
.header {
padding: 32px 48px;
display: flex;
align-items: center;
justify-content: space-between;
position: sticky; top: 0; z-index: 5;
background: var(--bg);
}
.logo {
font-family: 'Fraunces', serif;
font-size: 22px;
font-weight: 300;
font-style: italic;
color: var(--ink);
}
.header-right {
display: flex;
gap: 24px;
align-items: center;
font-size: 13px;
font-weight: 500;
color: var(--muted);
}
/* Grid */
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 2px;
padding: 0 2px 2px;
}
/* Card */
.card {
background: var(--card-bg);
cursor: pointer;
overflow: hidden;
position: relative;
transition: transform 0.2s;
}
.card:hover { z-index: 2; }
.card-thumb {
aspect-ratio: 4/3;
display: flex;
align-items: center;
justify-content: center;
font-size: 72px;
position: relative;
overflow: hidden;
transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}
.card:hover .card-thumb { transform: scale(1.04); }
.card-meta {
padding: 20px 24px 28px;
}
.card-cat {
font-size: 10px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--muted);
margin-bottom: 8px;
}
.card-title {
font-family: 'Fraunces', serif;
font-size: 22px;
font-weight: 300;
line-height: 1.2;
margin-bottom: 8px;
}
.card-price {
font-size: 14px;
font-weight: 700;
color: var(--ink);
}
/* Detail overlay */
.detail-overlay {
position: fixed;
inset: 0;
z-index: 100;
pointer-events: none;
display: flex;
align-items: flex-end;
}
.detail-backdrop {
position: absolute;
inset: 0;
background: rgba(28, 24, 20, 0);
transition: background var(--detail-dur) var(--detail-ease);
}
.detail-panel {
position: relative;
width: 100%;
max-width: 100%;
background: white;
border-radius: 20px 20px 0 0;
padding: 40px 48px 56px;
transform: translateY(100%) scale(0.92);
transform-origin: center bottom;
transition:
transform var(--detail-dur) var(--detail-ease),
opacity var(--detail-dur) var(--detail-ease);
opacity: 0;
max-height: 85vh;
overflow-y: auto;
}
.detail-overlay.open {
pointer-events: auto;
}
.detail-overlay.open .detail-backdrop {
background: rgba(28, 24, 20, 0.6);
}
.detail-overlay.open .detail-panel {
transform: translateY(0) scale(1);
opacity: 1;
}
.detail-handle {
width: 40px; height: 4px;
background: #ddd;
border-radius: 2px;
margin: 0 auto 32px;
}
.detail-layout {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 48px;
align-items: start;
}
.detail-visual {
aspect-ratio: 1;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 100px;
transition: transform 0.6s var(--detail-ease);
}
.detail-overlay.open .detail-visual {
transform: scale(1);
}
.detail-cat {
font-size: 10px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--muted);
margin-bottom: 12px;
}
.detail-title {
font-family: 'Fraunces', serif;
font-size: 36px;
font-weight: 300;
line-height: 1.1;
margin-bottom: 16px;
}
.detail-desc {
font-size: 14px;
line-height: 1.8;
color: var(--muted);
margin-bottom: 28px;
}
.detail-price-row {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 28px;
}
.detail-price {
font-size: 28px;
font-weight: 900;
}
.detail-old-price {
font-size: 16px;
color: var(--muted);
text-decoration: line-through;
}
.detail-actions {
display: flex;
gap: 12px;
}
.btn-add {
flex: 1;
height: 52px;
background: var(--ink);
color: white;
border: none;
border-radius: 8px;
font-family: 'Cabinet Grotesk', sans-serif;
font-size: 14px;
font-weight: 700;
letter-spacing: 0.03em;
cursor: pointer;
transition: opacity 0.2s;
}
.btn-add:hover { opacity: 0.85; }
.btn-wish {
width: 52px; height: 52px;
background: var(--bg);
border: none;
border-radius: 8px;
font-size: 22px;
cursor: pointer;
}
.close-btn {
position: absolute;
top: 32px; right: 40px;
width: 36px; height: 36px;
border-radius: 50%;
background: var(--bg);
border: none;
font-size: 18px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--muted);
transition: background 0.2s;
}
.close-btn:hover { background: #e8e2d8; }
/* Tags */
.tag-row {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 20px;
}
.tag {
padding: 5px 14px;
background: var(--bg);
border-radius: 20px;
font-size: 12px;
font-weight: 500;
color: var(--muted);
}
@media (max-width: 640px) {
.header { padding: 20px 20px; }
.grid { grid-template-columns: 1fr 1fr; }
.detail-layout { grid-template-columns: 1fr; }
.detail-panel { padding: 28px 24px 40px; }
.detail-visual { max-height: 200px; }
}
```
**JS:**
```js
const products = [
{ emoji: '🌸', bg: '#fce8f0', cat: 'Florals', title: 'Cherry Blossom Silk', price: '$128', old: '$180', tags: ['New', 'Limited', 'Silk'], desc: 'Hand-dyed in small batches using traditional Japanese techniques. Each piece is unique, with natural variations that make it truly one-of-a-kind.' },
{ emoji: '🌿', bg: '#e8f0e8', cat: 'Botanicals', title: 'Eucalyptus Linen', price: '$94', old: '', tags: ['Organic', 'Linen'], desc: 'Sustainably grown and minimally processed. Our eucalyptus linen is GOTS certified and biodegradable from thread to packaging.' },
{ emoji: '🍋', bg: '#f8f0d8', cat: 'Citrus', title: 'Lemon Grove Tee', price: '$56', old: '$72', tags: ['Sale', 'Cotton'], desc: 'A relaxed, slightly oversized silhouette in 100% organic cotton. Pre-washed for softness. Looks better the more you wear it.' },
{ emoji: '🌊', bg: '#dceef8', cat: 'Ocean', title: 'Coastal Linen Shirt', price: '$112', old: '', tags: ['Linen', 'Unisex'], desc: 'Inspired by Mediterranean mornings. The loose fit and breathable linen make it ideal for warm days from breakfast to sunset.' },
{ emoji: '🌙', bg: '#e8e0f8', cat: 'Celestial', title: 'Midnight Modal Dress', price: '$168', old: '$220', tags: ['Sale', 'Modal', 'New'], desc: 'Ultra-soft TENCEL modal in a deep midnight hue. The bias-cut drapes beautifully and the fabric moves with you — not against you.' },
{ emoji: '🍂', bg: '#f0e8d8', cat: 'Autumn', title: 'Terracotta Knit', price: '$136', old: '', tags: ['Knit', 'Wool'], desc: 'Hand-knitted in a relaxed, chunky stitch using undyed alpaca-merino blend. Warm without bulk, and gets softer with every wash.' },
];
const grid = document.getElementById('grid');
const overlay = document.getElementById('overlay');
const backdrop = document.getElementById('backdrop');
const closeBtn = document.getElementById('closeBtn');
// Render cards
products.forEach((p, i) => {
const card = document.createElement('div');
card.className = 'card';
card.innerHTML = `
${p.emoji}
`;
card.addEventListener('click', () => openDetail(p));
grid.appendChild(card);
});
function openDetail(p) {
document.getElementById('detailVisual').style.background = p.bg;
document.getElementById('detailVisual').textContent = p.emoji;
document.getElementById('detailCat').textContent = p.cat;
document.getElementById('detailTitle').textContent = p.title;
document.getElementById('detailPrice').textContent = p.price;
document.getElementById('detailOld').textContent = p.old;
document.getElementById('detailDesc').textContent = p.desc;
const tagsEl = document.getElementById('detailTags');
tagsEl.innerHTML = p.tags.map(t => `${t} `).join('');
overlay.classList.add('open');
document.body.style.overflow = 'hidden';
}
function closeDetail() {
overlay.classList.remove('open');
document.body.style.overflow = '';
}
closeBtn.addEventListener('click', closeDetail);
backdrop.addEventListener('click', closeDetail);
```
### 04. Clip-Path Wipe
**Type:** CSS + JS
**Description:** A dramatic clip-path reveal that wipes the new page into view. High-impact and memorable — best reserved for creative portfolios and brand sites.
**HTML:**
```html
STUDIO
Creative Studio · Est. 2019
WE BUILDBOLD FUTURES
A multi-disciplinary studio pushing the boundaries of brand, motion, and digital experience design.
View Work →
01
Brand Identity
Luminary Financial
→
02
Digital Experience
Atlas Platform
→
03
Motion & Film
Epoch Campaign
→
04
Product Design
Nova Wearables
→
WE AREFORM STUDIO
A tight team of designers, developers, and strategists who believe that great work comes from obsessing over every pixel, every word, and every interaction.
We've partnered with everyone from pre-seed startups to Fortune 500s — always bringing the same level of care.
FORM
Home
Work
About
```
**CSS:**
```css
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--dur: 800ms;
--ease: cubic-bezier(0.76, 0, 0.24, 1);
}
html, body {
height: 100%;
overflow: hidden;
font-family: 'Space Grotesk', sans-serif;
}
/* Pages */
.page {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
}
/* Base state: clipped to nothing (right side) */
.page-incoming {
clip-path: polygon(100% 0%, 100% 0%, 100% 100%, 100% 100%);
transition: clip-path var(--dur) var(--ease);
pointer-events: none;
z-index: 2;
}
/* Fully revealed */
.page-incoming.reveal {
clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}
/* Exiting page stays visible beneath */
.page-outgoing {
z-index: 1;
}
/* Page 0 — Hero */
#page-0 {
background: #0e0e14;
justify-content: flex-end;
padding: 80px;
color: white;
}
#page-0 .bg-word {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-family: 'Bebas Neue', sans-serif;
font-size: min(25vw, 240px);
line-height: 1;
color: rgba(255,255,255,0.04);
white-space: nowrap;
pointer-events: none;
letter-spacing: -0.02em;
}
#page-0 .hero-grid {
display: grid;
grid-template-columns: 1fr auto;
align-items: end;
gap: 40px;
width: 100%;
max-width: 1100px;
}
#page-0 .hero-eyebrow {
font-size: 11px;
letter-spacing: 0.25em;
text-transform: uppercase;
color: #8888aa;
margin-bottom: 24px;
}
#page-0 .hero-title {
font-family: 'Bebas Neue', sans-serif;
font-size: clamp(52px, 9vw, 120px);
line-height: 0.92;
letter-spacing: -0.01em;
color: white;
margin-bottom: 32px;
}
#page-0 .hero-title span { color: #c8ff00; }
#page-0 .hero-body {
font-size: 15px;
line-height: 1.75;
color: #8888aa;
max-width: 420px;
margin-bottom: 48px;
}
.btn-hero {
display: inline-flex;
align-items: center;
gap: 12px;
background: #c8ff00;
color: #0e0e14;
border: none;
padding: 18px 36px;
font-family: 'Space Grotesk', sans-serif;
font-size: 14px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
cursor: pointer;
border-radius: 2px;
transition: transform 0.2s, background 0.2s;
}
.btn-hero:hover { background: #d4ff33; transform: translateX(3px); }
.hero-side {
display: flex;
flex-direction: column;
gap: 12px;
align-items: flex-end;
}
.hero-stat {
text-align: right;
border-right: 2px solid #c8ff00;
padding-right: 20px;
}
.hero-stat-num {
font-family: 'Bebas Neue', sans-serif;
font-size: 40px;
color: white;
line-height: 1;
}
.hero-stat-label {
font-size: 10px;
letter-spacing: 0.15em;
text-transform: uppercase;
color: #555570;
}
/* Page 1 — Projects */
#page-1 {
background: #c8ff00;
overflow-y: auto;
padding: 80px;
color: #0e0e14;
}
#page-1 .page-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
margin-bottom: 64px;
}
#page-1 h1 {
font-family: 'Bebas Neue', sans-serif;
font-size: clamp(52px, 9vw, 112px);
line-height: 0.9;
letter-spacing: -0.01em;
color: #0e0e14;
}
.proj-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 3px;
}
.proj-card {
background: #0e0e14;
padding: 36px;
color: white;
display: flex;
flex-direction: column;
min-height: 220px;
position: relative;
overflow: hidden;
cursor: pointer;
transition: background 0.3s;
}
.proj-card:nth-child(even) { background: #1a1a24; }
.proj-card:hover { background: #2a2a3a; }
.proj-num {
font-family: 'Bebas Neue', sans-serif;
font-size: 64px;
color: rgba(200,255,0,0.15);
line-height: 1;
position: absolute;
top: 16px;
right: 24px;
letter-spacing: -0.04em;
}
.proj-cat {
font-size: 9px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #555570;
margin-bottom: 12px;
}
.proj-title {
font-family: 'Bebas Neue', sans-serif;
font-size: 36px;
letter-spacing: 0.01em;
line-height: 1.1;
color: white;
margin-bottom: auto;
}
.proj-arrow {
margin-top: 32px;
font-size: 20px;
color: #c8ff00;
}
/* Page 2 — About */
#page-2 {
background: #1a0a2e;
color: white;
padding: 80px;
display: flex;
align-items: center;
}
#page-2 .about-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 80px;
align-items: center;
max-width: 1000px;
margin: 0 auto;
width: 100%;
}
#page-2 h1 {
font-family: 'Bebas Neue', sans-serif;
font-size: clamp(52px, 8vw, 100px);
line-height: 0.9;
letter-spacing: -0.01em;
}
#page-2 h1 em {
color: #c8ff00;
font-style: italic;
font-family: inherit;
}
#page-2 .about-body {
font-size: 15px;
line-height: 1.8;
color: #8888aa;
margin-bottom: 32px;
}
.skill-row { margin-top: 32px; }
.skill-item { margin-bottom: 16px; }
.skill-name {
display: flex;
justify-content: space-between;
font-size: 12px;
font-weight: 500;
letter-spacing: 0.08em;
text-transform: uppercase;
margin-bottom: 6px;
color: #aaaacc;
}
.skill-bar {
height: 2px;
background: rgba(255,255,255,0.1);
border-radius: 1px;
overflow: hidden;
}
.skill-fill {
height: 100%;
background: #c8ff00;
border-radius: 1px;
}
/* Nav */
.site-nav {
position: fixed;
top: 0; left: 0; right: 0;
z-index: 50;
padding: 28px 48px;
display: flex;
align-items: center;
justify-content: space-between;
mix-blend-mode: difference;
}
.nav-logo {
font-family: 'Bebas Neue', sans-serif;
font-size: 24px;
letter-spacing: 0.05em;
color: white;
cursor: pointer;
}
.nav-links {
display: flex;
gap: 32px;
}
.nav-link {
font-size: 12px;
font-weight: 500;
letter-spacing: 0.12em;
text-transform: uppercase;
color: white;
cursor: pointer;
border: none;
background: none;
position: relative;
padding-bottom: 4px;
transition: opacity 0.2s;
}
.nav-link::after {
content: '';
position: absolute;
bottom: 0; left: 0;
width: 0%; height: 1px;
background: white;
transition: width 0.3s;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
/* Page indicator */
.page-indicator {
position: fixed;
right: 32px;
top: 50%;
transform: translateY(-50%);
z-index: 50;
display: flex;
flex-direction: column;
gap: 8px;
mix-blend-mode: difference;
}
.ind-dot {
width: 4px; height: 4px;
background: rgba(255,255,255,0.3);
border-radius: 2px;
transition: height 0.3s, background 0.3s;
cursor: pointer;
border: none;
}
.ind-dot.active {
height: 24px;
background: white;
}
@media (max-width: 640px) {
#page-0, #page-1, #page-2 { padding: 80px 24px 40px; }
#page-0 .hero-grid { grid-template-columns: 1fr; }
.hero-side { display: none; }
.proj-grid { grid-template-columns: 1fr; }
#page-2 .about-grid { grid-template-columns: 1fr; gap: 32px; }
.site-nav { padding: 20px 24px; }
.nav-links { gap: 16px; }
}
```
**JS:**
```js
const pages = document.querySelectorAll('.page');
const navLinks = document.querySelectorAll('.nav-link');
const indDots = document.querySelectorAll('.ind-dot');
let current = 0;
let transitioning = false;
function goTo(idx) {
if (idx === current || transitioning) return;
transitioning = true;
const prev = current;
current = idx;
// Update nav & dots
navLinks.forEach(l => l.classList.toggle('active', +l.dataset.idx === current));
indDots.forEach(d => d.classList.toggle('active', +d.dataset.idx === current));
// Set the incoming page visible but clipped
const incoming = pages[current];
incoming.classList.add('page-incoming');
incoming.classList.remove('reveal');
incoming.style.zIndex = 2;
// Trigger reflow then animate
requestAnimationFrame(() => {
requestAnimationFrame(() => {
incoming.classList.add('reveal');
});
});
// After animation, clean up old page
setTimeout(() => {
pages[prev].style.zIndex = 1;
incoming.style.zIndex = 1;
// Reset all other pages to hidden state
pages.forEach((p, i) => {
if (i !== current) {
p.classList.add('page-incoming');
p.classList.remove('reveal');
p.style.zIndex = '';
} else {
p.classList.remove('page-incoming');
p.classList.remove('reveal');
p.style.zIndex = '';
}
});
transitioning = false;
}, 850);
}
// Initialize: show first page, hide rest
pages.forEach((p, i) => {
if (i === 0) {
p.classList.remove('page-incoming');
} else {
p.classList.add('page-incoming');
}
});
// Keyboard
document.addEventListener('keydown', e => {
if (e.key === 'ArrowRight' || e.key === 'ArrowDown') goTo(Math.min(current + 1, pages.length - 1));
if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') goTo(Math.max(current - 1, 0));
});
// Wheel
let lastWheel = 0;
document.addEventListener('wheel', e => {
const now = Date.now();
if (now - lastWheel < 900) return;
lastWheel = now;
if (e.deltaY > 0) goTo(Math.min(current + 1, pages.length - 1));
if (e.deltaY < 0) goTo(Math.max(current - 1, 0));
});
```
### 05. Blur Morph Transition
**Type:** CSS + JS
**Description:** Content softly de-focuses then re-focuses as the new view emerges. Calm and considered — ideal for data-heavy SaaS dashboards and admin apps.
**HTML:**
```html
Good afternoon, Kayla 👋
Here's what's happening with your business today.
💰
$84.2k
Total Revenue
↑ 12.4% vs last month
👥
3,241
Active Users
↑ 8.1% vs last month
✓
98.2%
Uptime
↑ 0.3% vs last month
⚡
142ms
Avg Response
↓ 18ms vs last month
Revenue by Month
January — June 2025
Traffic Sources
Current month breakdown
Analytics
Funnel performance and conversion data.
Conversion Funnel
Visitors → Paying customers
Key Metrics
Rolling 30-day averages
Conversion Rate
8.9%
↑ 1.2pp this month
Avg Session Duration
4m 32s
↑ 14s this month
Bounce Rate
34.1%
↓ 2.4pp this month
Transactions
Recent payment activity across all accounts.
Acme Corp
$4,200.00
Jun 12
Paid
GlobalTech
$11,800.00
Jun 11
Pending
Sunrise Co
$860.00
Jun 10
Paid
Nova Labs
$2,100.00
Jun 9
Failed
Peak Media
$7,450.00
Jun 8
Paid
Drift Studio
$3,300.00
Jun 7
Paid
Cloud Nine
$18,000.00
Jun 6
Pending
Settings
Manage your account and preferences.
General
Security
Billing
Notifications
Integrations
Email Notifications
Receive alerts for new transactions and reports
Two-Factor Authentication
Add an extra layer of security to your account
Weekly Digest
Get a summary of your metrics every Monday
Beta Features
Access new features before public release
Usage Analytics
Help us improve by sharing anonymous usage data
```
**CSS:**
```css
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #090912;
--surface: #0f0f1c;
--surface-2: #161627;
--border: rgba(255,255,255,0.06);
--text: #e2e2f0;
--muted: #6060a0;
--blue: #3b82f6;
--purple: #8b5cf6;
--green: #10b981;
--orange: #f59e0b;
--red: #ef4444;
--pink: #ec4899;
--dur: 500ms;
--ease: cubic-bezier(0.4, 0, 0.2, 1);
}
html, body {
height: 100%;
font-family: 'Plus Jakarta Sans', sans-serif;
background: var(--bg);
color: var(--text);
overflow: hidden;
}
/* App Shell */
.app {
display: grid;
grid-template-columns: 220px 1fr;
height: 100vh;
}
/* Sidebar */
.sidebar {
background: var(--surface);
border-right: 1px solid var(--border);
padding: 24px 16px;
display: flex;
flex-direction: column;
gap: 4px;
}
.sidebar-brand {
display: flex;
align-items: center;
gap: 10px;
padding: 8px 12px;
margin-bottom: 24px;
}
.brand-icon {
width: 32px; height: 32px;
background: linear-gradient(135deg, var(--blue), var(--purple));
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
}
.brand-name {
font-size: 15px;
font-weight: 700;
color: var(--text);
letter-spacing: -0.01em;
}
.nav-section { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); padding: 16px 12px 8px; }
.nav-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 12px;
border-radius: 8px;
cursor: pointer;
font-size: 13.5px;
font-weight: 500;
color: var(--muted);
border: none;
background: none;
width: 100%;
text-align: left;
transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.nav-item.active { background: rgba(59,130,246,0.12); color: var(--blue); }
.nav-icon { font-size: 15px; width: 20px; text-align: center; }
.nav-badge {
margin-left: auto;
padding: 2px 8px;
border-radius: 10px;
font-size: 10px;
font-weight: 700;
background: var(--blue);
color: white;
}
/* Main area */
.main {
display: flex;
flex-direction: column;
overflow: hidden;
}
/* Top bar */
.topbar {
height: 60px;
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32px;
flex-shrink: 0;
}
.topbar-title {
font-size: 15px;
font-weight: 600;
color: var(--text);
transition: all var(--dur) var(--ease);
}
.topbar-right { display: flex; gap: 16px; align-items: center; }
.avatar {
width: 32px; height: 32px;
border-radius: 50%;
background: linear-gradient(135deg, var(--purple), var(--pink));
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
font-weight: 700;
}
.search-bar {
display: flex;
align-items: center;
gap: 8px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 8px;
padding: 6px 14px;
font-size: 12px;
color: var(--muted);
width: 200px;
}
/* Page stack */
.page-stack {
flex: 1;
position: relative;
overflow: hidden;
}
.dash-page {
position: absolute;
inset: 0;
overflow-y: auto;
padding: 32px;
opacity: 0;
filter: blur(8px);
transform: scale(0.98) translateY(8px);
pointer-events: none;
transition:
opacity var(--dur) var(--ease),
filter var(--dur) var(--ease),
transform var(--dur) var(--ease);
will-change: opacity, filter, transform;
}
.dash-page.active {
opacity: 1;
filter: blur(0px);
transform: scale(1) translateY(0px);
pointer-events: auto;
}
/* Dashboard components */
.page-heading {
font-size: 22px;
font-weight: 700;
color: var(--text);
margin-bottom: 8px;
letter-spacing: -0.02em;
}
.page-sub {
font-size: 13px;
color: var(--muted);
margin-bottom: 28px;
}
/* KPI row */
.kpi-row {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16px;
margin-bottom: 24px;
}
.kpi-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px;
position: relative;
overflow: hidden;
}
.kpi-card::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(135deg, var(--glow-a) 0%, transparent 60%);
opacity: 0.06;
pointer-events: none;
}
.kpi-icon {
width: 36px; height: 36px;
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-size: 17px;
margin-bottom: 14px;
}
.kpi-value {
font-size: 26px;
font-weight: 700;
letter-spacing: -0.03em;
color: var(--text);
margin-bottom: 4px;
}
.kpi-label {
font-size: 12px;
color: var(--muted);
margin-bottom: 10px;
}
.kpi-delta {
font-size: 11px;
font-weight: 600;
display: flex;
align-items: center;
gap: 4px;
}
.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--red); }
/* Charts row */
.charts-row {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 16px;
margin-bottom: 24px;
}
.chart-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px;
}
.chart-title {
font-size: 13px;
font-weight: 600;
color: var(--text);
margin-bottom: 4px;
}
.chart-sub { font-size: 11px; color: var(--muted); margin-bottom: 20px; }
/* Fake bar chart */
.bar-chart {
display: flex;
align-items: flex-end;
gap: 6px;
height: 120px;
}
.bar {
flex: 1;
border-radius: 4px 4px 0 0;
transition: height 1s cubic-bezier(0.32, 0.72, 0, 1);
min-width: 0;
}
/* Fake donut */
.donut-wrap {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.donut {
width: 100px; height: 100px;
border-radius: 50%;
background: conic-gradient(
var(--blue) 0% 42%,
var(--purple) 42% 68%,
var(--green) 68% 84%,
var(--muted) 84% 100%
);
position: relative;
}
.donut::after {
content: '';
position: absolute;
inset: 20px;
border-radius: 50%;
background: var(--surface);
}
.legend {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
font-size: 11px;
color: var(--muted);
width: 100%;
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
/* Table */
.table-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
overflow: hidden;
}
.table-header {
padding: 16px 20px;
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
}
.table-title { font-size: 13px; font-weight: 600; }
.table-row {
display: grid;
grid-template-columns: 1fr 1fr 1fr 80px;
padding: 14px 20px;
border-bottom: 1px solid var(--border);
font-size: 12.5px;
align-items: center;
transition: background 0.15s;
}
.table-row:last-child { border-bottom: none; }
.table-row:hover { background: rgba(255,255,255,0.02); }
.table-row.head { color: var(--muted); font-size: 11px; font-weight: 500; }
.status-pill {
padding: 3px 10px;
border-radius: 10px;
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.status-active { background: rgba(16,185,129,0.15); color: var(--green); }
.status-pending { background: rgba(245,158,11,0.15); color: var(--orange); }
.status-failed { background: rgba(239,68,68,0.15); color: var(--red); }
/* Analytics page */
.funnel {
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: 24px;
}
.funnel-row {
display: flex;
align-items: center;
gap: 16px;
}
.funnel-label { font-size: 12px; color: var(--muted); width: 100px; flex-shrink: 0; }
.funnel-bar-bg {
flex: 1;
height: 28px;
background: var(--surface-2);
border-radius: 4px;
overflow: hidden;
}
.funnel-bar-fill {
height: 100%;
border-radius: 4px;
display: flex;
align-items: center;
padding-left: 10px;
font-size: 11px;
font-weight: 700;
color: white;
white-space: nowrap;
}
/* Settings page */
.settings-grid {
display: grid;
grid-template-columns: 200px 1fr;
gap: 24px;
}
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav-item {
padding: 10px 14px;
border-radius: 8px;
font-size: 13px;
color: var(--muted);
cursor: pointer;
transition: all 0.15s;
}
.settings-nav-item.active { background: rgba(59,130,246,0.12); color: var(--blue); }
.settings-nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.settings-section {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
overflow: hidden;
}
.settings-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 24px;
border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: 13.5px; font-weight: 500; margin-bottom: 3px; }
.settings-desc { font-size: 12px; color: var(--muted); }
.toggle-switch {
width: 40px; height: 22px;
background: rgba(255,255,255,0.1);
border-radius: 11px;
position: relative;
cursor: pointer;
transition: background 0.25s;
border: none;
flex-shrink: 0;
}
.toggle-switch.on { background: var(--blue); }
.toggle-switch::after {
content: '';
position: absolute;
width: 16px; height: 16px;
background: white;
border-radius: 50%;
top: 3px; left: 3px;
transition: transform 0.25s;
}
.toggle-switch.on::after { transform: translateX(18px); }
@media (max-width: 768px) {
.app { grid-template-columns: 1fr; }
.sidebar { display: none; }
.kpi-row { grid-template-columns: 1fr 1fr; }
.charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
.kpi-row { grid-template-columns: 1fr; }
}
```
**JS:**
```js
const navItems = document.querySelectorAll('.nav-item');
const pages = document.querySelectorAll('.dash-page');
const titles = { overview: 'Overview', analytics: 'Analytics', transactions: 'Transactions', settings: 'Settings' };
navItems.forEach(item => {
item.addEventListener('click', () => {
const target = item.dataset.page;
navItems.forEach(n => n.classList.remove('active'));
item.classList.add('active');
pages.forEach(p => p.classList.remove('active'));
document.getElementById(target).classList.add('active');
document.getElementById('topbarTitle').textContent = titles[target];
});
});
```
### 06. Book Page Turn
**Type:** CSS + JS
**Description:** A real 3D page curl using CSS preserve-3d and rotateY — the right leaf lifts off and turns to reveal the next spread. An antiquarian book floating in a dark ambient scene.
**HTML:**
```html
✦ ✦ ✦
The Invisible Library
A Novel in Four Books
Marguerite Vane
MDCCCXCII
First Edition · London
The InvisibleLibrary
Being a Complete & Faithful Account of the Travels of Miss Helena Voss Through the Rooms of Memory
Printed by Alderman & Sons · Paternoster Row
Set in 12pt Garamond · Hand-bound in vellum
Edition of 250 copies
ii
The Invisible Library
Chapter the First
In Which a Letter Arrives at Dusk
T he letter came on a Thursday, which Helena had always considered an unreliable day — too far from the comfort of Wednesday, not close enough to the relief of Friday. It arrived not by post but by the hand of a boy no older than ten, who pressed it into her palm without a word and turned and ran before she could ask him anything sensible.
It was addressed in a hand she did not recognise, though the ink had an odd quality: too dark for iron gall, too warm for carbon, as if whoever had written it had dipped their pen in something between midnight and rust.
3
Chapter the First
She broke the seal — a figure-eight pressed in wax the colour of dried blood — and read the four lines inside twice, then a third time, in the failing light of her sitting room window. They said only this:
The library is open. You were expected. Come before the candles go out, which they will at midnight. Bring nothing that matters to you, for it will not return as it was.
Helena set the letter on her writing desk and looked at it for a long time. Then she put on her coat, took her lamp, and went out into the street, which had begun, very quietly, to rain.
She did not bring anything that mattered to her. She was not certain she had anything left that did.
cf. Borges, Labyrinths, pp.51–58
4
The Invisible Library
An Interlude: The Catalogue
Here are the books that were never written, shelved between the ones that were. Here are the thoughts that stopped mid-sentence and dried before they could occur.
The index to a lost cartography. A grammar of a wordless tongue. The history of a city founded in a country that has come undone.
All present. All accounted for. All alphabetised by what they lack. The library collects the absent as faithfully as what came back.
47
An Interlude
She read the catalogue by lamplight, running her finger down the spines of volumes that existed only as an entry between the lines.
Dreams of the Paralysed Mathematician. A Psalter Written Left to Right. Everything Your Mother Almost Said on the particular Tuesday night.
She closed it carefully. She set it back. She understood, now, what this place required: not the books she'd brought, nor those she'd read, but the ones she'd always half-desired.
48
The Invisible Library
S he emerged at dawn into a street she did not recognise, though she had lived in the city all her life. The library was gone — or rather, it had returned to being the unremarkable stone building on the corner of Cloth Fair that had stood there, according to the Parish records, since 1742.
Her notebook, which she had not brought, was in her hand. It was full.
She walked home, reading as she went, which is the most dangerous form of walking, and by the time she reached her door she had understood that the library had not given her the books inside it. It had given her back the ones she'd lost — the ones she had been, without knowing it, writing all along.
Finis
214
…
This book was composed and set by hand at the Alderman Press, London, in the autumn of 1892. The typeface is Garamond, cut in the manner of Granjon. The paper is Arches mould-made.
Alderman & Sons · Paternoster Row · London
215
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
--cream:#f4edd8;
--parchment:#e8dbb8;
--burg:#4a1020;
--burg-light:#7a2838;
--ink:#1c1008;
--gold:#b8922a;
}
html,body{height:100%;overflow:hidden;background:#2a1a10;font-family:'Crimson Pro',serif;}
/* Scene */
.scene{
position:fixed;inset:0;
perspective:2000px;
perspective-origin:50% 40%;
display:flex;align-items:center;justify-content:center;
}
.book{
width:min(900px,95vw);
height:min(600px,90vh);
position:relative;
transform-style:preserve-3d;
transform:rotateX(6deg) rotateY(-2deg);
box-shadow:
0 60px 120px rgba(0,0,0,0.6),
0 20px 40px rgba(0,0,0,0.4);
}
/* Book pages sit side by side */
.book-spread{
position:absolute;inset:0;
display:grid;
grid-template-columns:1fr 1fr;
}
/* Spine shadow */
.book-spread::before{
content:'';
position:absolute;
top:0;bottom:0;
left:50%;width:4px;
transform:translateX(-50%);
background:linear-gradient(90deg,rgba(0,0,0,0.3),rgba(0,0,0,0.1),rgba(255,255,255,0.08),rgba(0,0,0,0.1),rgba(0,0,0,0.3));
z-index:100;
}
/* Page spread */
.spread{
position:absolute;inset:0;
display:grid;grid-template-columns:1fr 1fr;
transform-style:preserve-3d;
visibility:hidden;
}
.spread.active{visibility:visible;}
/* Each leaf is half the spread */
.leaf{
position:relative;
overflow:hidden;
}
.leaf-left{background:var(--cream);}
.leaf-right{background:var(--parchment);}
/* Thin paper texture via gradient */
.leaf::before{
content:'';position:absolute;inset:0;
background:
repeating-linear-gradient(0deg,transparent,transparent 28px,rgba(0,0,0,0.018) 28px,rgba(0,0,0,0.018) 29px),
linear-gradient(180deg,rgba(255,255,255,0.4) 0%,transparent 20%,transparent 80%,rgba(0,0,0,0.04) 100%);
pointer-events:none;z-index:10;
}
/* Turning leaf */
.page-turn-container{
position:absolute;
top:0;bottom:0;
right:0;left:50%;
transform-style:preserve-3d;
transform-origin:left center;
transform:rotateY(0deg);
z-index:500;
pointer-events:none;
}
.turn-front,.turn-back{
position:absolute;inset:0;
backface-visibility:hidden;
overflow:hidden;
}
.turn-back{
transform:rotateY(180deg);
background:var(--parchment);
}
.turn-back::before{
content:'';position:absolute;inset:0;
background:linear-gradient(90deg,rgba(0,0,0,0.12),transparent 30%);
pointer-events:none;z-index:10;
}
/* Shadow that rides the fold */
.fold-shadow{
position:absolute;
top:0;bottom:0;left:0;width:40px;
background:linear-gradient(90deg,rgba(0,0,0,0.25),transparent);
pointer-events:none;z-index:20;
}
/* SPREAD CONTENT STYLES */
.page-inner{
padding:48px 44px;
height:100%;
display:flex;flex-direction:column;
position:relative;
overflow:hidden;
}
/* Page number */
.page-num{
position:absolute;bottom:20px;
font-size:9px;letter-spacing:0.15em;
color:rgba(28,16,8,0.3);
font-family:'Crimson Pro',serif;
font-style:italic;
}
.leaf-left .page-num{left:44px;}
.leaf-right .page-num{right:44px;}
/* Decorative rule */
.rule{
width:100%;height:1px;
background:linear-gradient(90deg,transparent,var(--gold),transparent);
margin:12px 0;
}
/* Drop cap */
.dropcap{
float:left;
font-family:'IM Fell English',serif;
font-size:72px;line-height:0.85;
margin-right:6px;margin-top:8px;
color:var(--burg);
}
.running-head{
font-size:8px;letter-spacing:0.3em;text-transform:uppercase;
color:rgba(28,16,8,0.4);
text-align:center;margin-bottom:8px;
font-family:'Crimson Pro',serif;
}
/* Spread 0 — cover / title page */
.s0-left{
align-items:center;justify-content:center;
text-align:center;
background:var(--burg);
color:var(--cream);
}
.s0-left::before{display:none;}
.s0-left::after{
content:'';position:absolute;inset:16px;
border:1px solid rgba(184,146,42,0.3);
pointer-events:none;
}
.cover-ornament{
font-size:28px;color:rgba(184,146,42,0.5);
letter-spacing:0.2em;margin-bottom:20px;
}
.cover-title{
font-family:'IM Fell English',serif;
font-size:36px;font-weight:400;
line-height:1.2;color:var(--parchment);
margin-bottom:8px;
}
.cover-title em{font-style:italic;color:var(--gold);}
.cover-subtitle{
font-size:11px;letter-spacing:0.2em;text-transform:uppercase;
color:rgba(232,219,184,0.45);margin-bottom:32px;
}
.cover-rule{
width:60px;height:1px;background:var(--gold);
margin:0 auto 28px;opacity:0.5;
}
.cover-author{
font-size:14px;letter-spacing:0.12em;
color:rgba(232,219,184,0.6);
font-style:italic;
}
.cover-year{
font-size:9px;letter-spacing:0.2em;
color:rgba(232,219,184,0.3);
margin-top:16px;
}
.s0-right{
background:var(--cream);
}
.s0-right-inner{
padding:48px 44px;height:100%;
display:flex;flex-direction:column;
justify-content:center;
position:relative;
}
.title-page-label{
font-size:8px;letter-spacing:0.3em;text-transform:uppercase;
color:rgba(28,16,8,0.3);margin-bottom:28px;
}
.title-page-title{
font-family:'IM Fell English',serif;
font-size:44px;line-height:1.1;
color:var(--ink);margin-bottom:12px;
}
.title-page-title em{font-style:italic;color:var(--burg);}
.title-page-sub{
font-size:14px;font-style:italic;
color:rgba(28,16,8,0.5);margin-bottom:32px;
line-height:1.6;
}
.title-page-meta{
font-size:10px;letter-spacing:0.08em;
color:rgba(28,16,8,0.3);line-height:2;
border-top:1px solid rgba(28,16,8,0.1);
padding-top:20px;margin-top:auto;
}
/* Spread 1 — chapter */
.chapter-heading{
text-align:center;margin-bottom:24px;
}
.chapter-num{
font-size:9px;letter-spacing:0.35em;text-transform:uppercase;
color:var(--burg);margin-bottom:12px;display:block;
}
.chapter-title{
font-family:'IM Fell English',serif;
font-size:30px;color:var(--ink);line-height:1.2;
}
.body-text{
font-family:'EB Garamond',serif;
font-size:13.5px;line-height:1.85;
color:rgba(28,16,8,0.8);
text-align:justify;
hyphens:auto;
}
/* Spread 2 — poetry */
.poem-title{
font-family:'IM Fell English',serif;
font-size:22px;font-style:italic;
color:var(--burg);margin-bottom:20px;
padding-bottom:16px;
border-bottom:1px solid rgba(74,16,32,0.15);
}
.poem-body{
font-family:'EB Garamond',serif;
font-size:14px;line-height:2.1;
color:rgba(28,16,8,0.75);
font-style:italic;
padding-left:20px;
}
.poem-body p{margin-bottom:16px;}
.marginal-note{
position:absolute;right:12px;top:30%;
width:44px;
font-size:7px;line-height:1.6;
color:rgba(28,16,8,0.35);
text-align:center;
transform:rotate(90deg);
transform-origin:center;
letter-spacing:0.1em;
font-style:italic;
}
/* Spread 3 — colophon */
.colophon{
display:flex;flex-direction:column;align-items:center;justify-content:center;
text-align:center;height:100%;
}
.colophon-mark{
font-size:48px;color:var(--burg);opacity:0.3;
margin-bottom:24px;
}
.colophon-text{
font-size:11px;line-height:1.9;
color:rgba(28,16,8,0.4);
font-style:italic;max-width:220px;
border-top:1px solid rgba(28,16,8,0.1);
border-bottom:1px solid rgba(28,16,8,0.1);
padding:20px 0;margin-bottom:20px;
}
.colophon-pub{
font-size:9px;letter-spacing:0.2em;
color:rgba(28,16,8,0.25);text-transform:uppercase;
}
/* Nav arrows */
.book-nav{
position:fixed;bottom:40px;left:50%;transform:translateX(-50%);
z-index:1000;display:flex;align-items:center;gap:16px;
}
.bnav-btn{
width:44px;height:44px;
border:1px solid rgba(232,219,184,0.25);
background:rgba(28,16,8,0.7);
color:rgba(232,219,184,0.6);
font-size:20px;display:flex;align-items:center;justify-content:center;
cursor:pointer;backdrop-filter:blur(12px);
transition:all .2s;font-family:serif;
}
.bnav-btn:hover{border-color:var(--gold);color:var(--gold);}
.page-indicator{
font-family:'Crimson Pro',serif;font-style:italic;
font-size:12px;color:rgba(232,219,184,0.4);
letter-spacing:0.08em;
min-width:80px;text-align:center;
}
/* Ambient bg */
body::before{
content:'';position:fixed;inset:0;
background:
radial-gradient(ellipse 80% 60% at 50% 50%,#3a2015,#1a0e08);
z-index:-1;
}
```
**JS:**
```js
const spreads=document.querySelectorAll('.spread');
const turner=document.getElementById('turner');
const turnFront=document.getElementById('turnFront');
const turnBack=document.getElementById('turnBack');
const pageInd=document.getElementById('pageInd');
const labels=['pp. i–ii','pp. 3–4','pp. 47–48','pp. 214–215'];
let cur=0,total=spreads.length,busy=false;
function cloneSpreadContent(spreadEl,side){
const leaves=spreadEl.querySelectorAll('.leaf');
const idx=side==='left'?0:1;
if(!leaves[idx])return;
const clone=leaves[idx].cloneNode(true);
clone.style.cssText='position:absolute;inset:0;margin:0;';
return clone;
}
function turnPage(direction){
if(busy)return;
const next=direction>0?cur+1:cur-1;
if(next<0||next>=total)return;
busy=true;
const fromSpread=spreads[cur];
const toSpread=spreads[next];
turnFront.innerHTML='';
const frontClone=cloneSpreadContent(fromSpread,'right');
if(frontClone)turnFront.appendChild(frontClone);
turnFront.appendChild(Object.assign(document.createElement('div'),{className:'fold-shadow'}));
turnBack.innerHTML='';
const backClone=cloneSpreadContent(toSpread,'right');
if(backClone){
backClone.style.transform='scaleX(-1)';
turnBack.appendChild(backClone);
}
turner.style.transition='none';
turner.style.transform=direction>0?'rotateY(0deg)':'rotateY(-180deg)';
turner.style.display='block';
fromSpread.classList.add('active');
toSpread.classList.remove('active');
requestAnimationFrame(()=>{
requestAnimationFrame(()=>{
turner.style.transition='transform 900ms cubic-bezier(0.6,0,0.4,1)';
turner.style.transform=direction>0?'rotateY(-180deg)':'rotateY(0deg)';
});
});
setTimeout(()=>{
fromSpread.classList.remove('active');
toSpread.classList.add('active');
},450);
setTimeout(()=>{
turner.style.display='none';
cur=next;
pageInd.textContent=labels[cur];
busy=false;
},920);
}
document.getElementById('nextBtn').onclick=()=>turnPage(1);
document.getElementById('prevBtn').onclick=()=>turnPage(-1);
document.addEventListener('keydown',e=>{
if(e.key==='ArrowRight')turnPage(1);
if(e.key==='ArrowLeft')turnPage(-1);
});
let wt=0;
window.addEventListener('wheel',e=>{
const now=Date.now();if(now-wt<1100)return;wt=now;
turnPage(e.deltaY>0?1:-1);
},{passive:true});
```
### 07. Ink Bleed
**Type:** CSS + JS
**Description:** A Canvas ink drop radiates organically from the centre with seismic roughness — like sumi ink spreading on wet paper, covering, then receding. Set in a Japanese ceramics studio.
**HTML:**
```html
白泥窯 · Hakudei Kiln
器
Handmade · Raku · Seasonal
Things made to last
一期一会の器
Each piece is made once, in the way the clay demands. We do not repeat ourselves. We do not sell in quantity. We work with fire and patience.
茶碗 · Chawan · Tea Bowl · Shino glaze · 2025
器
Autumn Collection 2025
New work from the kiln
Shino Chawan
Tea Series · No.01
¥ 68,000
Ash Katakuchi
Vessel Series · No.04
¥ 42,000
Raku Guinomi
Sake Series · No.07
¥ 24,000
Oribe Hachi
Bowl Series · No.02
¥ 38,000
The Process
Made by hand and fire
Nothing here is hurried. The kiln dictates the schedule, not the calendar. Each firing takes three days and reveals results that cannot be predicted or reproduced.
一
Clay reclaimed from mountain sources and aged for one year
二
Hand-thrown or slab-built, each piece unique in form
三
Wood-fired in anagama kiln at cone 12 over 60 hours
四
Unboxed by hand and inspected. Most pieces are not kept.
白泥窯 · 一九八九年創業
Making is a form oflistening
The clay knows what it wants to become. Our work is only to be present for long enough to hear it — and skilled enough to help it arrive.
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
--ash:#e8e2d8;
--pale:#f4f0ea;
--clay:#c4a882;
--smoke:#8a8070;
--ink:#1a1410;
--charcoal:#2a2420;
}
html,body{height:100%;overflow:hidden;background:var(--pale);font-family:'Cormorant',serif;color:var(--ink);}
/* Ink canvas overlay */
#inkCanvas{
position:fixed;inset:0;z-index:800;
pointer-events:none;
}
/* Pages */
.pages{position:fixed;inset:0;}
.page{
position:absolute;inset:0;
visibility:hidden;pointer-events:none;
}
.page.active{visibility:visible;pointer-events:auto;}
/* PAGE 0 — STUDIO */
#p0{
background:var(--pale);
display:grid;grid-template-columns:1fr 1fr;
}
.p0-left{
padding:80px 70px;
display:flex;flex-direction:column;justify-content:space-between;
border-right:1px solid rgba(26,20,16,0.08);
position:relative;
}
.studio-mark{
font-family:'Noto Serif JP',serif;
font-size:13px;letter-spacing:0.2em;
color:rgba(26,20,16,0.3);
font-weight:200;
}
.p0-hero{
flex:1;
display:flex;flex-direction:column;justify-content:flex-end;
padding-bottom:20px;
}
.kanji-bg{
position:absolute;
font-family:'Noto Serif JP',serif;
font-size:40vw;font-weight:200;
color:rgba(26,20,16,0.025);
line-height:1;
top:50%;left:50%;
transform:translate(-35%,-55%);
pointer-events:none;
user-select:none;
}
.p0-tagline{
font-size:9px;letter-spacing:0.35em;text-transform:uppercase;
color:var(--smoke);margin-bottom:20px;
}
.p0-title{
font-size:clamp(48px,7vw,88px);
font-weight:300;line-height:0.95;
letter-spacing:-0.02em;
color:var(--ink);
margin-bottom:20px;
position:relative;
}
.p0-title-jp{
font-family:'Noto Serif JP',serif;
font-size:11px;letter-spacing:0.2em;
color:var(--clay);font-weight:300;
margin-bottom:32px;
}
.p0-body{
font-size:15px;line-height:1.8;font-weight:300;
color:rgba(26,20,16,0.5);
max-width:360px;font-style:italic;
}
.p0-footer{
display:flex;align-items:center;justify-content:space-between;
}
.season-badge{
font-size:9px;letter-spacing:0.25em;text-transform:uppercase;
color:var(--clay);
border:1px solid rgba(196,168,130,0.4);
padding:6px 16px;
}
.p0-right{
display:flex;flex-direction:column;
background:var(--ash);
position:relative;overflow:hidden;
}
/* Sumi-e brush artwork area */
.brush-art{
flex:1;
display:flex;align-items:center;justify-content:center;
position:relative;
}
.bowl-art{
position:relative;
width:240px;height:240px;
}
.ceramic-ring{
position:absolute;
border-radius:50%;
border:1px solid rgba(26,20,16,0.12);
}
.ring-1{inset:0;background:rgba(196,168,130,0.15);}
.ring-2{inset:16px;background:rgba(196,168,130,0.1);border-color:rgba(26,20,16,0.08);}
.ring-3{inset:40px;background:rgba(196,168,130,0.08);border-color:rgba(26,20,16,0.05);}
.ring-inner{
position:absolute;inset:80px;
border-radius:50%;
background:var(--ink);opacity:0.06;
}
.stroke{
position:absolute;
background:rgba(26,20,16,0.12);
border-radius:50% 20% 50% 20%;
transform-origin:center;
}
.stroke-1{width:3px;height:80px;top:-40px;left:50%;transform:translateX(-50%) rotate(-10deg);}
.stroke-2{width:2px;height:60px;top:20px;right:20px;transform:rotate(35deg);opacity:0.6;}
.stroke-3{width:2px;height:40px;bottom:20px;left:24px;transform:rotate(-20deg);opacity:0.4;}
.p0-caption{
padding:32px 48px;
border-top:1px solid rgba(26,20,16,0.08);
font-size:11px;letter-spacing:0.12em;
color:rgba(26,20,16,0.35);
text-align:center;font-style:italic;
}
/* PAGE 1 — COLLECTION */
#p1{
background:var(--charcoal);
color:var(--ash);
display:flex;flex-direction:column;
padding:80px;
position:relative;
overflow:hidden;
}
.p1-bg{
position:absolute;
font-family:'Noto Serif JP',serif;
font-size:500px;font-weight:200;
color:rgba(255,255,255,0.015);
line-height:1;
bottom:-100px;right:-60px;
pointer-events:none;
}
.p1-eyebrow{
font-size:9px;letter-spacing:0.35em;text-transform:uppercase;
color:var(--clay);margin-bottom:40px;
position:relative;z-index:1;
display:flex;align-items:center;gap:12px;
}
.p1-eyebrow::after{
content:'';flex:1;height:1px;
background:rgba(196,168,130,0.2);
}
.p1-title{
font-size:clamp(40px,6vw,72px);
font-weight:300;color:var(--ash);
letter-spacing:-0.02em;line-height:1.05;
margin-bottom:60px;position:relative;z-index:1;
}
.p1-grid{
display:grid;grid-template-columns:repeat(4,1fr);gap:24px;
flex:1;align-content:start;
position:relative;z-index:1;
}
.ceramic-card{
display:flex;flex-direction:column;gap:12px;
cursor:pointer;
transition:transform .3s;
}
.ceramic-card:hover{transform:translateY(-4px);}
.ceramic-thumb{
aspect-ratio:3/4;
background:rgba(255,255,255,0.03);
border:1px solid rgba(232,226,216,0.08);
display:flex;align-items:center;justify-content:center;
position:relative;overflow:hidden;
transition:border-color .3s;
}
.ceramic-card:hover .ceramic-thumb{border-color:rgba(196,168,130,0.3);}
.c-shape{
width:60px;height:80px;
background:linear-gradient(160deg,rgba(196,168,130,0.3),rgba(196,168,130,0.1));
border-radius:50% 50% 40% 40%;
border:1px solid rgba(196,168,130,0.2);
position:relative;
}
.c-shape::before{
content:'';position:absolute;
top:-8px;left:50%;transform:translateX(-50%);
width:24px;height:12px;
background:rgba(196,168,130,0.25);
border-radius:50% 50% 0 0;
border:1px solid rgba(196,168,130,0.2);
border-bottom:none;
}
.ceramic-name{
font-size:13px;font-weight:300;color:var(--ash);
letter-spacing:0.04em;
}
.ceramic-series{
font-size:9px;letter-spacing:0.2em;text-transform:uppercase;
color:rgba(232,226,216,0.3);
}
.ceramic-price{
font-size:11px;color:var(--clay);letter-spacing:0.08em;
}
/* PAGE 2 — PROCESS */
#p2{
background:var(--pale);
display:grid;grid-template-columns:480px 1fr;
}
.p2-left{
padding:80px 70px;
display:flex;flex-direction:column;justify-content:center;
border-right:1px solid rgba(26,20,16,0.08);
}
.p2-eyebrow{
font-size:9px;letter-spacing:0.35em;text-transform:uppercase;
color:var(--clay);margin-bottom:28px;
}
.p2-title{
font-size:clamp(36px,5vw,64px);
font-weight:300;color:var(--ink);
letter-spacing:-0.02em;line-height:1.05;
margin-bottom:24px;
}
.p2-body{
font-size:15px;line-height:1.85;font-weight:300;font-style:italic;
color:rgba(26,20,16,0.5);margin-bottom:48px;
}
.process-list{
display:flex;flex-direction:column;gap:20px;
}
.proc-item{
display:flex;align-items:flex-start;gap:20px;
padding-bottom:20px;
border-bottom:1px solid rgba(26,20,16,0.06);
}
.proc-num{
font-family:'Noto Serif JP',serif;
font-size:9px;color:var(--clay);
width:20px;flex-shrink:0;
padding-top:2px;font-weight:300;
}
.proc-text{
font-size:13px;line-height:1.7;
color:rgba(26,20,16,0.5);letter-spacing:0.03em;
}
.p2-right{
background:var(--ash);
display:flex;flex-direction:column;align-items:center;justify-content:center;
padding:60px;
position:relative;overflow:hidden;
gap:48px;
}
.form-lg{
width:160px;height:220px;
background:linear-gradient(160deg,rgba(196,168,130,0.4),rgba(26,20,16,0.06));
border-radius:50% 50% 40% 40%;
border:1px solid rgba(196,168,130,0.3);
box-shadow:12px 24px 40px rgba(26,20,16,0.08);
}
.form-sm{
width:100px;height:60px;
background:linear-gradient(160deg,rgba(196,168,130,0.3),rgba(26,20,16,0.04));
border-radius:50%;
border:1px solid rgba(196,168,130,0.2);
}
/* PAGE 3 — ABOUT */
#p3{
background:var(--ink);
color:var(--ash);
display:flex;align-items:center;justify-content:center;
padding:80px;
position:relative;overflow:hidden;
}
.p3-bg{
position:absolute;inset:0;
background:radial-gradient(ellipse 60% 60% at 30% 50%,rgba(196,168,130,0.04),transparent);
}
.p3-content{max-width:640px;position:relative;}
.p3-jp{
font-family:'Noto Serif JP',serif;
font-size:11px;letter-spacing:0.3em;font-weight:200;
color:rgba(196,168,130,0.5);margin-bottom:32px;
}
.p3-title{
font-size:clamp(36px,6vw,72px);
font-weight:300;color:var(--ash);
line-height:1.05;letter-spacing:-0.02em;
margin-bottom:32px;
}
.p3-title em{font-style:italic;color:var(--clay);}
.p3-quote{
font-size:17px;line-height:1.8;font-style:italic;font-weight:300;
color:rgba(232,226,216,0.55);
border-left:2px solid rgba(196,168,130,0.3);
padding-left:24px;margin-bottom:40px;
}
.p3-meta{
display:flex;gap:48px;
padding-top:32px;
border-top:1px solid rgba(232,226,216,0.08);
}
.p3-meta-item{display:flex;flex-direction:column;gap:6px;}
.p3-meta-num{
font-size:32px;font-weight:300;color:var(--clay);
}
.p3-meta-label{
font-size:9px;letter-spacing:0.25em;text-transform:uppercase;
color:rgba(232,226,216,0.25);
}
/* Nav */
.dot-nav{
position:fixed;bottom:40px;left:50%;transform:translateX(-50%);
z-index:900;display:flex;gap:10px;align-items:center;
}
.dot{
width:5px;height:5px;border-radius:50%;
background:rgba(26,20,16,0.2);border:none;cursor:pointer;
transition:transform .35s,background .25s;
}
.dot.on-dark{background:rgba(232,226,216,0.2);}
.dot.active{transform:scale(1.8);background:var(--clay);}
.dot.on-dark.active{background:var(--clay);}
@media(max-width:768px){
#p0,#p2{grid-template-columns:1fr;}
.p0-right,.p2-right{display:none;}
.p0-left,.p2-left,.p3-content{padding:48px 28px;}
#p1{padding:48px 28px;}
.p1-grid{grid-template-columns:1fr 1fr;}
.p3-meta{gap:24px;}
}
```
**JS:**
```js
const canvas=document.getElementById('inkCanvas');
const ctx=canvas.getContext('2d');
const pages=document.querySelectorAll('.page');
const dots=document.querySelectorAll('.dot');
const darkPages=[1,3];
let cur=0,busy=false;
function resize(){
canvas.width=window.innerWidth;
canvas.height=window.innerHeight;
}
resize();
window.addEventListener('resize',resize);
function inkTransition(x,y,color,midCallback,done){
const W=canvas.width,H=canvas.height;
const maxR=Math.sqrt(W*W+H*H)*0.6;
let r=0,phase=0;
const speed=28;
const roughnessSeeds=Array.from({length:16},(_,i)=>({
angle:i/16*Math.PI*2,
amp:Math.random()*0.15+0.05,
freq:Math.random()*3+2,
phase:Math.random()*Math.PI*2
}));
function draw(){
ctx.clearRect(0,0,W,H);
if(phase===0&&r>maxR*0.45&&!midCallback._called){
midCallback();midCallback._called=true;
}
if(phase===1&&r<=0){
ctx.clearRect(0,0,W,H);done&&done();return;
}
ctx.beginPath();
const steps=120;
for(let i=0;i<=steps;i++){
const a=i/steps*Math.PI*2;
let rad=r;
roughnessSeeds.forEach(s=>{
rad+=r*s.amp*Math.sin(a*s.freq+s.phase+(phase===0?r*0.01:-r*0.01));
});
rad=Math.max(0,rad);
const px=x+Math.cos(a)*rad;
const py=y+Math.sin(a)*rad;
i===0?ctx.moveTo(px,py):ctx.lineTo(px,py);
}
ctx.closePath();
const g=ctx.createRadialGradient(x,y,0,x,y,r*1.1);
g.addColorStop(0,color);
g.addColorStop(0.7,color);
g.addColorStop(1,'transparent');
ctx.fillStyle=g;
ctx.fill();
ctx.beginPath();
for(let i=0;i<=steps;i++){
const a=i/steps*Math.PI*2;
let rad=r;
roughnessSeeds.forEach(s=>{rad+=r*s.amp*Math.sin(a*s.freq+s.phase+(phase===0?r*0.01:-r*0.01));});
const edgeR=rad*0.92;
const px=x+Math.cos(a)*edgeR;
const py=y+Math.sin(a)*edgeR;
i===0?ctx.moveTo(px,py):ctx.lineTo(px,py);
}
ctx.closePath();
ctx.fillStyle='rgba(0,0,0,0.08)';
ctx.fill();
if(phase===0){
r+=speed;
if(r>=maxR){phase=1;}
}else{
r-=speed*1.4;
}
requestAnimationFrame(draw);
}
draw();
}
const inkColors=['#1a1410','#e8e2d8','#1a1410','#1a1410'];
function goTo(n,ex,ey){
if(busy||n===cur)return;
busy=true;
const prev=cur;cur=n;
const x=ex||window.innerWidth/2;
const y=ey||window.innerHeight/2;
const color=inkColors[cur];
const mid=()=>{
pages[prev].classList.remove('active');
pages[cur].classList.add('active');
dots.forEach((d,i)=>{
d.classList.toggle('active',i===cur);
d.classList.toggle('on-dark',darkPages.includes(cur));
});
};
mid._called=false;
inkTransition(x,y,color,mid,()=>{busy=false;});
}
dots.forEach(d=>d.addEventListener('click',e=>{
const r=e.currentTarget.getBoundingClientRect();
goTo(+d.dataset.i,r.left+r.width/2,r.top+r.height/2);
}));
let wt=0;
window.addEventListener('wheel',e=>{
const now=Date.now();if(now-wt<1000)return;wt=now;
goTo(Math.max(0,Math.min(3,cur+(e.deltaY>0?1:-1))),window.innerWidth/2,window.innerHeight/2);
},{passive:true});
document.addEventListener('keydown',e=>{
const c=window.innerWidth/2,m=window.innerHeight/2;
if(e.key==='ArrowRight')goTo(Math.min(3,cur+1),c,m);
if(e.key==='ArrowLeft')goTo(Math.max(0,cur-1),c,m);
});
```
### 08. Triangle Shatter
**Type:** CSS + JS
**Description:** Delaunay-like triangular fragments fill the viewport then explode outward with random velocities and rotations, revealing the next page. Applied to an aerospace deep-tech site.
**HTML:**
```html
APEX. SYS
MISSION 047 · ACTIVE
Launch window open · T-minus 48:00:00
We build for the void
Autonomous systems for environments that humans cannot reach — built to fail safely, adapt quietly, and outlast everything else we send up there.
Mission Overview
Join the crew
⬡
SYS.001
Adaptive GNC
Guidance, navigation & control that rewrites its own mission parameters in-flight based on sensor confidence intervals.
◈
SYS.002
Fault Mesh
Distributed fault tolerance across 2,048 redundant compute nodes. No single point of failure. Period.
▲
SYS.003
Thermal Skin
Ceramic-composite outer layers with embedded heat-pipe lattice rated to 1,650°C continuous exposure.
◇
SYS.004
Deep RF
X-band + Ka-band comms array with 3.2 Gbit/s downlink. Operates from lunar distance without relay.
⬟
SYS.005
Propulsion AI
Neural burn optimizer trained on 3M simulated flight paths. Reduces delta-v budget by 18% on average.
⬢
SYS.006
Surface Intel
Multispectral imaging + LIDAR fusion producing real-time 3D terrain maps at 4mm/pixel resolution.
// Mission Architecture
Built to outlast certainty
Every system assumes its own failure. Every component assumes its redundant twin will fail first. This is how you build hardware for places no one can go to fix it.
First autonomous landing: Mare Tranquillitatis basin
2021
48-hour continuous ops record — no human input
2022
Mission 040: first in-situ resource utilisation test
2024
Mission 047: deep polar orbit insertion, active now
2025
// LIVE · Mission 047
ALTITUDE 847.3 km
INCLINATION 89.7°
VELOCITY 7.62 km/s
BATTERY 98.2%
TEMPERATURE -112°C
SIGNAL DELAY 1.28s
FAULT COUNT 0
UPTIME 14d 08h 33m
Join the mission
8 open roles · Remote + Berlin
Principal GNC Engineer
Guidance & Navigation · Orbital
Apply
ML Engineer — Flight Systems
Neural burn optimization
Apply
Thermal Systems Lead
Materials & thermal design
Apply
Systems Integration Engineer
Avionics & software
Apply
Mission Control Operator
24/7 ops rotation
Apply
Launch
Systems
Mission
Careers
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
--space:#03040a;
--deep:#070b18;
--steel:#8090a8;
--electric:#2060ff;
--glow:#4080ff;
--white:#e8eef8;
--dim:rgba(232,238,248,0.4);
}
html,body{height:100%;overflow:hidden;background:var(--space);font-family:'Space Grotesk',sans-serif;color:var(--white);}
/* Pages */
.pages{position:fixed;inset:0;}
.page{position:absolute;inset:0;pointer-events:none;visibility:hidden;}
.page.active{pointer-events:auto;visibility:visible;}
/* Shatter layer */
#shatterLayer{
position:fixed;inset:0;z-index:700;pointer-events:none;overflow:hidden;
}
/* PAGE 0 — LAUNCH */
#p0{
background:var(--space);
position:relative;overflow:hidden;
}
.stars{position:absolute;inset:0;pointer-events:none;}
.p0-content{
position:absolute;inset:0;
display:flex;flex-direction:column;
justify-content:space-between;
padding:60px 80px;
}
.p0-top{
display:flex;align-items:center;justify-content:space-between;
}
.logo{
font-family:'Space Mono',monospace;
font-size:13px;letter-spacing:0.08em;
color:var(--white);font-weight:700;
}
.logo span{color:var(--electric);}
.mission-count{
font-family:'Space Mono',monospace;
font-size:9px;letter-spacing:0.2em;color:var(--steel);
}
.p0-hero{
display:flex;flex-direction:column;
max-width:820px;
}
.mission-badge{
display:inline-flex;align-items:center;gap:8px;
border:1px solid rgba(32,96,255,0.3);
padding:6px 16px;
margin-bottom:32px;
width:fit-content;
}
.mission-dot{
width:5px;height:5px;border-radius:50%;
background:var(--electric);
box-shadow:0 0 8px var(--electric);
animation:pulse 1.5s ease-in-out infinite;
}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1);}50%{opacity:0.5;transform:scale(0.8);}}
.mission-text{
font-family:'Space Mono',monospace;
font-size:8px;letter-spacing:0.25em;color:rgba(32,96,255,0.8);
}
.p0-title{
font-size:clamp(52px,8.5vw,120px);
font-weight:700;line-height:0.92;
letter-spacing:-0.04em;
color:var(--white);
margin-bottom:32px;
}
.p0-title .blue{color:var(--electric);}
.p0-sub{
font-size:16px;line-height:1.65;
color:var(--dim);font-weight:300;
max-width:540px;margin-bottom:48px;
font-family:'Space Mono',monospace;
letter-spacing:-0.01em;
}
.btn-row{display:flex;gap:16px;}
.btn-primary{
padding:16px 40px;
background:var(--electric);color:var(--white);
border:none;font-family:'Space Grotesk',sans-serif;
font-size:12px;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;
cursor:pointer;
transition:box-shadow .2s,transform .15s;
box-shadow:0 0 20px rgba(32,96,255,0.3);
}
.btn-primary:hover{box-shadow:0 0 40px rgba(32,96,255,0.6);transform:translateY(-2px);}
.btn-ghost{
padding:16px 32px;
background:transparent;color:var(--steel);
border:1px solid rgba(128,144,168,0.25);
font-family:'Space Grotesk',sans-serif;
font-size:12px;letter-spacing:0.1em;text-transform:uppercase;
cursor:pointer;
transition:border-color .2s,color .2s;
}
.btn-ghost:hover{border-color:var(--steel);color:var(--white);}
.p0-bottom{
display:flex;align-items:flex-end;justify-content:space-between;
}
.p0-stats{display:flex;gap:48px;}
.stat-item{display:flex;flex-direction:column;gap:6px;}
.stat-num{
font-family:'Space Mono',monospace;
font-size:28px;font-weight:700;
color:var(--white);
text-shadow:0 0 20px rgba(32,96,255,0.3);
}
.stat-lbl{
font-family:'Space Mono',monospace;
font-size:8px;letter-spacing:0.2em;text-transform:uppercase;color:var(--steel);
}
/* Orbit graphic */
.orbit-graphic{
position:absolute;right:80px;top:50%;transform:translateY(-50%);
width:360px;height:360px;
pointer-events:none;
}
.orbit-ring{
position:absolute;border-radius:50%;
border:1px solid rgba(32,96,255,0.12);
}
.or-1{inset:0;}
.or-2{inset:40px;border-color:rgba(32,96,255,0.08);}
.or-3{inset:80px;border-color:rgba(32,96,255,0.06);}
.or-4{inset:120px;border-color:rgba(32,96,255,0.08);}
.orbit-dot{
position:absolute;width:6px;height:6px;border-radius:50%;
background:var(--glow);
box-shadow:0 0 12px var(--glow);
}
.od-1{top:20px;left:50%;transform:translateX(-50%);}
.od-2{bottom:60px;right:40px;}
.od-3{top:50%;left:10px;transform:translateY(-50%);}
.planet{
position:absolute;inset:130px;border-radius:50%;
background:radial-gradient(ellipse at 35% 35%,rgba(32,96,255,0.3),rgba(3,4,10,0.8));
border:1px solid rgba(32,96,255,0.2);
box-shadow:0 0 40px rgba(32,96,255,0.1),inset 0 0 40px rgba(32,96,255,0.05);
}
/* PAGE 1 — TECHNOLOGY */
#p1{
background:var(--deep);
padding:60px 80px;
display:flex;flex-direction:column;
overflow-y:auto;
}
.p1-header{
display:flex;justify-content:space-between;align-items:flex-start;
margin-bottom:52px;
}
.p1-title{
font-size:clamp(36px,5.5vw,72px);
font-weight:700;letter-spacing:-0.04em;line-height:0.95;
}
.p1-title span{color:var(--electric);}
.p1-index{
font-family:'Space Mono',monospace;
font-size:9px;letter-spacing:0.2em;color:var(--steel);
padding-top:8px;
}
.tech-grid{
display:grid;grid-template-columns:repeat(3,1fr);gap:2px;
flex:1;
}
.tech-card{
background:rgba(255,255,255,0.02);
border:1px solid rgba(128,144,168,0.08);
padding:32px;
transition:background .25s,border-color .25s;
cursor:pointer;
}
.tech-card:hover{background:rgba(32,96,255,0.04);border-color:rgba(32,96,255,0.2);}
.tc-icon{
width:40px;height:40px;
border:1px solid rgba(32,96,255,0.3);
display:flex;align-items:center;justify-content:center;
margin-bottom:20px;
color:var(--electric);font-size:18px;
position:relative;
}
.tc-icon::before{
content:'';position:absolute;inset:0;
background:linear-gradient(135deg,rgba(32,96,255,0.1),transparent);
}
.tc-label{
font-family:'Space Mono',monospace;
font-size:8px;letter-spacing:0.2em;text-transform:uppercase;
color:var(--electric);margin-bottom:12px;
}
.tc-title{
font-size:18px;font-weight:700;letter-spacing:-0.02em;
margin-bottom:12px;
}
.tc-body{
font-size:12px;line-height:1.7;color:var(--dim);
font-family:'Space Mono',monospace;
letter-spacing:-0.01em;
}
/* PAGE 2 — MISSION */
#p2{
background:var(--space);
display:grid;grid-template-columns:1fr 1fr;
position:relative;overflow:hidden;
}
.p2-left{
padding:80px;
display:flex;flex-direction:column;justify-content:center;
border-right:1px solid rgba(128,144,168,0.06);
}
.p2-eyebrow{
font-family:'Space Mono',monospace;
font-size:8px;letter-spacing:0.3em;text-transform:uppercase;
color:var(--electric);margin-bottom:28px;
}
.p2-title{
font-size:clamp(40px,6vw,80px);
font-weight:700;letter-spacing:-0.04em;line-height:0.95;
margin-bottom:32px;
}
.p2-body{
font-family:'Space Mono',monospace;
font-size:12px;line-height:1.8;color:var(--dim);
margin-bottom:40px;max-width:440px;
letter-spacing:-0.01em;
}
.timeline{
display:flex;flex-direction:column;gap:0;
}
.tl-item{
display:flex;gap:20px;
padding:20px 0;
border-bottom:1px solid rgba(128,144,168,0.06);
position:relative;
}
.tl-item::before{
content:'';
position:absolute;left:8px;top:0;bottom:-1px;width:1px;
background:linear-gradient(180deg,var(--electric),rgba(32,96,255,0));
}
.tl-dot{
width:17px;height:17px;flex-shrink:0;
border:1px solid var(--electric);border-radius:50%;
background:var(--space);
display:flex;align-items:center;justify-content:center;
position:relative;z-index:1;
margin-top:2px;
}
.tl-dot::after{
content:'';width:5px;height:5px;border-radius:50%;
background:var(--electric);
box-shadow:0 0 6px var(--electric);
}
.tl-text{font-size:12px;color:var(--dim);font-family:'Space Mono',monospace;line-height:1.6;}
.tl-year{font-size:9px;color:var(--electric);letter-spacing:0.1em;margin-top:4px;font-weight:700;}
.p2-right{
background:var(--deep);
display:flex;flex-direction:column;justify-content:center;align-items:center;
padding:80px;
position:relative;
}
.data-readout{
font-family:'Space Mono',monospace;
width:100%;max-width:340px;
}
.dr-row{
display:flex;justify-content:space-between;align-items:center;
padding:14px 0;
border-bottom:1px solid rgba(128,144,168,0.08);
font-size:11px;
}
.dr-key{color:var(--steel);letter-spacing:0.06em;}
.dr-val{color:var(--electric);font-weight:700;}
.p2-glow{
position:absolute;inset:0;
background:radial-gradient(ellipse 40% 40% at 50% 50%,rgba(32,96,255,0.04),transparent);
pointer-events:none;
}
/* PAGE 3 — CAREERS */
#p3{
background:var(--deep);
padding:80px;
overflow-y:auto;
}
.p3-top{
display:flex;justify-content:space-between;align-items:flex-end;
margin-bottom:48px;
}
.p3-title{
font-size:clamp(40px,6vw,80px);
font-weight:700;letter-spacing:-0.04em;line-height:0.95;
}
.p3-open{
font-family:'Space Mono',monospace;
font-size:9px;letter-spacing:0.2em;color:var(--steel);
}
.job-list{display:flex;flex-direction:column;gap:2px;}
.job-row{
display:grid;
grid-template-columns:1fr 160px 120px 80px;
border:1px solid rgba(128,144,168,0.08);
align-items:center;
transition:background .2s,border-color .2s;
cursor:pointer;
}
.job-row:hover{background:rgba(32,96,255,0.04);border-color:rgba(32,96,255,0.2);}
.job-cell{
padding:24px;
border-right:1px solid rgba(128,144,168,0.06);
}
.job-cell:last-child{border-right:none;}
.job-title{
font-size:15px;font-weight:700;letter-spacing:-0.02em;
margin-bottom:4px;
}
.job-sub{
font-family:'Space Mono',monospace;
font-size:9px;color:var(--steel);letter-spacing:0.08em;
}
.job-dept{
font-family:'Space Mono',monospace;
font-size:10px;color:var(--electric);letter-spacing:0.1em;
}
.job-loc{
font-family:'Space Mono',monospace;
font-size:10px;color:var(--steel);letter-spacing:0.06em;
}
.apply-btn{
padding:8px 20px;
background:var(--electric);color:var(--white);border:none;
font-family:'Space Grotesk',sans-serif;
font-size:9px;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;
cursor:pointer;transition:opacity .2s;
}
.apply-btn:hover{opacity:0.8;}
/* Nav */
.sys-nav{
position:fixed;top:40px;right:60px;z-index:900;
display:flex;flex-direction:column;gap:6px;
align-items:flex-end;
}
.sys-btn{
font-family:'Space Mono',monospace;
font-size:8px;letter-spacing:0.2em;text-transform:uppercase;
color:rgba(128,144,168,0.4);
background:none;border:none;cursor:pointer;
display:flex;align-items:center;gap:8px;
transition:color .2s;
padding:4px 0;
}
.sys-btn::after{
content:'';width:16px;height:1px;
background:rgba(128,144,168,0.3);
transition:width .3s,background .2s;
}
.sys-btn:hover{color:var(--white);}
.sys-btn:hover::after{width:32px;background:var(--white);}
.sys-btn.active{color:var(--electric);}
.sys-btn.active::after{width:32px;background:var(--electric);}
@media(max-width:768px){
#p0 .orbit-graphic{display:none;}
#p2{grid-template-columns:1fr;}
.p2-right{display:none;}
#p0 .p0-content,#p1,#p2 .p2-left,#p3{padding:40px 24px;}
.tech-grid{grid-template-columns:1fr;}
.job-row{grid-template-columns:1fr 100px;}
.job-dept,.job-loc{display:none;}
.sys-nav{top:auto;right:20px;bottom:20px;}
.p0-stats{gap:24px;}
}
```
**JS:**
```js
// Starfield
const sc=document.getElementById('starCanvas');
sc.width=window.innerWidth;sc.height=window.innerHeight;
const sx=sc.getContext('2d');
for(let i=0;i<200;i++){
sx.beginPath();
sx.arc(Math.random()*sc.width,Math.random()*sc.height,Math.random()*1.2,0,Math.PI*2);
sx.fillStyle=`rgba(232,238,248,${Math.random()*0.5+0.1})`;
sx.fill();
}
// Shatter transition
const shatterLayer=document.getElementById('shatterLayer');
const pages=document.querySelectorAll('.page');
const navBtns=document.querySelectorAll('.sys-btn');
let cur=0,busy=false;
function genTriangles(W,H,N){
const pts=[];
const cols=Math.ceil(Math.sqrt(N*W/H));
const rows=Math.ceil(N/cols);
for(let r=0;r<=rows;r++)
for(let c=0;c<=cols;c++){
const x=(c/cols)*W+(Math.random()-0.5)*W/cols*0.8;
const y=(r/rows)*H+(Math.random()-0.5)*H/rows*0.8;
pts.push([Math.max(0,Math.min(W,x)),Math.max(0,Math.min(H,y))]);
}
const tris=[];
const cx=cols+1;
for(let r=0;rb.classList.toggle('active',i===cur));
const W=window.innerWidth,H=window.innerHeight;
const tris=genTriangles(W,H,60);
shatterLayer.innerHTML='';
tris.forEach(tri=>{
const pts=tri.map(([x,y])=>`${x}px ${y}px`).join(',');
const frag=document.createElement('div');
frag.style.cssText=`
position:absolute;inset:0;
clip-path:polygon(${pts});
background:var(--space);
opacity:0;
transition:none;
`;
shatterLayer.appendChild(frag);
});
const allFrags=Array.from(shatterLayer.children);
const sorted=allFrags.sort(()=>Math.random()-0.5);
let covered=false;
sorted.forEach((frag,i)=>{
setTimeout(()=>{
frag.style.transition='opacity 80ms';
frag.style.opacity='1';
if(i===Math.floor(sorted.length*0.5)&&!covered){
covered=true;
pages[prev].classList.remove('active');
pages[cur].classList.add('active');
sorted.forEach((f2,j)=>{
const angle=Math.random()*Math.PI*2;
const dist=Math.random()*300+100;
setTimeout(()=>{
f2.style.transition=`transform 500ms cubic-bezier(0.4,0,1,0.8),opacity 400ms 100ms`;
f2.style.transform=`translate(${Math.cos(angle)*dist}px,${Math.sin(angle)*dist}px) rotate(${(Math.random()-0.5)*40}deg)`;
f2.style.opacity='0';
},j*8);
});
}
},i*12);
});
setTimeout(()=>{
shatterLayer.innerHTML='';
busy=false;
},sorted.length*12+650);
}
navBtns.forEach(b=>b.addEventListener('click',()=>goTo(+b.dataset.i)));
document.querySelectorAll('[data-next]').forEach(b=>b.addEventListener('click',()=>goTo(+b.dataset.next)));
let wt=0;
window.addEventListener('wheel',e=>{
const now=Date.now();if(now-wt<1200)return;wt=now;
goTo(Math.max(0,Math.min(3,cur+(e.deltaY>0?1:-1))));
},{passive:true});
document.addEventListener('keydown',e=>{
if(e.key==='ArrowRight')goTo(Math.min(3,cur+1));
if(e.key==='ArrowLeft')goTo(Math.max(0,cur-1));
});
```
### 09. Vertical Split Curtain
**Type:** CSS + JS
**Description:** Two full-height panels slide closed like theatre curtains, swap the page, then split apart with a different easing — a gold-seamed theatrical reveal. A Parisian haute couture house.
**HTML:**
```html
Maison Lécluse · Paris
Automne–Hiver 2025
Entre Ombre & Lumière
Between shadow and light
A collection born from the silences between words. Forty-two looks. Each one a conversation the body has alone.
Discover the collection
Collection
AH 2025 · 42 looks
Runway
Palais Royal, 4 Oct
The Collection
42 Looks · AH 2025
L'Atelier Lécluse
Made by hand, in silence
Each garment passes through twenty-four pairs of hands before it leaves the atelier. We consider this not a process, but a conversation with the material.
I
Pattern cutting by master tailleur
II
Hand-draping on the mannequin
III
Three fittings per garment minimum
IV
Handstitched finishing throughout
V
Final inspection by the directrice
Maison Lécluse · Since 1967
24
Artisan hands per garment
200+
Hours in a single couture piece
ML
Maison Lécluse · Paris
Private Fitting
By appointment only. Ateliers are open to clients for consultation from Tuesday through Saturday.
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
--noir:#080808;
--white:#f8f4f0;
--warm:#e8e0d4;
--dim:rgba(248,244,240,0.4);
--accent:#c8a060;
--mid:rgba(248,244,240,0.1);
--dur:900ms;
--ease:cubic-bezier(0.76,0,0.24,1);
}
html,body{height:100%;overflow:hidden;background:var(--noir);font-family:'Cormorant Garamond',serif;}
/* Pages */
.pages{position:fixed;inset:0;}
.page{position:absolute;inset:0;pointer-events:none;visibility:hidden;}
.page.active{visibility:visible;pointer-events:auto;}
/* Curtain panels */
.curtain-left,.curtain-right{
position:fixed;top:0;bottom:0;z-index:700;
background:var(--noir);
will-change:transform;
}
.curtain-left{
left:0;width:50%;
transform:translateX(-100%);
transform-origin:left;
}
.curtain-right{
right:0;width:50%;
transform:translateX(100%);
transform-origin:right;
}
/* Centre seam line */
.curtain-left::after{
content:'';
position:absolute;right:0;top:0;bottom:0;
width:1px;
background:linear-gradient(180deg,transparent,var(--accent),transparent);
opacity:0;
}
/* States */
.curtain-left.close{transform:translateX(0);}
.curtain-right.close{transform:translateX(0);}
.curtain-left.close::after{opacity:0.4;}
/* PAGE 0 — MAISON */
#p0{background:var(--noir);color:var(--white);}
.p0-layout{
height:100%;
display:grid;grid-template-columns:1fr 1fr;
}
.p0-left{
padding:60px 80px;
display:flex;flex-direction:column;
justify-content:space-between;
border-right:1px solid var(--mid);
}
.p0-mark{
font-family:'Italiana',serif;
font-size:11px;letter-spacing:0.4em;text-transform:uppercase;
color:var(--dim);
}
.p0-main{
flex:1;display:flex;flex-direction:column;justify-content:flex-end;
padding-bottom:20px;
}
.p0-season{
font-size:8px;letter-spacing:0.4em;text-transform:uppercase;
color:var(--accent);margin-bottom:24px;
display:flex;align-items:center;gap:12px;
}
.p0-season::before{
content:'';width:20px;height:1px;background:var(--accent);
}
.p0-title{
font-family:'Italiana',serif;
font-size:clamp(52px,8vw,112px);
font-weight:400;line-height:0.9;
letter-spacing:-0.02em;
color:var(--white);margin-bottom:24px;
}
.p0-title-fr{
font-size:clamp(24px,3.5vw,48px);
font-style:italic;font-weight:300;
color:rgba(248,244,240,0.35);margin-bottom:40px;
}
.p0-body{
font-size:13px;line-height:1.9;font-weight:300;
color:var(--dim);max-width:380px;font-style:italic;
}
.p0-cta{
margin-top:40px;
display:inline-flex;align-items:center;gap:16px;
font-size:9px;letter-spacing:0.3em;text-transform:uppercase;
color:var(--white);cursor:pointer;background:none;border:none;
font-family:'Didact Gothic',sans-serif;
transition:color .2s;
}
.p0-cta:hover{color:var(--accent);}
.p0-cta-arrow{
width:40px;height:1px;background:currentColor;
transition:width .3s;position:relative;
}
.p0-cta-arrow::after{
content:'';position:absolute;right:-1px;top:-3px;
width:7px;height:7px;
border-right:1px solid currentColor;
border-top:1px solid currentColor;
transform:rotate(45deg);
}
.p0-cta:hover .p0-cta-arrow{width:64px;}
.p0-right{
display:grid;grid-template-rows:1fr 1fr;
padding:60px;
gap:0;
}
/* Abstract fashion illustration using CSS shapes */
.silhouette-area{
display:flex;align-items:center;justify-content:center;
position:relative;
}
.figure{
position:relative;
width:80px;height:200px;
}
.fig-body{
position:absolute;bottom:0;left:50%;transform:translateX(-50%);
width:48px;height:140px;
background:linear-gradient(180deg,rgba(200,160,96,0.2),rgba(200,160,96,0.06));
border:1px solid rgba(200,160,96,0.2);
border-radius:2px 2px 0 0;
}
.fig-head{
position:absolute;bottom:136px;left:50%;transform:translateX(-50%);
width:20px;height:24px;
border-radius:50%;
background:rgba(200,160,96,0.15);
border:1px solid rgba(200,160,96,0.2);
}
.fig-arm{
position:absolute;
height:1px;background:rgba(200,160,96,0.25);
top:72px;
}
.fig-arm-l{width:32px;right:48px;}
.fig-arm-r{width:32px;left:48px;}
.p0-right-bottom{
display:flex;flex-direction:column;justify-content:flex-end;
gap:16px;
}
.p0-detail-row{
display:flex;justify-content:space-between;align-items:baseline;
border-bottom:1px solid var(--mid);
padding:12px 0;
}
.det-key{
font-size:8px;letter-spacing:0.25em;text-transform:uppercase;
color:rgba(248,244,240,0.25);
font-family:'Didact Gothic',sans-serif;
}
.det-val{
font-size:12px;font-style:italic;
color:rgba(248,244,240,0.6);
}
/* PAGE 1 — COLLECTION */
#p1{
background:#0c0c0c;
color:var(--white);
padding:60px 80px;
display:flex;flex-direction:column;
}
.p1-top{
display:flex;align-items:flex-end;justify-content:space-between;
margin-bottom:52px;
padding-bottom:24px;
border-bottom:1px solid var(--mid);
}
.p1-title{
font-family:'Italiana',serif;
font-size:clamp(44px,7vw,100px);
font-weight:400;line-height:0.9;
letter-spacing:-0.02em;
}
.p1-count{
font-size:9px;letter-spacing:0.25em;
color:var(--dim);font-family:'Didact Gothic',sans-serif;
text-transform:uppercase;
}
.look-grid{
display:grid;
grid-template-columns:repeat(5,1fr);
gap:12px;
flex:1;
}
.look{
display:flex;flex-direction:column;gap:12px;
cursor:pointer;
}
.look-img{
flex:1;
border:1px solid rgba(248,244,240,0.06);
position:relative;overflow:hidden;
min-height:200px;
background:linear-gradient(180deg,#111,#0a0a0a);
transition:border-color .3s;
}
.look:hover .look-img{border-color:rgba(200,160,96,0.3);}
/* Abstract garment shape */
.garment{
position:absolute;bottom:0;left:50%;transform:translateX(-50%);
width:60%;
background:rgba(200,160,96,0.08);
border-top:1px solid rgba(200,160,96,0.15);
}
.g1{height:70%;border-radius:2px 2px 0 0;}
.g2{height:85%;clip-path:polygon(20% 0,80% 0,100% 100%,0 100%);}
.g3{height:60%;border-radius:40% 40% 0 0;}
.g4{height:75%;clip-path:polygon(0 0,100% 0,90% 100%,10% 100%);}
.g5{height:90%;clip-path:polygon(30% 0,70% 0,100% 100%,0 100%);}
.look-num{
font-size:8px;letter-spacing:0.2em;
color:var(--accent);font-family:'Didact Gothic',sans-serif;
}
.look-name{
font-family:'Cormorant Garamond',serif;
font-size:13px;font-style:italic;color:rgba(248,244,240,0.7);
}
/* PAGE 2 — ATELIER */
#p2{
background:var(--white);
color:var(--noir);
display:grid;grid-template-columns:1fr 1fr;
}
.p2-left{
padding:80px;
display:flex;flex-direction:column;justify-content:center;
background:#f0ece6;
}
.p2-eyebrow{
font-size:8px;letter-spacing:0.35em;text-transform:uppercase;
color:var(--accent);margin-bottom:28px;
font-family:'Didact Gothic',sans-serif;
}
.p2-title{
font-family:'Italiana',serif;
font-size:clamp(44px,6vw,80px);
font-weight:400;line-height:1.0;
color:var(--noir);letter-spacing:-0.02em;
margin-bottom:28px;
}
.p2-body{
font-size:15px;line-height:1.85;font-weight:300;font-style:italic;
color:rgba(8,8,8,0.5);max-width:400px;margin-bottom:48px;
}
.craft-list{
display:flex;flex-direction:column;gap:0;
}
.craft-row{
display:flex;gap:20px;
padding:18px 0;
border-bottom:1px solid rgba(8,8,8,0.08);
align-items:baseline;
}
.craft-n{
font-size:9px;letter-spacing:0.15em;
color:var(--accent);
font-family:'Didact Gothic',sans-serif;
width:24px;flex-shrink:0;
}
.craft-t{
font-size:14px;font-style:italic;color:rgba(8,8,8,0.6);
}
.p2-right{
padding:80px;
background:var(--white);
display:flex;flex-direction:column;justify-content:center;
border-left:1px solid rgba(8,8,8,0.06);
}
.maison-since{
font-size:9px;letter-spacing:0.35em;text-transform:uppercase;
color:rgba(8,8,8,0.25);margin-bottom:40px;
font-family:'Didact Gothic',sans-serif;
}
.p2-numbers{
display:flex;flex-direction:column;gap:28px;
}
.num-item{
display:flex;align-items:baseline;gap:20px;
padding-bottom:28px;
border-bottom:1px solid rgba(8,8,8,0.06);
}
.num-big{
font-family:'Italiana',serif;
font-size:56px;color:var(--noir);line-height:1;
}
.num-label{
font-size:12px;font-style:italic;color:rgba(8,8,8,0.45);
line-height:1.4;
}
/* PAGE 3 — CONTACT */
#p3{
background:var(--noir);color:var(--white);
display:flex;align-items:center;justify-content:center;
text-align:center;padding:80px;
position:relative;overflow:hidden;
}
.p3-bg-text{
position:absolute;
font-family:'Italiana',serif;
font-size:30vw;color:rgba(248,244,240,0.025);
line-height:1;letter-spacing:-0.06em;
pointer-events:none;
user-select:none;
}
.p3-content{position:relative;max-width:560px;}
.p3-mark{
font-family:'Italiana',serif;
font-size:9px;letter-spacing:0.5em;text-transform:uppercase;
color:var(--dim);margin-bottom:48px;display:block;
}
.p3-title{
font-family:'Italiana',serif;
font-size:clamp(44px,8vw,100px);
font-weight:400;line-height:0.9;
letter-spacing:-0.02em;
color:var(--white);margin-bottom:16px;
}
.p3-sub{
font-size:14px;font-style:italic;
color:var(--dim);margin-bottom:48px;
line-height:1.7;
}
.p3-contact-grid{
display:flex;flex-direction:column;gap:16px;
border-top:1px solid var(--mid);
padding-top:36px;
}
.p3-contact-row{
display:flex;justify-content:space-between;
align-items:baseline;padding:8px 0;
border-bottom:1px solid var(--mid);
}
.p3-contact-key{
font-size:8px;letter-spacing:0.25em;text-transform:uppercase;
color:rgba(248,244,240,0.25);
font-family:'Didact Gothic',sans-serif;
}
.p3-contact-val{
font-size:13px;font-style:italic;
color:rgba(248,244,240,0.65);
}
/* Curtain nav */
.c-nav{
position:fixed;bottom:40px;left:50%;transform:translateX(-50%);
z-index:800;
display:flex;align-items:center;gap:24px;
background:rgba(8,8,8,0.7);
border:1px solid var(--mid);
padding:16px 32px;
backdrop-filter:blur(20px);
}
.c-label{
font-size:8px;letter-spacing:0.3em;text-transform:uppercase;
color:var(--dim);
font-family:'Didact Gothic',sans-serif;
min-width:80px;text-align:center;
}
.c-btn{
width:36px;height:36px;
border:1px solid var(--mid);
background:none;color:var(--dim);
font-size:16px;cursor:pointer;
display:flex;align-items:center;justify-content:center;
transition:border-color .2s,color .2s;
font-family:serif;
}
.c-btn:hover{border-color:var(--accent);color:var(--accent);}
.c-dots{display:flex;gap:8px;}
.c-dot{
width:3px;height:3px;border-radius:50%;
background:rgba(248,244,240,0.2);border:none;cursor:pointer;
transition:background .25s,transform .3s;
}
.c-dot.active{background:var(--accent);transform:scale(1.8);}
@media(max-width:768px){
#p0 .p0-layout{grid-template-columns:1fr;}
.p0-right{display:none;}
.p0-left{padding:40px 28px;}
#p1{padding:40px 24px;}
.look-grid{grid-template-columns:repeat(2,1fr);}
#p2{grid-template-columns:1fr;}
.p2-right{display:none;}
.p2-left{padding:40px 28px;}
#p3{padding:40px 28px;}
}
```
**JS:**
```js
const cLeft=document.getElementById('cLeft');
const cRight=document.getElementById('cRight');
const pages=document.querySelectorAll('.page');
const cdots=document.querySelectorAll('.c-dot');
const cLabel=document.getElementById('cLabel');
const labels=['Maison','Collection','Atelier','Contact'];
let cur=0,busy=false;
const dur=900;
function curtainTransition(prev,next,done){
cLeft.style.transition=`transform ${dur*0.4}ms cubic-bezier(0.76,0,0.24,1)`;
cRight.style.transition=`transform ${dur*0.4}ms cubic-bezier(0.76,0,0.24,1)`;
cLeft.classList.add('close');
cRight.classList.add('close');
setTimeout(()=>{
pages[prev].classList.remove('active');
pages[next].classList.add('active');
cLeft.style.transition=`transform ${dur*0.55}ms cubic-bezier(0.25,1,0.5,1)`;
cRight.style.transition=`transform ${dur*0.55}ms cubic-bezier(0.25,1,0.5,1)`;
cLeft.classList.remove('close');
cRight.classList.remove('close');
setTimeout(()=>{ done&&done(); },dur*0.6);
},dur*0.42);
}
function goTo(n){
if(busy||n===cur)return;
busy=true;
const prev=cur;cur=n;
cdots.forEach((d,i)=>d.classList.toggle('active',i===cur));
cLabel.textContent=labels[cur];
curtainTransition(prev,cur,()=>{busy=false;});
}
document.getElementById('cNext').onclick=()=>goTo(Math.min(3,cur+1));
document.getElementById('cPrev').onclick=()=>goTo(Math.max(0,cur-1));
cdots.forEach(d=>d.addEventListener('click',()=>goTo(+d.dataset.i)));
document.querySelectorAll('[data-next]').forEach(b=>b.addEventListener('click',()=>goTo(+b.dataset.next)));
let wt=0;
window.addEventListener('wheel',e=>{
const now=Date.now();if(now-wt<1100)return;wt=now;
goTo(Math.max(0,Math.min(3,cur+(e.deltaY>0?1:-1))));
},{passive:true});
document.addEventListener('keydown',e=>{
if(e.key==='ArrowRight')goTo(Math.min(3,cur+1));
if(e.key==='ArrowLeft')goTo(Math.max(0,cur-1));
});
```
### 10. ASCII Matrix Rain
**Type:** CSS + JS
**Description:** A Canvas rain of katakana and ASCII floods the screen column by column, glowing at the leading edge, then retracts in a second wave. CRT scanlines throughout. A cybersecurity platform.
**HTML:**
```html
NEXUS-OS v4.2.1 · SECURE SHELL · AUTHENTICATED
root@nexus :~# whoami --extended
NEXUS
Security Intelligence Platform
// System online. All nodes responsive.
✓ Threat monitoring active · 2,847 signatures loaded
✓ Network perimeter intact · 0 active intrusions
⚠ 3 unpatched CVEs detected · action required
// Last audit: 2025-09-14 03:12:47 UTC
root@nexus :~#
./ops_status
./threat_intel
./team --list
// SYSTEM STATUS
CPU 12%
MEM 68%
NET I/O 2.1 Gb/s
UPTIME 847d
THREATS 3
INTRUSION 0
NODES 48/48
KERNEL 6.8.4
Perimeter Watch
Real-time monitoring of 48 network boundary nodes. Zero intrusion events in past 72 hours.
Last event: 2025-09-01 · False positive
Endpoint XDR
Extended detection across 2,400 managed endpoints. Behavioral AI scoring all process trees.
Last quarantine: 2025-09-10 · Ransomware sim
Intel Feed
External threat intelligence ingestion partially degraded — 2 upstream providers offline.
ETA restore: 2025-09-15 09:00 UTC
SIEM
Security event correlation processing 4.2M events/sec. Zero queue backlog. All rules current.
Rules version: 9.4.1 · Updated yesterday
// RECENT LOG ENTRIES
09:14:03 INFO Perimeter scan complete. 0 anomalies detected.
09:11:47 INFO Intel feed sync: 2847 signatures updated.
09:08:22 WARN Feed provider sigma.intel unreachable. Retrying.
09:01:05 INFO Daily key rotation completed. All sessions refreshed.
CVE ID
Description
Severity
CVSS
Status
CVE-2025-4471
Remote code exec in libssl 3.x via malformed cert chain
Critical
9.8
New
CVE-2025-3892
Privilege escalation in Linux kernel via io_uring
High
8.1
Active
CVE-2025-3301
SQL injection in Nginx Plus management API
Medium
6.5
Patch ready
CVE-2025-2984
Zero-day in AMD CPU microcode (speculative exec)
High
7.4
Active
vex
Lead Analyst
Vera Okonkwo
malware RE threat hunting
z0r
Exploit Dev
Kai Ishikawa
kernel asm fuzzing
gh0st
Red Team Lead
Lena Brandt
pentest social eng APT sim
null_ptr
Platform Eng
Marcus Webb
rust eBPF k8s
./nexus_home
./ops_status
./threat_intel
./team --list
00:00:00 UTC
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
--terminal:#020d02;
--green:#00e060;
--green-dim:#006030;
--green-faint:rgba(0,224,96,0.08);
--green-mid:rgba(0,224,96,0.4);
--white:#d0f0d0;
--dim:rgba(208,240,208,0.4);
--red:#ff3050;
}
html,body{height:100%;overflow:hidden;background:var(--terminal);font-family:'JetBrains Mono',monospace;color:var(--white);}
/* CRT scanline effect */
body::after{
content:'';position:fixed;inset:0;z-index:9999;pointer-events:none;
background:repeating-linear-gradient(0deg,transparent,transparent 1px,rgba(0,0,0,0.08) 1px,rgba(0,0,0,0.08) 2px);
}
/* Phosphor glow vignette */
body::before{
content:'';position:fixed;inset:0;z-index:9998;pointer-events:none;
background:radial-gradient(ellipse at center,transparent 60%,rgba(0,0,0,0.4) 100%);
}
/* Pages */
.pages{position:fixed;inset:0;}
.page{position:absolute;inset:0;pointer-events:none;visibility:hidden;}
.page.active{visibility:visible;pointer-events:auto;}
/* Matrix canvas */
#matCanvas{
position:fixed;inset:0;z-index:700;pointer-events:none;
}
/* PAGE 0 — TERMINAL */
#p0{background:var(--terminal);}
.term-frame{
height:100%;
display:flex;flex-direction:column;
padding:32px 48px;
position:relative;
}
.term-topbar{
display:flex;align-items:center;gap:12px;
margin-bottom:32px;
border-bottom:1px solid var(--green-faint);
padding-bottom:20px;
}
.term-dots{display:flex;gap:6px;}
.term-dot{width:10px;height:10px;border-radius:50%;}
.td-red{background:#ff3b3b;}
.td-yellow{background:#ffbb00;}
.td-green{background:#00e060;}
.term-title{
font-size:9px;letter-spacing:0.2em;
color:var(--green-dim);flex:1;text-align:center;
text-transform:uppercase;
}
.term-body{
flex:1;
display:flex;flex-direction:column;
justify-content:center;
max-width:700px;
margin:0 auto;
width:100%;
}
.term-prompt{
font-size:9px;color:var(--green-dim);
margin-bottom:8px;letter-spacing:0.08em;
}
.term-prompt span{color:var(--green);}
.term-hero{
margin-bottom:48px;
}
.term-big{
font-family:'Syne',sans-serif;
font-size:clamp(44px,8vw,96px);
font-weight:800;line-height:0.9;
letter-spacing:-0.04em;
color:var(--green);
text-shadow:0 0 40px rgba(0,224,96,0.3);
margin-bottom:4px;
}
.term-big-dim{
font-family:'Syne',sans-serif;
font-size:clamp(20px,3.5vw,44px);
font-weight:400;line-height:1;
letter-spacing:-0.02em;
color:var(--green-dim);
}
.term-output{
display:flex;flex-direction:column;gap:6px;
margin-bottom:40px;
}
.term-line{
font-size:12px;letter-spacing:0.04em;line-height:1.6;
}
.term-line.c{color:var(--dim);}
.term-line.g{color:var(--green);}
.term-line.r{color:var(--red);}
.term-line.y{color:#ffee00;}
.blink{
display:inline-block;width:8px;height:14px;
background:var(--green);vertical-align:middle;
animation:blink .8s step-end infinite;
}
@keyframes blink{0%,100%{opacity:1;}50%{opacity:0;}}
.term-commands{
display:flex;gap:12px;flex-wrap:wrap;
}
.cmd-btn{
padding:10px 24px;
border:1px solid var(--green-dim);
background:none;color:var(--green-mid);
font-family:'JetBrains Mono',monospace;
font-size:11px;letter-spacing:0.08em;
cursor:pointer;
transition:all .15s;
}
.cmd-btn:hover{
border-color:var(--green);color:var(--green);
background:var(--green-faint);
box-shadow:0 0 12px rgba(0,224,96,0.15);
}
.cmd-btn.primary{
background:var(--green);color:var(--terminal);
font-weight:700;border-color:var(--green);
}
.cmd-btn.primary:hover{
background:#00ff70;
box-shadow:0 0 20px rgba(0,224,96,0.4);
}
/* System info sidebar */
.term-side{
position:absolute;right:48px;top:50%;transform:translateY(-50%);
width:220px;
border:1px solid var(--green-faint);
padding:20px;
background:rgba(0,224,96,0.02);
}
.side-label{
font-size:8px;letter-spacing:0.25em;text-transform:uppercase;
color:var(--green-dim);margin-bottom:16px;
border-bottom:1px solid var(--green-faint);
padding-bottom:10px;
}
.side-row{
display:flex;justify-content:space-between;
font-size:10px;padding:6px 0;
border-bottom:1px solid rgba(0,224,96,0.04);
}
.side-k{color:var(--green-dim);}
.side-v{color:var(--green);}
.side-v.ok{color:#00e060;}
.side-v.warn{color:#ffee00;}
.side-v.crit{color:var(--red);animation:blink .5s step-end infinite;}
/* PAGE 1 — OPERATIONS */
#p1{
background:#010a01;
padding:48px;
overflow-y:auto;
}
.p1-header{
display:flex;align-items:baseline;gap:24px;
margin-bottom:40px;
border-bottom:1px solid var(--green-faint);
padding-bottom:20px;
}
.p1-title{
font-family:'Syne',sans-serif;
font-size:clamp(32px,5vw,64px);
font-weight:800;letter-spacing:-0.04em;
color:var(--green);line-height:1;
}
.p1-uptime{
font-size:9px;letter-spacing:0.2em;
color:var(--green-dim);
}
.ops-grid{
display:grid;grid-template-columns:repeat(2,1fr);
gap:2px;
margin-bottom:32px;
}
.op-card{
border:1px solid var(--green-faint);
padding:24px;
background:rgba(0,224,96,0.015);
transition:border-color .2s,background .2s;
cursor:pointer;
}
.op-card:hover{
border-color:var(--green-dim);
background:rgba(0,224,96,0.03);
}
.op-status{
display:flex;align-items:center;gap:8px;
margin-bottom:16px;
}
.op-dot{
width:6px;height:6px;border-radius:50%;
}
.dot-ok{background:var(--green);box-shadow:0 0 6px var(--green);}
.dot-warn{background:#ffee00;box-shadow:0 0 6px #ffee00;}
.dot-crit{background:var(--red);box-shadow:0 0 6px var(--red);animation:blink .5s step-end infinite;}
.op-status-text{
font-size:8px;letter-spacing:0.2em;text-transform:uppercase;color:var(--green-dim);
}
.op-name{
font-family:'Syne',sans-serif;
font-size:20px;font-weight:700;color:var(--white);
letter-spacing:-0.02em;margin-bottom:8px;
}
.op-desc{
font-size:10px;line-height:1.7;color:var(--dim);
letter-spacing:0.02em;margin-bottom:16px;
}
.op-meta{
font-size:9px;color:var(--green-dim);letter-spacing:0.08em;
font-style:italic;
}
.log-feed{
border:1px solid var(--green-faint);
padding:16px 20px;
background:rgba(0,224,96,0.01);
max-height:200px;overflow-y:auto;
}
.log-title{font-size:8px;letter-spacing:0.2em;text-transform:uppercase;color:var(--green-dim);margin-bottom:12px;}
.log-entry{font-size:9px;line-height:1.8;letter-spacing:0.04em;}
.log-time{color:var(--green-dim);}
.log-msg{color:var(--dim);}
.log-ok{color:var(--green);}
.log-err{color:var(--red);}
/* PAGE 2 — THREAT INTEL */
#p2{
background:#010802;
padding:48px;
overflow-y:auto;
}
.p2-header{
display:flex;justify-content:space-between;align-items:flex-end;
margin-bottom:40px;
padding-bottom:20px;
border-bottom:1px solid var(--green-faint);
}
.p2-title{
font-family:'Syne',sans-serif;
font-size:clamp(32px,5vw,64px);
font-weight:800;letter-spacing:-0.04em;
color:var(--red);line-height:1;
}
.threat-level{
display:flex;align-items:center;gap:8px;
padding:8px 20px;
border:1px solid rgba(255,48,80,0.4);
background:rgba(255,48,80,0.05);
font-size:9px;letter-spacing:0.2em;text-transform:uppercase;
color:var(--red);
}
.threat-table{
display:flex;flex-direction:column;gap:2px;
margin-bottom:28px;
}
.threat-row{
display:grid;
grid-template-columns:140px 1fr 100px 80px 80px;
border:1px solid var(--green-faint);
font-size:10px;letter-spacing:0.04em;
}
.threat-row.head{
border-color:rgba(0,224,96,0.12);
font-size:8px;letter-spacing:0.2em;text-transform:uppercase;
}
.th-cell{
padding:14px 16px;
border-right:1px solid var(--green-faint);
display:flex;align-items:center;
}
.th-cell:last-child{border-right:none;}
.sev{
padding:3px 10px;font-size:8px;letter-spacing:0.12em;text-transform:uppercase;
font-weight:700;
}
.sev-crit{background:rgba(255,48,80,0.15);color:var(--red);}
.sev-high{background:rgba(255,160,0,0.12);color:#ffa000;}
.sev-med{background:rgba(255,238,0,0.08);color:#ffee00;}
.stat-badge{
padding:2px 10px;font-size:8px;letter-spacing:0.1em;
}
.badge-new{border:1px solid var(--red);color:var(--red);}
.badge-active{border:1px solid #ffa000;color:#ffa000;}
.badge-patch{border:1px solid var(--green-dim);color:var(--green-dim);}
/* PAGE 3 — TEAM */
#p3{
background:var(--terminal);
padding:48px;
display:flex;flex-direction:column;
}
.p3-header{
display:flex;align-items:baseline;gap:20px;
margin-bottom:48px;border-bottom:1px solid var(--green-faint);
padding-bottom:20px;
}
.p3-title{
font-family:'Syne',sans-serif;
font-size:clamp(36px,6vw,72px);
font-weight:800;letter-spacing:-0.04em;
color:var(--green);line-height:1;
}
.team-grid{
display:grid;grid-template-columns:repeat(4,1fr);gap:2px;
flex:1;align-content:start;
}
.team-card{
border:1px solid var(--green-faint);
padding:24px;
position:relative;
overflow:hidden;
transition:border-color .2s,background .2s;
}
.team-card:hover{
border-color:var(--green-dim);
background:rgba(0,224,96,0.02);
}
.tc-handle{
font-size:10px;letter-spacing:0.12em;
color:var(--green);margin-bottom:12px;
display:flex;align-items:center;gap:6px;
}
.tc-handle::before{content:'@';color:var(--green-dim);}
.tc-role{
font-size:9px;letter-spacing:0.15em;text-transform:uppercase;
color:var(--green-dim);margin-bottom:8px;
}
.tc-name{
font-family:'Syne',sans-serif;
font-size:15px;font-weight:700;
color:var(--white);margin-bottom:16px;
}
.tc-skills{
display:flex;flex-wrap:wrap;gap:6px;
}
.skill-tag{
font-size:8px;letter-spacing:0.1em;
border:1px solid var(--green-faint);
color:var(--green-dim);padding:2px 8px;
}
/* Nav */
.term-nav{
position:fixed;bottom:0;left:0;right:0;z-index:800;
background:rgba(1,10,1,0.95);
border-top:1px solid var(--green-faint);
display:flex;align-items:center;
padding:12px 48px;
gap:0;
backdrop-filter:blur(20px);
}
.tnav-item{
flex:1;padding:8px 16px;
font-size:9px;letter-spacing:0.15em;text-transform:uppercase;
color:var(--green-dim);background:none;border:none;
cursor:pointer;font-family:'JetBrains Mono',monospace;
position:relative;
transition:color .2s;
text-align:left;
}
.tnav-item::before{
content:attr(data-cmd);
position:absolute;left:0;top:0;bottom:0;
display:flex;align-items:center;padding-left:16px;
color:rgba(0,224,96,0.2);
font-size:8px;
pointer-events:none;
transition:opacity .2s;
}
.tnav-item:hover{color:var(--green);}
.tnav-item.active{color:var(--green);}
.tnav-item.active::after{
content:'';position:absolute;top:0;left:0;right:0;height:1px;
background:var(--green);
box-shadow:0 0 8px var(--green);
}
.term-clock{
font-size:9px;letter-spacing:0.15em;color:var(--green-dim);
margin-left:auto;
}
```
**JS:**
```js
const matCanvas=document.getElementById('matCanvas');
const matCtx=matCanvas.getContext('2d');
const pages=document.querySelectorAll('.page');
const navItems=document.querySelectorAll('.tnav-item');
let cur=0,busy=false;
function resize(){matCanvas.width=window.innerWidth;matCanvas.height=window.innerHeight;}
resize();window.addEventListener('resize',resize);
// Matrix characters — katakana + ASCII
const CHARS='アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*<>/\\|{}[]';
function matrixTransition(color,midCallback,done){
const W=matCanvas.width,H=matCanvas.height;
const fontSize=14;
const cols=Math.ceil(W/fontSize);
const rows=Math.ceil(H/fontSize);
const dropPos=Array.from({length:cols},()=>-Math.floor(Math.random()*rows*0.8));
const speed=Array.from({length:cols},()=>Math.random()*1.5+0.8);
let midDone=false;
let phase=0;
function frame(){
matCtx.clearRect(0,0,W,H);
matCtx.fillStyle='rgba(2,13,2,0.15)';
matCtx.fillRect(0,0,W,H);
let allCovered=true;
for(let c=0;cd>=rows)){
matCtx.clearRect(0,0,W,H);
done&&done();
} else {
requestAnimationFrame(frame);
}
}
requestAnimationFrame(frame);
}
function goTo(n){
if(busy||n===cur)return;
busy=true;
const prev=cur;cur=n;
navItems.forEach((it,i)=>it.classList.toggle('active',i===cur));
matrixTransition('#020d02',
()=>{
pages[prev].classList.remove('active');
pages[cur].classList.add('active');
},
()=>{busy=false;}
);
}
navItems.forEach(it=>it.addEventListener('click',()=>goTo(+it.dataset.i)));
document.querySelectorAll('[data-next]').forEach(b=>b.addEventListener('click',()=>goTo(+b.dataset.next)));
let wt=0;
window.addEventListener('wheel',e=>{
const now=Date.now();if(now-wt<1500)return;wt=now;
goTo(Math.max(0,Math.min(3,cur+(e.deltaY>0?1:-1))));
},{passive:true});
document.addEventListener('keydown',e=>{
if(e.key==='ArrowRight')goTo(Math.min(3,cur+1));
if(e.key==='ArrowLeft')goTo(Math.max(0,cur-1));
});
// Clock
(function tick(){
const now=new Date();
const t=now.toUTCString().split(' ').slice(-2)[0];
document.getElementById('termClock').textContent=t+' UTC';
setTimeout(tick,1000);
})();
```
### 11. Paint Brush Stroke
**Type:** CSS + JS
**Description:** A wide organic bezier brushstroke sweeps across the viewport — overlapping waves with ink texture and rough-edge noise. The accent colour shifts per page. A contemporary art gallery.
**HTML:**
```html
Volta — Contemporary Art
Current Exhibition
Surface /Pressure
New works by Noa Svensson. Painting as excavation — as the removal of what was always already there.
See all exhibitions
Surface / Pressure No. 7
Oil on linen · 240 × 180 cm
Exhibitions
Current + Upcoming
01
Surface / Pressure
Noa Svensson
12 Sep — 18 Nov 2025
Now On
02
Weight of Light
Tomás Erdős
28 Nov — 14 Feb 2026
Upcoming
03
22 Feb — 10 May 2026
Upcoming
04
1 Jun — 30 Aug 2025
Closed
05
After the Voice
Priya Krishnaswamy
15 Mar — 28 May 2025
Closed
Featured Artist
NoaSvensson
b. 1982 · Stockholm · Lives and works in Berlin and Oslo
Svensson's paintings begin with dense, opaque surfaces which she systematically removes — scraping, sanding, and dissolving layers until something she cannot account for emerges. She considers the work finished when she no longer recognises her own intentions in it.
Selected Works
2025
Surface / Pressure No. 7
Oil on linen · 240 × 180 cm
2024
Still Counting
Mixed media on panel · 120 × 90 cm
2023
The Weight of It
Oil, sand, wax on canvas · 300 × 200 cm
2022
Revision (IV)
Graphite, oil on board · 80 × 60 cm
2021
Groundlessness
Oil on aluminium · 200 × 160 cm
VOLTA
COME SEE ART
We don't believe art needs to be explained before it can be felt. Come with an open hour and no particular expectations.
Location
Torstraße 88, Berlin
Contact
hello@volta.gallery
Home
Exhibitions
Artist
Visit
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
--white:#fafaf8;
--off:#f0eeea;
--ink:#0a0a0a;
--dim:rgba(10,10,10,0.35);
--faint:rgba(10,10,10,0.06);
--accent:#e84030;
}
html,body{height:100%;overflow:hidden;background:var(--white);font-family:'Hanken Grotesk',sans-serif;color:var(--ink);}
/* Pages */
.pages{position:fixed;inset:0;}
.page{position:absolute;inset:0;visibility:hidden;pointer-events:none;}
.page.active{visibility:visible;pointer-events:auto;}
/* Stroke canvas */
#strokeCanvas{
position:fixed;inset:0;z-index:700;pointer-events:none;
}
/* PAGE 0 — GALLERY HOME */
#p0{
background:var(--white);
display:grid;grid-template-columns:1fr 1fr;
}
.p0-left{
padding:64px;
display:flex;flex-direction:column;
justify-content:space-between;
border-right:1px solid var(--faint);
}
.gallery-wordmark{
font-size:10px;font-weight:900;letter-spacing:0.08em;
text-transform:uppercase;color:var(--ink);
}
.p0-hero{
display:flex;flex-direction:column;
}
.exhibition-tag{
font-size:9px;letter-spacing:0.3em;text-transform:uppercase;
color:var(--dim);margin-bottom:20px;
display:flex;align-items:center;gap:12px;
}
.exhibition-tag::before{
content:'';width:20px;height:2px;background:var(--accent);
flex-shrink:0;
}
.p0-title{
font-size:clamp(48px,7.5vw,100px);
font-weight:900;line-height:0.9;
letter-spacing:-0.05em;color:var(--ink);
margin-bottom:20px;
}
.p0-title .accent{color:var(--accent);}
.p0-sub{
font-size:15px;line-height:1.7;font-weight:200;font-style:italic;
color:var(--dim);max-width:360px;
margin-bottom:40px;
}
.stroke-btn{
display:inline-flex;align-items:center;gap:12px;
background:var(--ink);color:var(--white);
padding:16px 36px;border:none;
font-family:'Hanken Grotesk',sans-serif;
font-size:11px;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;
cursor:pointer;width:fit-content;
position:relative;overflow:hidden;
transition:transform .15s;
}
.stroke-btn:hover{transform:translateY(-2px);}
.stroke-btn::before{
content:'';position:absolute;inset:0;
background:var(--accent);
transform:scaleX(0);transform-origin:left;
transition:transform .3s cubic-bezier(0.76,0,0.24,1);
}
.stroke-btn:hover::before{transform:scaleX(1);}
.stroke-btn span{position:relative;z-index:1;}
.p0-footer-info{
display:flex;align-items:center;gap:16px;
}
.on-view-badge{
font-size:8px;letter-spacing:0.2em;text-transform:uppercase;
background:var(--accent);color:var(--white);
padding:4px 12px;font-weight:700;
}
.p0-dates{
font-size:10px;letter-spacing:0.06em;color:var(--dim);
font-style:italic;
}
.p0-right{
position:relative;overflow:hidden;
background:var(--off);
display:flex;align-items:center;justify-content:center;
}
/* Abstract painting: rect compositions */
.painting{
position:absolute;inset:0;
display:grid;
grid-template-rows:60% 40%;
gap:2px;
padding:2px;
}
.paint-top{
background:linear-gradient(135deg,#1a1a2e,#0d0d1a);
position:relative;overflow:hidden;
}
.paint-bottom{
display:grid;grid-template-columns:60% 40%;gap:2px;
}
.paint-bl{background:var(--accent);}
.paint-br{background:var(--off);}
/* White shape overlay */
.paint-shape{
position:absolute;
width:180px;height:180px;
border-radius:50% 10% 50% 10%;
background:rgba(255,255,255,0.07);
top:30%;left:20%;
}
.paint-shape2{
position:absolute;
width:80px;height:120px;
background:rgba(255,255,255,0.04);
bottom:10%;right:15%;
border-radius:50% 50% 0 0;
}
.painting-caption{
position:absolute;bottom:20px;left:24px;right:24px;
display:flex;justify-content:space-between;align-items:flex-end;
z-index:2;
}
.cap-title{
font-size:12px;font-style:italic;font-weight:200;color:rgba(255,255,255,0.5);
}
.cap-dim{font-size:9px;letter-spacing:0.12em;color:rgba(255,255,255,0.25);}
/* PAGE 1 — EXHIBITIONS */
#p1{
background:var(--white);
padding:64px;
overflow-y:auto;
display:flex;flex-direction:column;
}
.p1-top{
display:flex;justify-content:space-between;align-items:flex-end;
margin-bottom:52px;
padding-bottom:24px;
border-bottom:2px solid var(--ink);
}
.p1-title{
font-size:clamp(48px,8vw,100px);
font-weight:900;letter-spacing:-0.05em;line-height:0.9;
color:var(--ink);
}
.p1-count{
font-size:9px;letter-spacing:0.25em;text-transform:uppercase;
color:var(--dim);font-weight:300;
padding-bottom:8px;
}
.exh-list{display:flex;flex-direction:column;gap:0;}
.exh-row{
display:grid;
grid-template-columns:80px 1fr 200px 120px;
border-bottom:1px solid var(--faint);
transition:background .15s;
cursor:pointer;
}
.exh-row:hover{background:rgba(10,10,10,0.02);}
.exh-cell{
padding:24px 20px;
border-right:1px solid var(--faint);
display:flex;align-items:center;
}
.exh-cell:last-child{border-right:none;}
.exh-num{
font-size:9px;color:var(--dim);
letter-spacing:0.1em;font-weight:300;
}
.exh-title{
font-size:16px;font-weight:700;letter-spacing:-0.02em;
color:var(--ink);
}
.exh-artist{
font-size:11px;font-weight:200;font-style:italic;
color:var(--dim);margin-top:4px;
}
.exh-dates{
font-size:10px;font-weight:300;font-style:italic;color:var(--dim);
letter-spacing:0.04em;
}
.exh-status{
font-size:8px;letter-spacing:0.15em;text-transform:uppercase;
padding:4px 12px;font-weight:700;
}
.status-now{background:var(--accent);color:var(--white);}
.status-up{background:var(--ink);color:var(--white);}
.status-past{color:var(--dim);border:1px solid var(--faint);}
/* PAGE 2 — ARTIST */
#p2{
background:var(--ink);
color:var(--white);
display:grid;grid-template-columns:1fr 480px;
}
.p2-main{
padding:64px;
display:flex;flex-direction:column;justify-content:space-between;
border-right:1px solid rgba(255,255,255,0.05);
}
.p2-eyebrow{
font-size:9px;letter-spacing:0.3em;text-transform:uppercase;
color:rgba(255,255,255,0.3);margin-bottom:28px;
}
.p2-artist-name{
font-size:clamp(48px,7vw,96px);
font-weight:900;line-height:0.9;
letter-spacing:-0.04em;
color:var(--white);
margin-bottom:20px;
}
.p2-artist-name .line2{
display:block;
color:var(--accent);
}
.p2-born{
font-size:11px;font-style:italic;
color:rgba(255,255,255,0.3);margin-bottom:40px;
letter-spacing:0.06em;
}
.p2-bio{
font-size:14px;line-height:1.85;font-weight:200;
color:rgba(255,255,255,0.55);
max-width:480px;font-style:italic;
}
.p2-stats{
display:flex;gap:40px;
padding-top:32px;
border-top:1px solid rgba(255,255,255,0.06);
}
.p2-stat{display:flex;flex-direction:column;gap:6px;}
.p2-stat-num{
font-size:36px;font-weight:900;letter-spacing:-0.04em;
color:var(--white);
}
.p2-stat-label{
font-size:9px;letter-spacing:0.2em;text-transform:uppercase;
color:rgba(255,255,255,0.25);font-weight:300;
}
.p2-right{
padding:64px 56px;
background:#111;
display:flex;flex-direction:column;
gap:0;overflow-y:auto;
}
.p2-works-label{
font-size:8px;letter-spacing:0.3em;text-transform:uppercase;
color:rgba(255,255,255,0.2);margin-bottom:28px;
}
.work-item{
padding:20px 0;
border-bottom:1px solid rgba(255,255,255,0.05);
display:flex;flex-direction:column;gap:6px;
cursor:pointer;
transition:opacity .2s;
}
.work-item:hover{opacity:0.7;}
.work-year{font-size:9px;letter-spacing:0.15em;color:var(--accent);font-weight:700;}
.work-title{font-size:14px;font-style:italic;color:rgba(255,255,255,0.75);}
.work-medium{font-size:10px;letter-spacing:0.06em;color:rgba(255,255,255,0.3);font-weight:200;}
/* PAGE 3 — VISIT */
#p3{
background:var(--accent);
color:var(--white);
display:flex;align-items:flex-end;
padding:64px;
position:relative;overflow:hidden;
}
.p3-bg-text{
position:absolute;
font-size:25vw;font-weight:900;
color:rgba(0,0,0,0.08);
line-height:1;letter-spacing:-0.06em;
top:50%;left:50%;transform:translate(-45%,-55%);
text-transform:uppercase;
pointer-events:none;user-select:none;
}
.p3-content{
position:relative;z-index:1;
display:grid;grid-template-columns:1fr 1fr;
gap:80px;width:100%;
}
.p3-left{
display:flex;flex-direction:column;justify-content:flex-end;
}
.p3-big{
font-size:clamp(48px,9vw,120px);
font-weight:900;line-height:0.9;
letter-spacing:-0.05em;
color:var(--white);margin-bottom:24px;
}
.p3-tagline{
font-size:14px;line-height:1.7;font-weight:200;font-style:italic;
color:rgba(255,255,255,0.7);
max-width:400px;
}
.p3-right{
display:flex;flex-direction:column;gap:0;
justify-content:flex-end;
}
.visit-row{
display:flex;justify-content:space-between;align-items:baseline;
padding:16px 0;
border-bottom:1px solid rgba(255,255,255,0.15);
}
.visit-key{
font-size:9px;letter-spacing:0.2em;text-transform:uppercase;
font-weight:700;color:rgba(255,255,255,0.6);
}
.visit-val{
font-size:13px;font-style:italic;color:var(--white);font-weight:300;
}
/* Stroke nav */
.stroke-nav{
position:fixed;top:40px;right:48px;z-index:800;
display:flex;flex-direction:column;gap:4px;
align-items:flex-end;
}
.stroke-nav-item{
display:flex;align-items:center;gap:10px;
background:none;border:none;cursor:pointer;
padding:6px 0;
font-family:'Hanken Grotesk',sans-serif;
font-size:8px;letter-spacing:0.2em;text-transform:uppercase;
color:rgba(10,10,10,0.2);
transition:color .2s;
}
.stroke-nav-item:hover{color:rgba(10,10,10,0.5);}
.stroke-nav-item.active{color:var(--ink);}
.nav-stroke-line{
width:20px;height:2px;
background:currentColor;
transition:width .35s cubic-bezier(0.4,0,0.2,1);
}
.stroke-nav-item.active .nav-stroke-line{width:40px;}
.stroke-nav-item:hover .nav-stroke-line{width:32px;}
@media(max-width:768px){
#p0,#p2{grid-template-columns:1fr;}
.p0-right,.p2-right{display:none;}
.p0-left,.p2-main{padding:40px 28px;}
#p1{padding:40px 28px;}
.exh-row{grid-template-columns:1fr 100px;}
.exh-num,.exh-dates{display:none;}
#p3{padding:40px 28px;}
.p3-content{grid-template-columns:1fr;gap:32px;}
.stroke-nav{top:auto;right:20px;bottom:20px;}
}
```
**JS:**
```js
const canvas=document.getElementById('strokeCanvas');
const ctx=canvas.getContext('2d');
const pages=document.querySelectorAll('.page');
const navItems=document.querySelectorAll('.stroke-nav-item');
const nav=document.getElementById('strokeNav');
let cur=0,busy=false;
function resize(){canvas.width=window.innerWidth;canvas.height=window.innerHeight;}
resize();window.addEventListener('resize',resize);
function buildStrokePath(ctx,W,H,progress){
const midY=H*0.5;
const variance=H*0.18;
ctx.beginPath();
const waves=5;
for(let w=0;w=0;w--){
const yOff=(w/(waves-1)-0.5)*variance*2;
const cp1x=W*0.65,cp1y=midY-yOff+variance*0.3;
const cp2x=W*0.25,cp2y=midY+yOff-variance*0.2;
ctx.bezierCurveTo(
Math.min(W*progress,W+20)+20,midY+yOff*0.5+variance*0.1,
cp1x,cp1y,
cp2x,cp2y
);
}
ctx.closePath();
}
const strokeColors=['#0a0a0a','#0a0a0a','#fafaf8','#e84030'];
function strokeTransition(color,mid,done){
let progress=0;
const dur=50;
const W=canvas.width,H=canvas.height;
let midDone=false;
function draw(){
ctx.clearRect(0,0,W,H);
const p=progress/dur;
const ep=p<0.5?2*p*p:1-Math.pow(-2*p+2,2)/2;
ctx.save();
buildStrokePath(ctx,W,H,ep*1.05);
const g=ctx.createLinearGradient(0,H*0.3,0,H*0.7);
g.addColorStop(0,color);
g.addColorStop(0.3,color);
g.addColorStop(0.7,color);
g.addColorStop(1,color);
ctx.fillStyle=g;
ctx.fill();
ctx.globalCompositeOperation='destination-out';
for(let i=0;i<8;i++){
const noiseY=H*0.5+(Math.sin(i*2.7+progress*0.1)*H*0.08);
const noiseX=Math.random()*W*ep;
const r=Math.random()*30+10;
ctx.beginPath();
ctx.arc(noiseX,noiseY,r,0,Math.PI*2);
ctx.fillStyle='rgba(0,0,0,0.06)';
ctx.fill();
}
ctx.globalCompositeOperation='source-over';
ctx.restore();
if(ep>0.48&&!midDone){midDone=true;mid&&mid();}
progress++;
if(progress<=dur){
requestAnimationFrame(draw);
}else{
let alpha=1;
function fadeOut(){
ctx.clearRect(0,0,W,H);
ctx.save();
buildStrokePath(ctx,W,H,1.05);
ctx.fillStyle=color;
ctx.globalAlpha=alpha;
ctx.fill();
ctx.globalAlpha=1;
ctx.restore();
alpha-=0.12;
if(alpha>0) requestAnimationFrame(fadeOut);
else{ctx.clearRect(0,0,W,H);done&&done();}
}
requestAnimationFrame(fadeOut);
}
}
requestAnimationFrame(draw);
}
function goTo(n){
if(busy||n===cur)return;
busy=true;
const prev=cur;cur=n;
navItems.forEach((it,i)=>it.classList.toggle('active',i===cur));
nav.style.color=cur===2?'white':'';
strokeTransition(strokeColors[cur],
()=>{
pages[prev].classList.remove('active');
pages[cur].classList.add('active');
},
()=>{busy=false;}
);
}
navItems.forEach(it=>it.addEventListener('click',()=>goTo(+it.dataset.i)));
document.querySelectorAll('[data-next]').forEach(b=>b.addEventListener('click',()=>goTo(+b.dataset.next)));
let wt=0;
window.addEventListener('wheel',e=>{
const now=Date.now();if(now-wt<1200)return;wt=now;
goTo(Math.max(0,Math.min(3,cur+(e.deltaY>0?1:-1))));
},{passive:true});
document.addEventListener('keydown',e=>{
if(e.key==='ArrowRight')goTo(Math.min(3,cur+1));
if(e.key==='ArrowLeft')goTo(Math.max(0,cur-1));
});
```
---
## 10 CSS Parallax Effects
URL: https://codefronts.com/motion/css-parallax-designs/
Description: 10 hand-coded CSS parallax effects covering the patterns search demand actually targets — multi-layer scroll hero, cinematic SVG landscape with 5 depth layers, sticky scroll sections (Stripe / Linear marketing pattern), multi-scene sticky-pinned parallax journey, asymmetric image grid parallax, sticky horizontal-scroll panels driven by vertical scroll, text overlay texture, mouse-position 3D card tilt, zoom-in depth illusion, and backdrop-filter blur cross-fade transition. All 10 use requestAnimationFrame-throttled scroll/mouse listeners for the parallax math. Every demo respects prefers-reduced-motion, scoped class names, MIT-licensed.
Demo count: 10
### 01. CSS Parallax Hero Section
**Type:** CSS + JS
**Description:** A luxury editorial hero built on five parallax layers — gradient bg, perspective grid, amber orbs, diagonal geometry SVG, and floating headline — each drifting at its own cadence. Bebas Neue display at 13rem collapses to 5rem on mobile. Below-fold image container with counter-scroll inner, animated gold marquee band. Gold/rust/charcoal palette on #0a0a0f ink.
**HTML:**
```html
Est. 2024 · Design Studio
WHERE FORMMEETS FUNCTION
Crafting digital experiences that leave a lasting impression.
We build at the intersection of art, technology, and human desire.
View Our Work
Get in Touch
Precision in Every Pixel
We approach design as a discipline of reduction — stripping away everything that isn't essential until only the pure signal remains.
Every interaction is intentional. Every animation has a reason. Every color earns its place.
120+ Projects
8yr Experience
14 Awards
DESIGN · DEVELOP · DELIVER · DESIGN · DEVELOP · DELIVER ·
DESIGN · DEVELOP · DELIVER · DESIGN · DEVELOP · DELIVER ·
We Build What Others Only Imagine
```
**CSS:**
```css
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.plx-01 {
--ink: #0a0a0f;
--cream: #f5f0e8;
--gold: #c8a95a;
--rust: #b84c2a;
font-family: 'Inter', sans-serif;
background: var(--ink);
color: var(--cream);
overflow-x: hidden;
}
/* ── Hero ── */
.plx-01__hero {
position: relative;
height: 100vh;
min-height: 600px;
overflow: hidden;
display: flex;
/* align-items: safe center — center the content when there's
enough room, but fall back to flex-start when content would
overflow. Without the safe keyword, flex centers content
even when it overflows the container, which COMBINED with
overflow:hidden above causes the top + bottom of the
content to be clipped equally (the user reported "top and
bottom of the view cut"). The safe keyword is the modern
fix — Chrome 93+, Safari 16+, Firefox 63+. justify-content
stays plain center since horizontal alignment never overflows
in this layout. */
align-items: safe center;
justify-content: center;
padding: 24px 0;
}
.plx-01__bg-layer {
position: absolute;
inset: -30%;
background:
radial-gradient(ellipse 80% 60% at 60% 40%, rgba(200,169,90,0.18) 0%, transparent 60%),
radial-gradient(ellipse 40% 40% at 20% 70%, rgba(184,76,42,0.22) 0%, transparent 55%),
linear-gradient(160deg, #0d0b18 0%, #1a0f0a 50%, #0a0d1a 100%);
will-change: transform;
transform: translateY(0px);
}
/* Grain texture overlay */
.plx-01__grain {
position: absolute;
inset: 0;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
background-size: 200px 200px;
opacity: 0.5;
pointer-events: none;
}
/* Geometric lines */
.plx-01__lines {
position: absolute;
inset: 0;
will-change: transform;
transform: translateY(0px);
}
.plx-01__lines svg {
width: 100%; height: 100%;
opacity: 0.12;
}
/* Floating orbs */
.plx-01__orb {
position: absolute;
border-radius: 50%;
filter: blur(60px);
will-change: transform;
transform: translateY(0px);
}
.plx-01__orb--a {
width: 420px; height: 420px;
background: radial-gradient(circle, rgba(200,169,90,0.4) 0%, transparent 70%);
top: -10%; right: -5%;
}
.plx-01__orb--b {
width: 300px; height: 300px;
background: radial-gradient(circle, rgba(184,76,42,0.35) 0%, transparent 70%);
bottom: -5%; left: 5%;
}
/* Content — scrolls at normal speed */
.plx-01__content {
position: relative;
z-index: 10;
text-align: center;
padding: 0 24px;
max-width: 900px;
}
.plx-01__eyebrow {
display: inline-block;
font-size: 11px;
letter-spacing: 0.35em;
text-transform: uppercase;
color: var(--gold);
border: 1px solid rgba(200,169,90,0.4);
padding: 6px 18px;
margin-bottom: 36px;
border-radius: 2px;
}
.plx-01__headline {
font-family: 'Bebas Neue', sans-serif;
/* Sizing math (derived empirically, measured in browser):
The headline has 4 forced stacked lines + line-height 0.88,
so its block height = font_size × 0.88 × 4 = font_size × 3.52.
Other content + margins in the hero (eyebrow + sub + cta +
padding + scroll-indicator clearance) measured to ~360px.
For everything to fit in 100vh without clipping, headline block
needs to be ≤ (100vh - 360px), so font_size ≤ (100vh - 360px) / 3.52.
This calc-driven ceiling means the headline scales naturally
with available viewport height: ~205px at desktop 1080px viewport
(clamps to 180px ceiling from the design intent), ~83px in the
playground iframe at 651px height (vs the previous 97px that
overflowed the bottom CTAs), 56px floor on short mobile.
14vw secondary constraint stops the headline being too wide on
very wide-but-short viewports. Floor 56px handles 360px-wide
phones. Ceiling 180px = 13rem from the demo desc. */
font-size: clamp(56px, min(14vw, calc((100vh - 380px) / 3.52)), 180px);
line-height: 0.88;
letter-spacing: -0.01em;
color: var(--cream);
will-change: transform;
transform: translateY(0px);
}
.plx-01__headline em {
font-style: normal;
display: block;
background: linear-gradient(135deg, var(--gold) 0%, var(--rust) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.plx-01__sub {
margin-top: 32px;
font-size: 16px;
font-weight: 300;
line-height: 1.7;
color: rgba(245,240,232,0.6);
max-width: 500px;
margin-left: auto;
margin-right: auto;
will-change: transform;
transform: translateY(0px);
}
.plx-01__cta {
margin-top: 48px;
display: inline-flex;
gap: 16px;
flex-wrap: wrap;
justify-content: center;
}
.plx-01__btn {
padding: 14px 36px;
font-size: 13px;
letter-spacing: 0.15em;
text-transform: uppercase;
border: none;
cursor: pointer;
font-family: 'Inter', sans-serif;
font-weight: 600;
transition: transform 0.2s, box-shadow 0.2s;
}
.plx-01__btn--primary {
background: linear-gradient(135deg, var(--gold), var(--rust));
color: var(--ink);
}
.plx-01__btn--secondary {
background: transparent;
color: var(--cream);
border: 1px solid rgba(245,240,232,0.3);
}
.plx-01__btn:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(200,169,90,0.25); }
/* Scroll indicator — original design: absolute-positioned at
the hero's bottom-center, sits at the bottom edge of the
100vh hero regardless of content height. Visible whenever
content doesn't extend into the bottom 80px (which the new
headline clamp prevents thanks to the 22vh component). */
.plx-01__scroll {
position: absolute;
bottom: 40px;
left: 50%;
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
opacity: 0.5;
z-index: 10;
pointer-events: none;
}
.plx-01__scroll span {
font-size: 10px;
letter-spacing: 0.2em;
text-transform: uppercase;
}
.plx-01__scroll-line {
width: 1px;
height: 48px;
background: linear-gradient(to bottom, var(--gold), transparent);
animation: plx-01-scroll-pulse 2s ease-in-out infinite;
}
@keyframes plx-01-scroll-pulse {
0%, 100% { opacity: 0.3; transform: scaleY(1); }
50% { opacity: 1; transform: scaleY(0.6); }
}
/* ── Content sections below hero ── */
.plx-01__section {
position: relative;
padding: 120px 40px;
max-width: 1100px;
margin: 0 auto;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 80px;
align-items: center;
}
.plx-01__section-img {
position: relative;
aspect-ratio: 4/5;
overflow: hidden;
border: 1px solid rgba(200,169,90,0.2);
}
.plx-01__section-inner {
position: absolute;
inset: -20%;
background:
linear-gradient(135deg, #1a120a 0%, #0f1520 100%);
will-change: transform;
}
.plx-01__section-inner::after {
content: '';
position: absolute;
inset: 20%;
background: radial-gradient(circle at 40% 60%, rgba(200,169,90,0.3) 0%, rgba(184,76,42,0.2) 40%, transparent 70%);
border: 1px solid rgba(200,169,90,0.15);
}
.plx-01__section-text h2 {
font-family: 'Bebas Neue', sans-serif;
font-size: clamp(42px, 6vw, 72px);
line-height: 0.95;
margin-bottom: 24px;
}
.plx-01__section-text h2 span {
color: var(--gold);
}
.plx-01__section-text p {
font-size: 15px;
line-height: 1.75;
color: rgba(245,240,232,0.6);
margin-bottom: 16px;
}
.plx-01__rule {
width: 48px;
height: 2px;
background: linear-gradient(90deg, var(--gold), transparent);
margin: 32px 0;
}
.plx-01__stat-row {
display: flex;
gap: 40px;
margin-top: 40px;
}
.plx-01__stat strong {
display: block;
font-family: 'Bebas Neue', sans-serif;
font-size: 42px;
color: var(--gold);
line-height: 1;
}
.plx-01__stat small {
font-size: 11px;
letter-spacing: 0.15em;
text-transform: uppercase;
color: rgba(245,240,232,0.4);
}
/* Divider band */
.plx-01__band {
background: linear-gradient(135deg, var(--gold) 0%, var(--rust) 100%);
padding: 40px;
text-align: center;
overflow: hidden;
position: relative;
}
.plx-01__band-inner {
position: absolute;
inset: -20%;
will-change: transform;
}
.plx-01__marquee {
font-family: 'Bebas Neue', sans-serif;
font-size: 64px;
color: rgba(10,10,15,0.12);
white-space: nowrap;
position: relative;
z-index: 1;
animation: plx-01-marquee 18s linear infinite;
}
@keyframes plx-01-marquee {
from { transform: translateX(0); }
to { transform: translateX(-50%); }
}
.plx-01__band-text {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
letter-spacing: 0.25em;
text-transform: uppercase;
color: var(--ink);
font-weight: 600;
}
@media (max-width: 768px) {
.plx-01__section {
grid-template-columns: 1fr;
gap: 40px;
padding: 80px 24px;
}
.plx-01__section-img { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.plx-01__bg-layer,
.plx-01__lines,
.plx-01__orb,
.plx-01__headline,
.plx-01__sub,
.plx-01__section-inner { transform: none !important; }
.plx-01__scroll-line { animation: none; }
.plx-01__marquee { animation: none; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.plx-01');
if (!root) return;
const hero = root.querySelector('.plx-01__hero');
const heroH = hero.offsetHeight;
// Elements with data-parallax on the hero
const heroLayers = Array.from(root.querySelectorAll('[data-parallax]')).map(el => ({
el,
speed: parseFloat(el.dataset.parallax)
}));
// Section inner parallax
const sectionInner = root.querySelector('[data-parallax-section]');
const sectionSpeed = sectionInner ? parseFloat(sectionInner.dataset.parallaxSection) : 0.3;
// Band inner parallax
const bandInner = root.querySelector('[data-parallax-band]');
const bandSpeed = bandInner ? parseFloat(bandInner.dataset.parallaxBand) : 0.4;
let ticking = false;
function onScroll() {
if (ticking) return;
ticking = true;
requestAnimationFrame(() => {
const sy = window.scrollY;
// Hero layers
heroLayers.forEach(({ el, speed }) => {
el.style.transform = `translateY(${sy * speed}px)`;
});
// Section inner — relative to its position
if (sectionInner) {
const rect = sectionInner.closest('.plx-01__section-img').getBoundingClientRect();
const relY = rect.top + rect.height / 2;
const offset = (relY - window.innerHeight / 2) * sectionSpeed;
sectionInner.style.transform = `translateY(${-offset * 0.4}px)`;
}
// Band inner
if (bandInner) {
const rect = bandInner.closest('.plx-01__band').getBoundingClientRect();
const relY = rect.top + rect.height / 2;
const offset = (relY - window.innerHeight / 2) * bandSpeed;
bandInner.style.transform = `translateX(${-offset * 0.2}px)`;
}
ticking = false;
});
}
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
})();
```
### 02. Multi-layered CSS Parallax Landscape / Illustration
**Type:** CSS + JS
**Description:** Cinematic twilight scene with eight independent SVG layers — star field, crescent moon, sun glow corona, drifting clouds, far and near mountain ranges, tree silhouettes, and rolling ground — each scrolling 0.08× to 0.94× viewport speed for convincing pseudo-3D depth. Cinzel serif headline. Right-edge depth-indicator dots. Rich indigo-to-amber sunset gradient sky.
**HTML:**
```html
The Last
HORIZON
Five layers. One infinite depth. Pure CSS parallax landscape.
Five Depths, One Horizon
Each layer moves at its own pace — sky barely drifts, foreground trees rush by. The result is a pseudo-3D parallax landscape built entirely in CSS SVG layers, no canvas, no WebGL.
```
**CSS:**
```css
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.plx-02 {
--sky-top: #0d1b3e;
--sky-mid: #1a2f5a;
--sky-low: #2d4a8a;
--horizon: #e85d2a;
--fog: #c4a97a;
--mt1: #1e2d4a;
--mt2: #2a3d60;
--mt3: #3a5278;
--tree: #0d1f0d;
--tree2: #112411;
--ground: #0a140a;
font-family: 'Lato', sans-serif;
background: var(--sky-top);
overflow-x: hidden;
}
/* ── Scene wrapper ── */
.plx-02__scene {
position: relative;
height: 100vh;
min-height: 600px;
overflow: hidden;
}
/* Each layer is absolutely positioned, full width */
.plx-02__layer {
position: absolute;
width: 100%;
bottom: 0;
will-change: transform;
}
/* Layer 0: Sky gradient */
.plx-02__sky {
inset: 0;
background: linear-gradient(
to bottom,
#040d20 0%,
#0d1b3e 25%,
#1a2f5a 50%,
#2d4a8a 70%,
#e85d2a 88%,
#f5a623 95%,
#ffd680 100%
);
position: absolute;
}
/* Stars */
.plx-02__stars {
position: absolute;
inset: 0 0 40% 0;
will-change: transform;
}
/* Moon */
.plx-02__moon {
position: absolute;
top: 8%;
right: 12%;
width: 60px;
height: 60px;
border-radius: 50%;
background: radial-gradient(circle at 35% 35%, #fff9e6, #f0d080);
box-shadow: 0 0 30px rgba(240,208,128,0.6), 0 0 80px rgba(240,208,128,0.2);
will-change: transform;
}
/* Sun/horizon glow.
Horizontal centering uses calc() on the left property instead
of transform: translateX(-50%) — this element carries data-plx
so the JS parallax handler clobbers style.transform with
translateY() on every scroll, which would erase the centering
and shift the sun to the right of the headline. */
.plx-02__sun {
position: absolute;
bottom: -30px;
left: calc(50% - 100px);
width: 200px;
height: 200px;
border-radius: 50%;
background: radial-gradient(circle, #ffd680 0%, #f5a623 30%, #e85d2a 60%, transparent 80%);
filter: blur(8px);
will-change: transform;
}
/* Cloud wisps */
.plx-02__clouds {
position: absolute;
inset: 15% 0 40% 0;
will-change: transform;
}
.plx-02__cloud {
position: absolute;
border-radius: 50px;
background: rgba(255,255,255,0.05);
filter: blur(6px);
}
.plx-02__cloud:nth-child(1) { width: 300px; height: 40px; top: 20%; left: 5%; }
.plx-02__cloud:nth-child(2) { width: 200px; height: 30px; top: 35%; left: 60%; background: rgba(255,200,100,0.08); }
.plx-02__cloud:nth-child(3) { width: 400px; height: 50px; top: 50%; left: 20%; }
.plx-02__cloud:nth-child(4) { width: 250px; height: 35px; top: 60%; left: 50%; background: rgba(255,150,50,0.1); }
/* Mountain layers — SVG inline */
.plx-02__mtn-far {
height: 45vh;
}
.plx-02__mtn-mid {
height: 38vh;
}
.plx-02__mtn-near {
height: 30vh;
}
/* Tree lines */
.plx-02__trees-far {
height: 22vh;
}
.plx-02__trees-near {
height: 16vh;
}
/* Ground */
.plx-02__ground {
height: 12vh;
background: linear-gradient(to bottom, #0a140a, #050a05);
position: absolute;
bottom: 0;
width: 100%;
}
/* Fog band */
.plx-02__fog {
position: absolute;
height: 100px;
width: 120%;
left: -10%;
background: linear-gradient(to bottom, transparent, rgba(196,169,122,0.18) 50%, transparent);
filter: blur(12px);
will-change: transform;
}
.plx-02__fog--a { bottom: 20%; }
.plx-02__fog--b { bottom: 12%; opacity: 0.6; }
/* ── Content overlay ── */
.plx-02__overlay {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 20;
text-align: center;
padding: 20px;
will-change: transform;
}
.plx-02__title {
font-family: 'Cinzel', serif;
font-size: clamp(40px, 9vw, 110px);
font-weight: 900;
color: #fff;
line-height: 0.9;
text-shadow:
0 0 40px rgba(232,93,42,0.5),
0 2px 60px rgba(0,0,0,0.8);
letter-spacing: 0.04em;
}
.plx-02__title em {
font-style: normal;
display: block;
font-size: 0.35em;
letter-spacing: 0.3em;
font-weight: 400;
color: rgba(255,214,128,0.85);
text-shadow: 0 0 20px rgba(245,166,35,0.6);
margin-bottom: 12px;
}
.plx-02__divider {
width: 80px;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(255,214,128,0.6), transparent);
margin: 24px auto;
}
.plx-02__tagline {
font-size: 13px;
letter-spacing: 0.25em;
text-transform: uppercase;
color: rgba(255,255,255,0.5);
max-width: 380px;
line-height: 1.8;
}
/* ── Below-fold narrative ── */
.plx-02__narrative {
background: #050a05;
padding: 100px 40px;
text-align: center;
}
.plx-02__narrative h2 {
font-family: 'Cinzel', serif;
font-size: clamp(28px, 4vw, 48px);
color: #f0d080;
margin-bottom: 20px;
}
.plx-02__narrative p {
font-size: 15px;
line-height: 1.8;
color: rgba(255,255,255,0.45);
max-width: 600px;
margin: 0 auto;
}
/* Layer depth badges */
.plx-02__layers-ui {
position: absolute;
right: 24px;
top: 50%;
transform: translateY(-50%);
z-index: 30;
display: flex;
flex-direction: column;
gap: 8px;
}
.plx-02__layer-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: rgba(255,255,255,0.3);
cursor: default;
transition: all 0.3s;
position: relative;
}
.plx-02__layer-dot::after {
content: attr(data-label);
position: absolute;
right: 14px;
top: 50%;
transform: translateY(-50%);
font-size: 9px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: rgba(255,255,255,0.4);
white-space: nowrap;
opacity: 0;
transition: opacity 0.3s;
}
.plx-02__layer-dot:hover {
background: rgba(245,166,35,0.9);
transform: scale(1.8);
}
.plx-02__layer-dot:hover::after { opacity: 1; }
@media (max-width: 600px) {
.plx-02__layers-ui { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.plx-02__stars,
.plx-02__moon,
.plx-02__sun,
.plx-02__clouds,
.plx-02__mtn-far,
.plx-02__mtn-mid,
.plx-02__mtn-near,
.plx-02__trees-far,
.plx-02__trees-near,
.plx-02__fog,
.plx-02__overlay { transform: none !important; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.plx-02');
if (!root) return;
const layers = Array.from(root.querySelectorAll('[data-plx]')).map(el => ({
el,
speed: parseFloat(el.dataset.plx)
}));
let ticking = false;
function onScroll() {
if (ticking) return;
ticking = true;
requestAnimationFrame(() => {
const sy = window.scrollY;
layers.forEach(({ el, speed }) => {
el.style.transform = `translateY(${sy * speed}px)`;
});
ticking = false;
});
}
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
})();
```
### 03. CSS Sticky Parallax Sections
**Type:** CSS + JS
**Description:** Five-chapter sticky-scroll narrative. Each chapter occupies 300vh with a position:sticky panel that tracks its own scroll progress: background scale, geometric shape rotation, inner grid translation, and headline drift are all driven by a live progress ratio. Fixed accent-bar progress indicator and chapter dot-nav. Fraunces display + DM Sans body. Distinct hue per chapter.
**HTML:**
```html
01
Concept · Vision
Where does an idea begin?
Every landmark design starts with a restless question. We trace the edges of possibility before a single line is drawn, mapping the territory of what could exist.
Explore Origins
02
Research · Systems
Structure is the silent language.
Beneath every fluid interaction is an architecture of intent. We build systems that behave with purpose — grids that breathe, type scales that sing, spacing that creates rhythm.
See the System
03
Craft · Emotion
Design should make you feel something.
The best interfaces don't just work — they make you feel cared for. Every micro-interaction is a tiny handshake, a signal that someone thought deeply about your experience.
Feel the Craft
04
Technology · Precision
Code is a creative material.
We treat the browser as a canvas. CSS transforms become choreography. JavaScript becomes conversation. The medium itself becomes a means of expression.
Read the Code
05
Legacy · Future
The best work outlasts its moment.
Trends are temporary. We pursue the permanent — the design decisions that will feel right in twenty years, that age like a well-edited sentence, never a marketing slogan.
Begin Something
```
**CSS:**
```css
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.plx-03 {
--c1: #1a0a2e;
--c2: #0d2818;
--c3: #1f0a0a;
--c4: #0a1a2e;
--c5: #1a1a0a;
--text: #f0ede8;
--acc1: #c084fc;
--acc2: #34d399;
--acc3: #fb7185;
--acc4: #60a5fa;
--acc5: #fbbf24;
font-family: 'DM Sans', sans-serif;
background: #080510;
color: var(--text);
}
/* Each "chapter" is a tall scroll trigger */
.plx-03__chapter {
position: relative;
height: 300vh;
}
/* The sticky panel */
.plx-03__sticky {
position: sticky;
top: 0;
height: 100vh;
overflow: hidden;
}
/* Background fill per chapter */
.plx-03__bg {
position: absolute;
inset: 0;
will-change: transform;
}
.plx-03__chapter--1 .plx-03__bg { background: radial-gradient(ellipse at 30% 70%, #4c1d95 0%, #1a0a2e 60%); }
.plx-03__chapter--2 .plx-03__bg { background: radial-gradient(ellipse at 70% 30%, #064e3b 0%, #0d2818 60%); }
.plx-03__chapter--3 .plx-03__bg { background: radial-gradient(ellipse at 50% 50%, #7f1d1d 0%, #1f0a0a 60%); }
.plx-03__chapter--4 .plx-03__bg { background: radial-gradient(ellipse at 20% 80%, #1e3a5f 0%, #0a1a2e 60%); }
.plx-03__chapter--5 .plx-03__bg { background: radial-gradient(ellipse at 80% 20%, #78350f 0%, #1a1a0a 60%); }
/* Abstract shape / illustration per chapter */
.plx-03__shape {
position: absolute;
will-change: transform;
border-radius: 50%;
filter: blur(1px);
}
.plx-03__chapter--1 .plx-03__shape {
width: 520px; height: 520px;
right: -80px; bottom: -80px;
background: conic-gradient(from 0deg, #c084fc, #818cf8, #c084fc);
opacity: 0.25;
}
.plx-03__chapter--2 .plx-03__shape {
width: 460px; height: 460px;
left: -60px; top: -60px;
background: conic-gradient(from 120deg, #34d399, #059669, #34d399);
border-radius: 40% 60% 70% 30%;
opacity: 0.3;
}
.plx-03__chapter--3 .plx-03__shape {
width: 500px; height: 500px;
right: 10%;
/* Vertical centering uses calc() on the top property instead
of transform: translateY(-50%) — the JS parallax handler
clobbers style.transform with translateY() rotate() on every
scroll, which would erase the centering and drop the blob
off the bottom of the panel. */
top: calc(50% - 250px);
background: conic-gradient(from 240deg, #fb7185, #e11d48, #fb7185);
border-radius: 30% 70% 40% 60%;
opacity: 0.25;
}
.plx-03__chapter--4 .plx-03__shape {
width: 440px; height: 440px;
left: 5%; bottom: 5%;
background: conic-gradient(from 60deg, #60a5fa, #2563eb, #60a5fa);
border-radius: 60% 40% 30% 70%;
opacity: 0.3;
}
.plx-03__chapter--5 .plx-03__shape {
width: 480px; height: 480px;
right: -40px; top: -40px;
background: conic-gradient(from 180deg, #fbbf24, #d97706, #fbbf24);
border-radius: 45% 55%;
opacity: 0.28;
}
/* Grid lines — parallax at different speed */
.plx-03__grid {
position: absolute;
inset: 0;
will-change: transform;
opacity: 0.07;
}
.plx-03__grid svg { width: 100%; height: 100%; }
/* Content layer */
.plx-03__content {
position: absolute;
inset: 0;
display: flex;
align-items: center;
padding: 60px;
will-change: transform;
}
/* Number */
.plx-03__num {
font-family: 'Fraunces', serif;
font-size: clamp(160px, 22vw, 280px);
font-weight: 900;
line-height: 1;
opacity: 0.06;
position: absolute;
right: 40px;
bottom: 20px;
letter-spacing: -0.05em;
}
.plx-03__chapter--1 .plx-03__num { color: var(--acc1); }
.plx-03__chapter--2 .plx-03__num { color: var(--acc2); }
.plx-03__chapter--3 .plx-03__num { color: var(--acc3); }
.plx-03__chapter--4 .plx-03__num { color: var(--acc4); }
.plx-03__chapter--5 .plx-03__num { color: var(--acc5); }
/* Text block */
.plx-03__text {
max-width: 600px;
z-index: 2;
}
.plx-03__label {
display: inline-block;
font-size: 11px;
letter-spacing: 0.3em;
text-transform: uppercase;
margin-bottom: 20px;
padding: 5px 14px;
border: 1px solid;
border-radius: 2px;
opacity: 0.7;
}
.plx-03__chapter--1 .plx-03__label { color: var(--acc1); border-color: var(--acc1); }
.plx-03__chapter--2 .plx-03__label { color: var(--acc2); border-color: var(--acc2); }
.plx-03__chapter--3 .plx-03__label { color: var(--acc3); border-color: var(--acc3); }
.plx-03__chapter--4 .plx-03__label { color: var(--acc4); border-color: var(--acc4); }
.plx-03__chapter--5 .plx-03__label { color: var(--acc5); border-color: var(--acc5); }
.plx-03__heading {
font-family: 'Fraunces', serif;
font-size: clamp(36px, 6vw, 80px);
font-weight: 700;
line-height: 1.05;
margin-bottom: 24px;
}
.plx-03__chapter--1 .plx-03__heading i { font-style: italic; color: var(--acc1); }
.plx-03__chapter--2 .plx-03__heading i { font-style: italic; color: var(--acc2); }
.plx-03__chapter--3 .plx-03__heading i { font-style: italic; color: var(--acc3); }
.plx-03__chapter--4 .plx-03__heading i { font-style: italic; color: var(--acc4); }
.plx-03__chapter--5 .plx-03__heading i { font-style: italic; color: var(--acc5); }
.plx-03__body {
font-size: 16px;
font-weight: 300;
line-height: 1.75;
color: rgba(240,237,232,0.6);
max-width: 480px;
margin-bottom: 36px;
}
.plx-03__pill {
display: inline-block;
padding: 12px 32px;
font-size: 13px;
font-weight: 500;
letter-spacing: 0.1em;
text-transform: uppercase;
border-radius: 100px;
cursor: pointer;
transition: transform 0.2s;
}
.plx-03__pill:hover { transform: scale(1.04); }
.plx-03__chapter--1 .plx-03__pill { background: var(--acc1); color: #1a0a2e; }
.plx-03__chapter--2 .plx-03__pill { background: var(--acc2); color: #0d2818; }
.plx-03__chapter--3 .plx-03__pill { background: var(--acc3); color: #1f0a0a; }
.plx-03__chapter--4 .plx-03__pill { background: var(--acc4); color: #0a1a2e; }
.plx-03__chapter--5 .plx-03__pill { background: var(--acc5); color: #1a1a0a; }
/* Progress bar */
.plx-03__progress {
position: fixed;
top: 0;
left: 0;
height: 2px;
background: linear-gradient(90deg, #c084fc, #34d399, #fb7185, #60a5fa, #fbbf24);
z-index: 100;
width: 0%;
transition: width 0.1s linear;
}
/* Chapter indicator dots */
.plx-03__dots {
position: fixed;
right: 20px;
top: 50%;
transform: translateY(-50%);
z-index: 100;
display: flex;
flex-direction: column;
gap: 12px;
}
.plx-03__dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: rgba(255,255,255,0.2);
transition: all 0.3s;
}
.plx-03__dot.is-active {
background: rgba(255,255,255,0.9);
transform: scale(1.5);
}
/* Clip edge for stacking illusion */
.plx-03__sticky {
clip-path: inset(0);
}
@media (max-width: 768px) {
.plx-03__content { padding: 30px; }
.plx-03__num { font-size: 120px; right: 20px; bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
.plx-03__bg, .plx-03__shape, .plx-03__grid, .plx-03__content { transform: none !important; }
.plx-03__progress { transition: none; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.plx-03');
if (!root) return;
const progress = document.getElementById('plx03-progress');
const dots = Array.from(document.querySelectorAll('.plx-03__dot'));
const chapters = Array.from(root.querySelectorAll('.plx-03__chapter'));
let ticking = false;
function onScroll() {
if (ticking) return;
ticking = true;
requestAnimationFrame(() => {
const sy = window.scrollY;
const totalH = document.documentElement.scrollHeight - window.innerHeight;
// Progress bar
if (progress) progress.style.width = (sy / totalH * 100) + '%';
// Per-chapter parallax
chapters.forEach((ch, i) => {
const rect = ch.getBoundingClientRect();
const viewH = window.innerHeight;
// dot indicator
if (rect.top < viewH * 0.5 && rect.bottom > viewH * 0.5) {
dots.forEach(d => d.classList.remove('is-active'));
if (dots[i]) dots[i].classList.add('is-active');
}
// Only compute if near viewport
if (rect.bottom < -viewH || rect.top > viewH * 2) return;
const bg = ch.querySelector('[data-bg]');
const shape = ch.querySelector('[data-shape]');
const grid = ch.querySelector('[data-grid]');
const content = ch.querySelector('[data-content]');
// Progress through sticky: 0 at entry, 1 at exit
const stickyProgress = Math.max(0, Math.min(1, -rect.top / (ch.offsetHeight - viewH)));
if (bg) bg.style.transform = `scale(${1 + stickyProgress * 0.08}) translateY(${stickyProgress * -30}px)`;
if (shape) shape.style.transform = `translateY(${stickyProgress * -60}px) rotate(${stickyProgress * 20}deg)`;
if (grid) grid.style.transform = `translateY(${stickyProgress * 40}px)`;
if (content) content.style.transform = `translateY(${stickyProgress * -20}px)`;
});
ticking = false;
});
}
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
})();
```
### 04. Multi-Scene Parallax Scrolling
**Type:** CSS + JS
**Description:** Five full-bleed sections (Cosmos, Desert, Ocean, Forest, Finale) each with a slower-moving SVG background driving the parallax via a requestAnimationFrame-throttled scroll listener. Sticky-pinned scenes, smooth scroll-to-scene nav dots, dark cosmos-to-forest palette. Playfair Display + Outfit typography.
**HTML:**
```html
CSS Parallax · Five Worlds
The infinite canvas awaits
Five worlds, each with its own sky. A full-page parallax journey — backgrounds drift at their own speed while you move through them.
02 / Desert
Heat &Silence.
The desert teaches patience. Vast emptiness between two points — just the relentless geometry of distance and will.
03 / Deep Ocean
Pressure builds diamonds.
At depth, things become transparent. Clarity is not found in brightness — it's found in the dark, still water far below.
04 / Ancient Forest
Roots remember everything.
The oldest trees have no memory of being seeds. They simply became what they were always going to be — slowly, in the green quiet.
05 / Origin
Every end is an origin.
The scroll ends. The journey doesn't. What you build with this moment is the only thing that matters now.
```
**CSS:**
```css
.plx-04, .plx-04 *, .plx-04 *::before, .plx-04 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.plx-04 {
font-family: 'Outfit', sans-serif;
background: #04020f;
color: #f0ede8;
/* overflow:clip not overflow:hidden — see Demo 09 + 10 fixes
(commits 876bc78, this one). overflow:hidden creates a scroll
context that breaks position:sticky on descendants. */
overflow-x: clip;
}
/* Each section is a sticky-pinned scene: 200vh outer + 100vh
sticky inner = 100vh of pin runway during which the bg parallax
animation plays. Sticky pinning works correctly because the
root .plx-04 uses overflow-x:clip (not :hidden), which would
have broken the sticky containment chain. */
.plx-04__scene {
position: relative;
height: 200vh;
}
/* Each scene's outer container has a fallback bg color matching
its theme. Without these, the 100vh of "post-sticky-release"
scroll runway at the bottom of each scene's 200vh container
would show the body bg (#04020f), creating a dark band between
scenes as the visitor scrolls between them. The per-scene
theme colors below match the dominant midtone of each scene's
gradient bg, so the transition reads as one continuous scene
color instead of a dark stripe gap. */
.plx-04__s1 { background: #07041a; }
.plx-04__s2 { background: #3d1800; }
.plx-04__s3 { background: #002040; }
.plx-04__s4 { background: #071407; }
.plx-04__s5 { background: #0e0028; }
.plx-04__sticky {
position: sticky;
top: 0;
height: 100vh;
overflow: hidden;
}
/* Background layer — moves slower than scroll (parallax effect via JS) */
.plx-04__bg {
position: absolute;
inset: -25%;
will-change: transform;
}
/* Content — centered, normal scroll speed */
.plx-04__fg {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 40px;
z-index: 5;
}
/* ── Scene 1: Cosmos ── */
.plx-04__s1 .plx-04__bg {
background:
radial-gradient(ellipse at 20% 20%, rgba(120,60,200,0.5) 0%, transparent 45%),
radial-gradient(ellipse at 80% 75%, rgba(30,80,200,0.4) 0%, transparent 45%),
linear-gradient(135deg, #04020f 0%, #0a0520 100%);
}
.plx-04__s1 .plx-04__bg::before {
content: '';
position: absolute;
inset: 0;
background-image:
radial-gradient(1.5px 1.5px at 8% 12%, #fff 0%, transparent 100%),
radial-gradient(1px 1px at 25% 8%, rgba(255,255,255,0.8) 0%, transparent 100%),
radial-gradient(2px 2px at 45% 20%, #fff 0%, transparent 100%),
radial-gradient(1px 1px at 62% 6%, rgba(255,255,255,0.7) 0%, transparent 100%),
radial-gradient(1.5px 1.5px at 78% 18%, #fff 0%, transparent 100%),
radial-gradient(1px 1px at 12% 45%, rgba(255,255,255,0.6) 0%, transparent 100%),
radial-gradient(2px 2px at 55% 55%, rgba(255,255,255,0.9) 0%, transparent 100%),
radial-gradient(1px 1px at 35% 68%, rgba(255,255,255,0.7) 0%, transparent 100%),
radial-gradient(1.5px 1.5px at 88% 40%, #fff 0%, transparent 100%),
radial-gradient(1px 1px at 70% 72%, rgba(255,255,255,0.8) 0%, transparent 100%),
radial-gradient(1px 1px at 18% 82%, rgba(255,255,255,0.6) 0%, transparent 100%),
radial-gradient(1.5px 1.5px at 92% 85%, rgba(255,240,200,0.9) 0%, transparent 100%);
}
.plx-04__s1 .plx-04__bg::after {
content: '';
position: absolute;
width: 260px; height: 260px;
top: 18%; right: 20%;
border-radius: 50%;
background: radial-gradient(circle at 35% 35%, #fff8e1 0%, #ffe082 60%);
box-shadow: 0 0 60px rgba(255,220,130,0.6), 0 0 140px rgba(255,180,80,0.25);
}
/* ── Scene 2: Desert ── */
.plx-04__s2 .plx-04__bg {
background:
radial-gradient(ellipse at 55% 30%, rgba(200,80,20,0.5) 0%, transparent 55%),
radial-gradient(ellipse at 20% 80%, rgba(140,60,0,0.3) 0%, transparent 45%),
linear-gradient(160deg, #1a0800 0%, #3d1800 40%, #6b2d00 100%);
}
.plx-04__s2 .plx-04__bg::before {
content: '';
position: absolute;
inset: 0;
background:
repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255,150,50,0.04) 40px, rgba(255,150,50,0.04) 41px),
repeating-linear-gradient(-45deg, transparent, transparent 80px, rgba(200,100,20,0.03) 80px, rgba(200,100,20,0.03) 81px);
}
.plx-04__s2 .plx-04__bg::after {
content: '';
position: absolute;
bottom: 15%;
left: -5%;
right: -5%;
height: 35%;
background: repeating-linear-gradient(
0deg,
rgba(180,80,20,0.08) 0px,
rgba(180,80,20,0.12) 4px,
transparent 4px,
transparent 18px
);
transform: skewY(-3deg);
}
/* ── Scene 3: Ocean ── */
.plx-04__s3 .plx-04__bg {
background:
radial-gradient(ellipse at 25% 55%, rgba(0,120,200,0.5) 0%, transparent 50%),
radial-gradient(ellipse at 75% 25%, rgba(0,200,160,0.25) 0%, transparent 45%),
linear-gradient(180deg, #001020 0%, #002040 55%, #003060 100%);
}
.plx-04__s3 .plx-04__bg::before {
content: '';
position: absolute;
inset: 0;
background:
repeating-linear-gradient(-30deg, transparent, transparent 50px, rgba(0,150,255,0.05) 50px, rgba(0,150,255,0.05) 52px);
}
.plx-04__s3 .plx-04__bg::after {
content: '';
position: absolute;
top: 40%;
left: -5%;
right: -5%;
height: 3px;
background: linear-gradient(90deg, transparent, rgba(0,200,180,0.4), transparent);
box-shadow: 0 20px 0 rgba(0,150,200,0.1), 0 -20px 0 rgba(0,150,200,0.1);
}
/* ── Scene 4: Forest ── */
.plx-04__s4 .plx-04__bg {
background:
radial-gradient(ellipse at 50% 0%, rgba(80,200,70,0.2) 0%, transparent 55%),
radial-gradient(ellipse at 20% 60%, rgba(40,120,40,0.2) 0%, transparent 45%),
linear-gradient(180deg, #020b02 0%, #071407 55%, #0a1e0a 100%);
}
.plx-04__s4 .plx-04__bg::before {
content: '';
position: absolute;
inset: 0;
background:
repeating-linear-gradient(90deg, transparent, transparent 80px, rgba(50,150,50,0.04) 80px, rgba(50,150,50,0.04) 82px),
repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(30,100,30,0.04) 60px, rgba(30,100,30,0.04) 62px);
}
/* ── Scene 5: Finale ── */
.plx-04__s5 .plx-04__bg {
background:
radial-gradient(ellipse at 50% 45%, rgba(200,80,255,0.35) 0%, transparent 55%),
radial-gradient(ellipse at 20% 20%, rgba(80,120,255,0.25) 0%, transparent 45%),
linear-gradient(135deg, #08001a 0%, #180030 100%);
}
/* ── Typography ── */
.plx-04__tag {
font-size: 10px;
font-weight: 600;
letter-spacing: 0.4em;
text-transform: uppercase;
color: rgba(255,255,255,0.35);
margin-bottom: 20px;
}
.plx-04__num {
font-family: 'Outfit', sans-serif;
font-size: 10px;
font-weight: 600;
letter-spacing: 0.4em;
text-transform: uppercase;
color: rgba(255,255,255,0.3);
margin-bottom: 16px;
}
.plx-04__h1 {
font-family: 'Playfair Display', serif;
font-size: clamp(52px, 11vw, 140px);
font-weight: 700;
line-height: 0.9;
letter-spacing: -0.02em;
}
.plx-04__h1 em {
font-style: italic;
font-weight: 400;
background: linear-gradient(135deg, #fbbf24, #f59e0b);
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
background-clip: text;
}
.plx-04__h {
font-family: 'Playfair Display', serif;
font-size: clamp(42px, 8vw, 100px);
font-weight: 700;
line-height: 0.95;
}
.plx-04__s2 .plx-04__h em { color: #fb923c; font-style: italic; }
.plx-04__s3 .plx-04__h em { color: #38bdf8; font-style: italic; }
.plx-04__s4 .plx-04__h em { color: #86efac; font-style: italic; }
.plx-04__s5 .plx-04__h em { color: #e879f9; font-style: italic; }
.plx-04__p {
margin-top: 24px;
font-size: 16px;
font-weight: 300;
line-height: 1.75;
opacity: 0.5;
max-width: 480px;
}
.plx-04__scroll-hint {
position: absolute;
bottom: 36px;
left: 50%;
transform: translateX(-50%);
font-size: 10px;
letter-spacing: 0.25em;
text-transform: uppercase;
opacity: 0.35;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.plx-04__arrow {
width: 18px; height: 18px;
border-right: 1px solid rgba(255,255,255,0.4);
border-bottom: 1px solid rgba(255,255,255,0.4);
transform: rotate(45deg);
animation: plx-04-bounce 1.6s ease-in-out infinite;
}
@keyframes plx-04-bounce {
0%, 100% { transform: rotate(45deg) translateY(0); }
50% { transform: rotate(45deg) translateY(6px); }
}
/* Nav dots */
.plx-04__nav {
position: fixed;
right: 20px;
top: 50%;
transform: translateY(-50%);
z-index: 100;
display: flex;
flex-direction: column;
gap: 10px;
}
.plx-04__nav-dot {
display: block;
width: 6px; height: 6px;
border-radius: 50%;
background: rgba(255,255,255,0.2);
border: none;
cursor: pointer;
transition: all 0.3s;
}
.plx-04__nav-dot.is-active {
background: rgba(255,255,255,0.85);
transform: scale(1.7);
}
/* Accent lines that appear at each scene */
.plx-04__accent {
width: 1px;
height: 60px;
background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
margin: 28px auto 0;
}
@media (max-width: 600px) {
.plx-04__nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.plx-04__bg { transform: none !important; }
.plx-04__arrow { animation: none; }
}
```
**JS:**
```js
(() => {
const root = document.getElementById('plx04');
if (!root) return;
const bgs = Array.from(root.querySelectorAll('[data-parallax]')).map(el => ({
el,
speed: parseFloat(el.dataset.parallax),
sticky: el.closest('.plx-04__sticky'),
scene: el.closest('.plx-04__scene'),
}));
const dots = Array.from(root.querySelectorAll('.plx-04__nav-dot'));
const scenes = Array.from(root.querySelectorAll('.plx-04__scene'));
// Nav dot click — scroll to scene start
dots.forEach((dot, i) => {
dot.addEventListener('click', () => {
scenes[i]?.scrollIntoView({ behavior: 'smooth' });
});
});
let ticking = false;
function onScroll() {
if (ticking) return;
ticking = true;
requestAnimationFrame(() => {
const sy = window.scrollY;
const vh = window.innerHeight;
// Parallax: bg moves slower than scroll
bgs.forEach(({ el, speed, scene }) => {
const rect = scene.getBoundingClientRect();
if (rect.bottom < -vh || rect.top > vh * 2) { ticking = false; return; }
// Progress within the scene's sticky section
const sceneTop = scene.offsetTop;
const progress = sy - sceneTop;
el.style.transform = `translateY(${progress * speed * -1}px)`;
});
// Active dot
let activeI = 0;
scenes.forEach((s, i) => {
const r = s.getBoundingClientRect();
if (r.top <= vh * 0.5) activeI = i;
});
dots.forEach((d, i) => d.classList.toggle('is-active', i === activeI));
ticking = false;
});
}
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
})();
```
### 05. CSS Parallax Image Grid / Gallery
**Type:** CSS + JS
**Description:** Twelve-cell asymmetric CSS Grid portfolio where each cell's inner layer translateY at speeds from 0.10× to 0.38× on scroll — creating subtle but convincing photo drift inside bounded containers. Abstract colour-field fills, hover captions, filter tab bar. Syne + Syne Mono. Clean white gallery aesthetic punctuated by oversized index numerals.
**HTML:**
```html
A gallery built on depth & movement.
All Works
Abstract
Landscape
Portrait
Editorial
Showing 12 of 12 works
Featured
Terracotta Dawn
Abstract · 2024 · Oil on linen
Verde Study I
Landscape · 2024
Midnight Architecture
Editorial · 2024
Mauve Hour
Abstract · 2023
Sand Drift
Landscape · 2023
New
Forest Floor
Landscape · 2024
Pale Geometry
Abstract · 2023
Chromatic Wheel
Abstract · 2024
Ember Study
Portrait · 2023
Ochre Valley
Landscape · 2024
Teal Descent
Abstract · 2024
```
**CSS:**
```css
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.plx-05 {
--ink: #0d0d0d;
--paper: #f2ede7;
--sand: #d4c4a8;
--terracotta: #c4623a;
--sage: #7a9e7e;
--navy: #1e2d45;
--lavender: #8b7ec8;
background: var(--paper);
color: var(--ink);
font-family: 'Syne', sans-serif;
overflow-x: hidden;
}
/* ── Header ── */
.plx-05__header {
padding: 80px 60px 60px;
display: flex;
justify-content: space-between;
align-items: flex-end;
border-bottom: 1px solid rgba(13,13,13,0.12);
}
.plx-05__brand {
font-size: clamp(14px, 2vw, 18px);
font-weight: 800;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.plx-05__tagline {
font-family: 'Syne Mono', monospace;
font-size: 11px;
letter-spacing: 0.08em;
opacity: 0.45;
}
/* ── Hero text ── */
.plx-05__hero-text {
padding: 80px 60px 0;
}
.plx-05__hero-text h1 {
font-size: clamp(52px, 10vw, 130px);
font-weight: 800;
line-height: 0.88;
letter-spacing: -0.03em;
max-width: 900px;
}
.plx-05__hero-text h1 em {
font-style: italic;
font-weight: 400;
color: var(--terracotta);
}
/* ── Masonry-style grid ── */
.plx-05__grid {
display: grid;
grid-template-columns: repeat(12, 1fr);
grid-auto-rows: 80px;
gap: 16px;
padding: 60px 60px;
}
/* Each cell is a parallax image container */
.plx-05__cell {
position: relative;
overflow: hidden;
cursor: pointer;
border-radius: 4px;
}
/* Cell size variations */
.plx-05__cell:nth-child(1) { grid-column: 1 / 6; grid-row: 1 / 7; }
.plx-05__cell:nth-child(2) { grid-column: 6 / 9; grid-row: 1 / 5; }
.plx-05__cell:nth-child(3) { grid-column: 9 / 13; grid-row: 1 / 6; }
.plx-05__cell:nth-child(4) { grid-column: 6 / 9; grid-row: 5 / 9; }
.plx-05__cell:nth-child(5) { grid-column: 9 / 12; grid-row: 6 / 10; }
.plx-05__cell:nth-child(6) { grid-column: 12 / 13; grid-row: 6 / 11; }
.plx-05__cell:nth-child(7) { grid-column: 1 / 5; grid-row: 7 / 12; }
.plx-05__cell:nth-child(8) { grid-column: 5 / 9; grid-row: 9 / 13; }
.plx-05__cell:nth-child(9) { grid-column: 9 / 13; grid-row: 10 / 14; }
.plx-05__cell:nth-child(10) { grid-column: 1 / 4; grid-row: 12 / 15; }
.plx-05__cell:nth-child(11) { grid-column: 4 / 9; grid-row: 13 / 17; }
.plx-05__cell:nth-child(12) { grid-column: 9 / 13; grid-row: 14 / 18; }
/* Inner element that moves with parallax. inset: -40% gives the
inner 40% extra on every side beyond the cell, providing buffer
for the JS translateY without revealing the cell's edge.
(Previously -25% which clipped at extreme scroll positions.) */
.plx-05__inner {
position: absolute;
inset: -40%;
will-change: transform;
background-size: cover;
background-position: center;
transition: filter 0.5s;
}
/* Color-based abstract fills (no real images) */
.plx-05__cell:nth-child(1) .plx-05__inner { background: linear-gradient(145deg, #c4623a 0%, #8b3a1e 50%, #1e2d45 100%); }
.plx-05__cell:nth-child(2) .plx-05__inner { background: linear-gradient(200deg, #7a9e7e 0%, #4a7a4e 70%); }
.plx-05__cell:nth-child(3) .plx-05__inner { background: linear-gradient(110deg, #1e2d45 0%, #2a4070 50%, #8b7ec8 100%); }
.plx-05__cell:nth-child(4) .plx-05__inner { background: radial-gradient(circle at 40% 60%, #8b7ec8 0%, #4a3a80 100%); }
.plx-05__cell:nth-child(5) .plx-05__inner { background: linear-gradient(160deg, #d4c4a8 0%, #c4623a 100%); }
.plx-05__cell:nth-child(6) .plx-05__inner { background: linear-gradient(180deg, #0d0d0d, #2a2a2a); }
.plx-05__cell:nth-child(7) .plx-05__inner { background: radial-gradient(ellipse at 60% 40%, #7a9e7e 0%, #1e2d1e 100%); }
.plx-05__cell:nth-child(8) .plx-05__inner { background: linear-gradient(135deg, #f2ede7 0%, #d4c4a8 40%, #c4623a 100%); }
.plx-05__cell:nth-child(9) .plx-05__inner { background: conic-gradient(from 30deg, #1e2d45, #8b7ec8, #c4623a, #1e2d45); }
.plx-05__cell:nth-child(10) .plx-05__inner { background: linear-gradient(200deg, #c4623a 0%, #7a4020 100%); }
.plx-05__cell:nth-child(11) .plx-05__inner { background: radial-gradient(circle at 30% 70%, #d4c4a8 0%, #8b6a40 100%); }
.plx-05__cell:nth-child(12) .plx-05__inner { background: linear-gradient(160deg, #0d0d0d 0%, #1e2d45 50%, #7a9e7e 100%); }
/* Geometric overlays on inner */
.plx-05__inner::after {
content: '';
position: absolute;
inset: 0;
opacity: 0.15;
}
.plx-05__cell:nth-child(odd) .plx-05__inner::after {
background: repeating-linear-gradient(45deg, rgba(255,255,255,0.1) 0px, rgba(255,255,255,0.1) 1px, transparent 1px, transparent 20px);
}
.plx-05__cell:nth-child(even) .plx-05__inner::after {
background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2) 0%, transparent 60%);
}
/* Overlay caption */
.plx-05__caption {
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 20px 18px 16px;
background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
opacity: 0;
transform: translateY(8px);
transition: opacity 0.35s, transform 0.35s;
z-index: 2;
}
.plx-05__cell:hover .plx-05__caption {
opacity: 1;
transform: translateY(0);
}
.plx-05__caption-title {
font-size: 12px;
font-weight: 700;
letter-spacing: 0.15em;
text-transform: uppercase;
color: #fff;
display: block;
}
.plx-05__caption-sub {
font-family: 'Syne Mono', monospace;
font-size: 10px;
color: rgba(255,255,255,0.55);
margin-top: 3px;
}
/* Badge on a few cells */
.plx-05__badge {
position: absolute;
top: 14px;
right: 14px;
background: rgba(255,255,255,0.95);
color: var(--ink);
font-family: 'Syne Mono', monospace;
font-size: 9px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
padding: 4px 10px;
z-index: 3;
border-radius: 2px;
}
/* Hover scale on entire cell */
.plx-05__cell {
transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.plx-05__cell:hover {
transform: scale(1.02);
z-index: 10;
}
/* ── Filters row ── */
.plx-05__filters {
display: flex;
gap: 8px;
padding: 0 60px 40px;
flex-wrap: wrap;
}
.plx-05__filter {
padding: 7px 18px;
font-family: 'Syne Mono', monospace;
font-size: 11px;
letter-spacing: 0.1em;
text-transform: uppercase;
border: 1px solid rgba(13,13,13,0.2);
border-radius: 100px;
cursor: pointer;
transition: all 0.2s;
background: transparent;
color: var(--ink);
}
.plx-05__filter.is-active,
.plx-05__filter:hover {
background: var(--ink);
color: var(--paper);
border-color: var(--ink);
}
/* ── Count ── */
.plx-05__count {
padding: 0 60px 20px;
font-family: 'Syne Mono', monospace;
font-size: 11px;
opacity: 0.4;
letter-spacing: 0.1em;
}
@media (max-width: 900px) {
.plx-05__grid {
grid-template-columns: repeat(4, 1fr);
grid-auto-rows: 100px;
padding: 30px;
}
.plx-05__cell:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 4; }
.plx-05__cell:nth-child(2) { grid-column: 3 / 5; grid-row: 1 / 3; }
.plx-05__cell:nth-child(3) { grid-column: 3 / 5; grid-row: 3 / 5; }
.plx-05__cell:nth-child(4) { grid-column: 1 / 3; grid-row: 4 / 6; }
.plx-05__cell:nth-child(5) { grid-column: 3 / 5; grid-row: 5 / 7; }
.plx-05__cell:nth-child(6) { grid-column: 1 / 3; grid-row: 6 / 8; }
.plx-05__cell:nth-child(7) { grid-column: 3 / 5; grid-row: 7 / 9; }
.plx-05__cell:nth-child(8) { grid-column: 1 / 3; grid-row: 8 / 10; }
.plx-05__cell:nth-child(9) { grid-column: 3 / 5; grid-row: 9 / 11; }
.plx-05__cell:nth-child(10) { grid-column: 1 / 3; grid-row: 10 / 12; }
.plx-05__cell:nth-child(11) { grid-column: 3 / 5; grid-row: 11 / 13; }
.plx-05__cell:nth-child(12) { grid-column: 1 / 5; grid-row: 13 / 15; }
.plx-05__header, .plx-05__hero-text, .plx-05__filters, .plx-05__count { padding-left: 30px; padding-right: 30px; }
}
@media (prefers-reduced-motion: reduce) {
.plx-05__inner { will-change: auto; transform: translateY(0) !important; }
.plx-05__cell { transition: none; }
.plx-05__caption { transition: none; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.plx-05');
if (!root) return;
// Skip parallax entirely for visitors who prefer reduced motion.
// The grid remains visible and scrollable; just no transform updates.
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
const cells = Array.from(root.querySelectorAll('.plx-05__cell[data-speed]')).map(el => ({
el,
inner: el.querySelector('.plx-05__inner'),
speed: parseFloat(el.dataset.speed)
}));
// Multiplier applied to every cell's data-speed. Original speeds
// (0.10-0.38 from the data attributes) produced too-subtle motion
// — visitors reported "no effect" because cell-relative drift was
// barely perceptible. ×2.5 gives roughly ±60-200px of inner
// translation across the viewport traversal, which is clearly
// visible without overrunning the new -40% inner buffer.
const BOOST = 2.5;
let ticking = false;
function onScroll() {
if (ticking) return;
ticking = true;
requestAnimationFrame(() => {
const viewH = window.innerHeight;
cells.forEach(({ el, inner, speed }) => {
const rect = el.getBoundingClientRect();
const centerY = rect.top + rect.height / 2 - viewH / 2;
if (inner) inner.style.transform = `translateY(${centerY * speed * BOOST * -1}px)`;
});
ticking = false;
});
}
// Filter buttons (visual only)
const filters = Array.from(root.querySelectorAll('.plx-05__filter'));
filters.forEach(btn => {
btn.addEventListener('click', () => {
filters.forEach(b => b.classList.remove('is-active'));
btn.classList.add('is-active');
});
});
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
})();
```
### 06. CSS Horizontal Parallax Scroll
**Type:** CSS + JS
**Description:** Vertical scroll drives a five-panel horizontal track via requestAnimationFrame. Each panel carries four independent horizontal parallax bands — giant numeral bg, decorative text ribbon, foreground content card, and right-side SVG visual — gliding at −0.4× to +0.6× relative speed. Progress fill bar, slide counter. Space Grotesk + Space Mono on near-black with vivid accent per panel.
**HTML:**
```html
01
Chapter One
Motion Through Space
Vertical scroll drives horizontal travel. Each layer moves at its own speed — the background drifts, the number floats, the content holds firm. Depth from pure math.
01 / 05
02
Chapter Two
Layers in Tension
The background moves opposite to your scroll direction. The foreground barely shifts. The gap between them is where depth lives — created without a single CSS 3D property.
02 / 05
03
Chapter Three
Speed as Hierarchy
Fast-moving elements feel close. Slow-moving elements feel distant. The eye reads speed differentials as spatial distance — an ancient visual instinct made digital.
03 / 05
04
Chapter Four
Four Kinds of Still
Every layer is in motion — yet nothing feels chaotic. The geometry holds its orbit. The content waits. The number recedes. Stillness is a composition, not an absence.
04 / 05
05
Chapter Five
The End Begins
Five panels, five velocities, one scroll gesture. The journey across them felt longer than the distance traveled — that's what parallax does. It stretches space with motion.
05 / 05
```
**CSS:**
```css
.plx-06, .plx-06 *, .plx-06 *::before, .plx-06 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.plx-06 {
font-family: 'Space Grotesk', sans-serif;
background: #06060e;
color: #f0eff8;
}
/* Tall enough to drive 5 panels of horizontal scroll */
.plx-06__driver {
height: 500vh;
position: relative;
}
/* Sticky container holds the whole horizontal experience */
.plx-06__sticky {
position: sticky;
top: 0;
height: 100vh;
overflow: hidden;
display: flex;
flex-direction: column;
}
/* Top bar */
.plx-06__bar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px 40px;
flex-shrink: 0;
border-bottom: 1px solid rgba(240,239,248,0.08);
position: relative;
z-index: 10;
}
.plx-06__logo {
font-family: 'Space Mono', monospace;
font-size: 12px;
letter-spacing: 0.15em;
text-transform: uppercase;
opacity: 0.6;
}
.plx-06__progress-track {
flex: 1; max-width: 280px; margin: 0 32px;
height: 1px; background: rgba(255,255,255,0.1); position: relative;
}
.plx-06__progress-fill {
position: absolute; inset: 0 auto 0 0;
height: 100%; width: 0%; background: #fff; transition: width 60ms linear;
}
.plx-06__counter {
font-family: 'Space Mono', monospace;
font-size: 11px; opacity: 0.35; letter-spacing: 0.1em;
}
/* Horizontal viewport — clips the track */
.plx-06__viewport {
flex: 1;
position: relative;
overflow: hidden;
}
/* Track — moves horizontally, 5 panels wide */
.plx-06__track {
display: flex;
width: 500%;
height: 100%;
will-change: transform;
}
/* Each panel = 1/5 of the track = 100vw */
.plx-06__panel {
width: 20%;
height: 100%;
position: relative;
overflow: hidden;
flex-shrink: 0;
}
/* ── Layer A: Full-bleed background ── */
.plx-06__bg {
position: absolute;
inset: -15%;
will-change: transform;
transition: none;
}
.plx-06__panel:nth-child(1) .plx-06__bg { background: linear-gradient(135deg, #0a001a 0%, #1a0030 60%, #2a0050 100%); }
.plx-06__panel:nth-child(2) .plx-06__bg { background: linear-gradient(135deg, #001a10 0%, #00301a 60%, #004020 100%); }
.plx-06__panel:nth-child(3) .plx-06__bg { background: linear-gradient(135deg, #1a0800 0%, #30100000 0%, #301000 100%); }
.plx-06__panel:nth-child(3) .plx-06__bg { background: linear-gradient(135deg, #1a0a00 0%, #301200 100%); }
.plx-06__panel:nth-child(4) .plx-06__bg { background: linear-gradient(135deg, #00101a 0%, #001c30 100%); }
.plx-06__panel:nth-child(5) .plx-06__bg { background: linear-gradient(135deg, #1a001a 0%, #280028 100%); }
/* ── Layer B: Giant number ── */
.plx-06__num-layer {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
will-change: transform;
pointer-events: none;
}
.plx-06__big-num {
font-family: 'Space Mono', monospace;
font-size: clamp(180px, 35vw, 480px);
font-weight: 700;
line-height: 1;
letter-spacing: -0.05em;
opacity: 0.05;
color: #fff;
user-select: none;
}
/* ── Layer C: Decorative SVG shape ── */
.plx-06__shape-layer {
position: absolute;
inset: 0;
will-change: transform;
pointer-events: none;
}
.plx-06__shape-svg {
position: absolute;
top: 50%; right: 8%;
transform: translateY(-50%);
width: 36vw; height: 36vw;
max-width: 400px; max-height: 400px;
opacity: 0.18;
}
/* ── Layer D: Content ── */
.plx-06__content {
position: absolute;
top: 50%;
left: 10%;
transform: translateY(-50%);
z-index: 5;
will-change: transform;
max-width: 42%;
}
.plx-06__panel-tag {
font-family: 'Space Mono', monospace;
font-size: 10px;
letter-spacing: 0.3em;
text-transform: uppercase;
opacity: 0.4;
margin-bottom: 16px;
display: block;
}
.plx-06__panel-title {
font-family: 'Space Grotesk', sans-serif;
font-size: clamp(36px, 6vw, 84px);
font-weight: 700;
line-height: 0.95;
letter-spacing: -0.03em;
margin-bottom: 20px;
}
.plx-06__panel-body {
font-size: 14px;
font-weight: 300;
line-height: 1.75;
opacity: 0.5;
max-width: 340px;
}
.plx-06__panel-num {
display: block;
font-family: 'Space Mono', monospace;
font-size: 10px;
letter-spacing: 0.2em;
opacity: 0.25;
margin-top: 28px;
}
/* Accent colors per panel */
.plx-06__panel:nth-child(1) .plx-06__panel-title { color: #c084fc; }
.plx-06__panel:nth-child(2) .plx-06__panel-title { color: #4ade80; }
.plx-06__panel:nth-child(3) .plx-06__panel-title { color: #fb923c; }
.plx-06__panel:nth-child(4) .plx-06__panel-title { color: #38bdf8; }
.plx-06__panel:nth-child(5) .plx-06__panel-title { color: #f472b6; }
/* Vertical dot nav */
.plx-06__dots {
position: absolute;
bottom: 28px;
left: 50%;
transform: translateX(-50%);
z-index: 20;
display: flex;
gap: 10px;
}
.plx-06__dot {
width: 5px; height: 5px;
border-radius: 50%;
background: rgba(255,255,255,0.2);
transition: all 0.3s;
}
.plx-06__dot.is-active {
background: #fff;
transform: scale(1.6);
}
/* Scroll hint — only on panel 1 */
.plx-06__hint {
position: absolute;
right: 40px;
top: 50%;
transform: translateY(-50%);
z-index: 10;
display: flex;
align-items: center;
gap: 12px;
font-family: 'Space Mono', monospace;
font-size: 9px;
letter-spacing: 0.25em;
text-transform: uppercase;
opacity: 0;
transition: opacity 0.4s;
}
.plx-06__hint.is-visible { opacity: 0.35; }
.plx-06__hint-arr {
display: flex;
flex-direction: column;
gap: 4px;
}
.plx-06__hint-arr span {
display: block;
width: 18px;
height: 1px;
background: rgba(255,255,255,0.6);
animation: plx-06-arr 1.6s ease-in-out infinite;
}
.plx-06__hint-arr span:nth-child(2) { animation-delay: 0.15s; }
.plx-06__hint-arr span:nth-child(3) { animation-delay: 0.3s; }
@keyframes plx-06-arr {
0%, 100% { transform: scaleX(1); opacity: 0.6; }
50% { transform: scaleX(1.4); opacity: 1; }
}
@media (max-width: 768px) {
.plx-06__content { max-width: 70%; left: 6%; }
.plx-06__shape-svg { display: none; }
.plx-06__bar { padding: 14px 20px; }
.plx-06__progress-track { max-width: 140px; margin: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
.plx-06__bg, .plx-06__num-layer, .plx-06__shape-layer, .plx-06__content { transform: none !important; }
.plx-06__track { transform: none !important; }
.plx-06__hint-arr span { animation: none; }
}
```
**JS:**
```js
(() => {
const driver = document.getElementById('plx06-driver');
const track = document.getElementById('plx06-track');
const fill = document.getElementById('plx06-fill');
const counter = document.getElementById('plx06-counter');
const hint = document.getElementById('plx06-hint');
const dots = Array.from(document.querySelectorAll('.plx-06__dot'));
if (!driver || !track) return;
const PANELS = 5;
// Per-panel parallax layers
const panels = Array.from(track.querySelectorAll('.plx-06__panel')).map((panel, i) => ({
bg: panel.querySelector('[data-plx-bg]'),
num: panel.querySelector('[data-plx-num]'),
shape: panel.querySelector('[data-plx-shape]'),
content: panel.querySelector('[data-plx-content]'),
bgSpeed: parseFloat(panel.querySelector('[data-plx-bg]')?.dataset.plxBg || 0),
numSpeed: parseFloat(panel.querySelector('[data-plx-num]')?.dataset.plxNum || 0),
shapeSpeed: parseFloat(panel.querySelector('[data-plx-shape]')?.dataset.plxShape || 0),
contentSpeed: parseFloat(panel.querySelector('[data-plx-content]')?.dataset.plxContent || 0),
}));
let ticking = false;
function onScroll() {
if (ticking) return;
ticking = true;
requestAnimationFrame(() => {
const driverRect = driver.getBoundingClientRect();
const driverH = driver.offsetHeight;
const vh = window.innerHeight;
const vw = window.innerWidth;
// scrollable range: driverH - vh
const scrollableH = driverH - vh;
const rawProgress = Math.max(0, Math.min(1, -driverRect.top / scrollableH));
// Horizontal offset of the track
const maxOffset = vw * (PANELS - 1);
const trackX = rawProgress * maxOffset;
track.style.transform = `translateX(${-trackX}px)`;
// Progress bar and counter
fill.style.width = (rawProgress * 100) + '%';
const activePanel = Math.min(PANELS - 1, Math.floor(rawProgress * PANELS));
counter.textContent = String(activePanel + 1).padStart(2,'0') + ' / 0' + PANELS;
dots.forEach((d, i) => d.classList.toggle('is-active', i === activePanel));
// Hide hint after first panel
if (hint) hint.classList.toggle('is-visible', rawProgress < 0.05);
// Per-layer parallax within each panel
// The local offset of each panel center relative to the viewport center
panels.forEach((p, i) => {
const panelCenter = i * vw; // absolute X center of panel in track
const viewCenter = trackX; // current left edge of visible area
const localOffset = panelCenter - viewCenter; // px from left edge
// "distance from center" — 0 when panel is fully visible
const fromCenter = localOffset - vw / 2;
if (p.bg) p.bg.style.transform = `translateX(${fromCenter * p.bgSpeed}px)`;
if (p.num) p.num.style.transform = `translateX(${fromCenter * p.numSpeed}px)`;
if (p.shape) p.shape.style.transform = `translateX(${fromCenter * p.shapeSpeed}px)`;
if (p.content) p.content.style.transform = `translateY(-50%) translateX(${fromCenter * p.contentSpeed}px)`;
});
ticking = false;
});
}
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
})();
```
### 07. CSS Parallax Text Overlay Effect
**Type:** CSS + JS
**Description:** Three typographic scenes demonstrating the fixed-text / sliding-texture trick. Scene 1: 28vw Unbounded display headline stays fixed while a noise-texture gradient slides beneath it. Scene 2: sticky pull-quote with drifting background layer. Scene 3: split outline/filled 'BOLD' with contrasting textures scrolling in opposite directions. Instrument Serif italics as accent counterpoint.
**HTML:**
```html
TYPE
OVER
IMAGE
Background scrolls · Text stays
"
Design is the art of making decisions invisible.
The best interface is the one you never notice —
only the experience remains.
— A Designer Who Believed It
BOLD
BOLD
The texture moves; the word doesn't.
Massive display type stays anchored while the rich background texture shifts beneath it. The contrast between stillness and motion creates instant depth.
```
**CSS:**
```css
.plx-07, .plx-07 *, .plx-07 *::before, .plx-07 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.plx-07 {
font-family: 'DM Sans', sans-serif;
background: #0c0c0a;
color: #f4f0e8;
/* overflow:clip not overflow:hidden — see Demo 09 + 10 fixes.
overflow:hidden creates a scroll context that breaks
position:sticky on descendants. */
overflow-x: clip;
}
/* ═══ SCENE 1: Headline stays fixed, stripe bg scrolls beneath ═══ */
.plx-07__s1 {
position: relative;
/* 300vh = 200vh of sticky pin runway during which the JS
animates bg + text overlays. Sticky pinning works because
.plx-07 root uses overflow-x:clip (not :hidden) — the
:hidden form would create a scroll context that breaks
sticky on descendants. */
height: 300vh;
}
.plx-07__s1-pin {
position: sticky;
top: 0;
height: 100vh;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
/* Diagonal stripe background — this is what scrolls */
.plx-07__s1-bg {
position: absolute;
inset: -30%;
will-change: transform;
background:
repeating-linear-gradient(
-55deg,
rgba(220,160,60,0.0) 0px,
rgba(220,160,60,0.0) 30px,
rgba(220,160,60,0.06) 30px,
rgba(220,160,60,0.06) 32px,
rgba(220,160,60,0.0) 32px,
rgba(220,160,60,0.0) 62px,
rgba(220,160,60,0.1) 62px,
rgba(220,160,60,0.1) 64px
),
radial-gradient(ellipse at 30% 50%, rgba(180,100,20,0.25) 0%, transparent 55%),
radial-gradient(ellipse at 75% 30%, rgba(100,60,140,0.2) 0%, transparent 50%),
linear-gradient(160deg, #1a1206 0%, #0c0c0a 60%, #060810 100%);
}
/* The text itself — stays put */
.plx-07__s1-text {
position: relative;
z-index: 5;
text-align: center;
mix-blend-mode: normal;
}
.plx-07__display {
display: block;
font-family: 'Anton', sans-serif;
font-size: clamp(72px, 16vw, 210px);
line-height: 0.88;
letter-spacing: -0.02em;
color: #f4f0e8;
text-transform: uppercase;
will-change: transform;
}
.plx-07__display.is-outline {
color: transparent;
-webkit-text-stroke: 2px rgba(244,240,232,0.25);
}
.plx-07__display.is-accent {
color: #dca03c;
}
/* S1 progress-driven: bg scrolls while text moves subtly in opposite dir */
/* S1 label */
.plx-07__s1-label {
position: absolute;
bottom: 40px;
left: 50%;
transform: translateX(-50%);
font-size: 9px;
font-family: 'DM Sans', sans-serif;
letter-spacing: 0.3em;
text-transform: uppercase;
opacity: 0.3;
white-space: nowrap;
}
/* ═══ SCENE 2: Quote — text and bg move at different rates ═══ */
.plx-07__s2 {
position: relative;
/* See plx-07__s1 comment above for rationale. */
height: 300vh;
background: #0a0e12;
}
.plx-07__s2-pin {
position: sticky;
top: 0;
height: 100vh;
overflow: hidden;
display: flex;
align-items: center;
}
.plx-07__s2-bg {
position: absolute;
inset: -30%;
will-change: transform;
background:
repeating-linear-gradient(
25deg,
rgba(100,160,220,0.0) 0px,
rgba(100,160,220,0.0) 50px,
rgba(100,160,220,0.05) 50px,
rgba(100,160,220,0.05) 52px
),
radial-gradient(ellipse at 70% 60%, rgba(60,100,180,0.3) 0%, transparent 55%),
radial-gradient(ellipse at 20% 30%, rgba(180,60,120,0.2) 0%, transparent 50%),
linear-gradient(160deg, #060810 0%, #0a0e14 100%);
}
.plx-07__quote-wrap {
position: relative;
z-index: 5;
padding: 0 clamp(40px, 10vw, 140px);
will-change: transform;
max-width: 1100px;
}
.plx-07__qmark {
display: block;
font-family: 'Lora', serif;
font-size: clamp(120px, 20vw, 220px);
line-height: 0.7;
color: rgba(100,160,220,0.2);
margin-bottom: -24px;
}
.plx-07__qtext {
font-family: 'Lora', serif;
font-style: italic;
font-size: clamp(24px, 4.5vw, 58px);
line-height: 1.35;
font-weight: 400;
color: #f4f0e8;
}
.plx-07__qtext em {
font-style: normal;
color: #7eb8e0;
}
.plx-07__qattr {
display: block;
margin-top: 32px;
font-size: 10px;
letter-spacing: 0.3em;
text-transform: uppercase;
opacity: 0.35;
font-style: normal;
font-family: 'DM Sans', sans-serif;
}
/* ═══ SCENE 3: Giant word — top half normal, bottom half outline, bg scrolls ═══ */
.plx-07__s3 {
position: relative;
/* See plx-07__s1 comment above for rationale. */
height: 300vh;
background: #100c08;
}
.plx-07__s3-pin {
position: sticky;
top: 0;
height: 100vh;
overflow: hidden;
display: flex;
align-items: center;
justify-content: flex-end;
}
.plx-07__s3-bg {
position: absolute;
inset: -30%;
will-change: transform;
background:
repeating-linear-gradient(
0deg,
rgba(220,140,60,0.0) 0px,
rgba(220,140,60,0.0) 20px,
rgba(220,140,60,0.05) 20px,
rgba(220,140,60,0.05) 21px
),
radial-gradient(ellipse at 60% 45%, rgba(200,100,20,0.3) 0%, transparent 55%),
linear-gradient(160deg, #100c06 0%, #180e04 100%);
}
/* Giant split word */
.plx-07__word-wrap {
position: relative;
z-index: 5;
padding-right: clamp(30px, 8vw, 120px);
will-change: transform;
line-height: 0.88;
}
.plx-07__word-solid {
display: block;
font-family: 'Anton', sans-serif;
font-size: clamp(90px, 20vw, 270px);
letter-spacing: -0.04em;
color: #f4f0e8;
/* clip to top 50% */
clip-path: inset(0 0 50% 0);
line-height: 0.88;
}
.plx-07__word-outline {
display: block;
font-family: 'Anton', sans-serif;
font-size: clamp(90px, 20vw, 270px);
letter-spacing: -0.04em;
color: transparent;
-webkit-text-stroke: 2px rgba(244,240,232,0.4);
/* offset up to align perfectly */
margin-top: calc(clamp(90px, 20vw, 270px) * -0.88);
clip-path: inset(50% 0 0 0);
line-height: 0.88;
}
/* Caption text left side */
.plx-07__s3-caption {
position: absolute;
left: clamp(30px, 6vw, 80px);
bottom: 60px;
z-index: 6;
max-width: 260px;
}
.plx-07__s3-caption h3 {
font-family: 'Lora', serif;
font-style: italic;
font-size: clamp(18px, 2.5vw, 26px);
font-weight: 400;
line-height: 1.4;
margin-bottom: 12px;
}
.plx-07__s3-caption p {
font-size: 13px;
font-weight: 300;
line-height: 1.8;
opacity: 0.45;
}
/* ═══ Footer ═══ */
.plx-07__footer {
background: #f4f0e8;
color: #0c0c0a;
padding: 100px 60px;
text-align: center;
}
.plx-07__footer h2 {
font-family: 'Anton', sans-serif;
font-size: clamp(32px, 6vw, 80px);
letter-spacing: -0.03em;
text-transform: uppercase;
margin-bottom: 20px;
}
.plx-07__footer h2 em {
font-family: 'Lora', serif;
font-style: italic;
font-weight: 400;
color: #b87020;
}
.plx-07__footer p {
font-size: 15px;
font-weight: 300;
line-height: 1.8;
opacity: 0.55;
max-width: 480px;
margin: 0 auto;
}
@media (max-width: 600px) {
.plx-07__s3-caption { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.plx-07__s1-bg, .plx-07__s2-bg, .plx-07__s2-bg, .plx-07__s3-bg,
.plx-07__quote-wrap, .plx-07__word-wrap, .plx-07__display { transform: none !important; }
}
```
**JS:**
```js
(() => {
const s1 = document.querySelector('.plx-07__s1');
const s2 = document.querySelector('.plx-07__s2');
const s3 = document.querySelector('.plx-07__s3');
const s1bg = document.getElementById('plx07-s1-bg');
const line1 = document.getElementById('plx07-line1');
const line2 = document.getElementById('plx07-line2');
const line3 = document.getElementById('plx07-line3');
const s2bg = document.getElementById('plx07-s2-bg');
const quote = document.getElementById('plx07-quote');
const s3bg = document.getElementById('plx07-s3-bg');
const word = document.getElementById('plx07-word');
let ticking = false;
/* progress(el): sticky-pin progress, 0 at pin engage → 1 at pin
release. Uses (offsetHeight - innerHeight) as the divisor which
is the pin runway in scroll px. With scene at 300vh + sticky
inner at 100vh, the runway is 200vh of scroll. */
function progress(el) {
if (!el) return 0;
const r = el.getBoundingClientRect();
const h = el.offsetHeight - window.innerHeight;
return h > 0 ? Math.max(0, Math.min(1, -r.top / h)) : 0;
}
function onScroll() {
if (ticking) return;
ticking = true;
requestAnimationFrame(() => {
// Scene 1: bg scrolls up fast, text drifts slightly
const p1 = progress(s1);
if (s1bg) s1bg.style.transform = `translateY(${p1 * -120}px)`;
if (line1) line1.style.transform = `translateY(${p1 * 15}px)`;
if (line2) line2.style.transform = `translateY(${p1 * 0}px)`;
if (line3) line3.style.transform = `translateY(${p1 * -15}px)`;
// Scene 2: bg scrolls fast, quote drifts slowly upward
const p2 = progress(s2);
if (s2bg) s2bg.style.transform = `translateY(${p2 * -140}px)`;
if (quote) quote.style.transform = `translateY(${p2 * -40}px)`;
// Scene 3: bg scrolls, word barely moves (anchored feel)
const p3 = progress(s3);
if (s3bg) s3bg.style.transform = `translateY(${p3 * -120}px) skewY(${p3 * 1.5}deg)`;
if (word) word.style.transform = `translateY(${p3 * -12}px)`;
ticking = false;
});
}
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
})();
```
### 08. CSS Parallax Card Hover Effect
**Type:** CSS + JS
**Description:** Six product/profile cards where three independent layers — gradient background, geometric SVG decoration, text content — shift on mouse position at 8px, 14px, and 22px depth respectively. Card tilts ±12° on both axes via CSS perspective. Soft radial light layer tracks cursor. All transitions use cubic-bezier easing; mouseleave smoothly resets. Geist + Geist Mono.
**HTML:**
```html
🌌
01 · Astrophysics
The Observable Universe
93 billion light-years of space. Everything we know, everything we can ever know, fits inside this sphere.
Explore
💎
02 · Mineralogy
Crystalline Structures
Carbon under immense pressure becomes diamond. Chaos compressed into the most ordered thing in nature.
Discover
🌊
03 · Oceanography
Deep Currents
The ocean's thermohaline circulation moves water around the entire planet over hundreds of years.
Dive in
🏙️
04 · Architecture
Vertical Cities
When land is scarce and ambition isn't, we build upward. The skyline is a city's autobiography.
Ascend
⚡
05 · Physics
Electromagnetic Fields
Invisible forces that hold atoms together, power every device, and fill every cubic inch of space around you.
Charge up
🌿
06 · Botany
Fractal Growth
A fern leaf, a river delta, a bolt of lightning — nature repeats its favourite shapes at every scale.
Grow
```
**CSS:**
```css
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Fall back to system mono if Geist unavailable */
.plx-08 {
--bg: #0c0c10;
--surface: #14141c;
--border: rgba(255,255,255,0.08);
--text: #e8e8f0;
--muted: rgba(232,232,240,0.45);
--card-h: 440px;
background: var(--bg);
color: var(--text);
font-family: 'Geist', system-ui, sans-serif;
min-height: 100vh;
padding: 60px 40px;
}
/* Header */
.plx-08__header {
text-align: center;
margin-bottom: 80px;
}
.plx-08__label {
display: inline-block;
font-size: 10px;
font-family: 'Geist Mono', monospace;
letter-spacing: 0.3em;
text-transform: uppercase;
color: var(--muted);
margin-bottom: 16px;
}
.plx-08__header h1 {
font-size: clamp(32px, 5vw, 60px);
font-weight: 700;
letter-spacing: -0.03em;
line-height: 1.0;
}
.plx-08__header h1 span {
opacity: 0.3;
}
/* Grid */
.plx-08__grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 24px;
max-width: 1200px;
margin: 0 auto;
}
/* === THE CARD === */
.plx-08__card {
position: relative;
height: var(--card-h);
border-radius: 16px;
border: 1px solid var(--border);
overflow: hidden;
cursor: pointer;
transform-style: preserve-3d;
will-change: transform;
/* 3D perspective is set inline via JS */
transform: perspective(800px) rotateX(0deg) rotateY(0deg);
transition: transform 0.1s ease, box-shadow 0.3s ease;
}
.plx-08__card:not(:hover) {
transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.6s ease;
}
/* Background gradient layer — moves slower than card tilt */
.plx-08__card-bg {
position: absolute;
inset: -10%;
border-radius: 24px;
will-change: transform;
transition: transform 0.1s ease;
transform: translateX(0px) translateY(0px);
}
.plx-08__card:not(:hover) .plx-08__card-bg {
transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Card accent/color themes */
.plx-08__card:nth-child(1) .plx-08__card-bg { background: radial-gradient(ellipse at 40% 40%, rgba(99,102,241,0.6) 0%, rgba(30,27,75,0.9) 60%); }
.plx-08__card:nth-child(2) .plx-08__card-bg { background: radial-gradient(ellipse at 60% 40%, rgba(236,72,153,0.5) 0%, rgba(75,10,50,0.9) 60%); }
.plx-08__card:nth-child(3) .plx-08__card-bg { background: radial-gradient(ellipse at 40% 60%, rgba(16,185,129,0.5) 0%, rgba(5,50,30,0.9) 60%); }
.plx-08__card:nth-child(4) .plx-08__card-bg { background: radial-gradient(ellipse at 50% 40%, rgba(245,158,11,0.5) 0%, rgba(60,30,5,0.9) 60%); }
.plx-08__card:nth-child(5) .plx-08__card-bg { background: radial-gradient(ellipse at 60% 60%, rgba(14,165,233,0.5) 0%, rgba(5,30,60,0.9) 60%); }
.plx-08__card:nth-child(6) .plx-08__card-bg { background: radial-gradient(ellipse at 40% 40%, rgba(168,85,247,0.5) 0%, rgba(40,10,70,0.9) 60%); }
/* Shimmer/light layer */
.plx-08__card-light {
position: absolute;
inset: 0;
background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.12) 0%, transparent 60%);
will-change: background;
pointer-events: none;
transition: background 0.1s ease;
border-radius: inherit;
}
/* Noise texture */
.plx-08__card-noise {
position: absolute;
inset: 0;
opacity: 0.04;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
pointer-events: none;
}
/* Geometric decorative layer — moves opposite to BG */
.plx-08__card-geo {
position: absolute;
inset: 0;
will-change: transform;
transform: translateX(0px) translateY(0px);
transition: transform 0.1s ease;
pointer-events: none;
}
.plx-08__card:not(:hover) .plx-08__card-geo {
transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.plx-08__card-geo svg {
width: 100%; height: 100%;
opacity: 0.18;
}
/* Content layer — moves even more than card tilt (depth pop) */
.plx-08__card-content {
position: absolute;
inset: 0;
padding: 32px;
display: flex;
flex-direction: column;
justify-content: flex-end;
will-change: transform;
transform: translateX(0px) translateY(0px) translateZ(0px);
transition: transform 0.1s ease;
z-index: 5;
}
.plx-08__card:not(:hover) .plx-08__card-content {
transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.plx-08__card-icon {
width: 48px;
height: 48px;
border-radius: 12px;
border: 1px solid rgba(255,255,255,0.15);
background: rgba(255,255,255,0.08);
display: grid;
place-items: center;
font-size: 22px;
margin-bottom: auto;
}
.plx-08__card-tag {
font-family: 'Geist Mono', monospace;
font-size: 10px;
letter-spacing: 0.2em;
text-transform: uppercase;
opacity: 0.4;
margin-bottom: 10px;
}
.plx-08__card-title {
font-size: 22px;
font-weight: 700;
letter-spacing: -0.02em;
line-height: 1.2;
margin-bottom: 10px;
}
.plx-08__card-body {
font-size: 13px;
font-weight: 300;
line-height: 1.65;
opacity: 0.55;
margin-bottom: 24px;
}
.plx-08__card-cta {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
font-weight: 500;
font-family: 'Geist Mono', monospace;
letter-spacing: 0.08em;
opacity: 0.7;
transition: opacity 0.2s;
}
.plx-08__card:hover .plx-08__card-cta { opacity: 1; }
.plx-08__card-cta::after {
content: '→';
transition: transform 0.2s;
}
.plx-08__card:hover .plx-08__card-cta::after { transform: translateX(4px); }
/* Shadow ring on hover */
.plx-08__card:hover {
box-shadow:
0 20px 60px rgba(0,0,0,0.5),
0 0 0 1px rgba(255,255,255,0.12);
}
/* Footer note */
.plx-08__footer {
text-align: center;
margin-top: 60px;
font-family: 'Geist Mono', monospace;
font-size: 11px;
letter-spacing: 0.15em;
color: var(--muted);
}
@media (max-width: 600px) {
.plx-08 { padding: 40px 20px; }
.plx-08__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.plx-08__card { transition: none !important; transform: none !important; }
.plx-08__card-bg, .plx-08__card-geo, .plx-08__card-content { transition: none !important; transform: none !important; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.plx-08');
if (!root) return;
const cards = Array.from(root.querySelectorAll('.plx-08__card'));
const TILT_MAX = 18; // degrees
const BG_SPEED = 0.3;
const GEO_SPEED = -0.5;
const CONTENT_SPEED = 0.7;
cards.forEach(card => {
const bg = card.querySelector('.plx-08__card-bg');
const light = card.querySelector('.plx-08__card-light');
const geo = card.querySelector('.plx-08__card-geo');
const content = card.querySelector('.plx-08__card-content');
function onMove(e) {
const rect = card.getBoundingClientRect();
// Normalized position: -1 to 1
const nx = ((e.clientX - rect.left) / rect.width) * 2 - 1;
const ny = ((e.clientY - rect.top) / rect.height) * 2 - 1;
// Card tilt
const rotX = -ny * TILT_MAX;
const rotY = nx * TILT_MAX;
card.style.transform = `perspective(800px) rotateX(${rotX}deg) rotateY(${rotY}deg)`;
// BG drifts slowly in same direction
const bgX = nx * 20 * BG_SPEED;
const bgY = ny * 20 * BG_SPEED;
if (bg) bg.style.transform = `translateX(${bgX}px) translateY(${bgY}px)`;
// Light follows cursor
if (light) light.style.background = `radial-gradient(circle at ${(nx+1)/2*100}% ${(ny+1)/2*100}%, rgba(255,255,255,0.15) 0%, transparent 55%)`;
// Geo drifts in opposite direction (depth separation)
const geoX = nx * 20 * GEO_SPEED;
const geoY = ny * 20 * GEO_SPEED;
if (geo) geo.style.transform = `translateX(${geoX}px) translateY(${geoY}px)`;
// Content pops forward
const contentX = nx * 12 * CONTENT_SPEED;
const contentY = ny * 12 * CONTENT_SPEED;
if (content) content.style.transform = `translateX(${contentX}px) translateY(${contentY}px) translateZ(20px)`;
}
function onLeave() {
card.style.transform = 'perspective(800px) rotateX(0deg) rotateY(0deg)';
if (bg) bg.style.transform = 'translateX(0px) translateY(0px)';
if (geo) geo.style.transform = 'translateX(0px) translateY(0px)';
if (content) content.style.transform = 'translateX(0px) translateY(0px) translateZ(0px)';
if (light) light.style.background = 'radial-gradient(circle at 50% 50%, rgba(255,255,255,0.12) 0%, transparent 60%)';
}
// Touch support
function onTouch(e) {
const t = e.touches[0];
onMove({ clientX: t.clientX, clientY: t.clientY });
}
card.addEventListener('mousemove', onMove);
card.addEventListener('mouseleave', onLeave);
card.addEventListener('touchmove', onTouch, { passive: true });
card.addEventListener('touchend', onLeave);
});
})();
```
### 09. CSS Zoom-In / Depth Parallax on Scroll
**Type:** CSS + JS
**Description:** Cinematic camera-zoom illusion: concentric-ring system scales 1× to 3× while background scales 1× to 2× in the opposite direction as you scroll, building a 'falling forward' sensation. Gallery of three depth cells with hover-triggered scale. Second scene: oversized Big Shoulders Display text with bg scale counter-zoom. Progress-driven opacity fades. Libre Baskerville subheads.
**HTML:**
```html
Scroll-Driven Zoom · CSS Scale
GET CLOSER
The world expands toward you. A depth illusion built on CSS scale and scroll position — no 3D transforms needed.
NebulaDeep space · scroll depth
AbyssOcean floor · scroll depth
EmberCore heat · scroll depth
Depth is a feeling, not a fact.
Your brain reads scale change as three-dimensional approach. The zoom-in effect triggers that ancient spatial instinct — getting closer to something important.
```
**CSS:**
```css
.plx-09, .plx-09 *, .plx-09 *::before, .plx-09 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.plx-09 {
--gold: #d4a843;
--ink: #080608;
--off: #f2eee8;
background: var(--ink);
color: var(--off);
font-family: 'Libre Baskerville', serif;
/* overflow-x:hidden was breaking position:sticky on descendants.
Setting any overflow axis to non-visible creates a new scroll
context, making this element the sticky-containment ancestor
instead of body — so the .plx-09__zoom-sticky inner never
pinned, and the visitor saw the zoom scene bg + rings scroll
past as a single block (looked like dead empty scroll between
sections). overflow:clip is the modern equivalent that
prevents horizontal overflow WITHOUT establishing a scroll
context — sticky works correctly underneath. Chrome 90+,
Safari 16+, Firefox 81+ (all evergreen majors). */
overflow-x: clip;
}
/* ═══ SCENE 1: Zoom-through ═══ */
.plx-09__zoom {
position: relative;
height: 400vh;
}
.plx-09__zoom-sticky {
position: sticky;
top: 0;
height: 100vh;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
/* BG: scales UP (world expanding toward viewer) */
.plx-09__zoom-bg {
position: absolute;
inset: -20%;
will-change: transform;
transform-origin: center center;
background:
radial-gradient(ellipse at 50% 50%, rgba(212,168,67,0.2) 0%, transparent 40%),
conic-gradient(from 0deg at 50% 50%,
#0a0808 0deg, #110a10 60deg, #0a0a12 120deg,
#0c0808 180deg, #100c08 240deg, #080a0c 300deg, #0a0808 360deg);
}
/* Grid: scales UP faster (closer layer) */
.plx-09__zoom-grid {
position: absolute;
inset: -50%;
will-change: transform;
transform-origin: center center;
background-image:
linear-gradient(rgba(212,168,67,0.06) 1px, transparent 1px),
linear-gradient(90deg, rgba(212,168,67,0.06) 1px, transparent 1px);
background-size: 80px 80px;
}
/* Rings: scale UP most (fly through them) */
.plx-09__rings {
position: absolute;
width: 100vmin; height: 100vmin;
will-change: transform;
transform-origin: center center;
top: 50%; left: 50%;
transform: translate(-50%, -50%);
}
.plx-09__ring {
position: absolute;
border-radius: 50%;
top: 50%; left: 50%;
transform: translate(-50%, -50%);
border: 1px solid;
}
.plx-09__ring:nth-child(1) { width: 92%; height: 92%; border-color: rgba(212,168,67,0.10); }
.plx-09__ring:nth-child(2) { width: 74%; height: 74%; border-color: rgba(212,168,67,0.14); }
.plx-09__ring:nth-child(3) { width: 56%; height: 56%; border-color: rgba(212,168,67,0.20); }
.plx-09__ring:nth-child(4) { width: 38%; height: 38%; border-color: rgba(212,168,67,0.30); }
.plx-09__ring:nth-child(5) { width: 22%; height: 22%; border-color: rgba(212,168,67,0.45); }
.plx-09__ring:nth-child(6) { width: 8%; height: 8%; border-color: rgba(212,168,67,0.7); background: rgba(212,168,67,0.1); }
/* Gold dot center */
.plx-09__dot {
position: absolute;
width: 10px; height: 10px;
border-radius: 50%;
background: var(--gold);
top: 50%; left: 50%;
transform: translate(-50%, -50%);
box-shadow: 0 0 20px rgba(212,168,67,0.9), 0 0 60px rgba(212,168,67,0.4);
z-index: 4;
}
/* Content: fades and slides in from bottom as zoom progresses */
.plx-09__zoom-content {
position: relative;
z-index: 10;
text-align: center;
padding: 0 40px;
opacity: 0;
transform: translateY(50px);
will-change: opacity, transform;
pointer-events: none;
}
.plx-09__zoom-eyebrow {
font-family: 'Big Shoulders Display', sans-serif;
font-size: 11px;
letter-spacing: 0.4em;
text-transform: uppercase;
color: var(--gold);
display: block;
margin-bottom: 16px;
}
.plx-09__zoom-h {
font-family: 'Big Shoulders Display', sans-serif;
font-weight: 900;
font-size: clamp(56px, 13vw, 170px);
letter-spacing: -0.04em;
line-height: 0.88;
}
.plx-09__zoom-sub {
margin-top: 24px;
font-style: italic;
font-size: 17px;
line-height: 1.7;
opacity: 0;
color: rgba(242,238,232,0.55);
max-width: 420px;
display: block;
will-change: opacity;
}
/* ═══ SCENE 2: Gallery — zoom inside bounded cells ═══ */
.plx-09__gallery {
padding: 100px 40px;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
max-width: 1100px;
margin: 0 auto;
}
.plx-09__cell {
position: relative;
aspect-ratio: 3/4;
overflow: hidden;
cursor: default;
}
/* Each cell inner: starts zoomed in (scale 1.3), scrolls to 1.0 as it enters viewport */
.plx-09__cell-inner {
position: absolute;
inset: -15%;
transform-origin: center center;
will-change: transform;
}
.plx-09__cell:nth-child(1) .plx-09__cell-inner {
background: radial-gradient(circle at 40% 40%, #4a2870 0%, #140820 70%);
}
.plx-09__cell:nth-child(2) .plx-09__cell-inner {
background: radial-gradient(circle at 55% 45%, #154060 0%, #04101c 70%);
}
.plx-09__cell:nth-child(3) .plx-09__cell-inner {
background: radial-gradient(circle at 50% 55%, #5a1a08 0%, #180604 70%);
}
.plx-09__cell-inner::after {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(circle at 50% 40%, rgba(255,255,255,0.1) 0%, transparent 55%);
}
.plx-09__cell-label {
position: absolute;
bottom: 20px;
left: 20px;
z-index: 3;
font-family: 'Big Shoulders Display', sans-serif;
font-size: 32px;
font-weight: 900;
letter-spacing: -0.02em;
text-shadow: 0 2px 16px rgba(0,0,0,0.8);
}
.plx-09__cell-label small {
display: block;
font-family: 'Libre Baskerville', serif;
font-size: 11px;
font-weight: 400;
font-style: italic;
letter-spacing: 0.05em;
opacity: 0.5;
margin-top: 4px;
}
/* ═══ SCENE 3: Outro zoom ═══ */
.plx-09__outro {
position: relative;
height: 300vh;
}
.plx-09__outro-sticky {
position: sticky;
top: 0;
height: 100vh;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.plx-09__outro-bg {
position: absolute;
inset: -20%;
will-change: transform;
transform-origin: center center;
background: radial-gradient(ellipse at 50% 50%, #1a0c26 0%, #080608 65%);
}
.plx-09__outro-text {
position: relative;
z-index: 5;
text-align: center;
will-change: transform;
}
.plx-09__outro-text h2 {
font-family: 'Big Shoulders Display', sans-serif;
font-weight: 900;
font-size: clamp(44px, 10vw, 130px);
letter-spacing: -0.04em;
line-height: 0.9;
}
.plx-09__outro-text h2 em {
font-style: italic;
font-family: 'Libre Baskerville', serif;
font-weight: 400;
color: var(--gold);
font-size: 0.65em;
}
.plx-09__outro-text p {
margin-top: 30px;
font-style: italic;
font-size: 15px;
line-height: 1.8;
color: rgba(242,238,232,0.4);
max-width: 380px;
margin-left: auto;
margin-right: auto;
}
@media (max-width: 768px) {
.plx-09__gallery { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.plx-09__zoom-bg, .plx-09__zoom-grid, .plx-09__rings,
.plx-09__cell-inner, .plx-09__outro-bg, .plx-09__outro-text { transform: none !important; }
.plx-09__zoom-content { opacity: 1 !important; transform: none !important; }
.plx-09__zoom-sub { opacity: 1 !important; }
}
```
**JS:**
```js
(() => {
const zoomBlock = document.getElementById('plx09-zoom');
const bg = document.getElementById('plx09-bg');
const grid = document.getElementById('plx09-grid');
const rings = document.getElementById('plx09-rings');
const content = document.getElementById('plx09-content');
const sub = document.getElementById('plx09-sub');
const galCells = [
document.getElementById('plx09-g1'),
document.getElementById('plx09-g2'),
document.getElementById('plx09-g3'),
];
const outroBlock = document.getElementById('plx09-outro');
const outroBg = document.getElementById('plx09-outro-bg');
const outroText = document.getElementById('plx09-outro-text');
let ticking = false;
function prog(el) {
if (!el) return 0;
const r = el.getBoundingClientRect();
const h = el.offsetHeight - window.innerHeight;
return h > 0 ? Math.max(0, Math.min(1, -r.top / h)) : 0;
}
function onScroll() {
if (ticking) return;
ticking = true;
requestAnimationFrame(() => {
const vh = window.innerHeight;
// ── SCENE 1 ──
const p = prog(zoomBlock);
// bg: scales from 1 → 2.2 (world rushes in)
if (bg) bg.style.transform = `scale(${1 + p * 1.2})`;
// grid: scales faster (closer layer)
if (grid) grid.style.transform = `scale(${1 + p * 1.8})`;
// rings: fly through (scale 1 → 3.5)
if (rings) rings.style.transform = `translate(-50%,-50%) scale(${1 + p * 2.5})`;
// content: fade in after 35% scroll, slide up
const cp = Math.max(0, (p - 0.35) / 0.45);
if (content) {
content.style.opacity = String(Math.min(1, cp * 1.5));
content.style.transform = `translateY(${(1 - Math.min(1, cp)) * 50}px)`;
}
if (sub) sub.style.opacity = String(Math.min(1, Math.max(0, (p - 0.55) / 0.3)));
// ── GALLERY: parallax inside each cell ──
galCells.forEach((cell) => {
if (!cell) return;
const parent = cell.closest('.plx-09__cell');
if (!parent) return;
const r = parent.getBoundingClientRect();
if (r.bottom < -vh || r.top > vh * 2) return;
const centerOffset = (r.top + r.height / 2) - vh / 2;
// Cell comes in zoomed out (1.0) from below, scale up as it centers
const cellProg = Math.max(0, Math.min(1, (vh * 0.6 - r.top) / (vh * 0.8)));
const scaleVal = 1.0 + cellProg * 0.25;
const yShift = centerOffset * 0.1;
cell.style.transform = `scale(${scaleVal}) translateY(${yShift}px)`;
});
// ── OUTRO ──
const op = prog(outroBlock);
if (outroBg) outroBg.style.transform = `scale(${1 + op * 0.5})`;
if (outroText) outroText.style.transform = `scale(${1 + op * 0.06}) translateY(${op * -18}px)`;
ticking = false;
});
}
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
})();
```
### 10. CSS Parallax Background Blur Transition
**Type:** CSS + JS
**Description:** Scroll drives backdrop-filter: blur from 0 to 28px on a vivid blob hero, while a frosted-glass card rises and fades in — pure CSS filter parallax. Live blur-strength badge fixed top-right. Three below-fold panels each with parallax inner image and a hover-triggered blur-reveal text overlay. Glassmorphism aesthetic. Cormorant Garamond + DM Mono on deep violet ground.
**HTML:**
```html
BLUR · 0px
Parallax · Background Blur Transition
Focus throughmotion.
Scroll to blur the world. The color field beneath you fades from vivid to frosted glass as you descend.
Glassmorphism · Blur Parallax
The world went soft.
The same color field that lived beneath the headline has blurred into this frosted surface. Depth through diffusion — a parallax story told in focus.
01 / Concept
Blur as distance.
The further something is from the focal plane, the softer it becomes. Parallax blur recreates this optical truth — objects you've scrolled past recede into soft focus.
02 / Technique
Glass over color.
Two versions of the same color field — one sharp, one blurred — cross-fade as you scroll. The transition is driven by opacity, not filters, keeping performance smooth on any device.
03 / Effect
Parallax through focus.
The background images inside these panels scroll at 0.35× the page speed, creating the sensation that the content floats in front of a deeper layer. Scroll depth as spatial poetry.
```
**CSS:**
```css
.plx-10, .plx-10 *, .plx-10 *::before, .plx-10 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.plx-10 {
--bg: #07080e;
--text: #eff2f8;
--accent: #92c5f0;
--warm: #e8c88a;
font-family: 'Cormorant Garamond', serif;
background: var(--bg);
color: var(--text);
/* overflow-x:hidden was breaking position:sticky on descendants —
same root cause as Demo 09 (commit 876bc78). overflow:clip is
the modern equivalent: prevents horizontal overflow without
creating a scroll context that would steal sticky containment
from the body. Chrome 90+, Safari 16+, Firefox 81+. */
overflow-x: clip;
}
/* ═══ HERO: vivid color field blurs as you scroll ═══ */
.plx-10__hero {
position: relative;
height: 250vh;
}
.plx-10__hero-sticky {
position: sticky;
top: 0;
height: 100vh;
overflow: hidden;
}
/* The vivid color blobs — this layer parallaxes */
.plx-10__blobs {
position: absolute;
inset: -20%;
will-change: transform;
}
.plx-10__blob {
position: absolute;
border-radius: 50%;
filter: blur(70px);
}
.plx-10__blob:nth-child(1) {
width: 60vw; height: 60vw;
top: -15%; left: -10%;
background: radial-gradient(circle, rgba(80,150,255,0.6) 0%, transparent 70%);
}
.plx-10__blob:nth-child(2) {
width: 50vw; height: 50vw;
top: 20%; right: -5%;
background: radial-gradient(circle, rgba(180,80,255,0.55) 0%, transparent 70%);
}
.plx-10__blob:nth-child(3) {
width: 45vw; height: 45vw;
bottom: -5%; left: 30%;
background: radial-gradient(circle, rgba(255,130,80,0.5) 0%, transparent 70%);
}
.plx-10__blob:nth-child(4) {
width: 35vw; height: 35vw;
top: 50%; left: 15%;
background: radial-gradient(circle, rgba(80,240,180,0.35) 0%, transparent 70%);
}
/* The frosted overlay — its opacity and filter change with scroll */
/* IMPORTANT: we use a solid semi-opaque overlay that increases,
NOT backdrop-filter (which doesn't work on parent bg) */
.plx-10__frost-overlay {
position: absolute;
inset: 0;
z-index: 2;
background: linear-gradient(
160deg,
rgba(7, 8, 14, 0) 0%,
rgba(7, 8, 14, 0) 100%
);
will-change: opacity;
opacity: 0;
/* We'll use a canvas-style blur by adding a blurred duplicate via a pseudo */
}
/* The blurred version of the blobs — initially invisible, fades in */
.plx-10__blobs-blur {
position: absolute;
inset: -20%;
will-change: transform, opacity, filter;
opacity: 0;
filter: blur(0px);
}
.plx-10__blobs-blur .plx-10__blob:nth-child(1) {
width: 60vw; height: 60vw;
top: -15%; left: -10%;
background: radial-gradient(circle, rgba(80,150,255,0.6) 0%, transparent 70%);
filter: blur(70px);
}
.plx-10__blobs-blur .plx-10__blob:nth-child(2) {
width: 50vw; height: 50vw;
top: 20%; right: -5%;
background: radial-gradient(circle, rgba(180,80,255,0.55) 0%, transparent 70%);
filter: blur(70px);
}
.plx-10__blobs-blur .plx-10__blob:nth-child(3) {
width: 45vw; height: 45vw;
bottom: -5%; left: 30%;
background: radial-gradient(circle, rgba(255,130,80,0.5) 0%, transparent 70%);
filter: blur(70px);
}
.plx-10__blobs-blur .plx-10__blob:nth-child(4) {
width: 35vw; height: 35vw;
top: 50%; left: 15%;
background: radial-gradient(circle, rgba(80,240,180,0.35) 0%, transparent 70%);
filter: blur(70px);
}
/* Additional extra-blur layer at full blur */
.plx-10__blobs-blur2 {
position: absolute;
inset: -20%;
will-change: transform, opacity, filter;
opacity: 0;
}
.plx-10__blobs-blur2 .plx-10__blob:nth-child(1) {
width: 70vw; height: 70vw;
top: -20%; left: -15%;
background: radial-gradient(circle, rgba(80,150,255,0.5) 0%, transparent 70%);
filter: blur(140px);
}
.plx-10__blobs-blur2 .plx-10__blob:nth-child(2) {
width: 60vw; height: 60vw;
top: 15%; right: -10%;
background: radial-gradient(circle, rgba(180,80,255,0.45) 0%, transparent 70%);
filter: blur(120px);
}
.plx-10__blobs-blur2 .plx-10__blob:nth-child(3) {
width: 55vw; height: 55vw;
bottom: -10%; left: 25%;
background: radial-gradient(circle, rgba(255,130,80,0.4) 0%, transparent 70%);
filter: blur(130px);
}
/* Dark overlay accumulates */
.plx-10__dark-overlay {
position: absolute;
inset: 0;
z-index: 3;
background: var(--bg);
will-change: opacity;
opacity: 0;
}
/* Glass card that fades in on top */
.plx-10__glass-wrap {
position: absolute;
inset: 0;
z-index: 5;
display: flex;
align-items: center;
justify-content: center;
will-change: opacity, transform;
opacity: 0;
transform: translateY(30px);
}
.plx-10__glass-card {
background: rgba(255,255,255,0.07);
border: 1px solid rgba(255,255,255,0.14);
border-radius: 20px;
padding: 56px 64px;
max-width: 560px;
text-align: center;
box-shadow: 0 32px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.12);
position: relative;
overflow: hidden;
}
.plx-10__glass-card::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
pointer-events: none;
}
.plx-10__card-tag {
font-family: 'DM Mono', monospace;
font-size: 9px;
letter-spacing: 0.35em;
text-transform: uppercase;
color: var(--accent);
opacity: 0.7;
display: block;
margin-bottom: 20px;
}
.plx-10__card-h {
font-size: clamp(36px, 5vw, 64px);
font-weight: 600;
line-height: 1.05;
margin-bottom: 20px;
}
.plx-10__card-h em {
font-style: italic;
font-weight: 300;
color: var(--accent);
}
.plx-10__card-p {
font-size: 17px;
font-weight: 300;
font-style: italic;
line-height: 1.7;
color: rgba(239,242,248,0.6);
}
.plx-10__card-line {
width: 40px;
height: 1px;
background: rgba(146,197,240,0.4);
margin: 24px auto;
}
/* Blur strength badge */
.plx-10__badge {
position: fixed;
top: 20px;
right: 20px;
z-index: 100;
font-family: 'DM Mono', monospace;
font-size: 10px;
letter-spacing: 0.2em;
color: var(--accent);
opacity: 0.6;
background: rgba(7,8,14,0.7);
padding: 6px 12px;
border: 1px solid rgba(146,197,240,0.2);
border-radius: 4px;
pointer-events: none;
}
/* Hero initial headline (fades out as blur comes in) */
.plx-10__hero-headline {
position: absolute;
inset: 0;
z-index: 4;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 40px;
will-change: opacity, transform;
pointer-events: none;
}
.plx-10__hero-tag {
font-family: 'DM Mono', monospace;
font-size: 10px;
letter-spacing: 0.3em;
text-transform: uppercase;
color: rgba(239,242,248,0.4);
margin-bottom: 24px;
display: block;
}
.plx-10__hero-h {
font-size: clamp(52px, 12vw, 160px);
font-weight: 600;
line-height: 0.92;
letter-spacing: -0.02em;
}
.plx-10__hero-h em {
font-style: italic;
font-weight: 300;
color: rgba(239,242,248,0.6);
}
.plx-10__hero-sub {
margin-top: 24px;
font-size: 16px;
font-style: italic;
font-weight: 300;
color: rgba(239,242,248,0.45);
max-width: 420px;
}
.plx-10__scroll-hint {
margin-top: 40px;
font-family: 'DM Mono', monospace;
font-size: 9px;
letter-spacing: 0.3em;
text-transform: uppercase;
color: rgba(239,242,248,0.25);
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.plx-10__scroll-line {
width: 1px; height: 44px;
background: linear-gradient(to bottom, rgba(239,242,248,0.3), transparent);
animation: plx-10-line 1.8s ease-in-out infinite;
}
@keyframes plx-10-line {
0%, 100% { opacity: 1; transform: scaleY(1); transform-origin: top; }
50% { opacity: 0.3; transform: scaleY(0.4); transform-origin: top; }
}
/* ═══ CONTENT SECTIONS below hero ═══ */
.plx-10__sections {
background: var(--bg);
}
.plx-10__section {
position: relative;
min-height: 80vh;
padding: 100px 5vw;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 60px;
align-items: center;
border-top: 1px solid rgba(255,255,255,0.06);
overflow: hidden;
}
.plx-10__section:nth-child(even) {
direction: rtl;
}
.plx-10__section:nth-child(even) > * { direction: ltr; }
.plx-10__sec-visual {
position: relative;
aspect-ratio: 4/3;
border-radius: 12px;
overflow: hidden;
}
.plx-10__sec-visual-inner {
position: absolute;
inset: -15%;
will-change: transform;
transform-origin: center;
border-radius: 16px;
}
.plx-10__section:nth-child(1) .plx-10__sec-visual-inner {
background: radial-gradient(ellipse at 40% 50%, rgba(80,150,255,0.45) 0%, rgba(7,8,14,0.9) 65%);
}
.plx-10__section:nth-child(2) .plx-10__sec-visual-inner {
background: radial-gradient(ellipse at 55% 40%, rgba(180,80,255,0.45) 0%, rgba(7,8,14,0.9) 65%);
}
.plx-10__section:nth-child(3) .plx-10__sec-visual-inner {
background: radial-gradient(ellipse at 50% 60%, rgba(255,130,80,0.45) 0%, rgba(7,8,14,0.9) 65%);
}
/* Hover blur reveal on section visuals */
.plx-10__sec-reveal {
position: absolute;
inset: 0;
background: rgba(7,8,14,0.6);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.4s;
}
.plx-10__sec-visual:hover .plx-10__sec-reveal { opacity: 1; }
.plx-10__sec-reveal span {
font-size: clamp(20px, 3vw, 36px);
font-weight: 600;
font-style: italic;
color: var(--accent);
}
.plx-10__sec-body {}
.plx-10__sec-tag {
font-family: 'DM Mono', monospace;
font-size: 9px;
letter-spacing: 0.3em;
text-transform: uppercase;
color: var(--accent);
opacity: 0.6;
margin-bottom: 16px;
display: block;
}
.plx-10__sec-h {
font-size: clamp(32px, 4.5vw, 60px);
font-weight: 600;
line-height: 1.05;
margin-bottom: 20px;
}
.plx-10__sec-h em { font-style: italic; font-weight: 300; color: rgba(239,242,248,0.7); }
.plx-10__sec-p {
font-size: 16px;
font-weight: 300;
font-style: italic;
line-height: 1.8;
color: rgba(239,242,248,0.45);
max-width: 400px;
}
.plx-10__sec-line {
width: 48px; height: 1px;
background: rgba(146,197,240,0.3);
margin: 20px 0;
}
@media (max-width: 768px) {
.plx-10__section { grid-template-columns: 1fr; direction: ltr !important; }
.plx-10__glass-card { padding: 36px 28px; }
}
@media (prefers-reduced-motion: reduce) {
.plx-10__blobs, .plx-10__blobs-blur, .plx-10__blobs-blur2 { transform: none !important; }
.plx-10__scroll-line { animation: none; }
.plx-10__sec-visual-inner { transform: none !important; }
}
```
**JS:**
```js
(() => {
const hero = document.getElementById('plx10-hero');
const blobs = document.getElementById('plx10-blobs');
const blur1 = document.getElementById('plx10-blur1');
const blur2 = document.getElementById('plx10-blur2');
const dark = document.getElementById('plx10-dark');
const hl = document.getElementById('plx10-hl');
const glass = document.getElementById('plx10-glass');
const badge = document.getElementById('plx10-badge');
const secVisuals = [
{ el: document.getElementById('plx10-v1'), speed: 0.35 },
{ el: document.getElementById('plx10-v2'), speed: 0.3 },
{ el: document.getElementById('plx10-v3'), speed: 0.32 },
];
if (!hero) return;
let ticking = false;
function prog(el) {
const r = el.getBoundingClientRect();
const h = el.offsetHeight - window.innerHeight;
return h > 0 ? Math.max(0, Math.min(1, -r.top / h)) : 0;
}
function onScroll() {
if (ticking) return;
ticking = true;
requestAnimationFrame(() => {
const p = prog(hero);
const vh = window.innerHeight;
// Blobs parallax downward (bg layer moves slower)
if (blobs) blobs.style.transform = `translateY(${p * -80}px)`;
if (blur1) blur1.style.transform = `translateY(${p * -80}px)`;
if (blur2) blur2.style.transform = `translateY(${p * -80}px)`;
// Cross-fade from sharp → medium blur → heavy blur
// Phase 1 (0→0.4): sharp visible, blur1 fades in
// Phase 2 (0.4→0.8): blur1 fades in fully, blur2 starts
// Phase 3 (0.7→1.0): glass card rises
const blur1Alpha = Math.max(0, Math.min(1, p / 0.45));
const blur2Alpha = Math.max(0, Math.min(1, (p - 0.35) / 0.35));
const darkAlpha = Math.max(0, Math.min(0.55, (p - 0.4) / 0.4 * 0.55));
const hlAlpha = Math.max(0, Math.min(1, 1 - p / 0.5));
const glassAlpha = Math.max(0, Math.min(1, (p - 0.6) / 0.3));
const glassY = (1 - Math.min(1, (p - 0.6) / 0.3)) * 30;
// Approximate blur in px for badge
const blurPx = Math.round(blur2Alpha * 28 + blur1Alpha * 14);
if (blur1) blur1.style.opacity = String(blur1Alpha);
if (blur2) blur2.style.opacity = String(blur2Alpha);
if (dark) dark.style.opacity = String(darkAlpha);
if (hl) {
hl.style.opacity = String(hlAlpha);
hl.style.transform = `translateY(${p * -20}px)`;
}
if (glass) {
glass.style.opacity = String(glassAlpha);
glass.style.transform = `translateY(${glassY}px)`;
}
if (badge) badge.textContent = `BLUR · ${blurPx}px`;
// Section visuals parallax
secVisuals.forEach(({ el, speed }) => {
if (!el) return;
const parent = el.closest('.plx-10__sec-visual');
if (!parent) return;
const r = parent.getBoundingClientRect();
if (r.bottom < -100 || r.top > vh + 100) return;
const centerOffset = (r.top + r.height / 2) - vh / 2;
el.style.transform = `translateY(${centerOffset * speed * -0.5}px) scale(1.3)`;
});
ticking = false;
});
}
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
})();
```
---
## 18 CSS Play / Pause Button Designs
URL: https://codefronts.com/components/css-play-pause-buttons/
Description: 18 free CSS play / pause button designs for audio, video and podcast UIs — copy-paste HTML, CSS and JS.
Demo count: 18
### 01. Morph Triangle
**Type:** Light JS
**Description:** A play triangle that morphs into two pause bars via SVG path interpolation. The icon never disappears — it transforms — which feels meaningfully more premium than a hard swap.
**HTML:**
```html
```
**CSS:**
```css
.pp-morph {
width: 56px;
height: 56px;
border-radius: 50%;
background: linear-gradient(135deg, #7c6cff, #a78bfa);
border: 0;
color: white;
display: grid;
place-items: center;
cursor: pointer;
box-shadow:
0 8px 24px -8px rgba(124, 108, 255, 0.6),
inset 0 1px 0 rgba(255, 255, 255, 0.18);
transition:
transform 0.15s,
box-shadow 0.25s;
}
.pp-morph:hover {
transform: translateY(-1px);
box-shadow:
0 12px 32px -8px rgba(124, 108, 255, 0.8),
inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.pp-morph:focus-visible {
outline: 3px solid rgba(124, 108, 255, 0.5);
outline-offset: 3px;
}
.pp-morph-icon {
transition: d 0.35s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-morph[aria-pressed="true"] .pp-morph-icon {
d: path("M7 5 H10 V19 H7 Z M14 5 H17 V19 H14 Z");
}
/* ─── Drop-in JS ───
document.querySelectorAll('[data-pp]').forEach(btn => {
btn.addEventListener('click', () => {
const playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
*/
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 02. Vinyl Record
**Type:** Light JS
**Description:** A miniature vinyl record. While playing it spins continuously; on pause the rotation slows to a stop with a subtle ease-out — the canonical music-app metaphor done as a single CSS button.
**HTML:**
```html
```
**CSS:**
```css
.pp-vinyl {
width: 72px;
height: 72px;
background: transparent;
border: 0;
padding: 0;
cursor: pointer;
border-radius: 50%;
}
.pp-vinyl:focus-visible {
outline: 3px solid rgba(251, 191, 36, 0.5);
outline-offset: 3px;
}
.pp-vinyl-disc {
display: block;
position: relative;
width: 100%;
height: 100%;
border-radius: 50%;
background: repeating-radial-gradient(circle at 50% 50%, #0a0a0a 0 1.5px, #1c1c1c 1.5px 3px);
box-shadow:
0 8px 22px -4px rgba(0, 0, 0, 0.7),
inset 0 0 0 2px rgba(255, 255, 255, 0.08);
/* Asymmetric reflection that makes the rotation visible */
}
.pp-vinyl-disc::before {
content: "";
position: absolute;
inset: 0;
border-radius: 50%;
background: linear-gradient(
135deg,
transparent 30%,
rgba(255, 255, 255, 0.18) 50%,
transparent 70%
);
pointer-events: none;
}
/* The shine span — a brighter, narrow streak that catches the eye */
.pp-vinyl-shine {
position: absolute;
inset: 0;
border-radius: 50%;
background: conic-gradient(
from 0deg,
transparent 0deg,
rgba(255, 255, 255, 0.22) 18deg,
transparent 36deg,
transparent 360deg
);
pointer-events: none;
}
.pp-vinyl[aria-pressed="true"] .pp-vinyl-disc {
animation: ppVinylSpin 2.4s linear infinite;
}
@keyframes ppVinylSpin {
to {
transform: rotate(360deg);
}
}
.pp-vinyl-label {
position: absolute;
inset: 0;
margin: auto;
width: 40%;
height: 40%;
border-radius: 50%;
background:
radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.4), transparent 40%),
linear-gradient(135deg, #fbbf24, #b45309);
box-shadow:
inset 0 0 0 1px rgba(0, 0, 0, 0.35),
inset 0 -2px 4px rgba(0, 0, 0, 0.25);
}
.pp-vinyl-icon {
position: absolute;
inset: 0;
margin: auto;
width: 8%;
height: 8%;
border-radius: 50%;
background: #15151d;
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}
@media (prefers-reduced-motion: reduce) {
.pp-vinyl,
.pp-vinyl * {
animation: none !important;
}
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 03. Equaliser Bars
**Type:** Light JS
**Description:** Three vertical bars that animate height while playing and freeze instantly when paused. Doubles as both a button and a "now playing" indicator — perfect for podcast and audio UIs.
**HTML:**
```html
```
**CSS:**
```css
.pp-eq {
width: 56px;
height: 56px;
border-radius: 14px;
background: rgba(20, 184, 166, 0.08);
border: 1px solid rgba(20, 184, 166, 0.3);
color: #2dd4bf;
display: grid;
place-items: center;
cursor: pointer;
transition:
background 0.2s,
border-color 0.2s,
transform 0.15s;
}
.pp-eq:hover {
background: rgba(20, 184, 166, 0.16);
border-color: rgba(20, 184, 166, 0.5);
transform: translateY(-1px);
}
.pp-eq:focus-visible {
outline: 3px solid rgba(20, 184, 166, 0.4);
outline-offset: 3px;
}
.pp-eq-bars {
display: flex;
align-items: center;
gap: 4px;
height: 22px;
}
.pp-eq-bars > span {
width: 4px;
height: 100%;
background: currentColor;
border-radius: 2px;
transform: scaleY(0.3);
transform-origin: center;
}
.pp-eq[aria-pressed="false"] .pp-eq-bars > span:nth-child(1) {
transform: scaleY(0.4);
}
.pp-eq[aria-pressed="false"] .pp-eq-bars > span:nth-child(2) {
transform: scaleY(0.7);
}
.pp-eq[aria-pressed="false"] .pp-eq-bars > span:nth-child(3) {
transform: scaleY(0.5);
}
.pp-eq[aria-pressed="true"] .pp-eq-bars > span {
animation: ppEqDance 0.9s ease-in-out infinite;
}
.pp-eq[aria-pressed="true"] .pp-eq-bars > span:nth-child(1) {
animation-delay: 0s;
}
.pp-eq[aria-pressed="true"] .pp-eq-bars > span:nth-child(2) {
animation-delay: 0.2s;
}
.pp-eq[aria-pressed="true"] .pp-eq-bars > span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes ppEqDance {
0%,
100% {
transform: scaleY(0.3);
}
50% {
transform: scaleY(1);
}
}
@media (prefers-reduced-motion: reduce) {
.pp-eq,
.pp-eq * {
animation: none !important;
}
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 04. Skip Hub
**Type:** Light JS
**Description:** Full media-control cluster with previous, play/pause and next buttons. The central button uses a morph icon with a gradient halo while playing — the canonical pattern for music players and podcast apps.
**HTML:**
```html
```
**CSS:**
```css
.pp-hub {
display: flex;
align-items: center;
gap: 12px;
padding: 8px 14px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 999px;
box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.6);
}
.pp-hub-side {
width: 32px;
height: 32px;
background: transparent;
border: 0;
padding: 0;
border-radius: 50%;
color: #94a3b8;
display: grid;
place-items: center;
cursor: pointer;
transition:
color 0.15s,
background 0.15s,
transform 0.12s;
}
.pp-hub-side:hover {
color: #f0eeff;
background: rgba(255, 255, 255, 0.06);
}
.pp-hub-side:active {
transform: scale(0.92);
}
.pp-hub-main {
width: 44px;
height: 44px;
border-radius: 50%;
background: linear-gradient(135deg, #f43f5e, #fb7185);
border: 0;
color: white;
display: grid;
place-items: center;
cursor: pointer;
box-shadow:
0 0 0 0 rgba(244, 63, 94, 0.5),
0 8px 18px -6px rgba(244, 63, 94, 0.7);
transition:
box-shadow 0.25s,
transform 0.15s;
}
.pp-hub-main:hover {
transform: translateY(-1px);
}
.pp-hub-main:focus-visible {
outline: 3px solid rgba(244, 63, 94, 0.45);
outline-offset: 3px;
}
.pp-hub-main[aria-pressed="true"] {
box-shadow:
0 0 0 6px rgba(244, 63, 94, 0.18),
0 8px 22px -6px rgba(244, 63, 94, 0.85);
}
.pp-hub-icon {
transition: d 0.35s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-hub-main[aria-pressed="true"] .pp-hub-icon {
d: path("M7 5 H10 V19 H7 Z M14 5 H17 V19 H14 Z");
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 05. Liquid Wave
**Type:** Light JS
**Description:** A continuous waveform travels across the button while playing and freezes mid-cycle on pause. Built with an SVG path + CSS transform — perfect for audio players and music-streaming UIs.
**HTML:**
```html
```
**CSS:**
```css
.pp-wave {
position: relative;
width: 140px;
height: 56px;
background: linear-gradient(135deg, #0c4a6e, #075985);
border: 1px solid rgba(56, 189, 248, 0.3);
border-radius: 14px;
color: #38bdf8;
cursor: pointer;
overflow: hidden;
display: grid;
place-items: center;
transition:
border-color 0.2s,
transform 0.15s;
}
.pp-wave:hover {
border-color: rgba(56, 189, 248, 0.6);
transform: translateY(-1px);
}
.pp-wave:focus-visible {
outline: 3px solid rgba(56, 189, 248, 0.4);
outline-offset: 3px;
}
.pp-wave-svg {
position: absolute;
inset: 0;
width: 200%;
height: 100%;
opacity: 0.6;
}
.pp-wave[aria-pressed="true"] .pp-wave-svg {
animation: ppWaveScroll 2.4s linear infinite;
}
@keyframes ppWaveScroll {
to {
transform: translateX(-50%);
}
}
.pp-wave-icon {
position: relative;
width: 0;
height: 0;
border-style: solid;
border-width: 9px 0 9px 13px;
border-color: transparent transparent transparent #38bdf8;
margin-left: 4px;
transition:
border-width 0.25s,
margin-left 0.25s;
}
.pp-wave[aria-pressed="true"] .pp-wave-icon {
border-width: 0 4px 0 4px;
border-color: transparent #38bdf8 transparent #38bdf8;
height: 18px;
margin-left: 0;
}
@media (prefers-reduced-motion: reduce) {
.pp-wave,
.pp-wave * {
animation: none !important;
}
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 06. Pulse Halo
**Type:** Light JS
**Description:** Concentric halo rings emanate outward while playing — a soft pulse that signals "live" or "active" without distraction. Ideal for radio streams, live broadcasts, and listen-now CTAs.
**HTML:**
```html
```
**CSS:**
```css
.pp-pulse {
position: relative;
width: 60px;
height: 60px;
background: linear-gradient(135deg, #ec4899, #db2777);
border: 0;
border-radius: 50%;
color: white;
display: grid;
place-items: center;
cursor: pointer;
box-shadow: 0 8px 22px -6px rgba(236, 72, 153, 0.7);
transition: transform 0.15s;
z-index: 1;
}
.pp-pulse:hover {
transform: translateY(-1px);
}
.pp-pulse:focus-visible {
outline: 3px solid rgba(236, 72, 153, 0.5);
outline-offset: 3px;
}
.pp-pulse-rings {
position: absolute;
inset: 0;
border-radius: 50%;
pointer-events: none;
z-index: -1;
}
.pp-pulse-rings > span {
position: absolute;
inset: 0;
border-radius: 50%;
border: 2px solid #ec4899;
opacity: 0;
transform: scale(1);
}
.pp-pulse[aria-pressed="true"] .pp-pulse-rings > span {
animation: ppPulseRipple 1.8s ease-out infinite;
}
.pp-pulse[aria-pressed="true"] .pp-pulse-rings > span:nth-child(2) {
animation-delay: 0.9s;
}
@keyframes ppPulseRipple {
0% {
opacity: 0.7;
transform: scale(1);
}
100% {
opacity: 0;
transform: scale(2);
}
}
.pp-pulse-icon {
transition: d 0.3s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-pulse[aria-pressed="true"] .pp-pulse-icon {
d: path("M7 5 H10 V19 H7 Z M14 5 H17 V19 H14 Z");
}
@media (prefers-reduced-motion: reduce) {
.pp-pulse,
.pp-pulse * {
animation: none !important;
}
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 07. Toggle Pill
**Type:** Light JS
**Description:** iOS-style sliding toggle — but for play/pause. The thumb glides between two icons inside a single rounded track. Reads instantly as a state-bearing control, not just a button.
**HTML:**
```html
```
**CSS:**
```css
.pp-toggle {
position: relative;
width: 76px;
height: 38px;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 999px;
cursor: pointer;
padding: 0;
transition:
background 0.2s,
border-color 0.2s;
}
.pp-toggle:hover {
background: rgba(255, 255, 255, 0.1);
border-color: rgba(255, 255, 255, 0.18);
}
.pp-toggle:focus-visible {
outline: 3px solid rgba(45, 212, 191, 0.4);
outline-offset: 3px;
}
.pp-toggle-icons {
position: absolute;
inset: 0;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 11px;
color: #64748b;
pointer-events: none;
transition: color 0.2s;
}
.pp-toggle[aria-pressed="false"] .pp-toggle-icons :first-child {
color: #2dd4bf;
}
.pp-toggle[aria-pressed="true"] .pp-toggle-icons :last-child {
color: #2dd4bf;
}
.pp-toggle-thumb {
position: absolute;
top: 3px;
left: 3px;
width: 30px;
height: 30px;
background: linear-gradient(135deg, #2dd4bf, #14b8a6);
border-radius: 50%;
box-shadow:
0 4px 10px -2px rgba(20, 184, 166, 0.6),
inset 0 1px 0 rgba(255, 255, 255, 0.25);
transition: transform 0.35s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-toggle[aria-pressed="true"] .pp-toggle-thumb {
transform: translateX(38px);
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 08. Neon Arcade
**Type:** Light JS
**Description:** Stacked neon-cyan glow with monospace label. The play / pause icon sits inside a glowing ring that pulses while playing — synthwave 80s arcade vibes for gaming, retro media, and dev tools.
**HTML:**
```html
PLAY
PAUSE
```
**CSS:**
```css
.pp-neon {
position: relative;
display: inline-grid;
grid-template-columns: auto auto;
align-items: center;
gap: 10px;
padding: 10px 22px 10px 16px;
background: #0a0014;
border: 1px solid rgba(108, 255, 255, 0.4);
border-radius: 8px;
color: #6cffff;
cursor: pointer;
font-family: "JetBrains Mono", monospace;
text-shadow: 0 0 8px rgba(108, 255, 255, 0.6);
box-shadow:
inset 0 0 12px rgba(108, 255, 255, 0.1),
0 0 14px rgba(108, 255, 255, 0.25);
transition:
box-shadow 0.25s,
border-color 0.2s,
transform 0.15s;
}
.pp-neon:hover {
border-color: #6cffff;
box-shadow:
inset 0 0 18px rgba(108, 255, 255, 0.2),
0 0 22px rgba(108, 255, 255, 0.5);
transform: translateY(-1px);
}
.pp-neon:focus-visible {
outline: 3px solid rgba(108, 255, 255, 0.5);
outline-offset: 3px;
}
.pp-neon-ring {
position: relative;
display: grid;
place-items: center;
width: 26px;
height: 26px;
border: 1.5px solid #6cffff;
border-radius: 50%;
box-shadow: 0 0 10px rgba(108, 255, 255, 0.4);
}
.pp-neon[aria-pressed="true"] .pp-neon-ring {
animation: ppNeonPulse 1.4s ease-in-out infinite;
}
@keyframes ppNeonPulse {
0%,
100% {
box-shadow: 0 0 10px rgba(108, 255, 255, 0.4);
}
50% {
box-shadow: 0 0 22px rgba(108, 255, 255, 0.85);
}
}
.pp-neon-ring svg {
display: block;
}
.pp-neon-label {
position: relative;
display: inline-block;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.2em;
/* Reserve width of the longer label (PAUSE) so the button
doesn't reflow when the state flips. */
min-width: 4ch;
text-align: left;
}
.pp-neon-text {
display: none;
}
.pp-neon[aria-pressed="false"] .pp-neon-text-play {
display: inline;
}
.pp-neon[aria-pressed="true"] .pp-neon-text-pause {
display: inline;
}
.pp-neon-icon {
transition: d 0.3s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-neon[aria-pressed="true"] .pp-neon-icon {
d: path("M7 5 H10 V19 H7 Z M14 5 H17 V19 H14 Z");
}
@media (prefers-reduced-motion: reduce) {
.pp-neon,
.pp-neon * {
animation: none !important;
}
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 09. Minimal Outline
**Type:** Light JS
**Description:** Refined outline-only button with a hairline border and subtle hover lift. The icon morphs cleanly between play and pause — an editorial, restrained pattern for content-heavy sites.
**HTML:**
```html
Listen
```
**CSS:**
```css
.pp-min {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 10px 18px 10px 14px;
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 999px;
color: #f0eeff;
font-family: system-ui, sans-serif;
font-size: 13px;
font-weight: 600;
letter-spacing: 0.02em;
cursor: pointer;
transition:
background 0.2s,
border-color 0.2s,
color 0.2s,
transform 0.15s;
}
.pp-min:hover {
background: rgba(255, 255, 255, 0.04);
border-color: rgba(255, 255, 255, 0.55);
transform: translateY(-1px);
}
.pp-min:focus-visible {
outline: 3px solid rgba(255, 255, 255, 0.25);
outline-offset: 3px;
}
.pp-min[aria-pressed="true"] {
background: #f0eeff;
color: #0f172a;
border-color: #f0eeff;
}
.pp-min-icon {
transition: d 0.3s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-min[aria-pressed="true"] .pp-min-icon {
d: path("M7 5 H10 V19 H7 Z M14 5 H17 V19 H14 Z");
}
.pp-min[aria-pressed="true"] .pp-min-label::before {
content: "Pause";
}
.pp-min[aria-pressed="true"] .pp-min-label {
font-size: 0;
}
.pp-min[aria-pressed="true"] .pp-min-label::before {
font-size: 13px;
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 10. Gradient Disc
**Type:** Light JS
**Description:** A `@property`-animated conic gradient rim that rotates while playing — true CSS angle animation, not a keyframes hack. Feels like a turntable or a high-end audio interface dial.
**HTML:**
```html
```
**CSS:**
```css
@property --pp-disc-angle {
syntax: "";
inherits: false;
initial-value: 0deg;
}
.pp-disc {
position: relative;
width: 64px;
height: 64px;
background: transparent;
border: 0;
padding: 0;
cursor: pointer;
border-radius: 50%;
}
.pp-disc:focus-visible {
outline: 3px solid rgba(192, 132, 252, 0.5);
outline-offset: 3px;
}
.pp-disc-rim {
position: absolute;
inset: 0;
border-radius: 50%;
background: conic-gradient(
from var(--pp-disc-angle, 0deg),
#c084fc,
#f472b6,
#fbbf24,
#34d399,
#c084fc
);
filter: blur(0px);
transition: filter 0.2s;
}
.pp-disc[aria-pressed="true"] .pp-disc-rim {
animation: ppDiscSpin 4s linear infinite;
filter: blur(0.5px);
}
@keyframes ppDiscSpin {
to {
--pp-disc-angle: 360deg;
}
}
.pp-disc-core {
position: absolute;
inset: 4px;
display: grid;
place-items: center;
background: radial-gradient(circle at 30% 25%, #2a2a36 0%, #15151d 100%);
border-radius: 50%;
color: #f0eeff;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.pp-disc:hover .pp-disc-core {
color: #c4b5fd;
}
.pp-disc-icon {
transition: d 0.3s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-disc[aria-pressed="true"] .pp-disc-icon {
d: path("M7 5 H10 V19 H7 Z M14 5 H17 V19 H14 Z");
}
@media (prefers-reduced-motion: reduce) {
.pp-disc,
.pp-disc * {
animation: none !important;
}
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 11. Voice Memo
**Type:** Light JS
**Description:** Record-style red button with a tiny live waveform indicator. The waveform animates while playing back; freezes when paused. Specifically tuned for voice notes, podcasts, and dictation UIs.
**HTML:**
```html
0:14
```
**CSS:**
```css
.pp-mem {
display: inline-grid;
grid-template-columns: auto 1fr auto;
align-items: center;
gap: 10px;
padding: 8px 14px 8px 10px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 999px;
color: #f0eeff;
cursor: pointer;
font-family: "JetBrains Mono", monospace;
transition:
border-color 0.2s,
background 0.2s;
}
.pp-mem:hover {
border-color: rgba(239, 68, 68, 0.4);
background: #1a1a25;
}
.pp-mem:focus-visible {
outline: 3px solid rgba(239, 68, 68, 0.4);
outline-offset: 3px;
}
.pp-mem-dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: #ef4444;
box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
transition: background 0.2s;
}
.pp-mem[aria-pressed="true"] .pp-mem-dot {
animation: ppMemPing 1.4s ease-out infinite;
}
@keyframes ppMemPing {
0% {
box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
}
100% {
box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
}
}
.pp-mem-wave {
display: flex;
align-items: center;
gap: 2px;
height: 18px;
}
.pp-mem-wave > span {
width: 2px;
height: 30%;
background: #94a3b8;
border-radius: 1px;
transform-origin: center;
}
.pp-mem-wave > span:nth-child(1) {
height: 50%;
}
.pp-mem-wave > span:nth-child(2) {
height: 80%;
}
.pp-mem-wave > span:nth-child(3) {
height: 65%;
}
.pp-mem-wave > span:nth-child(4) {
height: 95%;
}
.pp-mem-wave > span:nth-child(5) {
height: 70%;
}
.pp-mem-wave > span:nth-child(6) {
height: 90%;
}
.pp-mem-wave > span:nth-child(7) {
height: 55%;
}
.pp-mem-wave > span:nth-child(8) {
height: 75%;
}
.pp-mem-wave > span:nth-child(9) {
height: 40%;
}
.pp-mem[aria-pressed="true"] .pp-mem-wave > span {
background: #ef4444;
animation: ppMemWave 0.6s ease-in-out infinite alternate;
}
.pp-mem[aria-pressed="true"] .pp-mem-wave > span:nth-child(2n) {
animation-delay: 0.1s;
}
.pp-mem[aria-pressed="true"] .pp-mem-wave > span:nth-child(3n) {
animation-delay: 0.2s;
}
@keyframes ppMemWave {
from {
transform: scaleY(0.5);
}
to {
transform: scaleY(1.1);
}
}
.pp-mem-time {
font-size: 11px;
font-weight: 600;
color: #94a3b8;
font-variant-numeric: tabular-nums;
letter-spacing: 0.04em;
}
@media (prefers-reduced-motion: reduce) {
.pp-mem,
.pp-mem * {
animation: none !important;
}
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 12. Floating FAB
**Type:** Light JS
**Description:** Material-style floating action button with elevation that lifts on hover and presses down on click. The icon morphs between play and pause — a polished pattern for full-screen video and tutorial overlays.
**HTML:**
```html
```
**CSS:**
```css
.pp-fab {
width: 64px;
height: 64px;
border-radius: 50%;
background: linear-gradient(135deg, #6366f1, #4f46e5);
border: 0;
color: white;
display: grid;
place-items: center;
cursor: pointer;
box-shadow:
0 1px 2px rgba(0, 0, 0, 0.2),
0 4px 8px rgba(0, 0, 0, 0.18),
0 12px 24px -4px rgba(99, 102, 241, 0.5);
transition:
box-shadow 0.25s,
transform 0.15s,
background 0.25s;
}
.pp-fab:hover {
transform: translateY(-3px);
box-shadow:
0 2px 4px rgba(0, 0, 0, 0.25),
0 8px 16px rgba(0, 0, 0, 0.2),
0 22px 36px -6px rgba(99, 102, 241, 0.6);
}
.pp-fab:active {
transform: translateY(0);
box-shadow:
0 1px 2px rgba(0, 0, 0, 0.2),
0 2px 4px rgba(0, 0, 0, 0.18),
0 4px 8px -2px rgba(99, 102, 241, 0.45);
}
.pp-fab:focus-visible {
outline: 3px solid rgba(99, 102, 241, 0.5);
outline-offset: 4px;
}
.pp-fab[aria-pressed="true"] {
background: linear-gradient(135deg, #4f46e5, #4338ca);
}
.pp-fab-icon {
transition: d 0.35s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-fab[aria-pressed="true"] .pp-fab-icon {
d: path("M7 5 H10 V19 H7 Z M14 5 H17 V19 H14 Z");
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 13. Progress Ring
**Type:** Light JS
**Description:** A circular play button wrapped by an SVG progress ring that fills as audio plays. Tick the percentage from your real timeupdate events — gold/cream palette suited to podcast and audiobook UIs.
**HTML:**
```html
```
**CSS:**
```css
.pp-prog {
position: relative;
width: 60px;
height: 60px;
border: 0;
padding: 0;
background: radial-gradient(circle at 30% 25%, #2a2519 0%, #15120c 100%);
border-radius: 50%;
color: #fbbf24;
cursor: pointer;
display: grid;
place-items: center;
box-shadow:
0 6px 18px -4px rgba(251, 191, 36, 0.35),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
transition:
transform 0.15s,
box-shadow 0.25s;
}
.pp-prog:hover {
transform: translateY(-1px);
box-shadow:
0 10px 26px -4px rgba(251, 191, 36, 0.5),
inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.pp-prog:focus-visible {
outline: 3px solid rgba(251, 191, 36, 0.5);
outline-offset: 3px;
}
.pp-prog-ring {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
.pp-prog-fill {
transition: stroke-dashoffset 0.25s linear;
}
.pp-prog-icon-svg {
position: relative;
z-index: 1;
}
.pp-prog-icon {
transition: d 0.3s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-prog[aria-pressed="true"] .pp-prog-icon {
d: path("M7 5 H10 V19 H7 Z M14 5 H17 V19 H14 Z");
}
/* ── Drop-in JS for real progress ──
const btn = document.querySelector('.pp-prog');
const fill = btn.querySelector('.pp-prog-fill');
const audio = document.querySelector('audio');
audio.addEventListener('timeupdate', () => {
const pct = (audio.currentTime / audio.duration) * 100 || 0;
fill.style.strokeDashoffset = String(100 - pct);
});
*/
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 14. Magnetic Hover
**Type:** Light JS
**Description:** A play button whose icon subtly drifts toward the cursor on hover — a small touch of physicality that signals an interactive surface. Click to play; the icon morphs and the magnet effect releases.
**HTML:**
```html
```
**CSS:**
```css
.pp-mag {
width: 60px;
height: 60px;
border: 0;
padding: 0;
background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
border-radius: 18px;
color: #bfdbfe;
cursor: pointer;
position: relative;
overflow: hidden;
box-shadow:
0 8px 22px -6px rgba(29, 78, 216, 0.55),
inset 0 1px 0 rgba(255, 255, 255, 0.12);
transition:
box-shadow 0.25s,
color 0.2s;
}
.pp-mag:hover {
color: #ffffff;
}
.pp-mag:focus-visible {
outline: 3px solid rgba(29, 78, 216, 0.5);
outline-offset: 3px;
}
.pp-mag-track {
position: absolute;
inset: 0;
display: grid;
place-items: center;
transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pp-mag-icon {
transition: d 0.3s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-mag[aria-pressed="true"] .pp-mag-icon {
d: path("M7 5 H10 V19 H7 Z M14 5 H17 V19 H14 Z");
}
.pp-mag[aria-pressed="true"] .pp-mag-track {
transform: translate(0, 0) !important;
}
/* ── Drop-in JS for the magnetic effect ──
document.querySelectorAll('[data-pp-mag]').forEach(btn => {
const track = btn.querySelector('.pp-mag-track');
btn.addEventListener('pointermove', e => {
const r = btn.getBoundingClientRect();
const x = ((e.clientX - r.left) / r.width - 0.5) * 12;
const y = ((e.clientY - r.top) / r.height - 0.5) * 12;
track.style.transform = `translate(${x}px, ${y}px)`;
});
btn.addEventListener('pointerleave', () => {
track.style.transform = 'translate(0, 0)';
});
});
*/
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 15. Liquid Drop
**Type:** Light JS
**Description:** Organic blob shape that morphs its border-radius on play — like a droplet of mercury reshaping itself. Mint-fresh palette for wellness and meditation apps.
**HTML:**
```html
```
**CSS:**
```css
.pp-drop {
width: 64px;
height: 64px;
border: 0;
padding: 0;
background: linear-gradient(135deg, #34d399, #10b981);
border-radius: 50% 40% 50% 60% / 50% 50% 50% 50%;
color: white;
cursor: pointer;
display: grid;
place-items: center;
box-shadow:
0 10px 24px -4px rgba(16, 185, 129, 0.5),
inset 0 1px 0 rgba(255, 255, 255, 0.18);
transition:
border-radius 0.35s cubic-bezier(0.5, 0, 0.3, 1.2),
transform 0.15s,
box-shadow 0.25s;
}
.pp-drop:hover {
transform: translateY(-1px);
box-shadow:
0 14px 30px -4px rgba(16, 185, 129, 0.65),
inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.pp-drop:focus-visible {
outline: 3px solid rgba(52, 211, 153, 0.45);
outline-offset: 3px;
}
.pp-drop[aria-pressed="true"] {
animation: ppDropMorph 4s ease-in-out infinite;
}
@keyframes ppDropMorph {
0%,
100% {
border-radius: 50% 40% 50% 60% / 50% 50% 50% 50%;
}
25% {
border-radius: 60% 50% 40% 50% / 40% 60% 50% 50%;
}
50% {
border-radius: 40% 50% 60% 40% / 50% 40% 60% 50%;
}
75% {
border-radius: 50% 60% 40% 50% / 60% 50% 40% 60%;
}
}
.pp-drop-icon {
transition: d 0.3s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-drop[aria-pressed="true"] .pp-drop-icon {
d: path("M7 5 H10 V19 H7 Z M14 5 H17 V19 H14 Z");
}
@media (prefers-reduced-motion: reduce) {
.pp-drop,
.pp-drop * {
animation: none !important;
}
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 16. Ripple on Click
**Type:** Light JS
**Description:** Material-style ink ripple that emanates from the click point on every press. Click feedback that reads as tactile instantly — a subtle but premium detail.
**HTML:**
```html
```
**CSS:**
```css
.pp-ripple {
position: relative;
width: 56px;
height: 56px;
border: 0;
padding: 0;
background: linear-gradient(135deg, #a78bfa, #8b5cf6);
border-radius: 50%;
color: white;
cursor: pointer;
display: grid;
place-items: center;
overflow: hidden;
box-shadow: 0 6px 16px -4px rgba(139, 92, 246, 0.55);
transition:
transform 0.15s,
box-shadow 0.25s;
}
.pp-ripple:hover {
transform: translateY(-1px);
box-shadow: 0 10px 22px -4px rgba(139, 92, 246, 0.7);
}
.pp-ripple:focus-visible {
outline: 3px solid rgba(139, 92, 246, 0.5);
outline-offset: 3px;
}
.pp-ripple-wave {
position: absolute;
width: 0;
height: 0;
border-radius: 50%;
background: rgba(255, 255, 255, 0.4);
transform: translate(-50%, -50%);
pointer-events: none;
animation: ppRippleOut 0.6s ease-out forwards;
}
@keyframes ppRippleOut {
to {
width: 140px;
height: 140px;
opacity: 0;
}
}
.pp-ripple-icon {
position: relative;
z-index: 1;
transition: d 0.3s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-ripple[aria-pressed="true"] .pp-ripple-icon {
d: path("M7 5 H10 V19 H7 Z M14 5 H17 V19 H14 Z");
}
/* ── Drop-in JS for the ripple ──
document.querySelectorAll('[data-pp-ripple]').forEach(btn => {
btn.addEventListener('pointerdown', e => {
const r = btn.getBoundingClientRect();
const wave = document.createElement('span');
wave.className = 'pp-ripple-wave';
wave.style.left = (e.clientX - r.left) + 'px';
wave.style.top = (e.clientY - r.top) + 'px';
btn.appendChild(wave);
wave.addEventListener('animationend', () => wave.remove());
});
});
*/
@media (prefers-reduced-motion: reduce) {
.pp-ripple,
.pp-ripple * {
animation: none !important;
}
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 17. Cassette Tape
**Type:** Light JS
**Description:** Skeumorphic mini-cassette with two reels that rotate while playing and freeze instantly on pause. Warm tactile detail for retro music players, lo-fi radio apps, and nostalgic brand moments.
**HTML:**
```html
SIDE A
```
**CSS:**
```css
.pp-tape {
width: 110px;
height: 70px;
border: 0;
padding: 0;
background: transparent;
cursor: pointer;
border-radius: 10px;
}
.pp-tape:focus-visible {
outline: 3px solid rgba(180, 83, 9, 0.5);
outline-offset: 3px;
}
.pp-tape-body {
position: relative;
display: block;
width: 100%;
height: 100%;
background: linear-gradient(180deg, #92400e 0%, #78350f 100%);
border-radius: 8px;
border: 1px solid rgba(0, 0, 0, 0.4);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.18),
inset 0 -2px 6px rgba(0, 0, 0, 0.35),
0 8px 20px -6px rgba(0, 0, 0, 0.55);
}
.pp-tape-reel {
position: absolute;
top: 50%;
width: 32px;
height: 32px;
margin-top: -16px;
border-radius: 50%;
background: radial-gradient(circle, #1f1f1f 28%, #444 30%, #444 60%, #1f1f1f 62%);
border: 1.5px solid #1a1a1a;
display: grid;
place-items: center;
}
.pp-tape-reel-l {
left: 12px;
}
.pp-tape-reel-r {
right: 12px;
}
.pp-tape-spoke {
position: absolute;
width: 2px;
height: 100%;
background: #888;
border-radius: 1px;
}
.pp-tape-spoke:nth-child(2) {
transform: rotate(60deg);
}
.pp-tape-spoke:nth-child(3) {
transform: rotate(-60deg);
}
.pp-tape[aria-pressed="true"] .pp-tape-reel {
animation: ppTapeSpin 1.6s linear infinite;
}
@keyframes ppTapeSpin {
to {
transform: rotate(360deg);
}
}
.pp-tape-label {
position: absolute;
left: 50%;
bottom: 6px;
transform: translateX(-50%);
font-family: "JetBrains Mono", monospace;
font-size: 8px;
font-weight: 700;
color: #fed7aa;
letter-spacing: 0.2em;
background: rgba(0, 0, 0, 0.4);
padding: 1px 8px;
border-radius: 2px;
pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
.pp-tape,
.pp-tape * {
animation: none !important;
}
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
### 18. Live Badge
**Type:** Light JS
**Description:** Live-broadcast pill with a breathing background and a tiny presence dot. Click to join — the dot starts pinging, the gradient shifts to "on-air" warm red. Perfect for live podcasts, watch-parties, and Twitch-style streams.
**HTML:**
```html
LIVE
2.4k listening
```
**CSS:**
```css
.pp-live {
display: inline-grid;
grid-template-columns: auto 1fr auto;
align-items: center;
gap: 10px;
padding: 8px 14px 8px 12px;
background: linear-gradient(135deg, #1f1313 0%, #2a1414 100%);
border: 1px solid rgba(239, 68, 68, 0.3);
border-radius: 999px;
color: #fecaca;
cursor: pointer;
font-family: system-ui, sans-serif;
transition:
background 0.3s,
border-color 0.3s,
transform 0.15s;
}
.pp-live:hover {
border-color: rgba(239, 68, 68, 0.6);
transform: translateY(-1px);
}
.pp-live:focus-visible {
outline: 3px solid rgba(239, 68, 68, 0.4);
outline-offset: 3px;
}
.pp-live[aria-pressed="true"] {
background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 100%);
color: white;
border-color: #ef4444;
}
.pp-live-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #22c55e;
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
}
.pp-live[aria-pressed="true"] .pp-live-dot {
background: #ef4444;
animation: ppLivePing 1.4s ease-out infinite;
}
@keyframes ppLivePing {
0% {
box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
}
100% {
box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
}
}
.pp-live-text {
display: grid;
line-height: 1.1;
}
.pp-live-state {
font-size: 11px;
font-weight: 800;
letter-spacing: 0.18em;
}
.pp-live-meta {
font-size: 9.5px;
font-weight: 500;
color: rgba(255, 255, 255, 0.65);
font-variant-numeric: tabular-nums;
letter-spacing: 0.04em;
}
.pp-live[aria-pressed="true"] .pp-live-state::before {
content: "ON AIR";
}
.pp-live[aria-pressed="true"] .pp-live-state {
font-size: 0;
}
.pp-live[aria-pressed="true"] .pp-live-state::before {
font-size: 11px;
letter-spacing: 0.18em;
}
.pp-live-icon {
transition: d 0.3s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pp-live[aria-pressed="true"] .pp-live-icon {
d: path("M7 5 H10 V19 H7 Z M14 5 H17 V19 H14 Z");
}
@media (prefers-reduced-motion: reduce) {
.pp-live,
.pp-live * {
animation: none !important;
}
}
```
**JS:**
```js
// ── Drop this on every page where you render a play/pause button ──
// Toggles aria-pressed + aria-label on click. The CSS handles all visuals.
document.querySelectorAll('[data-pp]').forEach(function (btn) {
btn.addEventListener('click', function () {
var playing = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', String(!playing));
btn.setAttribute('aria-label', !playing ? 'Pause' : 'Play');
});
});
```
---
## 21 CSS Pricing Sections
URL: https://codefronts.com/layouts/css-pricing-sections/
Description: 21 hand-coded CSS pricing sections — three-tier cards, comparison tables, billing toggles, usage sliders, per-seat calculators. Copy-paste ready, accessible, mobile-first.
Demo count: 21
### 01. Animated Border Cards
**Type:** Pure CSS
**Description:** Three pricing cards with a conic-gradient border that rotates continuously using @property animatable angle. Slate base, violet/cyan highlight on the recommended tier — the modern AI-product launch treatment.
**HTML:**
```html
Plans
Built for builders. Priced for shipping.
Starter
$ 14/mo
3 projects
10 GB storage
Community support
Choose Starter
Recommended
Builder
$ 32/mo
Unlimited projects
100 GB storage
Priority support
API + webhooks
Choose Builder
Scale
$ 89/mo
Everything in Builder
SSO + audit logs
SLA + CSM
Talk to sales
```
**CSS:**
```css
@property --ps-grb-ang {
syntax: '';
initial-value: 0deg;
inherits: false;
}
.ps-grb {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background: #0a0d1a;
color: #e6e7f0;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-grb-head { text-align: center; margin-bottom: clamp(24px, 4vw, 40px); }
.ps-grb-eye {
display: inline-block; font-size: 11px; font-weight: 700;
letter-spacing: 0.18em; text-transform: uppercase;
color: #a5b4fc; padding: 5px 12px;
background: rgba(165,180,252,0.1);
border: 1px solid rgba(165,180,252,0.25);
border-radius: 999px; margin-bottom: 14px;
}
.ps-grb-head h2 {
font-size: clamp(22px, 3.4vw, 34px); font-weight: 700;
letter-spacing: -0.02em; margin: 0; color: #fff;
}
.ps-grb-grid {
display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px; max-width: 980px; margin: 0 auto;
}
.ps-grb-card {
position: relative;
border-radius: 16px;
padding: 1.5px;
background: rgba(255,255,255,0.04);
}
.ps-grb-edge {
position: absolute; inset: 0;
border-radius: 16px; padding: 1.5px;
background: conic-gradient(from var(--ps-grb-ang), #1e293b, #475569, #1e293b);
-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
-webkit-mask-composite: xor; mask-composite: exclude;
animation: ps-grb-spin 6s linear infinite;
}
.ps-grb-pri .ps-grb-edge {
background: conic-gradient(from var(--ps-grb-ang), #6366f1, #22d3ee, #a855f7, #6366f1);
}
@keyframes ps-grb-spin { to { --ps-grb-ang: 360deg; } }
.ps-grb-body {
position: relative;
background: #0f1224;
border-radius: 14.5px;
padding: 22px 20px 20px;
display: flex; flex-direction: column;
height: 100%;
}
.ps-grb-pill {
display: inline-block; align-self: flex-start;
background: linear-gradient(135deg, #6366f1, #22d3ee); color: #0a0d1a;
font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
text-transform: uppercase; padding: 4px 10px;
border-radius: 999px; margin-bottom: 10px;
}
.ps-grb-card h3 {
font-size: 14px; font-weight: 700; letter-spacing: 0.1em;
text-transform: uppercase; margin: 0 0 12px; color: #c7d2fe;
}
.ps-grb-price {
display: flex; align-items: baseline; gap: 4px;
font-size: 38px; font-weight: 800; letter-spacing: -0.03em;
margin-bottom: 18px; color: #fff;
}
.ps-grb-price em { font-size: 0.5em; font-style: normal; padding-right: 2px; opacity: 0.7; }
.ps-grb-price span { font-size: 0.34em; font-weight: 500; opacity: 0.65; margin-left: 6px; }
.ps-grb-card ul {
list-style: none; padding: 0; margin: 0 0 22px; flex: 1;
font-size: 13.5px; line-height: 1.95; color: #b8bfd8;
}
.ps-grb-card ul li::before { content: '✓'; color: #a5b4fc; display: inline-block; width: 20px; font-weight: 700; }
.ps-grb-cta {
display: block; text-align: center;
padding: 11px 16px; border-radius: 9px;
background: rgba(165,180,252,0.08); color: #c7d2fe;
text-decoration: none; font-size: 13.5px; font-weight: 600;
border: 1px solid rgba(165,180,252,0.25);
transition: background 0.18s, color 0.18s;
}
.ps-grb-cta-pri { background: linear-gradient(135deg, #6366f1, #22d3ee); color: #0a0d1a; border-color: transparent; }
.ps-grb-cta:hover { background: rgba(165,180,252,0.18); color: #fff; }
.ps-grb-cta-pri:hover { filter: brightness(1.1); }
.ps-grb-cta:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 3px; }
@media (max-width: 820px) {
.ps-grb-grid { grid-template-columns: 1fr; max-width: 380px; }
}
@media (prefers-reduced-motion: reduce) {
.ps-grb-edge { animation: none; background: linear-gradient(135deg, #475569, #1e293b); }
.ps-grb-pri .ps-grb-edge { background: linear-gradient(135deg, #6366f1, #22d3ee); }
}
```
### 02. Editorial Two Column
**Type:** Pure CSS
**Description:** A dense editorial pricing layout — left column carries the value-prop copy, right column stacks two compact tier rows like a printed price list. Neutral charcoal on cream, the Stripe / Basecamp documentation aesthetic.
**HTML:**
```html
— Pricing
Two plans. Pick one, change later.
We don’t play games with feature gating, seat limits, or upsell pop-ups. Pick a plan, get
the whole product, and move on with your work.
All plans include unlimited projects, every integration, and email support. Cancel any time,
money back inside 30 days.
See the full feature list →
For freelancers and indie builders shipping client work.
Single workspace
10 GB storage
Email support
Choose Solo →
Studio Recommended
$48/ month
For small teams who run multiple client engagements.
Unlimited workspaces
250 GB storage
Priority support & onboarding
Client billing & white-label
Choose Studio →
```
**CSS:**
```css
.ps-edt {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background: #f5f1ea;
color: #1c1c1e;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-edt-grid {
max-width: 1040px; margin: 0 auto;
display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px;
align-items: start;
}
.ps-edt-copy { padding-top: 6px; }
.ps-edt-eye {
display: block; font-family: 'JetBrains Mono', monospace;
font-size: 12px; letter-spacing: 0.1em; color: #6b6b6e;
margin-bottom: 14px;
}
.ps-edt-copy h2 {
font-family: 'Playfair Display', Georgia, serif;
font-size: clamp(28px, 4.4vw, 44px); font-weight: 700;
letter-spacing: -0.015em; line-height: 1.1;
margin: 0 0 18px;
}
.ps-edt-copy h2 em { font-style: italic; color: #6b6b6e; }
.ps-edt-copy p { font-size: 15px; line-height: 1.65; color: #3d3d40; margin: 0 0 12px; max-width: 380px; }
.ps-edt-fine { font-size: 13px !important; color: #6b6b6e !important; padding-top: 12px; border-top: 1px solid #d8d2c5; }
.ps-edt-link {
display: inline-block; margin-top: 12px;
font-size: 13px; font-weight: 600;
color: #1c1c1e; text-decoration: underline;
text-underline-offset: 4px; text-decoration-thickness: 1.5px;
}
.ps-edt-link:hover { color: #6b6b6e; }
.ps-edt-tiers { display: flex; flex-direction: column; gap: 14px; }
.ps-edt-row {
background: #fff; border: 1px solid #d8d2c5;
border-radius: 6px; padding: 22px 22px 18px;
transition: border-color 0.18s, box-shadow 0.18s;
}
.ps-edt-row:hover { border-color: #1c1c1e; box-shadow: 4px 4px 0 0 #1c1c1e; }
.ps-edt-rec { border-color: #1c1c1e; box-shadow: 4px 4px 0 0 #1c1c1e; }
.ps-edt-row header {
display: flex; align-items: baseline; justify-content: space-between;
gap: 12px; padding-bottom: 12px; margin-bottom: 12px;
border-bottom: 1px dashed #d8d2c5;
}
.ps-edt-row h3 {
font-family: 'Playfair Display', Georgia, serif;
font-size: 22px; font-weight: 700; margin: 0;
display: flex; align-items: center; gap: 10px;
}
.ps-edt-tag {
font-family: 'JetBrains Mono', monospace;
font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em;
text-transform: uppercase;
background: #1c1c1e; color: #f5f1ea;
padding: 3px 8px; border-radius: 2px;
}
.ps-edt-pri { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.ps-edt-pri em { font-size: 11px; font-style: normal; color: #6b6b6e; font-weight: 500; margin-left: 4px; letter-spacing: 0; }
.ps-edt-row p { font-size: 13.5px; color: #3d3d40; margin: 0 0 10px; line-height: 1.5; }
.ps-edt-row ul {
list-style: none; padding: 0; margin: 0 0 16px;
font-size: 13px; line-height: 1.85; color: #3d3d40;
}
.ps-edt-row ul li::before { content: '·'; color: #1c1c1e; font-weight: 800; display: inline-block; width: 18px; font-size: 18px; line-height: 0.5; vertical-align: middle; }
.ps-edt-cta {
display: inline-block; padding: 9px 16px; border-radius: 4px;
font-size: 13px; font-weight: 600; text-decoration: none;
border: 1.5px solid #1c1c1e; color: #1c1c1e;
background: transparent;
transition: background 0.18s, color 0.18s;
}
.ps-edt-cta-pri { background: #1c1c1e; color: #f5f1ea; }
.ps-edt-cta:hover { background: #1c1c1e; color: #f5f1ea; }
.ps-edt-cta-pri:hover { background: #f5f1ea; color: #1c1c1e; }
.ps-edt-cta:focus-visible { outline: 2px solid #1c1c1e; outline-offset: 3px; }
@media (max-width: 820px) {
.ps-edt-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
.ps-edt-row { transition: none; }
.ps-edt-row:hover { transform: none; }
}
```
### 03. 3D Tilt Cards
**Type:** Pure CSS
**Description:** Three pricing cards in 3D perspective, tilting back when not hovered and snapping forward on hover. Purple → cyan gradient surface, layered shadow stack giving real depth. perspective() + rotateY(), no JS.
**HTML:**
```html
Lite
$ 9/mo
Personal projects
5 GB storage
Community support
Pick Lite
Best fit
Plus
$ 29/mo
Unlimited projects
50 GB storage
Priority support
Custom domains
Pick Plus
Power
$ 79/mo
Everything in Plus
SSO + audit logs
Dedicated CSM
Pick Power
```
**CSS:**
```css
.ps-tlt {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background:
radial-gradient(60% 60% at 50% 0%, rgba(124,58,237,0.18), transparent 60%),
radial-gradient(60% 60% at 50% 100%, rgba(34,211,238,0.14), transparent 60%),
#0d0a1a;
color: #e9e6ff;
font-family: 'Inter', system-ui, sans-serif;
perspective: 1400px;
}
.ps-tlt-head { text-align: center; margin-bottom: clamp(24px, 4vw, 40px); }
.ps-tlt-head h2 {
font-size: clamp(24px, 3.6vw, 36px); font-weight: 700;
letter-spacing: -0.02em; margin: 0 0 8px; color: #fff;
}
.ps-tlt-head p { color: #a8a0c8; margin: 0; font-size: 14px; }
.ps-tlt-stage {
display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 20px; max-width: 980px; margin: 0 auto;
transform-style: preserve-3d;
align-items: center;
}
.ps-tlt-card {
position: relative;
background: linear-gradient(160deg, rgba(124,58,237,0.18), rgba(34,211,238,0.10));
border: 1px solid rgba(167,139,250,0.25);
border-radius: 16px;
padding: 26px 22px 22px;
display: flex; flex-direction: column;
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
transform-origin: center;
transition: transform 0.4s cubic-bezier(.22,1,.36,1), box-shadow 0.4s;
box-shadow: 0 10px 30px rgba(13,10,26,0.5);
}
.ps-tlt-l { transform: rotateY(14deg) translateZ(-30px); }
.ps-tlt-c { transform: translateZ(0); z-index: 2; }
.ps-tlt-r { transform: rotateY(-14deg) translateZ(-30px); }
.ps-tlt-card:hover {
transform: rotateY(0) translateZ(20px) translateY(-4px);
box-shadow: 0 24px 60px rgba(124,58,237,0.4);
z-index: 3;
}
.ps-tlt-c { background: linear-gradient(160deg, rgba(124,58,237,0.32), rgba(34,211,238,0.18)); border-color: rgba(34,211,238,0.45); }
.ps-tlt-pill {
position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
background: linear-gradient(135deg, #a78bfa, #22d3ee); color: #0d0a1a;
font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
text-transform: uppercase; padding: 5px 12px;
border-radius: 999px;
}
.ps-tlt-card h3 {
font-size: 14px; font-weight: 700; letter-spacing: 0.1em;
text-transform: uppercase; margin: 0 0 12px; color: #c4b5fd;
}
.ps-tlt-c h3 { color: #67e8f9; }
.ps-tlt-price {
display: flex; align-items: baseline; gap: 4px;
font-size: 38px; font-weight: 800; letter-spacing: -0.03em;
margin-bottom: 18px; color: #fff;
}
.ps-tlt-price em { font-size: 0.5em; font-style: normal; padding-right: 2px; opacity: 0.7; }
.ps-tlt-price span { font-size: 0.32em; font-weight: 500; opacity: 0.65; margin-left: 6px; }
.ps-tlt-card ul {
list-style: none; padding: 0; margin: 0 0 22px; flex: 1;
font-size: 13px; line-height: 1.95; color: #c4bde0;
}
.ps-tlt-card ul li::before { content: '◆'; color: #a78bfa; display: inline-block; width: 20px; font-size: 9px; }
.ps-tlt-c ul li::before { color: #22d3ee; }
.ps-tlt-cta {
display: block; text-align: center;
padding: 11px 16px; border-radius: 9px;
background: rgba(167,139,250,0.12); color: #c4b5fd;
text-decoration: none; font-size: 13.5px; font-weight: 600;
border: 1px solid rgba(167,139,250,0.3);
transition: background 0.18s, color 0.18s;
}
.ps-tlt-cta-pri { background: linear-gradient(135deg, #a78bfa, #22d3ee); color: #0d0a1a; border-color: transparent; }
.ps-tlt-cta:hover { background: rgba(167,139,250,0.28); color: #fff; }
.ps-tlt-cta:focus-visible { outline: 2px solid #22d3ee; outline-offset: 3px; }
@media (max-width: 820px) {
.ps-tlt-stage { grid-template-columns: 1fr; max-width: 380px; perspective: none; }
.ps-tlt-l, .ps-tlt-c, .ps-tlt-r { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
.ps-tlt-card { transition: none; }
.ps-tlt-l, .ps-tlt-c, .ps-tlt-r { transform: none; }
.ps-tlt-card:hover { transform: none; }
}
```
### 04. Synthwave Neon
**Type:** Pure CSS
**Description:** Retro 80s synthwave pricing — magenta and cyan neon over a perspective grid horizon, chrome heading reflection, sun gradient behind the cards. The aesthetic Vaporwave / Stranger Things landings ride on.
**HTML:**
```html
★ Pricing ★
Choose your signal.
Wave
$15
Solo channel
5 GB
Email reach
Tune in
★ FAVORITE ★
Pulse
$39
Multi-channel
50 GB
Live chat
Custom domain
Tune in
Storm
$99
Unlimited
500 GB
SSO + SLA
Tune in
```
**CSS:**
```css
.ps-syn {
position: relative; overflow: hidden;
contain: layout paint;
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background: linear-gradient(180deg, #0c0420 0%, #1a052e 60%, #2a0843 100%);
color: #f0e6ff;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-syn-grid-bg {
position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
width: 220%; height: 50%;
background:
repeating-linear-gradient(0deg, transparent 0, transparent 24px, rgba(236,72,153,0.4) 24px, rgba(236,72,153,0.4) 25px),
repeating-linear-gradient(90deg, transparent 0, transparent 24px, rgba(34,211,238,0.4) 24px, rgba(34,211,238,0.4) 25px);
transform: translateX(-50%) perspective(700px) rotateX(60deg);
transform-origin: center top;
mask-image: linear-gradient(180deg, transparent 0%, #000 35%);
-webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%);
z-index: 0;
}
.ps-syn-sun {
position: absolute; left: 50%; top: 30%;
transform: translateX(-50%);
width: 360px; height: 360px;
border-radius: 50%;
background:
repeating-linear-gradient(180deg, transparent 0, transparent 16px, #0c0420 16px, #0c0420 19px),
linear-gradient(180deg, #fde68a 0%, #f59e0b 30%, #ec4899 60%, #a855f7 90%);
filter: blur(0.4px);
opacity: 0.55;
z-index: 0;
}
.ps-syn-head { position: relative; z-index: 2; text-align: center; margin-bottom: clamp(24px, 4vw, 40px); }
.ps-syn-eye {
display: inline-block;
font-family: 'JetBrains Mono', monospace;
font-size: 12px; font-weight: 700; letter-spacing: 0.4em;
color: #22d3ee; margin-bottom: 14px;
text-shadow: 0 0 8px #22d3ee;
}
.ps-syn-head h2 {
font-size: clamp(28px, 5vw, 48px); font-weight: 800;
letter-spacing: -0.02em; margin: 0;
background: linear-gradient(180deg, #fff 0%, #fff 50%, #f9a8d4 50%, #ec4899 100%);
-webkit-background-clip: text; background-clip: text; color: transparent;
text-shadow: 0 0 30px rgba(236,72,153,0.5);
}
.ps-syn-head h2 em { font-style: italic; }
.ps-syn-grid {
position: relative; z-index: 2;
display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px; max-width: 940px; margin: 0 auto;
align-items: center;
}
.ps-syn-card {
position: relative;
background: rgba(12,4,32,0.7);
border: 1.5px solid #ec4899;
border-radius: 4px;
padding: 22px 20px 20px;
display: flex; flex-direction: column;
box-shadow: 0 0 0 1px rgba(236,72,153,0.4) inset, 0 0 24px rgba(236,72,153,0.3);
backdrop-filter: blur(6px);
}
.ps-syn-pri { border-color: #22d3ee; box-shadow: 0 0 0 1px rgba(34,211,238,0.5) inset, 0 0 30px rgba(34,211,238,0.5); }
.ps-syn-tag {
position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
background: #0c0420; color: #22d3ee;
font-family: 'JetBrains Mono', monospace;
font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
padding: 3px 12px;
border: 1px solid #22d3ee;
text-shadow: 0 0 6px #22d3ee;
}
.ps-syn-card h3 {
font-family: 'JetBrains Mono', monospace;
font-size: 14px; font-weight: 700; letter-spacing: 0.16em;
text-transform: uppercase; margin: 0 0 12px;
color: #ec4899;
text-shadow: 0 0 8px rgba(236,72,153,0.7);
}
.ps-syn-pri h3 { color: #22d3ee; text-shadow: 0 0 8px rgba(34,211,238,0.7); }
.ps-syn-price {
font-family: 'JetBrains Mono', monospace;
font-size: 42px; font-weight: 800; letter-spacing: -0.02em;
margin-bottom: 18px; color: #fff;
text-shadow: 0 0 12px rgba(236,72,153,0.6);
}
.ps-syn-pri .ps-syn-price { text-shadow: 0 0 12px rgba(34,211,238,0.6); }
.ps-syn-card ul {
list-style: none; padding: 0; margin: 0 0 20px; flex: 1;
font-size: 13px; line-height: 1.95; color: #d6c8ee;
font-family: 'JetBrains Mono', monospace;
}
.ps-syn-card ul li::before { content: '▸ '; color: #ec4899; }
.ps-syn-pri ul li::before { color: #22d3ee; }
.ps-syn-cta {
display: block; text-align: center;
padding: 10px 14px;
font-family: 'JetBrains Mono', monospace;
font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
text-transform: uppercase; text-decoration: none;
background: transparent; color: #ec4899;
border: 1.5px solid #ec4899;
transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.ps-syn-cta-pri { color: #22d3ee; border-color: #22d3ee; }
.ps-syn-cta:hover { background: #ec4899; color: #0c0420; box-shadow: 0 0 16px #ec4899; }
.ps-syn-cta-pri:hover { background: #22d3ee; color: #0c0420; box-shadow: 0 0 16px #22d3ee; }
.ps-syn-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (max-width: 820px) {
.ps-syn-grid { grid-template-columns: 1fr; max-width: 360px; }
.ps-syn-sun { width: 240px; height: 240px; top: 22%; }
}
@media (prefers-reduced-motion: reduce) {
.ps-syn-cta { transition: none; }
}
```
### 05. Pay What You Want
**Type:** Pure CSS
**Description:** A pay-what-you-want layout with five preset chips ($5 / $10 / $25 / $50 / Custom) — selecting one updates the active state and the highlighted CTA via radio + :has(). Mint palette, the indie-product / crowdfunding pattern.
**HTML:**
```html
```
**CSS:**
```css
.ps-pwy {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background:
radial-gradient(50% 50% at 50% 0%, rgba(45,212,191,0.16), transparent 60%),
#06181a;
color: #d4f5ee;
font-family: 'Inter', system-ui, sans-serif;
display: flex; align-items: center; justify-content: center;
}
.ps-pwy-card {
width: 100%; max-width: 560px;
background: linear-gradient(180deg, #0d2326, #06181a);
border: 1px solid rgba(45,212,191,0.3);
border-radius: 18px;
padding: clamp(26px, 4vw, 38px);
box-shadow: 0 24px 60px rgba(45,212,191,0.12);
}
.ps-pwy-head { text-align: center; margin-bottom: 24px; }
.ps-pwy-eye {
display: inline-block; font-size: 11px; font-weight: 700;
letter-spacing: 0.16em; text-transform: uppercase;
color: #5eead4; padding: 4px 12px;
background: rgba(94,234,212,0.12);
border-radius: 999px; margin-bottom: 14px;
}
.ps-pwy-head h2 {
font-size: clamp(22px, 3.6vw, 30px); font-weight: 700;
letter-spacing: -0.02em; margin: 0 0 10px; color: #fff;
}
.ps-pwy-head h2 em { color: #5eead4; font-style: italic; }
.ps-pwy-head p { color: #92b8b1; font-size: 14px; line-height: 1.6; margin: 0 auto; max-width: 420px; }
.ps-pwy-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.ps-pwy-amounts {
border: 0; padding: 0; margin: 0 0 20px;
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 8px;
}
.ps-pwy-amounts input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.ps-pwy-amounts label {
display: flex; flex-direction: column; align-items: center; justify-content: center;
padding: 14px 6px;
background: rgba(94,234,212,0.06);
border: 1.5px solid rgba(94,234,212,0.18);
border-radius: 10px;
cursor: pointer;
transition: border-color 0.18s, background 0.18s, transform 0.18s;
text-align: center;
min-height: 64px;
}
.ps-pwy-amounts label strong {
font-size: 16px; font-weight: 800; letter-spacing: -0.01em;
color: #fff;
}
.ps-pwy-amounts label span {
display: block; font-size: 10.5px; font-weight: 600;
letter-spacing: 0.06em; text-transform: uppercase;
color: #5eead4; margin-top: 2px;
}
.ps-pwy-amounts label:hover { border-color: rgba(94,234,212,0.5); background: rgba(94,234,212,0.1); }
.ps-pwy-amounts input:checked + label {
background: linear-gradient(135deg, #2dd4bf, #5eead4);
border-color: #5eead4;
transform: translateY(-2px);
box-shadow: 0 6px 18px rgba(45,212,191,0.4);
}
.ps-pwy-amounts input:checked + label strong { color: #06181a; }
.ps-pwy-amounts input:checked + label span { color: rgba(6,24,26,0.7); }
.ps-pwy-amounts input:focus-visible + label { outline: 2px solid #5eead4; outline-offset: 3px; }
.ps-pwy-feats {
list-style: none; padding: 0; margin: 0 0 20px;
font-size: 13px; line-height: 1.95; color: #b8d6cf;
}
.ps-pwy-feats li::before { content: '✓'; color: #5eead4; display: inline-block; width: 22px; font-weight: 700; }
.ps-pwy-cta {
display: block; position: relative;
text-align: center;
padding: 14px 18px; border-radius: 10px;
background: linear-gradient(135deg, #2dd4bf, #5eead4);
color: #06181a; text-decoration: none;
font-size: 14px; font-weight: 700; letter-spacing: 0.01em;
box-shadow: 0 10px 24px rgba(45,212,191,0.3);
transition: transform 0.18s;
margin-bottom: 12px;
}
.ps-pwy-cta:hover { transform: translateY(-1px); }
.ps-pwy-cta:focus-visible { outline: 2px solid #5eead4; outline-offset: 3px; }
.ps-pwy-cta span { display: none; }
.ps-pwy-cta .ps-pwy-cta-default { display: block; }
.ps-pwy:has(#ps-pwy-5:checked) .ps-pwy-cta-default,
.ps-pwy:has(#ps-pwy-25:checked) .ps-pwy-cta-default,
.ps-pwy:has(#ps-pwy-50:checked) .ps-pwy-cta-default,
.ps-pwy:has(#ps-pwy-x:checked) .ps-pwy-cta-default { display: none; }
.ps-pwy:has(#ps-pwy-5:checked) .ps-pwy-cta-5 { display: block; }
.ps-pwy:has(#ps-pwy-25:checked) .ps-pwy-cta-25 { display: block; }
.ps-pwy:has(#ps-pwy-50:checked) .ps-pwy-cta-50 { display: block; }
.ps-pwy:has(#ps-pwy-x:checked) .ps-pwy-cta-x { display: block; }
.ps-pwy-foot { font-size: 11.5px; color: #6e8a85; text-align: center; margin: 0; }
@media (max-width: 540px) {
.ps-pwy-amounts { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
.ps-pwy-amounts label, .ps-pwy-cta { transition: none; }
}
```
### 06. Currency Switcher
**Type:** Pure CSS
**Description:** A pure-CSS currency switcher (USD / EUR / GBP) using hidden radios + :has() to swap every visible price across all three tiers. Burgundy on cream — the wine-merchant / boutique-software aesthetic.
**HTML:**
```html
Petit
$12 €11 £10
/month
Solo cellar
3 bottles tracked
Email reminders
Choose Petit
Sommelier’s pick
Reserve
$36 €33 £28
/month
Full cellar
Unlimited bottles
Tasting notes
Pairing engine
Choose Reserve
Grand Cru
$96 €88 £76
/month
Multi-cellar
Insurance valuation
White-glove setup
Talk to us
```
**CSS:**
```css
.ps-cur {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background: #faf6ee;
color: #2a0a14;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-cur-head { text-align: center; margin-bottom: clamp(24px, 4vw, 36px); }
.ps-cur-head h2 {
font-family: 'Playfair Display', Georgia, serif;
font-size: clamp(26px, 4vw, 38px); font-weight: 700;
letter-spacing: -0.015em; margin: 0 0 8px; color: #6b1224;
}
.ps-cur-head p { color: #8a4555; margin: 0 0 20px; font-size: 14px; }
.ps-cur-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.ps-cur-tabs {
position: relative; display: inline-grid;
grid-template-columns: repeat(3, 1fr); gap: 0;
border: 1.5px solid #6b1224; border-radius: 999px;
padding: 3px; background: #fff;
margin: 0;
}
.ps-cur-tabs input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.ps-cur-tabs label {
padding: 7px 22px;
font-family: 'JetBrains Mono', monospace;
font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
color: #8a4555; cursor: pointer; border-radius: 999px;
transition: color 0.18s, background 0.18s;
}
.ps-cur-tabs input:checked + label { background: #6b1224; color: #faf6ee; }
.ps-cur-tabs input:focus-visible + label { outline: 2px solid #6b1224; outline-offset: 3px; }
.ps-cur-grid {
display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 18px; max-width: 1000px; margin: 0 auto;
align-items: center;
}
.ps-cur-card {
position: relative;
background: #fff;
border: 1px solid #e7d8c8;
border-radius: 8px;
padding: 26px 22px 22px;
display: flex; flex-direction: column;
}
.ps-cur-best {
background: #6b1224; color: #faf6ee;
border: 0;
transform: scale(1.04);
box-shadow: 0 18px 44px rgba(107,18,36,0.3);
}
.ps-cur-pill {
position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
background: #faf6ee; color: #6b1224;
font-family: 'JetBrains Mono', monospace;
font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em;
text-transform: uppercase; padding: 4px 11px;
border: 1.5px solid #6b1224;
border-radius: 999px;
}
.ps-cur-card h3 {
font-family: 'Playfair Display', Georgia, serif;
font-size: 22px; font-weight: 700; margin: 0 0 12px;
color: #6b1224; font-style: italic;
}
.ps-cur-best h3 { color: #faf6ee; }
.ps-cur-price {
display: flex; align-items: baseline; gap: 4px;
margin-bottom: 18px; padding-bottom: 18px;
border-bottom: 1px dashed #e7d8c8;
font-size: 38px; font-weight: 800; letter-spacing: -0.03em;
}
.ps-cur-best .ps-cur-price { border-bottom-color: rgba(250,246,238,0.25); }
.ps-cur-price em { font-size: 13px; font-weight: 500; color: #8a4555; font-style: normal; margin-left: 6px; }
.ps-cur-best .ps-cur-price em { color: rgba(250,246,238,0.7); }
.ps-cur-price > span { display: none; }
.ps-cur:has(#ps-cur-usd:checked) .ps-cur-usd,
.ps-cur:has(#ps-cur-eur:checked) .ps-cur-eur,
.ps-cur:has(#ps-cur-gbp:checked) .ps-cur-gbp { display: inline; }
.ps-cur-card ul {
list-style: none; padding: 0; margin: 0 0 20px; flex: 1;
font-size: 13.5px; line-height: 1.95; color: #4a2030;
}
.ps-cur-best ul { color: rgba(250,246,238,0.85); }
.ps-cur-card ul li::before { content: '◆'; color: #6b1224; display: inline-block; width: 20px; font-size: 9px; }
.ps-cur-best ul li::before { color: #faf6ee; }
.ps-cur-cta {
display: block; text-align: center;
padding: 11px 16px; border-radius: 6px;
text-decoration: none; font-size: 13px; font-weight: 600;
letter-spacing: 0.04em; text-transform: uppercase;
border: 1.5px solid currentColor; color: #6b1224;
background: transparent;
transition: background 0.18s, color 0.18s;
}
.ps-cur-best .ps-cur-cta { color: #faf6ee; }
.ps-cur-cta-pri { background: #faf6ee; color: #6b1224 !important; border-color: #faf6ee; }
.ps-cur-cta:hover { background: #6b1224; color: #faf6ee; border-color: #6b1224; }
.ps-cur-cta-pri:hover { background: transparent; color: #faf6ee !important; border-color: #faf6ee; }
.ps-cur-cta:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (max-width: 820px) {
.ps-cur-grid { grid-template-columns: 1fr; max-width: 380px; }
.ps-cur-best { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
.ps-cur-tabs label, .ps-cur-cta { transition: none; }
}
```
### 07. Social Proof Pricing
**Type:** Pure CSS
**Description:** A scrolling logo wall above the pricing tiers — social proof first, decision second. Slate background with lime accent on the recommended plan. Logos scroll in a seamless marquee using a duplicated track.
**HTML:**
```html
◇ NORTHWIND
▲ APEX.IO
★ PULSE
⬣ HEXLAB
◯ ORBITA
◤ FLINT
⬢ MERIDIAN
◇ NORTHWIND
▲ APEX.IO
★ PULSE
⬣ HEXLAB
◯ ORBITA
◤ FLINT
⬢ MERIDIAN
★★★★★ 4.9 from 12,400 teams
Pricing teams actually pay for.
Free
$ 0forever
1 project
5 GB storage
Community
Start free
Most teams pick this
Team
$ 32/mo
Unlimited projects
Priority support
SSO + roles
Choose Team
Enterprise
$ 0custom
Everything in Team
Dedicated CSM
SLA 99.99%
Talk to sales
```
**CSS:**
```css
.ps-spr {
position: relative;
overflow: hidden;
contain: layout paint;
padding: clamp(20px, 4vw, 36px) clamp(20px, 4vw, 40px) clamp(28px, 5vw, 48px);
min-height: 480px;
background: #0f172a;
color: #e2e8f0;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-spr-marquee {
position: relative; overflow: hidden;
contain: layout paint;
border-block: 1px solid rgba(163,230,53,0.18);
margin: 0 calc(-1 * clamp(20px, 4vw, 40px)) clamp(20px, 4vw, 32px);
padding: 14px 0;
background: rgba(15,23,42,0.6);
-webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ps-spr-track {
display: flex; gap: 56px;
white-space: nowrap;
animation: ps-spr-roll 28s linear infinite;
width: max-content;
}
@keyframes ps-spr-roll { to { transform: translateX(-50%); } }
.ps-spr-logo {
font-family: 'JetBrains Mono', monospace;
font-size: 14px; font-weight: 700; letter-spacing: 0.18em;
color: #94a3b8; flex-shrink: 0;
}
.ps-spr-head { text-align: center; margin-bottom: clamp(20px, 4vw, 32px); }
.ps-spr-rating {
display: inline-block; font-size: 12px; font-weight: 600;
letter-spacing: 0.08em; color: #a3e635;
margin-bottom: 10px;
}
.ps-spr-head h2 {
font-size: clamp(24px, 3.6vw, 36px); font-weight: 700;
letter-spacing: -0.02em; margin: 0; color: #fff;
}
.ps-spr-grid {
display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14px; max-width: 940px; margin: 0 auto;
align-items: center;
}
.ps-spr-card {
position: relative;
background: #1e293b;
border: 1px solid rgba(163,230,53,0.12);
border-radius: 12px;
padding: 22px 20px 18px;
display: flex; flex-direction: column;
}
.ps-spr-best {
background: linear-gradient(180deg, #1e293b, #243f1a);
border-color: #a3e635;
box-shadow: 0 0 0 1px #a3e635 inset, 0 14px 36px rgba(163,230,53,0.18);
}
.ps-spr-tag {
position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
background: #a3e635; color: #0f172a;
font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
text-transform: uppercase; padding: 4px 11px;
border-radius: 999px;
}
.ps-spr-card h3 {
font-size: 14px; font-weight: 700; letter-spacing: 0.1em;
text-transform: uppercase; margin: 0 0 12px; color: #cbd5e1;
}
.ps-spr-best h3 { color: #d9f99d; }
.ps-spr-price {
display: flex; align-items: baseline; gap: 4px;
font-size: 38px; font-weight: 800; letter-spacing: -0.03em;
margin-bottom: 18px; color: #fff;
}
.ps-spr-price em { font-size: 0.5em; font-style: normal; padding-right: 2px; opacity: 0.7; }
.ps-spr-price span { font-size: 0.32em; font-weight: 500; opacity: 0.65; margin-left: 6px; }
.ps-spr-card ul {
list-style: none; padding: 0; margin: 0 0 18px; flex: 1;
font-size: 13px; line-height: 1.95; color: #b8c1d1;
}
.ps-spr-card ul li::before { content: '✓'; color: #a3e635; display: inline-block; width: 20px; font-weight: 700; }
.ps-spr-cta {
display: block; text-align: center;
padding: 10px 16px; border-radius: 8px;
text-decoration: none; font-size: 13px; font-weight: 600;
background: rgba(163,230,53,0.1); color: #a3e635;
border: 1px solid rgba(163,230,53,0.28);
transition: background 0.18s, color 0.18s;
}
.ps-spr-cta-pri { background: #a3e635; color: #0f172a; border-color: #a3e635; }
.ps-spr-cta:hover { background: #a3e635; color: #0f172a; }
.ps-spr-cta-pri:hover { background: #d9f99d; }
.ps-spr-cta:focus-visible { outline: 2px solid #a3e635; outline-offset: 3px; }
@media (max-width: 820px) {
.ps-spr-grid { grid-template-columns: 1fr; max-width: 360px; }
}
@media (prefers-reduced-motion: reduce) {
.ps-spr-track { animation: none; }
}
```
### 08. Feature Accordion Tiers
**Type:** Pure CSS
**Description:** Three tier cards with native <details>/<summary> dropdowns that reveal the full feature list on click — keeps the page short and lets curious buyers dig in. Deep purple palette, no JS, fully keyboard-accessible.
**HTML:**
```html
Indie
$ 11/mo
For solo developers shipping side projects.
See all features ⌄
1 project workspace
10 GB storage
Community forum support
Public deploys with auto-SSL
50K monthly visitor cap
1-year version history
Choose Indie →
Recommended
Studio
$ 34/mo
For small teams shipping to real users.
See all features ⌄
Unlimited project workspaces
100 GB storage
Priority email + chat support
Custom domains with auto-SSL
500K monthly visitor cap
3-year version history
Team roles & permissions
Slack, GitHub, Linear sync
Choose Studio →
Org
$ 96/mo
For organisations with compliance requirements.
See all features ⌄
Everything in Studio
SAML SSO & SCIM provisioning
Audit logs (90-day retention)
Unlimited monthly visitors
Forever version history
SOC 2 + DPA on file
SLA 99.99% with credits
Dedicated CSM & quarterly review
Talk to sales →
```
**CSS:**
```css
.ps-acc {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background:
radial-gradient(60% 60% at 50% 0%, rgba(168,85,247,0.16), transparent 60%),
#15071f;
color: #f3e8ff;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-acc-head { text-align: center; margin-bottom: clamp(24px, 4vw, 36px); }
.ps-acc-head h2 {
font-size: clamp(22px, 3.4vw, 32px); font-weight: 700;
letter-spacing: -0.02em; margin: 0 0 8px; color: #fff;
}
.ps-acc-head p { color: #c4a8d6; margin: 0; font-size: 14px; }
.ps-acc-grid {
display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px; max-width: 980px; margin: 0 auto;
align-items: start;
}
.ps-acc-card {
position: relative;
background: #281033;
border: 1px solid rgba(168,85,247,0.2);
border-radius: 14px;
padding: 24px 22px 20px;
display: flex; flex-direction: column;
}
.ps-acc-pri {
background: linear-gradient(180deg, #3b1554, #281033);
border-color: #a855f7;
box-shadow: 0 0 0 1px #a855f7 inset, 0 16px 40px rgba(168,85,247,0.22);
}
.ps-acc-pill {
position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
background: linear-gradient(135deg, #a855f7, #d946ef);
color: #15071f;
font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
text-transform: uppercase; padding: 4px 11px;
border-radius: 999px;
}
.ps-acc-card h3 {
font-size: 15px; font-weight: 700; letter-spacing: 0.08em;
text-transform: uppercase; margin: 0 0 6px; color: #d8b4fe;
}
.ps-acc-price {
display: flex; align-items: baseline; gap: 4px;
font-size: 36px; font-weight: 800; letter-spacing: -0.03em;
margin-bottom: 6px; color: #fff;
}
.ps-acc-price em { font-size: 0.5em; font-style: normal; padding-right: 2px; opacity: 0.7; }
.ps-acc-price span { font-size: 0.32em; font-weight: 500; opacity: 0.65; margin-left: 6px; }
.ps-acc-sub { font-size: 13px; color: #c4a8d6; margin: 0 0 16px; line-height: 1.5; min-height: 36px; }
.ps-acc-det {
border: 1px solid rgba(168,85,247,0.18);
border-radius: 8px;
padding: 0 14px;
margin-bottom: 16px;
background: rgba(168,85,247,0.05);
}
.ps-acc-det[open] { padding-bottom: 4px; }
.ps-acc-det summary {
cursor: pointer;
padding: 11px 0;
font-size: 13px; font-weight: 600; color: #d8b4fe;
list-style: none;
display: flex; align-items: center; justify-content: space-between;
outline: 0;
}
.ps-acc-det summary::-webkit-details-marker { display: none; }
.ps-acc-det summary span {
display: inline-block; font-size: 14px; transition: transform 0.25s;
}
.ps-acc-det[open] summary span { transform: rotate(180deg); }
.ps-acc-det summary:focus-visible { outline: 2px solid #a855f7; outline-offset: 3px; border-radius: 4px; }
.ps-acc-det ul {
list-style: none; padding: 0; margin: 0 0 8px;
font-size: 12.5px; line-height: 1.95; color: #d8c8e8;
border-top: 1px dashed rgba(168,85,247,0.18);
padding-top: 10px;
}
.ps-acc-det ul li::before { content: '✓'; color: #d946ef; display: inline-block; width: 18px; font-weight: 700; }
.ps-acc-cta {
display: block; text-align: center; margin-top: auto;
padding: 11px 16px; border-radius: 8px;
background: rgba(168,85,247,0.12); color: #d8b4fe;
text-decoration: none; font-size: 13.5px; font-weight: 600;
border: 1px solid rgba(168,85,247,0.3);
transition: background 0.18s, color 0.18s;
}
.ps-acc-cta-pri { background: linear-gradient(135deg, #a855f7, #d946ef); color: #15071f; border-color: transparent; }
.ps-acc-cta:hover { background: rgba(168,85,247,0.28); color: #fff; }
.ps-acc-cta:focus-visible { outline: 2px solid #d946ef; outline-offset: 3px; }
@media (max-width: 820px) {
.ps-acc-grid { grid-template-columns: 1fr; max-width: 380px; }
.ps-acc-sub { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
.ps-acc-det summary span { transition: none; }
.ps-acc-cta { transition: none; }
}
```
### 09. Spotlight Pricing
**Type:** Light JS
**Description:** Cards illuminate where the cursor moves — a CSS variable carries pointer X/Y and a radial gradient renders the spotlight. Black + amber, the developer-tool / OSS-pricing aesthetic. JS only updates two CSS variables; everything else is CSS.
**HTML:**
```html
OSS
$0open source
Self-hosted
MIT licence
GitHub issues
Clone the repo
Recommended
Cloud
$24/mo
Hosted & maintained
Auto-updates + backups
Email support
API access
Choose Cloud
Self-Hosted Pro
$199/yr
Commercial licence
Priority email support
Audit logs
Buy licence
```
**CSS:**
```css
.ps-spt {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background: #050505;
color: #f5e6c8;
font-family: 'JetBrains Mono', 'Inter', system-ui, sans-serif;
}
.ps-spt-head { text-align: center; margin-bottom: clamp(24px, 4vw, 40px); }
.ps-spt-head h2 {
font-family: 'Inter', sans-serif;
font-size: clamp(22px, 3.4vw, 32px); font-weight: 700;
letter-spacing: -0.02em; margin: 0 0 8px; color: #fff;
}
.ps-spt-head p { color: #8a7656; margin: 0; font-size: 13.5px; }
.ps-spt-grid {
display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14px; max-width: 980px; margin: 0 auto;
align-items: stretch;
}
.ps-spt-card {
position: relative; overflow: hidden;
background: #0a0a0a;
border: 1px solid #2a2418;
border-radius: 14px;
padding: 24px 22px 20px;
display: flex; flex-direction: column;
isolation: isolate;
}
.ps-spt-glow {
position: absolute; inset: 0;
background: radial-gradient(180px circle at var(--ps-spt-x, 50%) var(--ps-spt-y, 50%),
rgba(245,158,11,0.4) 0%, rgba(245,158,11,0.1) 30%, transparent 60%);
opacity: 0; pointer-events: none;
transition: opacity 0.25s;
z-index: 0;
}
.ps-spt-card:hover .ps-spt-glow,
.ps-spt-card:focus-within .ps-spt-glow { opacity: 1; }
.ps-spt-card > *:not(.ps-spt-glow) { position: relative; z-index: 1; }
.ps-spt-card { transition: border-color 0.2s, transform 0.2s; }
.ps-spt-card:hover, .ps-spt-card:focus-within { border-color: #f59e0b; transform: translateY(-2px); }
.ps-spt-card:focus { outline: 0; }
.ps-spt-card:focus-visible { outline: 2px solid #f59e0b; outline-offset: 3px; }
.ps-spt-best { border-color: #b45309; background: linear-gradient(180deg, #1a0f02, #0a0a0a); }
.ps-spt-pill {
display: inline-block; align-self: flex-start;
background: #f59e0b; color: #050505;
font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
text-transform: uppercase; padding: 3px 10px;
border-radius: 4px; margin-bottom: 10px;
}
.ps-spt-card h3 {
font-size: 13px; font-weight: 700; letter-spacing: 0.16em;
text-transform: uppercase; margin: 0 0 12px; color: #f59e0b;
}
.ps-spt-price {
font-family: 'JetBrains Mono', monospace;
font-size: 38px; font-weight: 800; letter-spacing: -0.03em;
margin-bottom: 18px; color: #fff;
display: flex; align-items: baseline; gap: 8px;
}
.ps-spt-price span { font-size: 12px; font-weight: 500; color: #8a7656; letter-spacing: 0.04em; }
.ps-spt-card ul {
list-style: none; padding: 0; margin: 0 0 20px; flex: 1;
font-size: 12.5px; line-height: 2; color: #d8c69a;
}
.ps-spt-card ul li::before { content: '> '; color: #f59e0b; }
.ps-spt-cta {
display: block; text-align: center;
padding: 10px 16px; border-radius: 6px;
font-family: 'JetBrains Mono', monospace;
font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em;
text-transform: uppercase; text-decoration: none;
background: transparent; color: #f59e0b;
border: 1.5px solid #b45309;
transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.ps-spt-cta-pri { background: #f59e0b; color: #050505; border-color: #f59e0b; }
.ps-spt-cta:hover { background: #f59e0b; color: #050505; border-color: #f59e0b; }
.ps-spt-cta:focus-visible { outline: 2px solid #f59e0b; outline-offset: 3px; }
@media (max-width: 820px) {
.ps-spt-grid { grid-template-columns: 1fr; max-width: 360px; }
}
@media (prefers-reduced-motion: reduce) {
.ps-spt-card, .ps-spt-glow, .ps-spt-cta { transition: none; }
}
```
**JS:**
```js
(function () {
var cards = document.querySelectorAll('.ps-spt-card');
cards.forEach(function (card) {
card.addEventListener('pointermove', function (e) {
var rect = card.getBoundingClientRect();
var x = ((e.clientX - rect.left) / rect.width) * 100;
var y = ((e.clientY - rect.top) / rect.height) * 100;
card.style.setProperty('--ps-spt-x', x + '%');
card.style.setProperty('--ps-spt-y', y + '%');
});
card.addEventListener('focus', function () {
card.style.setProperty('--ps-spt-x', '50%');
card.style.setProperty('--ps-spt-y', '50%');
});
});
})();
```
### 10. Annual Savings Stripe
**Type:** Pure CSS
**Description:** A pricing layout that makes the annual discount visible — monthly price struck through next to the discounted annual price, with a "Save $X/yr" pill underneath. Forest green base with warm orange savings accents — the conversion-tested "anchor and discount" pattern.
**HTML:**
```html
Seedling
$15/mo
$12 /mo billed yearly
Save $36/yr
1 garden
30 plant slots
Care reminders
Choose Seedling
Recommended
Greenhouse
$36/mo
$29 /mo billed yearly
Save $84/yr
10 gardens
Unlimited slots
Disease alerts
Soil data sync
Choose Greenhouse
Estate
$96/mo
$79 /mo billed yearly
Save $204/yr
Multi-property
Pro APIs
Phone support
Choose Estate
```
**CSS:**
```css
.ps-sav {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background:
radial-gradient(60% 60% at 50% 0%, rgba(34,107,72,0.2), transparent 60%),
#07140e;
color: #e7f5ee;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-sav-head { text-align: center; margin-bottom: clamp(24px, 4vw, 36px); }
.ps-sav-head h2 {
font-size: clamp(24px, 3.6vw, 36px); font-weight: 700;
letter-spacing: -0.02em; margin: 0 0 8px;
color: #fff;
}
.ps-sav-head p { color: #94b5a3; margin: 0; font-size: 14px; }
.ps-sav-grid {
display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px; max-width: 980px; margin: 0 auto;
align-items: center;
}
.ps-sav-card {
position: relative;
background: #0d2018;
border: 1px solid rgba(52,153,108,0.22);
border-radius: 14px;
padding: 24px 22px 20px;
display: flex; flex-direction: column;
}
.ps-sav-rec {
background: linear-gradient(180deg, #14301f, #0d2018);
border-color: #34996c;
box-shadow: 0 0 0 1px #34996c inset, 0 14px 36px rgba(52,153,108,0.2);
transform: scale(1.04);
}
.ps-sav-pill {
position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
background: #34996c; color: #07140e;
font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
text-transform: uppercase; padding: 4px 11px;
border-radius: 999px;
}
.ps-sav-card h3 {
font-size: 14px; font-weight: 700; letter-spacing: 0.1em;
text-transform: uppercase; margin: 0 0 14px;
color: #6ee7b7;
}
.ps-sav-prices {
display: flex; flex-direction: column; gap: 4px;
margin-bottom: 8px;
}
.ps-sav-was {
font-size: 14px; color: #94b5a3;
text-decoration: line-through;
text-decoration-color: #f97316;
text-decoration-thickness: 2px;
}
.ps-sav-was em { font-style: normal; font-size: 12px; opacity: 0.8; }
.ps-sav-now {
display: flex; align-items: baseline; gap: 6px;
}
.ps-sav-now strong {
font-size: 38px; font-weight: 800; letter-spacing: -0.03em;
color: #fff;
}
.ps-sav-now em { font-style: normal; font-size: 12px; color: #94b5a3; }
.ps-sav-bag {
display: inline-block; align-self: flex-start;
background: #f97316; color: #07140e;
font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
padding: 3px 10px;
border-radius: 4px;
margin-bottom: 18px;
}
.ps-sav-card ul {
list-style: none; padding: 0; margin: 0 0 20px; flex: 1;
font-size: 13.5px; line-height: 1.95; color: #c8e0d3;
}
.ps-sav-card ul li::before { content: '✓'; color: #34d399; display: inline-block; width: 20px; font-weight: 700; }
.ps-sav-cta {
display: block; text-align: center;
padding: 11px 16px; border-radius: 8px;
background: rgba(52,153,108,0.14); color: #6ee7b7;
text-decoration: none; font-size: 13.5px; font-weight: 600;
border: 1px solid rgba(52,153,108,0.32);
transition: background 0.18s, color 0.18s;
}
.ps-sav-cta-pri { background: #34996c; color: #07140e; border-color: #34996c; }
.ps-sav-cta:hover { background: #34996c; color: #07140e; }
.ps-sav-cta:focus-visible { outline: 2px solid #34996c; outline-offset: 3px; }
@media (max-width: 820px) {
.ps-sav-grid { grid-template-columns: 1fr; max-width: 380px; }
.ps-sav-rec { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
.ps-sav-cta { transition: none; }
}
```
### 11. Classic Three Tier
**Type:** Pure CSS
**Description:** The canonical SaaS pricing layout — three equal tier cards (Starter / Team / Business) with emerald accent. Real <ul> feature lists, dashed dividers, and full-width CTAs at the bottom. The conversion-tested baseline every team starts from.
**HTML:**
```html
Starter
For solo builders shipping their first thing.
$9 / month
1 project
2 GB storage
Community support
Basic analytics
Start free →
Team
For small teams who need to ship together.
$29 / month
10 projects
50 GB storage
Email support
Team analytics
Role-based access
Start 14-day trial →
Business
For growing companies that need governance.
$79 / month
Unlimited projects
500 GB storage
Priority support
Advanced analytics
SSO + audit logs
SOC 2 ready
Talk to sales →
```
**CSS:**
```css
.ps-cls {
display: block;
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background: #07120e;
color: #e7f5ee;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.ps-cls-head { text-align: center; margin-bottom: clamp(20px, 4vw, 40px); }
.ps-cls-eye {
display: inline-block; font-size: 12px; font-weight: 600;
letter-spacing: 0.18em; text-transform: uppercase;
color: #34d399; margin-bottom: 12px;
}
.ps-cls-head h2 {
font-size: clamp(22px, 3.4vw, 34px); font-weight: 700;
letter-spacing: -0.01em; margin: 0 0 8px;
}
.ps-cls-head p { color: #9bb5a8; margin: 0; font-size: 14px; }
.ps-cls-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px;
max-width: 980px; margin: 0 auto;
}
.ps-cls-card {
background: #0d1f18;
border: 1px solid rgba(52,211,153,0.2);
border-radius: 14px;
padding: 22px 20px 20px;
display: flex; flex-direction: column;
transition: border-color 0.2s, transform 0.2s;
}
.ps-cls-card:hover { border-color: #34d399; transform: translateY(-2px); }
.ps-cls-card h3 {
font-size: 15px; font-weight: 700; margin: 0 0 4px;
color: #34d399; letter-spacing: 0.04em; text-transform: uppercase;
}
.ps-cls-sub { font-size: 13px; color: #9bb5a8; margin: 0 0 18px; line-height: 1.5; min-height: 38px; }
.ps-cls-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 18px;
padding-bottom: 18px; border-bottom: 1px dashed rgba(52,211,153,0.25);
}
.ps-cls-amt { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; color: #f0fff7; }
.ps-cls-per { font-size: 13px; color: #9bb5a8; }
.ps-cls-feats { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.ps-cls-feats li {
position: relative;
padding: 6px 0 6px 22px;
font-size: 13.5px; color: #d2e9dc;
}
.ps-cls-feats li::before {
content: ''; position: absolute; left: 0; top: 50%;
width: 14px; height: 14px;
transform: translateY(-50%);
background:
linear-gradient(135deg, transparent 50%, #34d399 50%) center/100% 100% no-repeat;
-webkit-mask: url("data:image/svg+xml;utf8, ") center/contain no-repeat;
mask: url("data:image/svg+xml;utf8, ") center/contain no-repeat;
background: #34d399;
}
.ps-cls-cta {
display: block; text-align: center;
padding: 11px 16px; border-radius: 8px;
background: rgba(52,211,153,0.12);
color: #34d399; text-decoration: none;
font-size: 13.5px; font-weight: 600;
border: 1px solid rgba(52,211,153,0.28);
transition: background 0.18s, color 0.18s;
}
.ps-cls-cta:hover { background: #34d399; color: #07120e; }
.ps-cls-cta:focus-visible { outline: 2px solid #34d399; outline-offset: 3px; }
@media (max-width: 820px) {
.ps-cls-grid { grid-template-columns: 1fr; max-width: 460px; }
.ps-cls-sub { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
.ps-cls-card { transition: none; }
.ps-cls-card:hover { transform: none; }
}
```
### 12. Highlighted Popular
**Type:** Pure CSS
**Description:** Three tiers with the middle "Pro" plan lifted, scaled, and ribboned with a "Most Popular" badge. Sunset peach gradient on the highlight, neutral cream on the surrounding tiers — the lift pattern that drives 60–70% of mid-tier conversions.
**HTML:**
```html
Basic
$ 12 /mo
Just the essentials.
3 projects
5 GB storage
Email-only support
Choose Basic
Most popular
Pro
$ 36 /mo
Everything teams actually need.
Unlimited projects
100 GB storage
Priority support
Custom domains
Team roles
Choose Pro
Enterprise
$ 99 /mo
Compliance + dedicated success.
Everything in Pro
SSO & SAML
SLA + dedicated CSM
Contact sales
```
**CSS:**
```css
.ps-pop {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background: #1a1410;
color: #fef2e6;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-pop-head { text-align: center; margin-bottom: clamp(28px, 5vw, 48px); }
.ps-pop-head h2 {
font-size: clamp(24px, 3.6vw, 36px); font-weight: 700;
letter-spacing: -0.02em; margin: 0 0 10px;
background: linear-gradient(90deg, #ff8b5a, #ffb37a);
-webkit-background-clip: text; background-clip: text; color: transparent;
}
.ps-pop-head p { color: #c9b3a3; margin: 0; font-size: 14px; }
.ps-pop-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 18px; align-items: center;
max-width: 980px; margin: 0 auto;
}
.ps-pop-card {
position: relative;
background: #261c16;
border: 1px solid rgba(255,179,122,0.12);
border-radius: 16px;
padding: 26px 22px 22px;
display: flex; flex-direction: column;
}
.ps-pop-popular {
background: linear-gradient(180deg, #ff8b5a 0%, #f56a3a 100%);
color: #1a1410;
transform: scale(1.05);
box-shadow: 0 14px 40px rgba(245,106,58,0.35);
border: 0;
z-index: 2;
}
.ps-pop-badge {
position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
background: #1a1410; color: #ff8b5a;
font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
text-transform: uppercase; padding: 5px 12px;
border-radius: 999px;
}
.ps-pop-card h3 {
font-size: 15px; font-weight: 700; letter-spacing: 0.06em;
text-transform: uppercase; margin: 0 0 14px;
color: #ffb37a;
}
.ps-pop-popular h3 { color: #1a1410; }
.ps-pop-price {
display: flex; align-items: baseline; gap: 3px;
margin-bottom: 6px;
}
.ps-pop-cur { font-size: 18px; font-weight: 600; opacity: 0.7; }
.ps-pop-amt { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; }
.ps-pop-per { font-size: 13px; opacity: 0.7; margin-left: 4px; }
.ps-pop-sub { font-size: 13px; opacity: 0.75; margin: 0 0 18px; }
.ps-pop-feats {
list-style: none; padding: 0; margin: 0 0 22px; flex: 1;
font-size: 13.5px; line-height: 1.9;
}
.ps-pop-feats li::before {
content: '✓'; display: inline-block; width: 18px;
font-weight: 800; opacity: 0.85;
}
.ps-pop-cta {
display: block; text-align: center;
padding: 11px 16px; border-radius: 8px;
text-decoration: none; font-size: 13.5px; font-weight: 600;
border: 1px solid currentColor;
color: #ffb37a; background: transparent;
transition: background 0.18s, color 0.18s;
}
.ps-pop-cta:hover { background: #ffb37a; color: #1a1410; }
.ps-pop-cta-pri { background: #1a1410; color: #ff8b5a; border-color: #1a1410; }
.ps-pop-cta-pri:hover { background: #fef2e6; color: #1a1410; border-color: #fef2e6; }
.ps-pop-cta:focus-visible { outline: 2px solid #ff8b5a; outline-offset: 3px; }
@media (max-width: 820px) {
.ps-pop-grid { grid-template-columns: 1fr; max-width: 380px; }
.ps-pop-popular { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
.ps-pop-cta { transition: none; }
}
```
### 13. Feature Comparison Table
**Type:** Pure CSS
**Description:** A real <table> with proper <th scope>, sticky header row, and check / dash cells comparing four plans across nine features. Cyan accent on the recommended column. Mobile fallback collapses to a stacked card list under 720px.
**HTML:**
```html
```
**CSS:**
```css
.ps-cmp {
padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 40px);
min-height: 480px;
background: #06141a;
color: #e0f2f7;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-cmp-head { text-align: center; margin-bottom: clamp(20px, 4vw, 36px); }
.ps-cmp-head h2 {
font-size: clamp(22px, 3.2vw, 32px); font-weight: 700;
letter-spacing: -0.02em; margin: 0 0 8px; color: #f1fbff;
}
.ps-cmp-head p { color: #88a8b3; margin: 0; font-size: 14px; }
.ps-cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 980px; margin: 0 auto; }
.ps-cmp-tbl {
width: 100%; border-collapse: separate; border-spacing: 0;
font-size: 13.5px; min-width: 720px;
}
.ps-cmp-tbl th, .ps-cmp-tbl td {
text-align: center; padding: 14px 12px;
border-bottom: 1px solid rgba(34,211,238,0.1);
}
.ps-cmp-tbl thead th {
font-size: 14px; font-weight: 700;
color: #cfeaf2;
background: #0c1f27;
position: relative;
}
.ps-cmp-tbl thead th span:not(.ps-cmp-pill) {
display: block; font-size: 13px; font-weight: 500; color: #88a8b3; margin-top: 4px;
}
.ps-cmp-fc { text-align: left !important; color: #88a8b3 !important; font-weight: 500 !important; background: transparent !important; }
.ps-cmp-tbl tbody th {
text-align: left; font-weight: 500; color: #cfeaf2;
}
.ps-cmp-rec {
background: rgba(34,211,238,0.06);
color: #22d3ee;
position: relative;
}
.ps-cmp-tbl thead th.ps-cmp-rec {
background: linear-gradient(180deg, rgba(34,211,238,0.18), rgba(34,211,238,0.04));
color: #5eead4;
}
.ps-cmp-pill {
position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
background: #22d3ee; color: #06141a;
font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
text-transform: uppercase; padding: 3px 10px;
border-radius: 999px;
}
.ps-cmp-yes { display: inline-block; width: 22px; height: 22px; line-height: 22px;
border-radius: 50%; background: rgba(34,211,238,0.15); color: #22d3ee;
font-weight: 700;
}
.ps-cmp-no { color: #4a606a; font-weight: 500; }
.ps-cmp-tbl tfoot td { padding-top: 18px; padding-bottom: 4px; border: 0; }
.ps-cmp-cta {
display: inline-block; padding: 9px 16px; border-radius: 7px;
font-size: 12.5px; font-weight: 600;
text-decoration: none;
border: 1px solid rgba(34,211,238,0.3); color: #5eead4;
transition: background 0.18s, color 0.18s;
}
.ps-cmp-cta:hover { background: rgba(34,211,238,0.18); color: #f1fbff; }
.ps-cmp-cta-pri { background: #22d3ee; color: #06141a; border-color: #22d3ee; }
.ps-cmp-cta-pri:hover { background: #5eead4; color: #06141a; }
.ps-cmp-cta:focus-visible { outline: 2px solid #22d3ee; outline-offset: 3px; }
@media (max-width: 720px) {
.ps-cmp-scroll { padding-bottom: 8px; }
.ps-cmp-tbl thead th, .ps-cmp-tbl tbody th, .ps-cmp-tbl td { padding: 10px 8px; font-size: 12px; }
.ps-cmp-pill { font-size: 9px; padding: 2px 6px; }
}
```
### 14. Monthly Yearly Toggle
**Type:** Pure CSS
**Description:** A pure-CSS billing-cycle switch using two hidden radios + :has(). No JavaScript — selecting Yearly swaps every visible price across all three tiers via sibling state. Teal gradient, save-20%-pill on the yearly option.
**HTML:**
```html
Hobby
$0 $0 forever
1 site
Public projects
Community
Start free
Best value
Studio
$19 $15 / month
Unlimited sites
Custom domains
Email support
Form submissions
Start trial
Agency
$59 $47 / month
Everything in Studio
Client billing
Workspace switcher
Priority support
Choose Agency
```
**CSS:**
```css
.ps-tog {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background: #062021;
color: #e0fafa;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-tog-head { text-align: center; margin-bottom: clamp(24px, 4vw, 40px); }
.ps-tog-head h2 {
font-size: clamp(22px, 3.4vw, 34px); font-weight: 700;
letter-spacing: -0.02em; margin: 0 0 8px;
background: linear-gradient(90deg, #14b8a6, #5eead4);
-webkit-background-clip: text; background-clip: text; color: transparent;
}
.ps-tog-head p { color: #7ea7a4; margin: 0 0 22px; font-size: 14px; }
.ps-tog-sr {
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.ps-tog-switch {
position: relative; display: inline-grid;
grid-template-columns: 1fr 1fr;
gap: 0; padding: 4px;
background: #0d2f30;
border: 1px solid rgba(94,234,212,0.18);
border-radius: 999px;
margin: 0;
}
.ps-tog-switch input[type="radio"] {
position: absolute; opacity: 0; pointer-events: none;
}
.ps-tog-switch input:focus-visible + label {
outline: 2px solid #5eead4; outline-offset: 3px;
}
.ps-tog-switch label {
position: relative; z-index: 1;
padding: 8px 22px; cursor: pointer;
font-size: 13px; font-weight: 600; color: #7ea7a4;
border-radius: 999px;
transition: color 0.2s;
display: inline-flex; align-items: center; gap: 6px;
white-space: nowrap;
}
.ps-tog-save {
font-size: 10px; font-weight: 700;
background: rgba(94,234,212,0.18); color: #5eead4;
padding: 2px 6px; border-radius: 6px;
}
.ps-tog-thumb {
position: absolute; top: 4px; left: 4px;
width: calc(50% - 4px); height: calc(100% - 8px);
background: linear-gradient(135deg, #14b8a6, #5eead4);
border-radius: 999px;
transition: transform 0.28s cubic-bezier(.4,0,.2,1);
z-index: 0;
box-shadow: 0 4px 14px rgba(20,184,166,0.3);
}
.ps-tog-switch:has(#ps-tog-y:checked) .ps-tog-thumb { transform: translateX(100%); }
.ps-tog-switch:has(#ps-tog-m:checked) label[for="ps-tog-m"],
.ps-tog-switch:has(#ps-tog-y:checked) label[for="ps-tog-y"] { color: #062021; }
.ps-tog-switch:has(#ps-tog-y:checked) .ps-tog-save { background: rgba(6,32,33,0.25); color: #062021; }
.ps-tog-grid {
display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px; max-width: 980px; margin: 0 auto;
}
.ps-tog-card {
position: relative;
background: #0d2f30;
border: 1px solid rgba(94,234,212,0.15);
border-radius: 14px;
padding: 24px 22px 22px;
display: flex; flex-direction: column;
}
.ps-tog-best { border-color: #5eead4; box-shadow: 0 0 0 1px #5eead4 inset; }
.ps-tog-badge {
position: absolute; top: -10px; right: 16px;
background: #5eead4; color: #062021;
font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
text-transform: uppercase; padding: 4px 10px;
border-radius: 6px;
}
.ps-tog-card h3 {
font-size: 15px; font-weight: 700; letter-spacing: 0.06em;
text-transform: uppercase; margin: 0 0 14px; color: #5eead4;
}
.ps-tog-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 18px; }
.ps-tog-m-amt, .ps-tog-y-amt { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; color: #f0fff7; }
.ps-tog-per { font-size: 13px; color: #7ea7a4; }
.ps-tog:has(#ps-tog-m:checked) .ps-tog-y-amt { display: none; }
.ps-tog:has(#ps-tog-y:checked) .ps-tog-m-amt { display: none; }
.ps-tog-card ul {
list-style: none; padding: 0; margin: 0 0 22px; flex: 1;
font-size: 13.5px; line-height: 2; color: #c8eaea;
}
.ps-tog-card ul li::before {
content: '✓'; color: #5eead4; font-weight: 700;
display: inline-block; width: 20px;
}
.ps-tog-cta {
display: block; text-align: center;
padding: 11px 16px; border-radius: 8px;
text-decoration: none; font-size: 13.5px; font-weight: 600;
background: rgba(94,234,212,0.12); color: #5eead4;
border: 1px solid rgba(94,234,212,0.25);
transition: background 0.18s, color 0.18s;
}
.ps-tog-cta-pri { background: #5eead4; color: #062021; border-color: #5eead4; }
.ps-tog-cta:hover { background: #5eead4; color: #062021; }
.ps-tog-cta:focus-visible { outline: 2px solid #5eead4; outline-offset: 3px; }
@media (max-width: 820px) {
.ps-tog-grid { grid-template-columns: 1fr; max-width: 380px; }
}
@media (prefers-reduced-motion: reduce) {
.ps-tog-thumb { transition: none; }
.ps-tog-cta { transition: none; }
.ps-tog-switch label { transition: none; }
}
```
### 15. Usage Slider
**Type:** Light JS
**Description:** Native <input type="range"> drives a live monthly estimate. Drag the slider, the requests count, total price, and recommended tier all update — with aria-valuetext announcing the result to screen readers. Magenta accent, the usage-based pricing pattern from Twilio / Stripe.
**HTML:**
```html
Estimated monthly cost
$ 12
10,000 requests on the
Starter tier
No setup fee, no minimum spend
Auto-tier switching at every milestone
Usage cap option to prevent surprises
Start with this plan →
```
**CSS:**
```css
.ps-slr {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background: #1a0a18;
color: #fde7f4;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-slr-head { text-align: center; margin-bottom: clamp(24px, 4vw, 36px); }
.ps-slr-eye {
display: inline-block; font-size: 11px; font-weight: 700;
letter-spacing: 0.18em; text-transform: uppercase;
color: #f472b6; padding: 5px 12px;
background: rgba(244,114,182,0.12);
border: 1px solid rgba(244,114,182,0.25);
border-radius: 999px; margin-bottom: 14px;
}
.ps-slr-head h2 {
font-size: clamp(22px, 3.4vw, 32px); font-weight: 700;
letter-spacing: -0.02em; margin: 0 0 10px;
color: #fff;
}
.ps-slr-head p { color: #c2a0b6; margin: 0 auto; max-width: 520px; font-size: 14px; line-height: 1.6; }
.ps-slr-card {
max-width: 580px; margin: 0 auto;
background: linear-gradient(180deg, #2a1227, #1a0a18);
border: 1px solid rgba(244,114,182,0.2);
border-radius: 18px;
padding: clamp(24px, 4vw, 36px) clamp(20px, 4vw, 32px);
box-shadow: 0 22px 60px rgba(244,114,182,0.12);
}
.ps-slr-display {
text-align: center; padding-bottom: 22px; margin-bottom: 22px;
border-bottom: 1px dashed rgba(244,114,182,0.2);
}
.ps-slr-label {
display: block; font-size: 11px; letter-spacing: 0.16em;
text-transform: uppercase; color: #c2a0b6;
}
.ps-slr-amount {
display: flex; justify-content: center; align-items: baseline; gap: 4px;
font-size: 64px; font-weight: 800; letter-spacing: -0.04em;
margin: 8px 0 6px;
background: linear-gradient(180deg, #f472b6, #be185d);
-webkit-background-clip: text; background-clip: text; color: transparent;
}
.ps-slr-amount em { font-size: 28px; font-style: normal; align-self: flex-start; padding-top: 12px; opacity: 0.7; }
.ps-slr-detail { font-size: 13px; color: #c2a0b6; }
.ps-slr-detail strong { color: #f472b6; font-weight: 700; }
.ps-slr-track-wrap { padding: 0 4px 22px; }
.ps-slr-sr {
position: absolute; width: 1px; height: 1px;
overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.ps-slr-range {
-webkit-appearance: none; appearance: none;
width: 100%; height: 6px; background: transparent; cursor: pointer;
margin: 8px 0 12px;
}
.ps-slr-range::-webkit-slider-runnable-track {
height: 6px; border-radius: 999px;
background: linear-gradient(90deg, #f472b6 0%, #f472b6 var(--ps-slr-fill, 10%), #3a1a30 var(--ps-slr-fill, 10%), #3a1a30 100%);
}
.ps-slr-range::-moz-range-track {
height: 6px; border-radius: 999px; background: #3a1a30;
}
.ps-slr-range::-moz-range-progress {
height: 6px; border-radius: 999px; background: #f472b6;
}
.ps-slr-range::-webkit-slider-thumb {
-webkit-appearance: none; appearance: none;
width: 22px; height: 22px; margin-top: -8px;
border-radius: 50%; background: #fff;
border: 3px solid #f472b6;
box-shadow: 0 4px 12px rgba(244,114,182,0.4);
cursor: grab;
}
.ps-slr-range::-moz-range-thumb {
width: 22px; height: 22px; border-radius: 50%; background: #fff;
border: 3px solid #f472b6; box-shadow: 0 4px 12px rgba(244,114,182,0.4);
cursor: grab;
}
.ps-slr-range:focus-visible::-webkit-slider-thumb { outline: 3px solid #f9a8d4; outline-offset: 2px; }
.ps-slr-range:focus-visible::-moz-range-thumb { outline: 3px solid #f9a8d4; outline-offset: 2px; }
.ps-slr-ticks {
display: flex; justify-content: space-between;
font-family: 'JetBrains Mono', monospace;
font-size: 10.5px; color: #8a647a;
}
.ps-slr-feats {
list-style: none; padding: 0; margin: 0 0 22px;
font-size: 13px; line-height: 1.9; color: #d8b8cc;
}
.ps-slr-feats li::before {
content: '✦'; color: #f472b6; display: inline-block; width: 20px;
}
.ps-slr-cta {
display: block; text-align: center;
padding: 13px 18px; border-radius: 10px;
background: linear-gradient(135deg, #f472b6, #be185d);
color: #fff; text-decoration: none;
font-size: 14px; font-weight: 700; letter-spacing: 0.02em;
box-shadow: 0 8px 22px rgba(190,24,93,0.35);
transition: transform 0.18s;
}
.ps-slr-cta:hover { transform: translateY(-1px); }
.ps-slr-cta:focus-visible { outline: 2px solid #f9a8d4; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
.ps-slr-cta { transition: none; }
}
```
**JS:**
```js
(function () {
var range = document.getElementById('ps-slr-range');
var priceEl = document.getElementById('ps-slr-price');
var unitsEl = document.getElementById('ps-slr-units');
var tierEl = document.getElementById('ps-slr-tier');
if (!range || !priceEl) return;
// 5 tiers — index → { units (k), price ($), tier name }
var tiers = [
{ units: 10, price: 12, name: 'Starter' },
{ units: 100, price: 49, name: 'Starter' },
{ units: 500, price: 149, name: 'Growth' },
{ units: 1000, price: 249, name: 'Growth' },
{ units: 5000, price: 749, name: 'Scale' }
];
function fmtUnits(k) { return k >= 1000 ? (k / 1000).toFixed(k % 1000 ? 1 : 0) + 'M' : k.toLocaleString() + 'K'; }
function update() {
var v = parseInt(range.value, 10);
// map 0..100 → 0..4 with stops at 10/30/55/80/100
var idx = v < 25 ? 0 : v < 50 ? 1 : v < 75 ? 2 : v < 95 ? 3 : 4;
var t = tiers[idx];
priceEl.textContent = t.price.toLocaleString();
unitsEl.textContent = fmtUnits(t.units) + ' requests';
// strip the trailing " requests" when re-using textContent below — show only the formatted number
unitsEl.textContent = fmtUnits(t.units);
tierEl.textContent = t.name;
range.style.setProperty('--ps-slr-fill', v + '%');
range.setAttribute('aria-valuetext',
fmtUnits(t.units) + ' requests, ' + t.name + ' tier, ' + t.price + ' dollars per month');
}
range.addEventListener('input', update);
update();
})();
```
### 16. Single Premium Card
**Type:** Pure CSS
**Description:** A single-tier pricing layout for one-product brands — premium gold / brass treatment over deep navy, oversized price block, six feature checkmarks in two columns, anchor testimonial below. The pattern Basecamp / Hover use when there is only one thing to sell.
**HTML:**
```html
One plan · everything included
The whole product, flat fee.
Stop comparing tiers. One price. Every feature. Every team member. As long as you need it.
$ 249
per month, billed annually
Unlimited team members
Unlimited projects & storage
SSO & SAML included
SOC 2 & HIPAA ready
Priority email + chat support
30-day money-back guarantee
Buy now — instant access
“It paid for itself in the first week. We never looked at the tier ladder again.”
— Maya R., Head of Ops at Northwood
```
**CSS:**
```css
.ps-her {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background:
radial-gradient(60% 60% at 30% 0%, rgba(212,175,55,0.12), transparent 60%),
radial-gradient(50% 50% at 90% 100%, rgba(212,175,55,0.10), transparent 60%),
#0b0b1a;
color: #f4ecd8;
font-family: 'Inter', system-ui, sans-serif;
display: flex; align-items: center; justify-content: center;
}
.ps-her-card {
position: relative;
width: 100%; max-width: 540px;
background: linear-gradient(180deg, #14142a 0%, #0b0b1a 100%);
border: 1px solid #d4af37;
border-radius: 22px;
padding: clamp(28px, 5vw, 44px);
text-align: center;
box-shadow: 0 20px 60px rgba(212,175,55,0.15), inset 0 0 0 1px rgba(212,175,55,0.15);
}
.ps-her-card::before {
content: ''; position: absolute; inset: 0;
border-radius: 22px;
background:
linear-gradient(135deg, transparent 40%, rgba(255,212,121,0.06) 50%, transparent 60%);
pointer-events: none;
}
.ps-her-eye {
display: inline-block;
font-size: 11px; font-weight: 600;
letter-spacing: 0.18em; text-transform: uppercase;
color: #d4af37; padding: 5px 14px;
border: 1px solid rgba(212,175,55,0.4);
border-radius: 999px;
margin-bottom: 18px;
}
.ps-her-card h2 {
font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
font-size: clamp(28px, 4.5vw, 44px);
font-weight: 700; letter-spacing: -0.01em;
margin: 0 0 14px; color: #fff;
}
.ps-her-card h2 em { color: #d4af37; font-style: italic; }
.ps-her-lead { color: #b8a888; font-size: 14.5px; line-height: 1.6; margin: 0 auto 28px; max-width: 380px; }
.ps-her-price {
display: flex; flex-direction: column; align-items: center;
gap: 4px; margin-bottom: 28px;
padding: 22px 0; border-top: 1px solid rgba(212,175,55,0.18);
border-bottom: 1px solid rgba(212,175,55,0.18);
}
.ps-her-amt {
font-family: 'Playfair Display', Georgia, serif;
font-size: clamp(56px, 9vw, 88px); font-weight: 800;
letter-spacing: -0.04em; line-height: 1;
background: linear-gradient(180deg, #ffd479, #d4af37);
-webkit-background-clip: text; background-clip: text; color: transparent;
}
.ps-her-amt em { font-size: 0.5em; font-style: normal; vertical-align: top; padding-right: 2px; opacity: 0.85; }
.ps-her-per { font-size: 13px; color: #b8a888; }
.ps-her-feats {
list-style: none; padding: 0; margin: 0 0 28px;
display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px;
text-align: left; font-size: 13.5px; color: #f4ecd8;
}
.ps-her-feats li::before {
content: '✓'; color: #d4af37; font-weight: 700;
display: inline-block; width: 20px;
}
.ps-her-cta {
display: block;
padding: 14px 20px; border-radius: 10px;
background: linear-gradient(180deg, #ffd479, #d4af37);
color: #0b0b1a; text-decoration: none;
font-size: 15px; font-weight: 700; letter-spacing: 0.01em;
box-shadow: 0 10px 24px rgba(212,175,55,0.3);
transition: transform 0.18s;
}
.ps-her-cta:hover { transform: translateY(-1px); }
.ps-her-cta:focus-visible { outline: 2px solid #ffd479; outline-offset: 3px; }
.ps-her-foot { font-size: 12px; color: #8a8068; margin: 12px 0 26px; }
.ps-her-quote {
margin: 0; padding-top: 22px; border-top: 1px dashed rgba(212,175,55,0.2);
}
.ps-her-quote p {
font-family: 'Playfair Display', Georgia, serif;
font-size: 16px; font-style: italic; color: #f4ecd8;
margin: 0 0 8px; line-height: 1.5;
}
.ps-her-quote cite { font-style: normal; font-size: 12px; color: #8a8068; letter-spacing: 0.05em; }
@media (max-width: 540px) {
.ps-her-feats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.ps-her-cta { transition: none; }
}
```
### 17. Bento Pricing Grid
**Type:** Pure CSS
**Description:** Apple-style bento layout — the recommended Pro tile dominates one large quadrant, with stat / quote / pill cells fanning out. Coral and rose tones. Each tile is its own <article> with semantic content; the layout uses CSS Grid named areas.
**HTML:**
```html
Recommended
Pro
$ 34/mo
Unlimited projects
100 GB storage
Priority support
Custom domains
Choose Pro →
Free
$ 0forever
Build something small, ship it, keep it free.
Start free →
14k+
teams pay for Pro every month
Team
$ 99/mo
Roles, billing, and audit logs for growing companies.
Choose Team →
“We tried five tools. This was the only one priced like a partner, not a tax.”
— Lior, CTO at Pulse
```
**CSS:**
```css
.ps-bnt {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background: #1a0d0d;
color: #ffe7df;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-bnt-head { text-align: center; margin-bottom: clamp(24px, 4vw, 36px); }
.ps-bnt-head h2 {
font-size: clamp(22px, 3.4vw, 34px); font-weight: 700;
letter-spacing: -0.02em; margin: 0 0 8px;
color: #ffd0bf;
}
.ps-bnt-head p { color: #b89180; margin: 0 auto; max-width: 480px; font-size: 14px; }
.ps-bnt-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: auto auto;
grid-template-areas:
"pro pro free stat"
"pro pro team quote";
gap: 14px;
max-width: 980px; margin: 0 auto;
}
.ps-bnt-tile {
background: #2a1612;
border: 1px solid rgba(255,108,79,0.15);
border-radius: 16px;
padding: 22px 20px;
display: flex; flex-direction: column; justify-content: space-between;
min-height: 130px;
}
.ps-bnt-pro {
grid-area: pro;
background: linear-gradient(135deg, #ff6b4a 0%, #f43f5e 100%);
border: 0;
color: #1a0d0d;
position: relative;
overflow: hidden;
}
.ps-bnt-pro::after {
content: ''; position: absolute; right: -40px; bottom: -40px;
width: 160px; height: 160px; border-radius: 50%;
background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
pointer-events: none;
}
.ps-bnt-pill {
display: inline-block; align-self: flex-start;
background: #1a0d0d; color: #ff6b4a;
font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
text-transform: uppercase; padding: 5px 11px;
border-radius: 999px; margin-bottom: 8px;
}
.ps-bnt-tile h3 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 6px; opacity: 0.8; }
.ps-bnt-pro h3 { color: #1a0d0d; opacity: 1; font-weight: 700; }
.ps-bnt-price {
font-size: clamp(36px, 5vw, 56px); font-weight: 800;
letter-spacing: -0.03em; line-height: 1;
margin-bottom: 12px;
}
.ps-bnt-price em { font-size: 0.5em; font-style: normal; vertical-align: top; padding-right: 2px; opacity: 0.7; }
.ps-bnt-price span { font-size: 0.28em; font-weight: 500; opacity: 0.7; margin-left: 6px; }
.ps-bnt-pro ul {
list-style: none; padding: 0; margin: 0 0 18px;
font-size: 13px; line-height: 1.9;
}
.ps-bnt-pro ul li::before { content: '✓'; display: inline-block; width: 20px; font-weight: 700; }
.ps-bnt-tile p {
font-size: 13px; line-height: 1.5; color: #b89180; margin: 0 0 12px;
}
.ps-bnt-cta, .ps-bnt-cta-sm {
display: inline-block; padding: 10px 16px; border-radius: 8px;
text-decoration: none; font-size: 13.5px; font-weight: 600;
border: 1px solid currentColor; color: inherit;
transition: background 0.18s, color 0.18s;
}
.ps-bnt-cta { background: #1a0d0d; color: #ff6b4a; border-color: #1a0d0d; align-self: flex-start; }
.ps-bnt-cta:hover { background: transparent; color: #fff; border-color: #fff; }
.ps-bnt-cta-sm { color: #ff6b4a; border-color: rgba(255,108,79,0.4); padding: 8px 14px; align-self: flex-start; font-size: 12.5px; }
.ps-bnt-cta-sm:hover { background: #ff6b4a; color: #1a0d0d; border-color: #ff6b4a; }
.ps-bnt-cta:focus-visible, .ps-bnt-cta-sm:focus-visible { outline: 2px solid #ffe7df; outline-offset: 3px; }
.ps-bnt-stat { grid-area: stat; align-items: flex-start; background: #2a1612; }
.ps-bnt-stat-num {
font-size: clamp(36px, 5vw, 50px); font-weight: 800;
letter-spacing: -0.03em; color: #ff6b4a;
background: linear-gradient(180deg, #ffb37a, #ff6b4a);
-webkit-background-clip: text; background-clip: text; color: transparent;
}
.ps-bnt-stat-lbl { font-size: 12px; color: #b89180; line-height: 1.4; }
.ps-bnt-team { grid-area: team; }
.ps-bnt-free { grid-area: free; }
.ps-bnt-quote {
grid-area: quote;
background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
color: #1a0d0d; border: 0;
}
.ps-bnt-quote p { font-style: italic; color: #1a0d0d; font-weight: 500; line-height: 1.5; font-size: 13px; opacity: 0.92; }
.ps-bnt-quote cite { font-style: normal; font-size: 11px; color: rgba(26,13,13,0.7); letter-spacing: 0.05em; }
@media (max-width: 820px) {
.ps-bnt-grid {
grid-template-columns: 1fr 1fr;
grid-template-areas:
"pro pro"
"free team"
"stat quote";
}
}
@media (max-width: 520px) {
.ps-bnt-grid {
grid-template-columns: 1fr;
grid-template-areas:
"pro"
"free"
"team"
"stat"
"quote";
}
}
```
### 18. Vertical Tier Timeline
**Type:** Pure CSS
**Description:** Tiers presented as a vertical roadmap — Free → Pro → Enterprise — connected by a glowing lime spine. Each station is a real <ol>/<li> with a numbered milestone, price, and feature list. Reads as a growth path, not a column comparison.
**HTML:**
```html
01
Open-source projects, side experiments, anything you want to ship without a credit card.
1 project
500 MB storage
Public repos only
Start free →
02
Where most teams settle. Private projects, real support, and the integrations you actually
use.
Unlimited projects
50 GB storage
Email + chat support
Slack, GitHub, Linear sync
Choose Pro →
03
For teams with procurement processes, security reviews, and quarterly business reviews.
SSO + SAML + audit logs
SLA, dedicated CSM
Custom DPA & invoicing
Talk to sales →
```
**CSS:**
```css
.ps-tml {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background: #0a1408;
color: #ecfccb;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-tml-head { text-align: center; margin-bottom: clamp(28px, 5vw, 44px); }
.ps-tml-head h2 {
font-size: clamp(22px, 3.4vw, 32px); font-weight: 700;
letter-spacing: -0.02em; margin: 0 0 8px; color: #f7feec;
}
.ps-tml-head p { color: #93a87f; margin: 0; font-size: 14px; }
.ps-tml-line {
position: relative; list-style: none; padding: 0;
margin: 0 auto; max-width: 580px;
}
.ps-tml-line::before {
content: ''; position: absolute; left: 28px; top: 18px; bottom: 18px;
width: 2px; background: linear-gradient(180deg, #84cc16, rgba(132,204,22,0.2));
border-radius: 2px;
}
.ps-tml-stop {
position: relative; padding: 0 0 24px 70px;
min-height: 56px;
}
.ps-tml-stop:last-child { padding-bottom: 0; }
.ps-tml-num {
position: absolute; left: 6px; top: 0;
width: 46px; height: 46px;
border-radius: 50%;
background: #0a1408; border: 2px solid #84cc16;
font-family: 'JetBrains Mono', monospace;
font-size: 13px; font-weight: 700; color: #84cc16;
display: flex; align-items: center; justify-content: center;
z-index: 1;
}
.ps-tml-current .ps-tml-num {
background: #84cc16; color: #0a1408;
box-shadow: 0 0 0 6px rgba(132,204,22,0.18);
}
.ps-tml-pane {
background: #14210e;
border: 1px solid rgba(132,204,22,0.18);
border-radius: 12px;
padding: 18px 18px 16px;
}
.ps-tml-current .ps-tml-pane {
border-color: #84cc16;
background: linear-gradient(180deg, #1a3010, #14210e);
box-shadow: 0 8px 24px rgba(132,204,22,0.12);
}
.ps-tml-pane header {
display: flex; align-items: baseline; justify-content: space-between;
margin-bottom: 8px;
border-bottom: 1px dashed rgba(132,204,22,0.18);
padding-bottom: 10px;
}
.ps-tml-pane h3 {
font-size: 14px; font-weight: 700; letter-spacing: 0.06em;
text-transform: uppercase; margin: 0; color: #84cc16;
}
.ps-tml-pri { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: #f7feec; }
.ps-tml-pri em { font-size: 12px; font-style: normal; color: #93a87f; font-weight: 500; margin-left: 2px; }
.ps-tml-pane p { font-size: 13px; color: #c8d8b0; margin: 10px 0; line-height: 1.55; }
.ps-tml-pane ul {
list-style: none; padding: 0; margin: 0 0 14px;
font-size: 13px; line-height: 1.85; color: #c8d8b0;
}
.ps-tml-pane ul li::before {
content: '→'; color: #84cc16; display: inline-block; width: 20px; font-weight: 700;
}
.ps-tml-cta {
display: inline-block; padding: 9px 14px; border-radius: 7px;
font-size: 13px; font-weight: 600; text-decoration: none;
border: 1px solid rgba(132,204,22,0.4); color: #84cc16;
background: transparent;
transition: background 0.18s, color 0.18s;
}
.ps-tml-cta:hover { background: rgba(132,204,22,0.15); color: #ecfccb; }
.ps-tml-cta-pri { background: #84cc16; color: #0a1408; border-color: #84cc16; }
.ps-tml-cta-pri:hover { background: #a3e635; color: #0a1408; border-color: #a3e635; }
.ps-tml-cta:focus-visible { outline: 2px solid #a3e635; outline-offset: 3px; }
```
### 19. Brutalist Print
**Type:** Pure CSS
**Description:** Print-zine pricing — black on cream, hard offset shadows, mono type, intentionally raw. Each plan card sits askew on a yellow grid; CTAs are big inverted blocks. The brutalist aesthetic that signals "no marketing fluff" — popular with indie hackers and OSS.
**HTML:**
```html
issue №07 · pricing
Three sizes. One product. Pick.
Plan Solo
Cost $8/mo
Built for Indie devs
1 site, 1 admin
5 GB storage
Forum support
[ Buy Solo ]
★ POPULAR
Plan Studio
Cost $24/mo
Built for Small studios
10 sites, 5 admins
50 GB storage
Email support
Custom domain
[ Buy Studio ]
Plan Shop
Cost $60/mo
Built for Agencies
Unlimited sites
500 GB storage
Priority support
White-label
[ Buy Shop ]
```
**CSS:**
```css
.ps-brt {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background:
repeating-linear-gradient(0deg, transparent 0, transparent 23px, rgba(0,0,0,0.04) 23px, rgba(0,0,0,0.04) 24px),
repeating-linear-gradient(90deg, transparent 0, transparent 23px, rgba(0,0,0,0.04) 23px, rgba(0,0,0,0.04) 24px),
#f4eccc;
color: #0e0e0e;
font-family: 'JetBrains Mono', 'Courier New', monospace;
}
.ps-brt-head { margin-bottom: clamp(24px, 4vw, 36px); }
.ps-brt-eye {
display: inline-block; font-size: 11px; letter-spacing: 0.18em;
text-transform: uppercase; padding: 4px 10px;
background: #0e0e0e; color: #f4eccc; margin-bottom: 12px;
}
.ps-brt-head h2 {
font-size: clamp(28px, 5vw, 44px); font-weight: 800;
letter-spacing: -0.02em; line-height: 1.1; margin: 0;
text-transform: uppercase;
}
.ps-brt-grid {
display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 24px; max-width: 980px; margin: 0 auto;
}
.ps-brt-card {
position: relative;
background: #f4eccc;
border: 2px solid #0e0e0e;
padding: 22px 20px 20px;
box-shadow: 8px 8px 0 0 #0e0e0e;
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ps-brt-card:hover { transform: translate(2px, 2px); box-shadow: 6px 6px 0 0 #0e0e0e; }
.ps-brt-r1 { transform: rotate(-1.2deg); }
.ps-brt-r2 { transform: rotate(0.8deg); }
.ps-brt-r3 { transform: rotate(-0.6deg); }
.ps-brt-pop { background: #facc15; border-color: #0e0e0e; box-shadow: 8px 8px 0 0 #0e0e0e; }
.ps-brt-stamp {
position: absolute; top: -14px; right: -10px;
background: #0e0e0e; color: #facc15;
font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
padding: 5px 12px; transform: rotate(4deg);
text-transform: uppercase;
}
.ps-brt-row {
display: flex; justify-content: space-between; align-items: baseline;
font-size: 12px; padding: 4px 0;
border-bottom: 1px dotted rgba(0,0,0,0.25);
}
.ps-brt-row span { text-transform: uppercase; opacity: 0.7; letter-spacing: 0.06em; }
.ps-brt-row strong { font-size: 14px; font-weight: 700; }
.ps-brt-pri { font-size: 22px !important; font-weight: 800 !important; }
.ps-brt-card hr { border: 0; border-top: 2px solid #0e0e0e; margin: 14px 0 12px; }
.ps-brt-card ul {
list-style: none; padding: 0; margin: 0 0 18px;
font-size: 12.5px; line-height: 1.7;
}
.ps-brt-card ul li::before { content: '▸ '; }
.ps-brt-cta {
display: block; text-align: center;
padding: 11px 16px;
background: #f4eccc; color: #0e0e0e;
border: 2px solid #0e0e0e;
text-decoration: none; font-size: 13px; font-weight: 700;
letter-spacing: 0.06em; text-transform: uppercase;
transition: background 0.15s, color 0.15s;
}
.ps-brt-cta-pri { background: #0e0e0e; color: #facc15; }
.ps-brt-cta:hover { background: #0e0e0e; color: #facc15; }
.ps-brt-cta-pri:hover { background: #facc15; color: #0e0e0e; }
.ps-brt-cta:focus-visible { outline: 3px solid #ff5e5e; outline-offset: 2px; }
@media (max-width: 820px) {
.ps-brt-grid { grid-template-columns: 1fr; max-width: 380px; gap: 32px; }
.ps-brt-r1, .ps-brt-r2, .ps-brt-r3 { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
.ps-brt-card { transition: none; }
.ps-brt-card:hover { transform: none; box-shadow: 8px 8px 0 0 #0e0e0e; }
.ps-brt-r1, .ps-brt-r2, .ps-brt-r3 { transform: none; }
}
```
### 20. Glass Aurora
**Type:** Pure CSS
**Description:** Frosted-glass pricing cards floating over a slow-drifting aurora gradient — radial blobs that orbit behind the cards. backdrop-filter: blur() over layered conic / radial gradients. Ice-blue palette, the high-end consumer-app pricing treatment.
**HTML:**
```html
Drift
$ 0free
Personal projects
1 GB storage
Community access
Get started
Recommended
Float
$ 18/mo
Unlimited projects
30 GB storage
Priority email support
Custom domains
Choose Float
Stratos
$ 56/mo
Everything in Float
SSO + audit logs
Dedicated success manager
Talk to sales
```
**CSS:**
```css
.ps-aur {
position: relative; overflow: hidden;
contain: layout paint;
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background: #050a1a;
color: #e6f0ff;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-aur-blobs { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.ps-aur-blobs span {
position: absolute; border-radius: 50%;
filter: blur(60px); opacity: 0.7;
animation: ps-aur-drift 22s ease-in-out infinite alternate;
}
.ps-aur-b1 { top: -10%; left: -10%; width: 380px; height: 380px;
background: radial-gradient(circle, #38bdf8 0%, transparent 60%);
animation-delay: -3s;
}
.ps-aur-b2 { top: 20%; right: -8%; width: 320px; height: 320px;
background: radial-gradient(circle, #818cf8 0%, transparent 60%);
animation-delay: -8s;
}
.ps-aur-b3 { bottom: -15%; left: 30%; width: 360px; height: 360px;
background: radial-gradient(circle, #22d3ee 0%, transparent 60%);
animation-delay: -14s;
}
@keyframes ps-aur-drift {
0% { transform: translate(0,0) scale(1); }
50% { transform: translate(40px,-30px) scale(1.08); }
100% { transform: translate(-30px,30px) scale(0.95); }
}
.ps-aur-head { position: relative; z-index: 2; text-align: center; margin-bottom: clamp(28px, 4vw, 44px); }
.ps-aur-head h2 {
font-size: clamp(24px, 3.6vw, 36px); font-weight: 700;
letter-spacing: -0.02em; margin: 0 0 8px; color: #fff;
}
.ps-aur-head p { color: #b8c4dc; margin: 0; font-size: 14px; }
.ps-aur-grid {
position: relative; z-index: 2;
display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 18px; max-width: 980px; margin: 0 auto;
align-items: center;
}
.ps-aur-card {
position: relative;
background: rgba(255,255,255,0.06);
border: 1px solid rgba(255,255,255,0.12);
border-radius: 18px;
padding: 26px 22px 22px;
display: flex; flex-direction: column;
backdrop-filter: blur(20px) saturate(140%);
-webkit-backdrop-filter: blur(20px) saturate(140%);
box-shadow: 0 18px 48px rgba(0,0,0,0.25);
}
.ps-aur-mid {
background: rgba(255,255,255,0.1);
border-color: rgba(56,189,248,0.4);
transform: scale(1.04);
box-shadow: 0 0 0 1px rgba(56,189,248,0.4) inset, 0 22px 56px rgba(56,189,248,0.18);
}
.ps-aur-pill {
position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
background: linear-gradient(90deg, #38bdf8, #818cf8);
color: #050a1a;
font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
text-transform: uppercase; padding: 5px 12px;
border-radius: 999px;
}
.ps-aur-card h3 {
font-size: 14px; font-weight: 700; letter-spacing: 0.1em;
text-transform: uppercase; margin: 0 0 12px; color: #93c5fd;
}
.ps-aur-price {
display: flex; align-items: baseline; gap: 4px;
font-size: 42px; font-weight: 800; letter-spacing: -0.03em;
margin-bottom: 18px; color: #fff;
}
.ps-aur-price em { font-size: 0.5em; font-style: normal; padding-right: 2px; opacity: 0.7; }
.ps-aur-price span { font-size: 0.32em; font-weight: 500; opacity: 0.65; margin-left: 6px; }
.ps-aur-card ul {
list-style: none; padding: 0; margin: 0 0 22px; flex: 1;
font-size: 13.5px; line-height: 1.9; color: #d1ddee;
}
.ps-aur-card ul li::before { content: '◇'; color: #38bdf8; display: inline-block; width: 20px; }
.ps-aur-cta {
display: block; text-align: center;
padding: 11px 16px; border-radius: 10px;
background: rgba(255,255,255,0.08);
color: #93c5fd; text-decoration: none;
font-size: 13.5px; font-weight: 600;
border: 1px solid rgba(147,197,253,0.3);
transition: background 0.18s, color 0.18s;
}
.ps-aur-cta-pri {
background: linear-gradient(90deg, #38bdf8, #818cf8);
color: #050a1a; border-color: transparent;
}
.ps-aur-cta:hover { background: rgba(255,255,255,0.18); color: #fff; }
.ps-aur-cta-pri:hover { background: linear-gradient(90deg, #7dd3fc, #a5b4fc); color: #050a1a; }
.ps-aur-cta:focus-visible { outline: 2px solid #38bdf8; outline-offset: 3px; }
@media (max-width: 820px) {
.ps-aur-grid { grid-template-columns: 1fr; max-width: 380px; }
.ps-aur-mid { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
.ps-aur-blobs span { animation: none; }
.ps-aur-cta { transition: none; }
}
```
### 21. Per-Seat Calculator
**Type:** Light JS
**Description:** Real interactive math — adjust the seat count with native +/− buttons (proper aria-label) and the per-seat × seats × cycle cost recomputes live. Indigo + sky palette. The pattern Linear / Notion / Slack use to let buyers self-serve estimates.
**HTML:**
```html
```
**CSS:**
```css
.ps-cal {
padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
min-height: 480px;
background:
radial-gradient(60% 80% at 80% 0%, rgba(99,102,241,0.18), transparent 60%),
radial-gradient(60% 80% at 0% 100%, rgba(56,189,248,0.14), transparent 60%),
#07091a;
color: #e6e9ff;
font-family: 'Inter', system-ui, sans-serif;
}
.ps-cal-head { text-align: center; margin-bottom: clamp(24px, 4vw, 36px); }
.ps-cal-eye {
display: inline-block; font-size: 11px; font-weight: 700;
letter-spacing: 0.18em; text-transform: uppercase;
color: #818cf8; padding: 5px 12px;
background: rgba(129,140,248,0.12);
border: 1px solid rgba(129,140,248,0.28);
border-radius: 999px; margin-bottom: 14px;
}
.ps-cal-head h2 {
font-size: clamp(22px, 3.4vw, 32px); font-weight: 700;
letter-spacing: -0.02em; margin: 0 0 8px; color: #fff;
}
.ps-cal-head p { color: #9aa3c8; margin: 0; font-size: 14px; }
.ps-cal-card {
display: grid; grid-template-columns: 1.1fr 1fr;
gap: 0;
max-width: 820px; margin: 0 auto;
background: rgba(20,22,48,0.7);
border: 1px solid rgba(129,140,248,0.2);
border-radius: 18px;
overflow: hidden;
box-shadow: 0 24px 60px rgba(0,0,0,0.35);
backdrop-filter: blur(8px);
}
.ps-cal-controls {
padding: clamp(22px, 4vw, 32px);
border-right: 1px solid rgba(129,140,248,0.15);
display: flex; flex-direction: column; gap: 22px;
}
.ps-cal-summary {
padding: clamp(22px, 4vw, 32px);
background: linear-gradient(180deg, rgba(99,102,241,0.1), rgba(56,189,248,0.06));
display: flex; flex-direction: column;
}
.ps-cal-cycle {
border: 1px solid rgba(129,140,248,0.2);
border-radius: 10px; padding: 4px;
display: grid; grid-template-columns: 1fr 1fr; gap: 0;
background: rgba(7,9,26,0.4);
margin: 0;
}
.ps-cal-sr {
position: absolute; width: 1px; height: 1px;
overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.ps-cal-cycle input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.ps-cal-cycle label {
text-align: center; padding: 9px 12px;
font-size: 12.5px; font-weight: 600; color: #9aa3c8;
cursor: pointer; border-radius: 7px;
transition: background 0.18s, color 0.18s;
}
.ps-cal-cycle input:checked + label {
background: linear-gradient(135deg, #6366f1, #38bdf8); color: #fff;
}
.ps-cal-cycle input:focus-visible + label { outline: 2px solid #818cf8; outline-offset: 2px; }
.ps-cal-stp-lbl {
display: block; font-size: 11px; letter-spacing: 0.16em;
text-transform: uppercase; color: #9aa3c8; margin-bottom: 8px;
}
.ps-cal-stp {
display: grid; grid-template-columns: 44px 1fr 44px;
border: 1px solid rgba(129,140,248,0.25);
border-radius: 10px; overflow: hidden;
background: rgba(7,9,26,0.5);
}
.ps-cal-btn {
background: transparent; border: 0; cursor: pointer;
font-size: 22px; font-weight: 700; color: #818cf8;
font-family: inherit;
transition: background 0.15s, color 0.15s;
}
.ps-cal-btn:hover { background: rgba(129,140,248,0.15); color: #fff; }
.ps-cal-btn:focus-visible { outline: 2px solid #818cf8; outline-offset: -2px; }
.ps-cal-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ps-cal-stp input[type="number"] {
background: transparent; border: 0; outline: 0;
text-align: center; color: #fff;
font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
font-family: inherit;
border-left: 1px solid rgba(129,140,248,0.18);
border-right: 1px solid rgba(129,140,248,0.18);
-moz-appearance: textfield;
}
.ps-cal-stp input::-webkit-outer-spin-button,
.ps-cal-stp input::-webkit-inner-spin-button {
-webkit-appearance: none; margin: 0;
}
.ps-cal-stp input:focus-visible { background: rgba(129,140,248,0.12); }
.ps-cal-stp-hint { display: block; font-size: 11.5px; color: #6c759b; margin-top: 8px; }
.ps-cal-row {
display: flex; justify-content: space-between; align-items: baseline;
padding: 10px 0;
font-size: 13.5px;
}
.ps-cal-row span { color: #9aa3c8; }
.ps-cal-row strong { color: #fff; font-weight: 600; }
.ps-cal-summary hr { border: 0; border-top: 1px dashed rgba(129,140,248,0.25); margin: 4px 0; }
.ps-cal-total span { color: #93c5fd; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.ps-cal-total strong {
font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -0.02em;
background: linear-gradient(90deg, #818cf8, #38bdf8);
-webkit-background-clip: text; background-clip: text; color: transparent;
}
.ps-cal-foot { font-size: 12px; color: #6c759b; margin: 4px 0 16px; }
.ps-cal-cta {
display: block; text-align: center;
padding: 12px 18px; border-radius: 10px;
background: linear-gradient(135deg, #6366f1, #38bdf8);
color: #fff; text-decoration: none;
font-size: 14px; font-weight: 700;
margin-top: auto;
box-shadow: 0 10px 24px rgba(99,102,241,0.3);
transition: transform 0.18s;
}
.ps-cal-cta:hover { transform: translateY(-1px); }
.ps-cal-cta:focus-visible { outline: 2px solid #818cf8; outline-offset: 3px; }
@media (max-width: 720px) {
.ps-cal-card { grid-template-columns: 1fr; }
.ps-cal-controls { border-right: 0; border-bottom: 1px solid rgba(129,140,248,0.15); }
}
@media (prefers-reduced-motion: reduce) {
.ps-cal-cta, .ps-cal-btn, .ps-cal-cycle label { transition: none; }
}
```
**JS:**
```js
(function () {
var seats = document.getElementById('ps-cal-seats');
var dec = document.getElementById('ps-cal-dec');
var inc = document.getElementById('ps-cal-inc');
var rM = document.getElementById('ps-cal-m');
var rY = document.getElementById('ps-cal-y');
var outSeats= document.getElementById('ps-cal-out-seats');
var outPer = document.getElementById('ps-cal-out-per');
var outCyc = document.getElementById('ps-cal-out-cyc');
var outTot = document.getElementById('ps-cal-out-total');
var outFoot = document.getElementById('ps-cal-out-foot');
if (!seats || !inc) return;
var BASE_MONTHLY = 12; // $12 / seat / mo
var YEARLY_DISC = 0.25; // 25% off when yearly
function clamp(v) {
if (isNaN(v) || v < 1) return 1;
if (v > 500) return 500;
return v;
}
function fmt(n) { return '$' + n.toFixed(2); }
function update() {
var n = clamp(parseInt(seats.value, 10));
seats.value = n;
var yearly = rY.checked;
var per = yearly ? BASE_MONTHLY * (1 - YEARLY_DISC) : BASE_MONTHLY;
var months = yearly ? 12 : 1;
var total = per * n * months;
outSeats.textContent = n + (n === 1 ? ' member' : ' members');
outPer.textContent = '$' + per.toFixed(2) + ' / mo';
outCyc.textContent = yearly ? 'Yearly (–25%)' : 'Monthly';
outTot.textContent = fmt(total);
outFoot.textContent = yearly
? 'Billed yearly · ' + fmt(total) + ' once, then renews annually'
: 'Billed monthly · cancel any time';
dec.disabled = n <= 1;
inc.disabled = n >= 500;
}
dec.addEventListener('click', function () { seats.value = clamp(parseInt(seats.value, 10) - 1); update(); });
inc.addEventListener('click', function () { seats.value = clamp(parseInt(seats.value, 10) + 1); update(); });
seats.addEventListener('input', update);
rM.addEventListener('change', update);
rY.addEventListener('change', update);
update();
})();
```
---
## 12 CSS Progress Bar Designs
URL: https://codefronts.com/components/css-progress-bars/
Description: 12 hand-coded CSS progress bar designs — liquid fill, step tracker, conic ring, segmented battery, skill bars, speed gauge and more. Semantic HTML, copy-paste ready.
Demo count: 12
### 01. Liquid Fill
**Type:** Pure CSS
**Description:** Wave-animated water rising inside a rounded vessel — perfect for resource meters, storage usage, and "fill your goal" patterns. Two SVG waves drift at different speeds for organic motion.
**HTML:**
```html
```
**CSS:**
```css
.pb-liquid {
position: relative;
width: 220px;
height: 88px;
border-radius: 14px;
background: linear-gradient(180deg, #0f172a, #1e293b);
border: 1px solid rgba(56, 189, 248, 0.25);
overflow: hidden;
box-shadow: 0 12px 30px -10px rgba(56, 189, 248, 0.25);
font-family: system-ui, sans-serif;
}
.pb-liquid-fill {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: var(--pb-liquid-level, 0%);
background: linear-gradient(180deg, rgba(56, 189, 248, 0.85) 0%, rgba(14, 165, 233, 0.95) 100%);
color: rgba(56, 189, 248, 0.85);
transition: height 0.6s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pb-liquid-wave {
position: absolute;
left: 0;
bottom: 100%;
width: 200%;
height: 18px;
}
.pb-liquid-wave.w1 {
animation: pbLiquidWave 4s linear infinite;
opacity: 0.85;
}
.pb-liquid-wave.w2 {
animation: pbLiquidWave 6s linear infinite reverse;
opacity: 0.55;
}
.pb-liquid-label {
position: absolute;
inset: 0;
display: grid;
place-items: center;
color: #f0f9ff;
font-size: 14px;
letter-spacing: 0.04em;
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
z-index: 1;
}
.pb-liquid-label strong {
font-size: 20px;
font-weight: 700;
}
@media (prefers-reduced-motion: reduce) {
.pb-liquid-wave {
animation: none;
}
}
@keyframes pbLiquidWave { to { transform: translateX(-50%); } }
```
### 02. Step Tracker
**Type:** Pure CSS
**Description:** Numbered steps with a connecting rail that fills as you progress. Completed steps morph into checkmarks via pseudo-elements — ideal for checkout flows, onboarding wizards, and multi-page forms.
**HTML:**
```html
1 Cart
2 Address
3 Payment
4 Confirm
```
**CSS:**
```css
.pb-step {
position: relative;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 0;
width: 280px;
list-style: none;
margin: 0;
padding: 0;
font-family: system-ui, sans-serif;
isolation: isolate;
}
.pb-step::before,
.pb-step::after {
content: "";
position: absolute;
left: 12.5%;
right: 12.5%;
top: 15px;
height: 2px;
border-radius: 2px;
z-index: 0;
}
.pb-step::before {
background: rgba(255, 255, 255, 0.08);
}
.pb-step::after {
background: linear-gradient(90deg, #14b8a6, #2dd4bf);
width: 0;
left: 12.5%;
right: auto;
transition: width 0.5s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pb-step[data-current="2"]::after {
width: calc(((2 - 1) / (4 - 1)) * 75%);
}
.pb-step[data-current="3"]::after {
width: calc(((3 - 1) / (4 - 1)) * 75%);
}
.pb-step[data-current="4"]::after {
width: 75%;
}
.pb-step-item {
position: relative;
display: grid;
gap: 6px;
place-items: center;
font-size: 11px;
color: #94a3b8;
z-index: 1;
}
.pb-step-item span {
display: grid;
place-items: center;
width: 32px;
height: 32px;
border-radius: 50%;
background: #1e293b;
border: 2px solid rgba(255, 255, 255, 0.08);
color: #94a3b8;
font-weight: 700;
font-size: 13px;
transition:
background 0.3s,
border-color 0.3s,
color 0.3s;
position: relative;
}
.pb-step-item em {
font-style: normal;
font-size: 10.5px;
letter-spacing: 0.06em;
text-transform: uppercase;
font-weight: 600;
}
.pb-step-item.is-done span,
.pb-step-item.is-current span {
background: linear-gradient(135deg, #14b8a6, #2dd4bf);
border-color: #2dd4bf;
color: #0f172a;
box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}
.pb-step-item.is-done span {
font-size: 0;
}
.pb-step-item.is-done span::before {
content: "";
width: 13px;
height: 7px;
border: 2px solid #0f172a;
border-top: 0;
border-right: 0;
transform: rotate(-45deg);
transform-origin: center;
}
.pb-step-item.is-current em {
color: #2dd4bf;
}
.pb-step-item.is-done em {
color: #cbd5e1;
}
```
### 03. Conic Ring
**Type:** Pure CSS
**Description:** A circular progress ring rendered with a real `@property`-animated conic gradient — no SVG, no JS scoring. The percentage in the centre updates with the value via a CSS custom property, and the fill sweeps from 0 to the target on every render.
**HTML:**
```html
74%
Profile
```
**CSS:**
```css
.pb-ring {
position: relative;
width: 120px;
height: 120px;
border-radius: 50%;
--pb-ring-deg: calc(var(--pb-ring-value, 0) * 3.6deg);
background: conic-gradient(
#c084fc 0deg,
#f472b6 var(--pb-ring-deg),
rgba(255, 255, 255, 0.06) var(--pb-ring-deg),
rgba(255, 255, 255, 0.06) 360deg
);
animation: pbRingDraw 1.4s cubic-bezier(0.5, 0, 0.3, 1.2) forwards;
font-family: system-ui, sans-serif;
}
.pb-ring-track {
position: absolute;
inset: 8px;
border-radius: 50%;
background: #15151d;
box-shadow: inset 0 0 18px rgba(192, 132, 252, 0.15);
}
.pb-ring-meta {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
line-height: 1;
}
.pb-ring-meta strong {
display: block;
font-size: 26px;
font-weight: 700;
color: #f0eeff;
font-variant-numeric: tabular-nums;
line-height: 1;
letter-spacing: -0.02em;
}
.pb-ring-meta strong small {
font-size: 13px;
font-weight: 600;
color: #c084fc;
margin-left: 1px;
}
.pb-ring-meta em {
display: block;
font-style: normal;
font-size: 9.5px;
font-weight: 600;
letter-spacing: 0.18em;
text-transform: uppercase;
color: #a78bfa;
line-height: 1;
}
@media (prefers-reduced-motion: reduce) {
.pb-ring {
animation: none;
}
}
@keyframes pbRingDraw {
from { --pb-ring-deg: 0deg; }
to { --pb-ring-deg: calc(var(--pb-ring-value, 0) * 3.6deg); }
}
```
### 04. Segmented Battery
**Type:** Pure CSS
**Description:** Discrete signal-bar segments that fill from left to right. Each segment has a distinct highlight, giving a tactile, hardware-keypad feel — great for upload progress and connection strength.
**HTML:**
```html
Signal
3 / 5 bars
```
**CSS:**
```css
.pb-seg {
width: 220px;
display: grid;
gap: 6px;
font-family: system-ui, sans-serif;
}
.pb-seg-label {
font-size: 11px;
font-weight: 600;
letter-spacing: 0.12em;
text-transform: uppercase;
color: #94a3b8;
}
.pb-seg-rail {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 4px;
}
.pb-seg-cell {
height: 22px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.06);
position: relative;
overflow: hidden;
transition: background 0.4s ease;
}
.pb-seg[data-pb-seg="1"] .pb-seg-cell:nth-child(-n + 1),
.pb-seg[data-pb-seg="2"] .pb-seg-cell:nth-child(-n + 2),
.pb-seg[data-pb-seg="3"] .pb-seg-cell:nth-child(-n + 3),
.pb-seg[data-pb-seg="4"] .pb-seg-cell:nth-child(-n + 4),
.pb-seg[data-pb-seg="5"] .pb-seg-cell:nth-child(-n + 5) {
background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
border-color: #34d399;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.pb-seg[data-pb-seg="1"] .pb-seg-cell:nth-child(-n + 1)::after,
.pb-seg[data-pb-seg="2"] .pb-seg-cell:nth-child(-n + 2)::after,
.pb-seg[data-pb-seg="3"] .pb-seg-cell:nth-child(-n + 3)::after,
.pb-seg[data-pb-seg="4"] .pb-seg-cell:nth-child(-n + 4)::after,
.pb-seg[data-pb-seg="5"] .pb-seg-cell:nth-child(-n + 5)::after {
content: "";
position: absolute;
left: 0;
right: 0;
top: 0;
height: 40%;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent);
}
.pb-seg-value {
font-size: 12px;
color: #6ee7b7;
font-family: "JetBrains Mono", monospace;
letter-spacing: 0.04em;
}
```
### 05. Stripe Loading
**Type:** Pure CSS
**Description:** Diagonal candy-stripes shimmer continuously inside the filled portion — instantly reads as "actively in progress." A premium touch lifted from server-software install dialogs and CI build runners.
**HTML:**
```html
```
**CSS:**
```css
.pb-stripe {
width: 240px;
display: grid;
gap: 6px;
font-family: system-ui, sans-serif;
}
.pb-stripe-head {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
font-weight: 600;
color: #fde68a;
font-family: "JetBrains Mono", monospace;
letter-spacing: 0.04em;
}
.pb-stripe-pct {
background: rgba(245, 158, 11, 0.15);
color: #fbbf24;
padding: 2px 8px;
border-radius: 4px;
font-variant-numeric: tabular-nums;
}
.pb-stripe-rail {
height: 14px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(245, 158, 11, 0.18);
border-radius: 7px;
overflow: hidden;
}
.pb-stripe-fill {
width: var(--pb-stripe-w, 0%);
height: 100%;
background: repeating-linear-gradient(-45deg, #f59e0b 0, #f59e0b 8px, #fbbf24 8px, #fbbf24 16px);
background-size: 22px 22px;
animation: pbStripeMove 0.8s linear infinite;
transition: width 0.5s cubic-bezier(0.5, 0, 0.3, 1.2);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.pb-stripe-foot {
font-size: 11px;
color: #94a3b8;
letter-spacing: 0.02em;
}
@media (prefers-reduced-motion: reduce) {
.pb-stripe-fill {
animation: none;
}
}
@keyframes pbStripeMove {
from { background-position: 0 0; }
to { background-position: 44px 0; }
}
```
### 06. Gradient Pulse
**Type:** Pure CSS
**Description:** A premium hero progress bar with a glowing leading edge that pulses gently. The trailing gradient shimmer creates a "comet" feel — perfect for app launchers, splash screens, and SaaS dashboards.
**HTML:**
```html
Syncing your workspace
48%
```
**CSS:**
```css
.pb-pulse {
width: 260px;
display: grid;
gap: 8px;
font-family: system-ui, sans-serif;
}
.pb-pulse-head {
display: flex;
justify-content: space-between;
align-items: baseline;
color: #f0eeff;
font-size: 13px;
}
.pb-pulse-head strong {
font-weight: 600;
}
.pb-pulse-pct {
font-family: "JetBrains Mono", monospace;
color: #c4b5fd;
font-size: 12px;
font-weight: 700;
font-variant-numeric: tabular-nums;
}
.pb-pulse-rail {
height: 6px;
background: rgba(255, 255, 255, 0.06);
border-radius: 99px;
overflow: hidden;
position: relative;
}
.pb-pulse-fill {
position: relative;
width: var(--pb-pulse-w, 0%);
height: 100%;
background: linear-gradient(90deg, rgba(124, 108, 255, 0.25) 0%, #7c6cff 60%, #c4b5fd 100%);
border-radius: inherit;
transition: width 0.5s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pb-pulse-edge {
position: absolute;
right: -4px;
top: -2px;
bottom: -2px;
width: 10px;
background: radial-gradient(circle, #fff 0%, rgba(196, 181, 253, 0.55) 60%, transparent 80%);
border-radius: 50%;
animation: pbPulseGlow 1.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
.pb-pulse-edge {
animation: none;
}
}
@keyframes pbPulseGlow {
0%, 100% { opacity: 0.6; transform: scale(1); }
50% { opacity: 1; transform: scale(1.25); }
}
```
### 07. Goal Tracker
**Type:** Pure CSS
**Description:** Vertical fundraising-style progress with milestone markers. Each tier ($1k, $5k, $10k) lights up as the bar grows past it — ideal for crowdfunding, sales targets, and quarterly goals.
**HTML:**
```html
```
**CSS:**
```css
.pb-goal {
width: 200px;
height: 200px;
display: grid;
grid-template-columns: 50px 1fr;
gap: 16px;
font-family: system-ui, sans-serif;
}
.pb-goal-track {
position: relative;
width: 12px;
height: 100%;
margin-left: 18px;
background: rgba(255, 255, 255, 0.06);
border-radius: 6px;
}
.pb-goal-fill {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: var(--pb-goal-pct, 0%);
background: linear-gradient(180deg, #ec4899, #f43f5e);
border-radius: 6px;
box-shadow: 0 0 18px rgba(236, 72, 153, 0.5);
transition: height 0.7s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pb-goal-marks {
position: absolute;
inset: 0;
list-style: none;
margin: 0;
padding: 0;
}
.pb-goal-marks li {
position: absolute;
right: -28px;
bottom: var(--m);
transform: translateY(50%);
font-size: 10px;
font-weight: 700;
color: #475569;
letter-spacing: 0.04em;
font-family: "JetBrains Mono", monospace;
display: flex;
align-items: center;
gap: 6px;
transition: color 0.3s;
}
.pb-goal-marks li::before {
content: "";
width: 8px;
height: 8px;
border-radius: 50%;
background: #1e293b;
border: 2px solid #475569;
margin-left: -28px;
transition:
background 0.3s,
border-color 0.3s,
box-shadow 0.3s;
}
.pb-goal-marks li.hit {
color: #fbcfe8;
}
.pb-goal-marks li.hit::before {
background: #ec4899;
border-color: #f9a8d4;
box-shadow: 0 0 10px rgba(236, 72, 153, 0.7);
}
.pb-goal-meta {
display: flex;
flex-direction: column;
justify-content: flex-end;
gap: 2px;
color: #f0eeff;
}
.pb-goal-meta strong {
font-size: 22px;
font-weight: 700;
color: #fda4af;
font-variant-numeric: tabular-nums;
letter-spacing: -0.02em;
}
.pb-goal-meta span {
font-size: 11px;
color: #94a3b8;
}
.pb-goal-meta em {
font-style: normal;
color: #fda4af;
font-weight: 600;
}
```
### 08. Skill Bars
**Type:** Pure CSS
**Description:** Stacked horizontal bars with labels and percentages. Each row slides in with a staggered animation — the canonical pattern for portfolios, CV pages, and team skill matrices.
**HTML:**
```html
TypeScript
92%
React
88%
CSS & Sass
95%
Figma
78%
```
**CSS:**
```css
.pb-skill {
width: 260px;
margin: 0;
padding: 0;
display: grid;
gap: 10px;
font-family: system-ui, sans-serif;
}
.pb-skill-row {
display: grid;
grid-template-columns: 90px 1fr;
align-items: center;
gap: 10px;
}
.pb-skill dt {
font-size: 11.5px;
font-weight: 600;
color: #fef3c7;
letter-spacing: 0.02em;
}
.pb-skill dd {
margin: 0;
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
gap: 8px;
}
.pb-skill-rail {
display: block;
height: 6px;
background: rgba(255, 255, 255, 0.05);
border-radius: 99px;
overflow: hidden;
}
.pb-skill-fill {
display: block;
height: 100%;
width: 0;
background: linear-gradient(90deg, #f97316, #fbbf24);
border-radius: inherit;
animation: pbSkillSlide 1s cubic-bezier(0.5, 0, 0.3, 1.2) var(--pb-skill-delay, 0s) forwards;
}
.pb-skill-pct {
font-family: "JetBrains Mono", monospace;
font-size: 11px;
font-weight: 700;
color: #fbbf24;
font-variant-numeric: tabular-nums;
min-width: 30px;
text-align: right;
}
@media (prefers-reduced-motion: reduce) {
.pb-skill-fill {
animation: none;
width: var(--pb-skill-w, 0%);
}
}
@keyframes pbSkillSlide {
to { width: var(--pb-skill-w, 0%); }
}
```
### 09. Circular Counter
**Type:** Light JS
**Description:** A radial chart with a synchronised counting number in the centre. The ring fills via SVG `stroke-dasharray` (with `pathLength="100"` so the math is honest) while the number animates from 0 — bound by light JS to keep the number truly in sync.
**HTML:**
```html
```
**CSS:**
```css
.pb-count {
position: relative;
width: 130px;
height: 130px;
font-family: system-ui, sans-serif;
}
.pb-count-ring {
width: 100%;
height: 100%;
transform: rotate(-90deg);
}
.pb-count-bg,
.pb-count-prog {
fill: none;
stroke-width: 7;
stroke-linecap: round;
}
.pb-count-bg {
stroke: rgba(255, 255, 255, 0.06);
}
.pb-count-prog {
stroke: url(#pb-count-grad);
stroke-dasharray: 100;
stroke-dashoffset: 100;
transition: stroke-dashoffset 1.4s cubic-bezier(0.5, 0, 0.3, 1.2);
}
.pb-count.is-ready .pb-count-prog {
stroke-dashoffset: calc(100 - (var(--pb-count-pct, 0) * 100));
}
.pb-count-meta {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
line-height: 1;
}
.pb-count-meta strong {
display: block;
font-size: 28px;
font-weight: 700;
color: #f0eeff;
font-variant-numeric: tabular-nums;
line-height: 1;
letter-spacing: -0.02em;
}
.pb-count-meta span {
display: block;
font-size: 9.5px;
font-weight: 600;
color: #34d399;
letter-spacing: 0.18em;
text-transform: uppercase;
line-height: 1;
}
```
**JS:**
```js
// Reads the target value from data-pb-count and animates the
// SVG ring + centre number from 0 to that value over 1.4s.
// Drop this on every page where you render a .pb-count element.
document.querySelectorAll("[data-pb-count]").forEach(function (el) {
var target = Number(el.dataset.pbCount) || 0;
var num = el.querySelector("[data-pb-count-num]");
// Drive the ring's stroke-dashoffset via a CSS custom property
el.style.setProperty("--pb-count-pct", String(target / 100));
requestAnimationFrame(function () {
el.classList.add("is-ready");
});
// Tick the centre number in sync with the 1.4s ring transition
var start = null;
var duration = 1400;
function tick(t) {
if (start === null) start = t;
var p = Math.min(1, (t - start) / duration);
var eased = 1 - Math.pow(1 - p, 3); // ease-out cubic
var v = Math.round(target * eased);
if (num) num.textContent = v;
el.setAttribute("aria-valuenow", String(v));
if (p < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
});
```
### 10. Stacked Categories
**Type:** Pure CSS
**Description:** A single bar split into multiple coloured segments — Documents, Photos, Apps, Free. Each segment's width is a CSS variable, with a legend below. Premium pattern for storage dashboards and budget breakdowns.
**HTML:**
```html
128 GB used
of 256 GB
Documents 36 GB
Photos 23 GB
Apps 18 GB
Free 51 GB
```
**CSS:**
```css
.pb-stack {
width: 260px;
display: grid;
gap: 10px;
font-family: system-ui, sans-serif;
}
.pb-stack-head {
display: flex;
align-items: baseline;
justify-content: space-between;
color: #f0eeff;
}
.pb-stack-head strong {
font-size: 18px;
font-weight: 700;
letter-spacing: -0.01em;
}
.pb-stack-head span {
font-size: 12px;
color: #94a3b8;
}
.pb-stack-rail {
display: flex;
height: 10px;
background: rgba(255, 255, 255, 0.05);
border-radius: 99px;
overflow: hidden;
gap: 2px;
padding: 0 1px;
}
.pb-stack-seg {
height: 100%;
border-radius: 99px;
transition: width 0.6s cubic-bezier(0.5, 0, 0.3, 1.2);
width: var(--w, 0%);
}
.pb-stack-seg.s1 {
background: linear-gradient(90deg, #6366f1, #818cf8);
}
.pb-stack-seg.s2 {
background: linear-gradient(90deg, #ec4899, #f472b6);
}
.pb-stack-seg.s3 {
background: linear-gradient(90deg, #14b8a6, #2dd4bf);
}
.pb-stack-seg.s4 {
background: rgba(255, 255, 255, 0.12);
}
.pb-stack-legend {
list-style: none;
margin: 0;
padding: 0;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 6px 14px;
font-size: 11px;
color: #cbd5e1;
}
.pb-stack-legend li {
display: flex;
align-items: center;
gap: 6px;
}
.pb-stack-legend li i {
width: 8px;
height: 8px;
border-radius: 2px;
display: inline-block;
}
.pb-stack-legend li.s1 i {
background: #818cf8;
}
.pb-stack-legend li.s2 i {
background: #f472b6;
}
.pb-stack-legend li.s3 i {
background: #2dd4bf;
}
.pb-stack-legend li.s4 i {
background: rgba(255, 255, 255, 0.3);
}
.pb-stack-legend em {
font-style: normal;
margin-left: auto;
color: #94a3b8;
font-family: "JetBrains Mono", monospace;
font-size: 10.5px;
}
```
### 11. Speed Test Gauge
**Type:** Pure CSS
**Description:** An SVG semicircular speedometer with a colour-graded arc (red → amber → green), tick marks at 0/50/100, and a needle that sweeps from the bottom. Drives every value via the `--pb-gauge-value` custom property — premium pattern for PageSpeed scores, performance audits, and internet speed tests.
**HTML:**
```html
```
**CSS:**
```css
.pb-gauge {
width: 220px;
height: 170px;
font-family: system-ui, sans-serif;
}
.pb-gauge-svg {
width: 100%;
height: 100%;
display: block;
overflow: visible;
}
.pb-gauge-value {
stroke-dasharray: 100;
stroke-dashoffset: 100;
animation: pbGaugeArc 1.4s cubic-bezier(0.5, 0, 0.3, 1.2) forwards;
}
.pb-gauge-needle {
transform-origin: 100px 105px;
animation: pbGaugeSweep 1.4s cubic-bezier(0.5, 0, 0.3, 1.2) forwards;
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
.pb-gauge-tick {
font-family: "JetBrains Mono", monospace;
font-size: 10px;
font-weight: 700;
fill: #64748b;
letter-spacing: 0.04em;
}
.pb-gauge-num {
font-family: system-ui, sans-serif;
font-size: 30px;
font-weight: 700;
fill: #34d399;
font-variant-numeric: tabular-nums;
letter-spacing: -0.02em;
}
.pb-gauge-label {
font-family: system-ui, sans-serif;
font-size: 10px;
font-weight: 600;
fill: #94a3b8;
letter-spacing: 0.16em;
}
@media (prefers-reduced-motion: reduce) {
.pb-gauge-value {
animation: none;
stroke-dashoffset: calc(100 - var(--pb-gauge-value, 0));
}
.pb-gauge-needle {
animation: none;
transform: rotate(calc(var(--pb-gauge-value, 0) * 1.8deg - 90deg));
}
}
@keyframes pbGaugeArc {
to { stroke-dashoffset: calc(100 - var(--pb-gauge-value, 0)); }
}
@keyframes pbGaugeSweep {
from { transform: rotate(-90deg); }
to { transform: rotate(calc(var(--pb-gauge-value, 0) * 1.8deg - 90deg)); }
}
```
### 12. Buffer Bar
**Type:** Pure CSS
**Description:** Video-player progress bar with two filled regions: solid played + lighter buffered ahead. A subtle scrubber dot sits at the play head — premium pattern for media players, podcast UIs, and audio dashboards.
**HTML:**
```html
1:24
4:18
Penthouse Tour · 4K
HD · 1080p
```
**CSS:**
```css
.pb-buf {
width: 280px;
display: grid;
gap: 8px;
font-family: system-ui, sans-serif;
}
.pb-buf-time {
display: flex;
justify-content: space-between;
font-family: "JetBrains Mono", monospace;
font-size: 11px;
color: #f0eeff;
font-weight: 600;
font-variant-numeric: tabular-nums;
}
.pb-buf-total {
color: #94a3b8;
}
.pb-buf-rail {
position: relative;
height: 5px;
background: rgba(255, 255, 255, 0.08);
border-radius: 99px;
}
.pb-buf-buffered {
position: absolute;
inset: 0;
width: var(--pb-buf-buffered, 0%);
background: rgba(255, 255, 255, 0.18);
border-radius: inherit;
transition: width 0.4s ease;
}
.pb-buf-played {
position: absolute;
inset: 0;
width: var(--pb-buf-played, 0%);
background: linear-gradient(90deg, #ef4444, #f97316);
border-radius: inherit;
transition: width 0.2s linear;
}
.pb-buf-thumb {
position: absolute;
top: 50%;
left: var(--pb-buf-played, 0%);
width: 12px;
height: 12px;
margin-left: -6px;
margin-top: -6px;
background: #fff;
border-radius: 50%;
box-shadow:
0 0 0 3px rgba(239, 68, 68, 0.4),
0 2px 8px rgba(0, 0, 0, 0.5);
transform: scale(0);
transition:
transform 0.2s ease,
left 0.2s linear;
}
.pb-buf-rail:hover .pb-buf-thumb,
.pb-buf:focus-within .pb-buf-thumb {
transform: scale(1);
}
.pb-buf-meta {
display: flex;
justify-content: space-between;
align-items: center;
}
.pb-buf-title {
font-size: 12px;
font-weight: 600;
color: #f0eeff;
}
.pb-buf-quality {
font-size: 10px;
color: #94a3b8;
font-weight: 600;
background: rgba(255, 255, 255, 0.06);
padding: 2px 6px;
border-radius: 4px;
letter-spacing: 0.04em;
}
```
---
## 18 CSS Radio Button Designs
URL: https://codefronts.com/components/css-radio-buttons/
Description: 18 hand-coded CSS radio buttons — pill slider, magnetic orb, ink drop, segmented bar, pricing tier, glow pulse and more. Accessible, drop-in ready.
Demo count: 18
### 01. Concentric Pulse
**Type:** Pure CSS
**Description:** Classic outer ring with inner dot — on check the dot bursts outward then settles into place. The benchmark every radio is measured against.
**HTML:**
```html
Plan
Starter
Pro
Team
```
**CSS:**
```css
.crb-pulse { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; }
.crb-pulse label {
display: flex; align-items: center; gap: 10px;
font: 500 13px/1 system-ui, sans-serif; color: #cbd5e1; cursor: pointer;
}
.crb-pulse input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-pulse span {
width: 18px; height: 18px; border-radius: 50%;
border: 2px solid #444461; background: transparent;
position: relative; transition: border-color 0.2s;
}
.crb-pulse span::after {
content: ''; position: absolute; inset: 3px;
border-radius: 50%; background: #7c6cff;
transform: scale(0); transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.crb-pulse input:checked + span { border-color: #7c6cff; }
.crb-pulse input:checked + span::after { transform: scale(1); animation: crb-pulse-burst 0.5s ease-out; }
@keyframes crb-pulse-burst {
0% { box-shadow: 0 0 0 0 rgba(124,108,255,0.6); }
100% { box-shadow: 0 0 0 12px rgba(124,108,255,0); }
}
@media (prefers-reduced-motion: reduce) {
.crb-pulse,
.crb-pulse * {
animation: none !important;
}
}
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 02. Pill Slider
**Type:** Pure CSS
**Description:** Three-option pill where the active background slides smoothly between selections — perfect for plan toggles and view switchers.
**HTML:**
```html
Billing
Monthly
Yearly
Forever
```
**CSS:**
```css
.crb-pill {
display: inline-flex; position: relative; padding: 4px;
background: #1a1a28; border: 1px solid rgba(255,255,255,0.08);
border-radius: 999px;
}
.crb-pill input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-pill label {
flex: 1 1 0; min-width: 80px;
position: relative; z-index: 1;
padding: 8px 16px;
font: 600 12px/1 system-ui, sans-serif; color: #b8b6d4;
text-align: center;
cursor: pointer; transition: color 0.25s;
border-radius: 999px;
}
.crb-pill input:checked + label { color: #fff; }
.crb-pill-thumb {
position: absolute; top: 4px; bottom: 4px; left: 4px;
width: calc(33.333% - 2.667px);
background: linear-gradient(135deg, #7c6cff, #a78bfa);
border-radius: 999px; z-index: 0;
transition: transform 0.4s cubic-bezier(0.65,0,0.35,1);
}
#crb-pill-2:checked ~ .crb-pill-thumb { transform: translateX(100%); }
#crb-pill-3:checked ~ .crb-pill-thumb { transform: translateX(200%); }
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 03. Magnetic Orb
**Type:** Pure CSS
**Description:** A single violet orb slides between options as if magnetically pulled — uses sibling-position state to drive the orb position with zero JS.
**HTML:**
```html
Speed
Slow
Fast
Turbo
```
**CSS:**
```css
.crb-orb { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; }
.crb-orb input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-orb label {
display: flex; align-items: center; gap: 12px;
padding: 8px 14px; border-radius: 8px;
font: 500 13px/1 system-ui, sans-serif; color: #cbd5e1; cursor: pointer;
transition: background 0.25s, color 0.25s;
}
.crb-orb-dot {
width: 14px; height: 14px; border-radius: 50%;
background: #2a2a3e; box-shadow: inset 0 0 0 2px #444461;
transition: background 0.35s cubic-bezier(0.65,0,0.35,1), box-shadow 0.35s, transform 0.35s;
}
.crb-orb input:checked + label { background: rgba(124,108,255,0.08); color: #fff; }
.crb-orb input:checked + label .crb-orb-dot {
background: #7c6cff; box-shadow: inset 0 0 0 2px #7c6cff, 0 0 12px rgba(124,108,255,0.7);
transform: scale(1.15);
}
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 04. Ink Drop
**Type:** Pure CSS
**Description:** A drop of ink falls from above and fills the circle on selection — uses a clip-path to animate the liquid level from empty to full.
**HTML:**
```html
Theme
Light
Dark
Auto
```
**CSS:**
```css
.crb-ink { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; }
.crb-ink label {
display: flex; align-items: center; gap: 10px;
font: 500 13px/1 system-ui, sans-serif; color: #cbd5e1; cursor: pointer;
}
.crb-ink input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-ink span {
width: 18px; height: 18px; border-radius: 50%;
border: 2px solid #444461; background: transparent;
position: relative; overflow: hidden;
transition: border-color 0.25s;
}
.crb-ink span::before {
content: ''; position: absolute; inset: 0;
background: linear-gradient(180deg, #06b6d4, #0ea5e9);
transform: translateY(-100%);
transition: transform 0.5s cubic-bezier(0.65,0,0.35,1);
}
.crb-ink input:checked + span { border-color: #06b6d4; }
.crb-ink input:checked + span::before { transform: translateY(0); }
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 05. Star Burst
**Type:** Pure CSS
**Description:** A 5-point star draws itself in via stroke-dasharray when selected — premium choice for ratings, favourites, and priority radios.
**HTML:**
```html
Priority
Low
Medium
High
```
**CSS:**
```css
.crb-star { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; }
.crb-star label {
display: flex; align-items: center; gap: 10px;
font: 500 13px/1 system-ui, sans-serif; color: #cbd5e1; cursor: pointer;
}
.crb-star input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-star svg {
width: 22px; height: 22px;
fill: transparent;
stroke: #444461; stroke-width: 1.5;
transition: stroke 0.3s, fill 0.4s;
}
.crb-star input:checked + svg {
stroke: #f5a623; fill: #f5a623;
filter: drop-shadow(0 0 6px rgba(245,166,35,0.5));
animation: crb-star-draw 0.6s ease-out;
}
@keyframes crb-star-draw {
0% { stroke-dasharray: 60; stroke-dashoffset: 60; fill: transparent; }
60% { stroke-dasharray: 60; stroke-dashoffset: 0; fill: transparent; }
100% { stroke-dasharray: 60; stroke-dashoffset: 0; fill: #f5a623; }
}
@media (prefers-reduced-motion: reduce) {
.crb-star,
.crb-star * {
animation: none !important;
}
}
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 06. Tilt Card
**Type:** Pure CSS
**Description:** Each option is a card that tilts up and glows when chosen — feature-rich plan picker for SaaS pricing pages.
**HTML:**
```html
Choose plan
Solo $9/mo
Team $29/mo
Scale $99/mo
```
**CSS:**
```css
.crb-tilt { display: flex; gap: 8px; border: 0; padding: 0; }
.crb-tilt input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-tilt label {
flex: 1; display: flex; flex-direction: column; gap: 4px;
padding: 12px 10px; border-radius: 10px;
background: #1a1a28; border: 1px solid rgba(255,255,255,0.06);
cursor: pointer;
transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s, border-color 0.3s, background 0.3s;
}
.crb-tilt label strong {
font: 700 13px/1 system-ui, sans-serif; color: #fff;
}
.crb-tilt label em {
font: 500 11px/1 monospace; color: #b8b6d4; font-style: normal;
}
.crb-tilt label:has(input:checked) {
transform: translateY(-4px) rotate(-1deg);
background: linear-gradient(135deg, rgba(124,108,255,0.18), rgba(167,139,250,0.1));
border-color: rgba(124,108,255,0.5);
box-shadow: 0 8px 24px rgba(124,108,255,0.3);
}
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 07. Minimal Tick
**Type:** Pure CSS
**Description:** Clean radio that converts to a check tick on selection — instead of a dot, the indicator becomes a checkmark for a "confirmed" feel.
**HTML:**
```html
Layout
Compact
Comfortable
Spacious
```
**CSS:**
```css
.crb-tick { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; }
.crb-tick label {
display: flex; align-items: center; gap: 10px;
font: 500 13px/1 system-ui, sans-serif; color: #cbd5e1; cursor: pointer;
}
.crb-tick input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-tick span {
width: 18px; height: 18px; border-radius: 50%;
border: 2px solid #444461; background: transparent;
position: relative;
transition: border-color 0.2s, background 0.3s;
}
.crb-tick span::after {
content: ''; position: absolute;
top: 50%; left: 50%;
width: 4px; height: 8px;
border: solid #fff; border-width: 0 2px 2px 0;
transform: translate(-50%, -60%) rotate(45deg) scale(0);
transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.crb-tick input:checked + span { background: #2ecc8a; border-color: #2ecc8a; }
.crb-tick input:checked + span::after { transform: translate(-50%, -60%) rotate(45deg) scale(1); }
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 08. Color Swatches
**Type:** Pure CSS
**Description:** Big circular colour swatch radios — for theme pickers and palette selectors. The selected swatch shows a contrasting inner ring.
**HTML:**
```html
Colour
```
**CSS:**
```css
.crb-swatch { display: flex; gap: 10px; border: 0; padding: 0; }
.crb-swatch input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-swatch label { cursor: pointer; }
.crb-swatch span {
display: block;
width: 32px; height: 32px; border-radius: 50%;
background: var(--c);
box-shadow: inset 0 0 0 0 #15151d, 0 0 0 0 var(--c);
transition: box-shadow 0.3s, transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.crb-swatch label:hover span { transform: scale(1.08); }
.crb-swatch input:checked + span {
box-shadow: inset 0 0 0 4px #15151d, 0 0 0 2px var(--c), 0 0 16px var(--c);
transform: scale(1.12);
}
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 09. Segmented Bar
**Type:** Pure CSS
**Description:** iOS-style segmented control with sliding pill background — sibling-position selectors drive the pill via translateX, no JS required.
**HTML:**
```html
View
Day
Week
Month
Year
```
**CSS:**
```css
.crb-seg {
display: inline-flex; position: relative;
padding: 3px; background: #0c0c12;
border: 1px solid rgba(255,255,255,0.06); border-radius: 8px;
}
.crb-seg input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-seg label {
flex: 1 1 0; min-width: 64px;
position: relative; z-index: 1;
padding: 7px 14px;
font: 600 12px/1 system-ui, sans-serif; color: #b8b6d4;
text-align: center;
cursor: pointer; transition: color 0.25s;
border-radius: 6px;
}
.crb-seg input:checked + label { color: #fff; }
.crb-seg-thumb {
position: absolute; top: 3px; bottom: 3px; left: 3px;
width: calc(25% - 1.5px);
background: #1f1f2e; border: 1px solid rgba(124,108,255,0.4);
border-radius: 6px; z-index: 0;
box-shadow: 0 2px 8px rgba(0,0,0,0.4);
transition: transform 0.35s cubic-bezier(0.65,0,0.35,1);
}
#crb-seg-2:checked ~ .crb-seg-thumb { transform: translateX(100%); }
#crb-seg-3:checked ~ .crb-seg-thumb { transform: translateX(200%); }
#crb-seg-4:checked ~ .crb-seg-thumb { transform: translateX(300%); }
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 10. Neon Ring
**Type:** Pure CSS
**Description:** Outline ring lights up neon-green with a halo glow on check — built for dark dashboards and developer tools.
**HTML:**
```html
Mode
Idle
Active
Burst
```
**CSS:**
```css
.crb-neon { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; }
.crb-neon label {
display: flex; align-items: center; gap: 10px;
font: 500 13px/1 monospace; color: #b8b6d4; cursor: pointer;
}
.crb-neon input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-neon span {
width: 16px; height: 16px; border-radius: 50%;
border: 1.5px solid #2a4a3a; background: transparent;
position: relative;
transition: border-color 0.25s, box-shadow 0.3s;
}
.crb-neon span::after {
content: ''; position: absolute; inset: 3px;
border-radius: 50%; background: #2ecc8a;
opacity: 0; transform: scale(0.4);
transition: opacity 0.25s, transform 0.3s;
}
.crb-neon input:checked + span {
border-color: #2ecc8a;
box-shadow: 0 0 12px rgba(46,204,138,0.6), inset 0 0 6px rgba(46,204,138,0.3);
}
.crb-neon input:checked + span::after {
opacity: 1; transform: scale(1);
box-shadow: 0 0 6px #2ecc8a;
}
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 11. Pricing Tier
**Type:** Pure CSS
**Description:** Pricing-card style with a "Best Value" featured ribbon revealed on selection — production-ready for SaaS plan pickers.
**HTML:**
```html
Plan tier
Basic
$5/mo
Best value
Plus
$15/mo
Best value
```
**CSS:**
```css
.crb-tier { display: flex; gap: 10px; border: 0; padding: 14px 0 0; }
.crb-tier input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-tier label { flex: 1; cursor: pointer; }
.crb-tier-card {
display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
position: relative;
padding: 12px;
background: #1a1a28; border: 1.5px solid rgba(255,255,255,0.06); border-radius: 10px;
transition: border-color 0.3s, background 0.3s;
}
.crb-tier-card strong { font: 700 14px/1 system-ui, sans-serif; color: #fff; }
.crb-tier-card em { font: 600 12px/1 monospace; color: #a78bfa; font-style: normal; }
.crb-tier-ribbon {
position: absolute;
top: 0; left: 50%;
padding: 4px 12px;
border-radius: 999px;
font: 700 9px/1 system-ui, sans-serif;
text-transform: uppercase;
text-align: center;
white-space: nowrap;
background: linear-gradient(90deg, #7c6cff, #ff6c8a); color: #fff;
box-shadow: 0 2px 8px rgba(124,108,255,0.4);
opacity: 0;
transform: translate(-50%, -50%) scale(0.6);
transition: opacity 0.25s, transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
pointer-events: none;
}
.crb-tier input:checked + .crb-tier-card {
border-color: #7c6cff;
background: linear-gradient(135deg, rgba(124,108,255,0.15), rgba(255,108,138,0.05));
}
.crb-tier input:checked + .crb-tier-card .crb-tier-ribbon {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 12. Wave Fill
**Type:** Pure CSS
**Description:** Selected radio fills with a sine-wave water animation — uses a moving SVG-free CSS wave for an organic liquid feel.
**HTML:**
```html
Volume
Low
Mid
Loud
```
**CSS:**
```css
.crb-wave { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; }
.crb-wave label {
display: flex; align-items: center; gap: 10px;
font: 500 13px/1 system-ui, sans-serif; color: #cbd5e1; cursor: pointer;
}
.crb-wave input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-wave span {
width: 20px; height: 20px; border-radius: 50%;
border: 2px solid #444461;
position: relative; overflow: hidden;
background: transparent;
transition: border-color 0.25s;
}
.crb-wave span::before {
content: ''; position: absolute;
top: 100%; left: -50%; width: 200%; height: 200%;
background: radial-gradient(ellipse at top, transparent 40%, #06b6d4 41%);
transition: top 0.5s ease-out;
}
.crb-wave input:checked + span { border-color: #06b6d4; }
.crb-wave input:checked + span::before {
top: -10%;
animation: crb-wave-bob 1.4s ease-in-out infinite;
}
@keyframes crb-wave-bob {
0%,100% { transform: translateY(0); }
50% { transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
.crb-wave,
.crb-wave * {
animation: none !important;
}
}
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 13. Clip Mask
**Type:** Pure CSS
**Description:** The fill is revealed via an animated clip-path morph from a tiny triangle to a full circle — a unique geometric reveal.
**HTML:**
```html
Speed
0.5x
1x
2x
```
**CSS:**
```css
.crb-clip { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; }
.crb-clip label {
display: flex; align-items: center; gap: 10px;
font: 500 13px/1 monospace; color: #cbd5e1; cursor: pointer;
}
.crb-clip input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-clip span {
width: 18px; height: 18px; border-radius: 50%;
border: 2px solid #444461;
position: relative; overflow: hidden;
transition: border-color 0.25s;
}
.crb-clip span::after {
content: ''; position: absolute; inset: 3px;
border-radius: 50%;
background: linear-gradient(135deg, #ff6c8a, #f5a623);
clip-path: polygon(50% 50%, 50% 50%, 50% 50%);
transition: clip-path 0.5s cubic-bezier(0.65,0,0.35,1);
}
.crb-clip input:checked + span { border-color: #ff6c8a; }
.crb-clip input:checked + span::after {
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 14. Gradient Border
**Type:** Pure CSS
**Description:** Conic gradient border traces around the selected option — creates a slowly rotating rainbow ring on focus.
**HTML:**
```html
Tier
Bronze
Silver
Gold
```
**CSS:**
```css
.crb-grad { display: flex; gap: 8px; border: 0; padding: 0; }
.crb-grad input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-grad label { cursor: pointer; }
.crb-grad-card {
display: block; padding: 10px 18px;
background: #1a1a28; border-radius: 8px;
font: 600 12px/1 system-ui, sans-serif; color: #b8b6d4;
position: relative; isolation: isolate;
transition: color 0.25s;
}
.crb-grad-card::before {
content: ''; position: absolute; inset: -2px; border-radius: 10px;
background: conic-gradient(from 0deg, #7c6cff, #ff6c8a, #f5a623, #2ecc8a, #06b6d4, #7c6cff);
z-index: -1; opacity: 0;
animation: crb-grad-spin 4s linear infinite;
transition: opacity 0.3s;
}
.crb-grad-card::after {
content: ''; position: absolute; inset: 0; border-radius: 8px;
background: #1a1a28; z-index: -1;
}
.crb-grad input:checked + .crb-grad-card { color: #fff; }
.crb-grad input:checked + .crb-grad-card::before { opacity: 1; }
@keyframes crb-grad-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
.crb-grad,
.crb-grad * {
animation: none !important;
}
}
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 15. Avatar Picker
**Type:** Pure CSS
**Description:** Round avatar tiles that scale up and glow on selection — perfect for character/profile pickers in onboarding flows.
**HTML:**
```html
Avatar
A
B
C
D
```
**CSS:**
```css
.crb-avatar { display: flex; gap: 10px; border: 0; padding: 0; }
.crb-avatar input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-avatar label { cursor: pointer; }
.crb-avatar span {
display: flex; align-items: center; justify-content: center;
width: 40px; height: 40px; border-radius: 50%;
background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c), white 30%));
font: 700 14px/1 system-ui, sans-serif; color: #fff;
box-shadow: 0 0 0 0 var(--c);
transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s, opacity 0.25s;
opacity: 0.55;
}
.crb-avatar label:hover span { opacity: 0.85; }
.crb-avatar input:checked + span {
opacity: 1; transform: scale(1.15);
box-shadow: 0 0 0 3px #15151d, 0 0 0 5px var(--c), 0 0 18px var(--c);
}
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 16. Vertical Stack
**Type:** Pure CSS
**Description:** Vertical stack with a slim left accent rail that slides between options — perfect for settings panels and form sections.
**HTML:**
```html
Notifications
All Every update
Important Critical only
Off Silent mode
```
**CSS:**
```css
.crb-stack {
display: flex; flex-direction: column;
position: relative; padding-left: 12px;
border: 0; border-left: 2px solid rgba(255,255,255,0.06);
}
.crb-stack input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-stack label {
display: flex; flex-direction: column; gap: 2px;
padding: 8px 10px; border-radius: 6px;
cursor: pointer; transition: color 0.25s, background 0.25s;
}
.crb-stack label strong {
font: 600 13px/1 system-ui, sans-serif; color: #cbd5e1;
}
.crb-stack label em {
font: 500 11px/1 system-ui, sans-serif; color: #b8b6d4; font-style: normal;
}
.crb-stack input:checked + label strong { color: #fff; }
.crb-stack input:checked + label { background: rgba(124,108,255,0.06); }
.crb-stack-rail {
position: absolute; left: -2px; top: 0;
width: 2px; height: 33.333%;
background: linear-gradient(180deg, #7c6cff, #a78bfa);
border-radius: 2px;
transition: transform 0.4s cubic-bezier(0.65,0,0.35,1);
}
#crb-stack-2:checked ~ .crb-stack-rail { transform: translateY(100%); }
#crb-stack-3:checked ~ .crb-stack-rail { transform: translateY(200%); }
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 17. 3D Push
**Type:** Pure CSS
**Description:** Skeuomorphic depressed-button style — the selected option sinks into the surface with an inverted shadow for tactile feedback.
**HTML:**
```html
Difficulty
Easy
Hard
Expert
```
**CSS:**
```css
.crb-push { display: flex; gap: 8px; border: 0; padding: 0; }
.crb-push input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-push label { cursor: pointer; }
.crb-push span {
display: block; padding: 10px 18px;
background: linear-gradient(180deg, #2a2a3e, #1a1a28);
color: #cbd5e1; font: 600 12px/1 system-ui, sans-serif;
border-radius: 8px;
box-shadow: 0 3px 0 #0c0c12, inset 0 1px 0 rgba(255,255,255,0.06);
transform: translateY(0);
transition: transform 0.12s, box-shadow 0.12s, color 0.2s, background 0.25s;
}
.crb-push input:checked + span {
transform: translateY(3px);
background: linear-gradient(180deg, #1a1a28, #0c0c12);
color: #a78bfa;
box-shadow: 0 0 0 #0c0c12, inset 0 2px 6px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(124,108,255,0.3);
}
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 18. Glow Pulse
**Type:** Pure CSS
**Description:** Selecting a radio fires a soft expanding halo that radiates outward from the dot — pure CSS, animation runs once per selection via a keyframed box-shadow ripple.
**HTML:**
```html
Reaction
Like
Love
Celebrate
```
**CSS:**
```css
.crb-glow { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; }
.crb-glow label {
display: flex; align-items: center; gap: 10px;
font: 500 13px/1 system-ui, sans-serif; color: #cbd5e1; cursor: pointer;
}
.crb-glow input { appearance: none; -webkit-appearance: none; position: absolute; opacity: 0; }
.crb-glow span {
width: 18px; height: 18px; border-radius: 50%;
border: 2px solid #444461; background: transparent;
position: relative;
transition: border-color 0.2s, background 0.25s;
}
.crb-glow span::after {
content: ''; position: absolute; inset: -2px;
border-radius: 50%;
box-shadow: 0 0 0 0 rgba(255,108,138,0.7);
pointer-events: none;
}
.crb-glow input:checked + span {
background: linear-gradient(135deg, #ff6c8a, #a78bfa);
border-color: transparent;
}
.crb-glow input:checked + span::after {
animation: crb-glow-ripple 0.9s ease-out;
}
@keyframes crb-glow-ripple {
0% { box-shadow: 0 0 0 0 rgba(255,108,138,0.7), 0 0 0 0 rgba(167,139,250,0.5); }
60% { box-shadow: 0 0 0 14px rgba(255,108,138,0), 0 0 0 22px rgba(167,139,250,0); }
100% { box-shadow: 0 0 0 14px rgba(255,108,138,0), 0 0 0 22px rgba(167,139,250,0); }
}
@media (prefers-reduced-motion: reduce) {
.crb-glow,
.crb-glow * {
animation: none !important;
}
}
.crb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
---
## 20 CSS Responsive Navbar Designs
URL: https://codefronts.com/navigation/css-responsive-navbar/
Description: 20 hand-coded CSS responsive navbar designs with live demos — glassmorphism frosted bar, CSS-only mega menu, sidebar drawer, animated underline tabs, pill highlight, scroll-shrink on scroll, synthwave neon, reading-progress breadcrumb, split two-tone, mobile bottom tab bar, conic-gradient animated border, centered logo, icon dot indicator, full-screen overlay, morphing search expand, floating island, step wizard, vertical rail, dual announcement bar, and scroll-spy active highlight. 14 pure CSS + 6 with a tiny vanilla JS snippet — no framework. Mobile-first, WCAG-friendly, copy-paste ready, MIT licensed.
Demo count: 20
### 01. CSS Glassmorphism Frosted Navbar
**Type:** Pure CSS
**Description:** Dark frosted-glass sticky navbar with backdrop-filter blur, smooth hover pills, and a pure CSS hamburger toggle.
**HTML:**
```html
Glassmorphism Navbar
Resize the window to see the hamburger menu appear. The nav uses backdrop-filter: blur() for the frosted glass effect.
```
**CSS:**
```css
.nav-01, .nav-01 *, .nav-01 *::before, .nav-01 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-01 {
--glass-bg: rgba(255,255,255,0.08);
--glass-border: rgba(255,255,255,0.15);
--text: #f0eeff;
--accent: #a78bfa;
--hover-bg: rgba(167,139,250,0.15);
font-family: 'Plus Jakarta Sans', sans-serif;
position: sticky;
top: 0;
z-index: 100;
}
.nav-01__bar {
background: var(--glass-bg);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border-bottom: 1px solid var(--glass-border);
padding: 0 2rem;
display: flex;
align-items: center;
justify-content: space-between;
height: 64px;
position: relative;
}
.nav-01__logo {
display: flex;
align-items: center;
gap: 10px;
text-decoration: none;
color: var(--text);
font-weight: 700;
font-size: 1.2rem;
letter-spacing: -0.02em;
}
.nav-01__logo-icon {
width: 32px; height: 32px;
background: linear-gradient(135deg, #a78bfa, #60a5fa);
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-size: 16px;
}
.nav-01__links {
display: flex;
align-items: center;
gap: 0.25rem;
list-style: none;
}
.nav-01__links a {
color: rgba(240,238,255,0.75);
text-decoration: none;
font-size: 0.9rem;
font-weight: 500;
padding: 0.5rem 0.9rem;
border-radius: 8px;
transition: background 0.2s, color 0.2s;
position: relative;
}
.nav-01__links a:hover,
.nav-01__links a.is-active {
background: var(--hover-bg);
color: var(--accent);
}
.nav-01__links a.is-active::after {
content: '';
position: absolute;
bottom: -2px; left: 50%; transform: translateX(-50%);
width: 4px; height: 4px;
border-radius: 50%;
background: var(--accent);
}
.nav-01__actions {
display: flex; align-items: center; gap: 0.75rem;
}
.nav-01__btn {
padding: 0.45rem 1.1rem;
border-radius: 8px;
font-size: 0.875rem;
font-weight: 600;
cursor: pointer;
border: none;
font-family: inherit;
transition: all 0.2s;
}
.nav-01__btn--ghost {
background: transparent;
color: var(--text);
border: 1px solid var(--glass-border);
}
.nav-01__btn--ghost:hover { background: var(--hover-bg); }
.nav-01__btn--primary {
background: linear-gradient(135deg, #a78bfa, #60a5fa);
color: #fff;
}
.nav-01__btn--primary:hover { opacity: 0.85; transform: translateY(-1px); }
.nav-01__hamburger {
display: none;
flex-direction: column;
gap: 5px;
cursor: pointer;
padding: 8px;
border: none;
background: transparent;
}
.nav-01__hamburger span {
display: block; width: 22px; height: 2px;
background: var(--text);
border-radius: 2px;
transition: transform 0.3s, opacity 0.3s;
}
#nav-01-toggle { display: none; }
#nav-01-toggle:checked ~ .nav-01__bar .nav-01__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-01-toggle:checked ~ .nav-01__bar .nav-01__hamburger span:nth-child(2) { opacity: 0; }
#nav-01-toggle:checked ~ .nav-01__bar .nav-01__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-01__mobile {
display: none;
background: rgba(15,12,41,0.95);
backdrop-filter: blur(20px);
border-bottom: 1px solid var(--glass-border);
padding: 1rem 1.5rem;
flex-direction: column;
gap: 0.25rem;
}
.nav-01__mobile a {
color: rgba(240,238,255,0.8);
text-decoration: none;
font-size: 0.95rem;
font-weight: 500;
padding: 0.65rem 0.75rem;
border-radius: 8px;
transition: background 0.2s, color 0.2s;
}
.nav-01__mobile a:hover { background: var(--hover-bg); color: var(--accent); }
.nav-01__mobile-actions { display: flex; gap: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--glass-border); margin-top: 0.5rem; }
.nav-01__mobile-actions .nav-01__btn { flex: 1; text-align: center; }
#nav-01-toggle:checked ~ .nav-01__mobile { display: flex; }
@media (max-width: 768px) {
.nav-01__links, .nav-01__actions { display: none; }
.nav-01__hamburger { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-01__btn--primary { transition: none; }
.nav-01__hamburger span { transition: none; }
}
```
### 02. CSS Mega Menu Dropdown Navbar
**Type:** Pure CSS
**Description:** Full-width mega menu with multi-column layout, icon cards, and a featured highlight panel triggered by CSS focus-within.
**HTML:**
```html
Mega Menu Dropdown Navbar
Hover over Products or Solutions to see the mega menu panels. Pure CSS :hover-driven with grid layout. Resize to see mobile drawer.
```
**CSS:**
```css
.nav-02, .nav-02 *, .nav-02 *::before, .nav-02 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-02 {
--bg: #ffffff;
--text: #1a1a2e;
--muted: #6b7280;
--accent: #e84393;
--border: #e5e7eb;
--mega-bg: #ffffff;
--icon-bg: #fdf2f8;
font-family: 'DM Sans', sans-serif;
position: sticky; top: 0; z-index: 200;
background: var(--bg);
border-bottom: 1px solid var(--border);
box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.nav-02__inner {
max-width: 1200px;
margin: 0 auto;
padding: 0 2rem;
display: flex;
align-items: center;
height: 68px;
gap: 2rem;
}
.nav-02__logo {
font-weight: 700;
font-size: 1.3rem;
color: var(--text);
text-decoration: none;
letter-spacing: -0.03em;
flex-shrink: 0;
}
.nav-02__logo span { color: var(--accent); }
.nav-02__menu {
display: flex;
list-style: none;
gap: 0;
flex: 1;
}
.nav-02__item {
position: relative;
}
.nav-02__item > a {
display: flex;
align-items: center;
gap: 4px;
color: var(--text);
text-decoration: none;
font-size: 0.9rem;
font-weight: 500;
padding: 0.5rem 1rem;
border-radius: 8px;
transition: background 0.15s, color 0.15s;
white-space: nowrap;
}
.nav-02__item > a::after {
content: '▾';
font-size: 0.7rem;
color: var(--muted);
transition: transform 0.2s;
}
.nav-02__item--plain > a::after { display: none; }
.nav-02__item:hover > a { background: #fdf2f8; color: var(--accent); }
.nav-02__item:hover > a::after { transform: rotate(180deg); }
/* Mega menu panel */
.nav-02__mega {
position: absolute;
top: calc(100% + 8px);
left: -1rem;
background: var(--mega-bg);
border: 1px solid var(--border);
border-radius: 16px;
padding: 1.5rem;
box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);
display: none;
min-width: 560px;
gap: 1.5rem;
}
.nav-02__mega--grid { display: none; grid-template-columns: repeat(2, 1fr); }
.nav-02__mega--wide { min-width: 700px; grid-template-columns: repeat(3, 1fr); }
.nav-02__item:hover .nav-02__mega--grid { display: grid; }
.nav-02__mega-col-title {
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--muted);
margin-bottom: 0.75rem;
}
.nav-02__mega-link {
display: flex;
align-items: flex-start;
gap: 0.75rem;
text-decoration: none;
padding: 0.6rem 0.75rem;
border-radius: 10px;
transition: background 0.15s;
margin-bottom: 0.25rem;
}
.nav-02__mega-link:hover { background: #fdf2f8; }
.nav-02__mega-icon {
width: 36px; height: 36px;
background: var(--icon-bg);
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-size: 16px;
flex-shrink: 0;
}
.nav-02__mega-link:hover .nav-02__mega-icon { background: #fce7f3; }
.nav-02__mega-title { font-size: 0.875rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.nav-02__mega-desc { font-size: 0.775rem; color: var(--muted); line-height: 1.4; }
.nav-02__spacer { flex: 1; }
.nav-02__cta {
display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0;
}
.nav-02__btn {
padding: 0.45rem 1.1rem;
border-radius: 8px;
font-size: 0.875rem;
font-weight: 600;
cursor: pointer;
border: none;
font-family: inherit;
transition: all 0.2s;
}
.nav-02__btn--ghost { background: transparent; color: var(--text); }
.nav-02__btn--ghost:hover { background: #f3f4f6; }
.nav-02__btn--pink { background: var(--accent); color: #fff; }
.nav-02__btn--pink:hover { background: #d1236a; transform: translateY(-1px); }
/* Mobile */
#nav-02-toggle { display: none; }
.nav-02__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; border: none; background: transparent; margin-left: auto; }
.nav-02__hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
#nav-02-toggle:checked ~ .nav-02__inner .nav-02__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-02-toggle:checked ~ .nav-02__inner .nav-02__hamburger span:nth-child(2) { opacity: 0; }
#nav-02-toggle:checked ~ .nav-02__inner .nav-02__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-02__drawer {
display: none;
padding: 1rem 1.5rem;
border-top: 1px solid var(--border);
flex-direction: column;
gap: 0.25rem;
}
.nav-02__drawer a { display: block; padding: 0.65rem 0.5rem; color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem; border-radius: 8px; }
.nav-02__drawer a:hover { background: #fdf2f8; color: var(--accent); padding-left: 1rem; }
#nav-02-toggle:checked ~ .nav-02__drawer { display: flex; }
@media (max-width: 768px) {
.nav-02__menu, .nav-02__cta { display: none; }
.nav-02__hamburger { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-02__btn { transition: none; }
.nav-02__hamburger span { transition: none; }
.nav-02__drawer a { transition: none; }
}
```
### 03. CSS Sidebar Drawer Navigation
**Type:** Pure CSS
**Description:** Off-canvas sidebar drawer that slides in from the left using a hidden checkbox toggle with overlay backdrop.
**HTML:**
```html
```
**CSS:**
```css
.nav-03, .nav-03 *, .nav-03 *::before, .nav-03 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-03 {
--bg: #161b22;
--sidebar: #0d1117;
--text: #e6edf3;
--muted: #7d8590;
--accent: #f78166;
--border: rgba(240,246,252,0.1);
--drawer-w: 280px;
font-family: 'Syne', sans-serif;
}
#nav-03-toggle { display: none; }
/* Top bar */
.nav-03__bar {
position: fixed; top: 0; left: 0; right: 0; z-index: 300;
background: var(--bg);
border-bottom: 1px solid var(--border);
height: 60px;
display: flex;
align-items: center;
padding: 0 1.5rem;
gap: 1rem;
}
.nav-03__menu-btn {
width: 36px; height: 36px;
display: flex; flex-direction: column;
align-items: center; justify-content: center;
gap: 5px;
cursor: pointer;
border: none; background: transparent;
border-radius: 8px;
transition: background 0.15s;
flex-shrink: 0;
}
.nav-03__menu-btn:hover { background: rgba(255,255,255,0.07); }
.nav-03__menu-btn span {
display: block; width: 18px; height: 1.5px;
background: var(--text);
border-radius: 2px;
transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s, width 0.3s;
}
#nav-03-toggle:checked ~ .nav-03__bar .nav-03__menu-btn span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#nav-03-toggle:checked ~ .nav-03__bar .nav-03__menu-btn span:nth-child(2) { opacity: 0; width: 0; }
#nav-03-toggle:checked ~ .nav-03__bar .nav-03__menu-btn span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-03__logo {
font-weight: 800;
font-size: 1.15rem;
color: var(--text);
text-decoration: none;
letter-spacing: -0.02em;
}
.nav-03__logo em { color: var(--accent); font-style: normal; }
.nav-03__search {
flex: 1;
max-width: 340px;
position: relative;
}
.nav-03__search input {
width: 100%;
background: rgba(255,255,255,0.05);
border: 1px solid var(--border);
border-radius: 8px;
color: var(--text);
font-family: inherit;
font-size: 0.875rem;
padding: 0.45rem 0.75rem 0.45rem 2.2rem;
outline: none;
transition: border-color 0.2s, background 0.2s;
}
.nav-03__search input:focus { border-color: var(--accent); background: rgba(247,129,102,0.05); }
.nav-03__search input::placeholder { color: var(--muted); }
.nav-03__search-icon { position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 0.875rem; pointer-events: none; }
.nav-03__bar-actions { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; }
.nav-03__avatar {
width: 32px; height: 32px;
border-radius: 50%;
background: linear-gradient(135deg, #f78166, #ffa657);
display: flex; align-items: center; justify-content: center;
font-size: 0.75rem; font-weight: 700; color: #fff;
cursor: pointer;
}
.nav-03__icon-btn {
width: 32px; height: 32px;
border-radius: 8px;
background: transparent; border: none; cursor: pointer;
color: var(--muted); font-size: 1rem;
display: flex; align-items: center; justify-content: center;
transition: background 0.15s, color 0.15s;
}
.nav-03__icon-btn:hover { background: rgba(255,255,255,0.07); color: var(--text); }
/* Overlay */
.nav-03__overlay {
position: fixed; inset: 0;
background: rgba(0,0,0,0.6);
z-index: 200;
opacity: 0; pointer-events: none;
transition: opacity 0.3s;
}
#nav-03-toggle:checked ~ .nav-03__overlay { opacity: 1; pointer-events: all; }
/* Drawer */
.nav-03__drawer {
position: fixed;
top: 0; left: 0; bottom: 0;
width: var(--drawer-w);
background: var(--sidebar);
border-right: 1px solid var(--border);
z-index: 250;
transform: translateX(-100%);
transition: transform 0.35s cubic-bezier(.4,0,.2,1);
overflow-y: auto;
padding: 1rem 0;
display: flex; flex-direction: column;
}
#nav-03-toggle:checked ~ .nav-03__drawer { transform: translateX(0); }
.nav-03__drawer-header {
padding: 0.75rem 1.25rem 1.25rem;
border-bottom: 1px solid var(--border);
margin-bottom: 0.5rem;
}
.nav-03__drawer-title { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.nav-03__section { margin-bottom: 0.25rem; }
.nav-03__section-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 0.75rem 1.25rem 0.35rem; }
.nav-03__link {
display: flex; align-items: center; gap: 0.75rem;
text-decoration: none;
color: var(--muted);
font-size: 0.9rem;
font-weight: 500;
padding: 0.55rem 1.25rem;
border-radius: 6px;
margin: 0 0.5rem;
transition: background 0.15s, color 0.15s;
position: relative;
}
.nav-03__link:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-03__link.is-active { color: var(--text); background: rgba(247,129,102,0.1); }
.nav-03__link.is-active::before {
content: ''; position: absolute; left: -0.5rem; top: 50%; transform: translateY(-50%);
width: 3px; height: 60%; background: var(--accent); border-radius: 0 2px 2px 0;
}
.nav-03__link-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-03__badge {
margin-left: auto;
background: var(--accent);
color: #fff;
font-size: 0.65rem;
font-weight: 700;
padding: 1px 6px;
border-radius: 10px;
}
.nav-03__drawer-footer { margin-top: auto; padding: 1rem; border-top: 1px solid var(--border); }
.nav-03__profile { display: flex; align-items: center; gap: 0.75rem; }
.nav-03__profile-name { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.nav-03__profile-role { font-size: 0.75rem; color: var(--muted); }
.nav-03__content { padding-top: 60px; padding: 80px 2rem 2rem; color: var(--text); }
@media (min-width: 768px) {
.nav-03__drawer { transform: translateX(0) !important; }
.nav-03__overlay { display: none !important; }
.nav-03__menu-btn { display: none; }
.nav-03__content { padding-left: calc(var(--drawer-w) + 2rem); }
}
@media (prefers-reduced-motion: reduce) {
.nav-03__drawer { transition: none; }
.nav-03__overlay { transition: none; }
.nav-03__menu-btn span { transition: none; }
}
```
### 04. CSS Animated Underline Tabs Navbar
**Type:** Pure CSS
**Description:** Tab-style navbar with an animated bottom border that slides between items using CSS transitions and radio-button state.
**HTML:**
```html
Animated Underline Tabs Navbar
The sliding underline is a scaleX transform on an ::after pseudo-element. Hover shows a 60% preview; active tab shows 100% width. No JavaScript.
```
**CSS:**
```css
.nav-04, .nav-04 *, .nav-04 *::before, .nav-04 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-04 {
--bg: #fff;
--text: #1c1c1c;
--muted: #888;
--accent: #ff6b35;
--track: #f0ebe3;
font-family: 'Manrope', sans-serif;
background: var(--bg);
border-bottom: 1px solid #f0ebe3;
position: sticky; top: 0; z-index: 100;
}
.nav-04__top {
display: flex;
align-items: center;
padding: 0 2.5rem;
height: 60px;
gap: 2rem;
}
.nav-04__logo {
font-weight: 800;
font-size: 1.25rem;
color: var(--text);
text-decoration: none;
letter-spacing: -0.04em;
flex-shrink: 0;
}
.nav-04__logo span { color: var(--accent); }
.nav-04__spacer { flex: 1; }
.nav-04__actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-04__action-link {
font-size: 0.875rem; font-weight: 600;
color: var(--muted); text-decoration: none;
transition: color 0.2s;
}
.nav-04__action-link:hover { color: var(--text); }
.nav-04__btn {
padding: 0.45rem 1.1rem;
border-radius: 6px;
font-size: 0.875rem; font-weight: 700;
cursor: pointer; border: none;
font-family: inherit;
background: var(--text); color: #fff;
transition: background 0.2s, transform 0.15s;
letter-spacing: -0.01em;
}
.nav-04__btn:hover { background: var(--accent); transform: translateY(-1px); }
/* Tab nav */
.nav-04__tabs {
display: flex;
align-items: flex-end;
padding: 0 2.5rem;
overflow-x: auto;
scrollbar-width: none;
gap: 0;
height: 48px;
}
.nav-04__tabs::-webkit-scrollbar { display: none; }
.nav-04__tab {
flex-shrink: 0;
position: relative;
display: inline-flex;
align-items: center;
gap: 6px;
padding: 0 1.25rem;
height: 100%;
font-size: 0.875rem;
font-weight: 600;
color: var(--muted);
text-decoration: none;
transition: color 0.2s;
white-space: nowrap;
}
.nav-04__tab::after {
content: '';
position: absolute;
bottom: 0; left: 0; right: 0;
height: 2.5px;
background: var(--accent);
border-radius: 2px 2px 0 0;
transform: scaleX(0);
transition: transform 0.25s cubic-bezier(.4,0,.2,1);
}
.nav-04__tab:hover { color: var(--text); }
.nav-04__tab:hover::after { transform: scaleX(0.6); }
.nav-04__tab.is-active { color: var(--accent); }
.nav-04__tab.is-active::after { transform: scaleX(1); }
.nav-04__tab-count {
font-size: 0.7rem;
font-weight: 700;
background: var(--track);
color: var(--muted);
padding: 1px 6px;
border-radius: 10px;
min-width: 20px;
text-align: center;
}
.nav-04__tab.is-active .nav-04__tab-count { background: #ffe8df; color: var(--accent); }
/* Mobile */
#nav-04-toggle { display: none; }
.nav-04__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; border: none; background: transparent; }
.nav-04__hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
#nav-04-toggle:checked ~ .nav-04__top .nav-04__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-04-toggle:checked ~ .nav-04__top .nav-04__hamburger span:nth-child(2) { opacity: 0; }
#nav-04-toggle:checked ~ .nav-04__top .nav-04__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-04__mobile {
display: none; flex-direction: column; gap: 0.25rem;
padding: 0.75rem 1.5rem 1rem;
border-top: 1px solid var(--track);
}
.nav-04__mobile a { display: block; padding: 0.6rem 0.5rem; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem; border-radius: 6px; transition: background 0.15s, color 0.15s; }
.nav-04__mobile a:hover { background: #ffe8df; color: var(--accent); padding-left: 1rem; }
#nav-04-toggle:checked ~ .nav-04__mobile { display: flex; }
@media (max-width: 640px) {
.nav-04__tabs, .nav-04__actions { display: none; }
.nav-04__hamburger { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-04__tab::after { transition: none; }
.nav-04__btn { transition: none; }
.nav-04__hamburger span { transition: none; }
}
```
### 05. CSS Pill Highlight Navigation Bar
**Type:** Pure CSS
**Description:** Compact pill-shaped nav links that highlight on hover with a soft background fill and subtle scale animation.
**HTML:**
```html
Pill Highlight Navigation Bar
A floating pill-style navbar centered on the page. Active state uses a solid white pill with dark text. Hover shows a translucent pill preview.
```
**CSS:**
```css
.nav-05, .nav-05 *, .nav-05 *::before, .nav-05 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-05 {
--text: #f9fafb;
--muted: #9ca3af;
--pill: rgba(255,255,255,0.1);
--active-pill: #ffffff;
--active-text: #111827;
font-family: 'Inter', sans-serif;
display: flex;
justify-content: center;
padding: 1.5rem 1rem;
position: sticky; top: 0; z-index: 100;
}
.nav-05__bar {
display: flex;
align-items: center;
gap: 0.5rem;
background: rgba(255,255,255,0.06);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 999px;
padding: 0.35rem;
backdrop-filter: blur(12px);
box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
.nav-05__logo {
font-weight: 700;
font-size: 0.95rem;
color: var(--text);
text-decoration: none;
padding: 0.4rem 1rem;
letter-spacing: -0.02em;
flex-shrink: 0;
}
.nav-05__sep {
width: 1px; height: 20px;
background: rgba(255,255,255,0.15);
flex-shrink: 0;
}
.nav-05__links {
display: flex;
list-style: none;
gap: 0.25rem;
}
.nav-05__links a {
display: block;
color: var(--muted);
text-decoration: none;
font-size: 0.85rem;
font-weight: 500;
padding: 0.4rem 0.9rem;
border-radius: 999px;
transition: color 0.2s, background 0.2s;
white-space: nowrap;
}
.nav-05__links a:hover { color: var(--text); background: var(--pill); }
.nav-05__links a.is-active {
background: var(--active-pill);
color: var(--active-text);
font-weight: 600;
box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.nav-05__cta {
padding: 0.4rem 1.1rem;
border-radius: 999px;
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
border: none;
font-family: inherit;
background: linear-gradient(135deg, #6366f1, #8b5cf6);
color: #fff;
transition: opacity 0.2s, transform 0.15s;
flex-shrink: 0;
box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}
.nav-05__cta:hover { opacity: 0.85; transform: scale(0.97); }
/* Mobile — stack center-aligned */
#nav-05-toggle { display: none; }
.nav-05__mobile-bar {
display: none;
position: sticky; top: 0; z-index: 100;
background: rgba(10,10,10,0.9);
backdrop-filter: blur(12px);
border-bottom: 1px solid rgba(255,255,255,0.08);
padding: 0.75rem 1.25rem;
align-items: center;
justify-content: space-between;
}
.nav-05__mobile-logo { font-weight: 700; font-size: 1rem; color: #f9fafb; text-decoration: none; }
.nav-05__hamburger { display: flex; flex-direction: column; gap: 4px; cursor: pointer; border: none; background: transparent; padding: 6px; }
.nav-05__hamburger span { display: block; width: 20px; height: 1.5px; background: #f9fafb; border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
#nav-05-toggle:checked ~ .nav-05__mobile-bar .nav-05__hamburger span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
#nav-05-toggle:checked ~ .nav-05__mobile-bar .nav-05__hamburger span:nth-child(2) { opacity: 0; }
#nav-05-toggle:checked ~ .nav-05__mobile-bar .nav-05__hamburger span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.nav-05__mobile-links {
display: none; flex-direction: column; gap: 0.25rem;
background: rgba(10,10,10,0.95); backdrop-filter: blur(12px);
padding: 1rem 1.25rem;
border-bottom: 1px solid rgba(255,255,255,0.08);
position: sticky; top: 56px; z-index: 99;
}
.nav-05__mobile-links a { display: block; color: #9ca3af; text-decoration: none; font-size: 0.95rem; font-weight: 500; padding: 0.6rem 0.75rem; border-radius: 8px; transition: background 0.15s, color 0.15s; }
.nav-05__mobile-links a:hover { background: rgba(255,255,255,0.06); color: #f9fafb; }
#nav-05-toggle:checked ~ .nav-05__mobile-links { display: flex; }
@media (max-width: 640px) {
.nav-05 { display: none; }
.nav-05__mobile-bar { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-05__links a, .nav-05__cta { transition: none; }
.nav-05__hamburger span { transition: none; }
.nav-05__mobile-links a { transition: none; }
}
```
### 06. CSS Scroll-Aware Shrink Navbar
**Type:** CSS + JS
**Description:** Full-height hero navbar that compresses to a compact strip on scroll with JS class-toggle and CSS transition.
**HTML:**
```html
Scroll to see the navbar transform
As you scroll down, the navbar shrinks in height, gains a frosted white background, and switches from ghost to solid button style.
↓ scroll down ↓
Page content area
The navbar listens to the scroll event and adds an .is-scrolled class when the page scrolls past 60px. All style changes are CSS transitions on that class toggle.
```
**CSS:**
```css
.nav-06, .nav-06 *, .nav-06 *::before, .nav-06 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-06 {
--bg: transparent;
--scrolled-bg: rgba(255,255,255,0.95);
--text: #faf5ee;
--scrolled-text: #1a1206;
--accent: #e8a838;
--border: rgba(255,255,255,0.15);
--scrolled-border: rgba(0,0,0,0.08);
font-family: 'Outfit', sans-serif;
position: fixed; top: 0; left: 0; right: 0; z-index: 200;
transition: background 0.4s, box-shadow 0.4s, height 0.4s;
height: 80px;
}
.nav-06.is-scrolled {
background: var(--scrolled-bg);
backdrop-filter: blur(16px);
box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.06);
height: 60px;
}
.nav-06__inner {
max-width: 1200px; margin: 0 auto;
padding: 0 2rem;
display: flex; align-items: center;
height: 100%;
gap: 2rem;
}
.nav-06__logo {
font-weight: 800; font-size: 1.3rem;
color: var(--text); text-decoration: none;
letter-spacing: -0.03em;
transition: color 0.4s;
flex-shrink: 0;
}
.nav-06.is-scrolled .nav-06__logo { color: var(--scrolled-text); }
.nav-06__logo em { color: var(--accent); font-style: normal; }
.nav-06__links {
display: flex; list-style: none; gap: 0.25rem; flex: 1;
}
.nav-06__links a {
color: rgba(250,245,238,0.85);
text-decoration: none; font-size: 0.9rem; font-weight: 500;
padding: 0.45rem 0.9rem; border-radius: 8px;
transition: color 0.4s, background 0.2s;
}
.nav-06.is-scrolled .nav-06__links a { color: rgba(26,18,6,0.7); }
.nav-06__links a:hover {
background: rgba(255,255,255,0.12);
color: var(--text) !important;
}
.nav-06.is-scrolled .nav-06__links a:hover { background: rgba(232,168,56,0.1); color: var(--accent) !important; }
.nav-06__links a.is-active { color: var(--accent) !important; font-weight: 600; }
.nav-06__btn {
padding: 0.5rem 1.3rem;
border-radius: 8px;
font-size: 0.875rem; font-weight: 600;
cursor: pointer; border: 2px solid rgba(255,255,255,0.35);
font-family: inherit;
color: var(--text);
background: transparent;
transition: all 0.4s;
flex-shrink: 0;
}
.nav-06.is-scrolled .nav-06__btn {
border-color: transparent;
background: var(--accent);
color: #1a1206;
}
.nav-06__btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,168,56,0.35); }
/* Hero */
.nav-06__hero {
height: 100vh;
background: linear-gradient(135deg, #1a1206 0%, #3d2b00 50%, #1a1206 100%);
display: flex; align-items: center; justify-content: center; flex-direction: column;
color: #faf5ee;
text-align: center;
padding: 2rem;
position: relative;
}
.nav-06__hero::after {
content: '';
position: absolute; inset: 0;
background: radial-gradient(ellipse at center, rgba(232,168,56,0.15) 0%, transparent 70%);
pointer-events: none;
}
.nav-06__hero h1 { font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.04em; margin-bottom: 1rem; }
.nav-06__hero p { color: rgba(250,245,238,0.65); font-size: 1.1rem; max-width: 500px; line-height: 1.7; }
.nav-06__scroll-hint { margin-top: 3rem; color: rgba(250,245,238,0.4); font-size: 0.875rem; animation: nav-06-bob 2s ease-in-out infinite; }
@keyframes nav-06-bob {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(6px); }
}
/* Mobile */
#nav-06-toggle { display: none; }
.nav-06__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; border: none; background: transparent; margin-left: auto; }
.nav-06__hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s, background 0.4s; }
.nav-06.is-scrolled .nav-06__hamburger span { background: var(--scrolled-text); }
#nav-06-toggle:checked ~ .nav-06__inner .nav-06__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-06-toggle:checked ~ .nav-06__inner .nav-06__hamburger span:nth-child(2) { opacity: 0; }
#nav-06-toggle:checked ~ .nav-06__inner .nav-06__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-06__mobile {
display: none; flex-direction: column; gap: 0.25rem;
background: rgba(255,255,255,0.97); backdrop-filter: blur(16px);
padding: 0.75rem 1.5rem 1rem;
border-bottom: 1px solid rgba(0,0,0,0.08);
}
.nav-06__mobile a { display: block; color: rgba(26,18,6,0.8); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 0.65rem 0.5rem; border-radius: 8px; transition: background 0.15s; }
.nav-06__mobile a:hover { background: rgba(232,168,56,0.1); color: #e8a838; padding-left: 1rem; }
#nav-06-toggle:checked ~ .nav-06__mobile { display: flex; }
@media (max-width: 768px) {
.nav-06__links, .nav-06__btn { display: none; }
.nav-06__hamburger { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-06, .nav-06__logo, .nav-06__links a, .nav-06__btn, .nav-06__hamburger span { transition: none; }
.nav-06__scroll-hint { animation: none; }
}
```
**JS:**
```js
const nav = document.getElementById('navbar06');
function onScroll() {
if (window.scrollY > 60) {
nav.classList.add('is-scrolled');
} else {
nav.classList.remove('is-scrolled');
}
}
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
```
### 07. CSS Neon Dark Navbar
**Type:** Pure CSS
**Description:** High-contrast dark navbar with neon-glow text effects, glowing CTA button, and animated pulse indicator dot.
**HTML:**
```html
Neon Dark Navbar
Hover the nav links to see the neon underline slide in. The glowing status dot uses a CSS keyframe. All glow effects are achieved with box-shadow and filter: drop-shadow.
```
**CSS:**
```css
.nav-07, .nav-07 *, .nav-07 *::before, .nav-07 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-07 {
--bg: #0a0a1a;
--border: rgba(0,245,255,0.2);
--text: #e0e8ff;
--muted: rgba(224,232,255,0.45);
--cyan: #00f5ff;
--magenta: #ff00cc;
--green: #00ff88;
font-family: 'Orbitron', monospace;
background: var(--bg);
border-bottom: 1px solid var(--border);
position: sticky; top: 0; z-index: 100;
box-shadow: 0 0 40px rgba(0,245,255,0.05), 0 1px 0 rgba(0,245,255,0.15);
}
.nav-07__inner {
max-width: 1200px; margin: 0 auto;
padding: 0 2rem;
display: flex; align-items: center;
height: 64px; gap: 2rem;
}
.nav-07__logo {
font-weight: 900; font-size: 1.1rem;
text-decoration: none; letter-spacing: 0.1em;
text-transform: uppercase;
background: linear-gradient(90deg, var(--cyan), var(--magenta));
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
filter: drop-shadow(0 0 8px rgba(0,245,255,0.5));
flex-shrink: 0;
transition: filter 0.3s;
}
.nav-07__logo:hover { filter: drop-shadow(0 0 16px rgba(0,245,255,0.9)); }
.nav-07__links {
display: flex; list-style: none; gap: 0; flex: 1;
}
.nav-07__links a {
display: block;
color: var(--muted);
text-decoration: none; font-size: 0.7rem; font-weight: 600;
letter-spacing: 0.12em; text-transform: uppercase;
padding: 0.5rem 1rem;
border-radius: 4px;
position: relative;
transition: color 0.25s;
}
.nav-07__links a::before {
content: '';
position: absolute; bottom: 6px; left: 50%; right: 50%;
height: 1px;
background: var(--cyan);
box-shadow: 0 0 6px var(--cyan), 0 0 12px var(--cyan);
transition: left 0.25s, right 0.25s;
}
.nav-07__links a:hover { color: var(--cyan); }
.nav-07__links a:hover::before { left: 1rem; right: 1rem; }
.nav-07__links a.is-active { color: var(--cyan); }
.nav-07__links a.is-active::before { left: 1rem; right: 1rem; }
.nav-07__status {
display: flex; align-items: center; gap: 0.5rem;
font-size: 0.65rem; letter-spacing: 0.1em;
color: var(--green);
border: 1px solid rgba(0,255,136,0.3);
padding: 0.3rem 0.75rem;
border-radius: 4px;
background: rgba(0,255,136,0.05);
flex-shrink: 0;
}
.nav-07__status::before {
content: '';
width: 6px; height: 6px;
border-radius: 50%;
background: var(--green);
box-shadow: 0 0 6px var(--green), 0 0 12px var(--green);
animation: nav-07-pulse 2s ease-in-out infinite;
}
@keyframes nav-07-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.3; }
}
.nav-07__btn {
padding: 0.45rem 1.3rem;
border: 1px solid var(--cyan);
border-radius: 4px; font-size: 0.65rem; font-weight: 700;
letter-spacing: 0.12em; text-transform: uppercase;
cursor: pointer; font-family: inherit;
background: transparent; color: var(--cyan);
box-shadow: 0 0 8px rgba(0,245,255,0.2), inset 0 0 8px rgba(0,245,255,0.05);
transition: box-shadow 0.25s, background 0.25s, color 0.25s;
flex-shrink: 0;
}
.nav-07__btn:hover {
background: rgba(0,245,255,0.1);
box-shadow: 0 0 20px rgba(0,245,255,0.5), inset 0 0 20px rgba(0,245,255,0.1);
color: #fff;
}
/* Mobile */
#nav-07-toggle { display: none; }
.nav-07__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; border: none; background: transparent; margin-left: auto; }
.nav-07__hamburger span { display: block; width: 22px; height: 1.5px; background: var(--cyan); box-shadow: 0 0 4px var(--cyan); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
#nav-07-toggle:checked ~ .nav-07__inner .nav-07__hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#nav-07-toggle:checked ~ .nav-07__inner .nav-07__hamburger span:nth-child(2) { opacity: 0; }
#nav-07-toggle:checked ~ .nav-07__inner .nav-07__hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-07__mobile {
display: none; flex-direction: column; gap: 0.25rem;
background: #0a0a1a; padding: 1rem 1.5rem;
border-bottom: 1px solid rgba(0,245,255,0.15);
}
.nav-07__mobile a { display: block; color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.65rem 0.5rem; border-bottom: 1px solid rgba(0,245,255,0.08); transition: color 0.2s, padding-left 0.2s; }
.nav-07__mobile a:last-child { border-bottom: none; }
.nav-07__mobile a:hover { color: var(--cyan); padding-left: 1rem; }
#nav-07-toggle:checked ~ .nav-07__mobile { display: flex; }
@media (max-width: 768px) {
.nav-07__links, .nav-07__status, .nav-07__btn { display: none; }
.nav-07__hamburger { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-07__status::before { animation: none; }
.nav-07__links a::before, .nav-07__logo, .nav-07__btn { transition: none; }
.nav-07__hamburger span { transition: none; }
}
```
### 08. CSS Breadcrumb Reading Progress Navbar
**Type:** CSS + JS
**Description:** Dual-row navbar with an auto-updating breadcrumb trail and a thin color-fill reading progress bar driven by scroll position.
**HTML:**
```html
Breadcrumb + Reading Progress Navbar
Scroll this page to see the green reading progress bar fill up. The bar width is set by JavaScript reading scrollY / (documentHeight - viewportHeight).
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
```
**CSS:**
```css
.nav-08, .nav-08 *, .nav-08 *::before, .nav-08 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-08 {
--bg: #fff;
--border: #e4e4e0;
--text: #111110;
--muted: #78716c;
--accent: #10b981;
--progress-bg: #e4e4e0;
font-family: 'IBM Plex Sans', sans-serif;
position: sticky; top: 0; z-index: 100;
background: var(--bg);
border-bottom: 1px solid var(--border);
}
/* Read progress bar at very top */
.nav-08__progress-track {
height: 3px;
background: var(--progress-bg);
position: relative;
}
.nav-08__progress-bar {
height: 100%;
background: linear-gradient(90deg, #10b981, #06d6a0, #34d399);
width: 0%;
transition: width 0.1s linear;
position: relative;
}
.nav-08__progress-bar::after {
content: '';
position: absolute; right: -1px; top: -1px;
width: 5px; height: 5px;
border-radius: 50%;
background: #06d6a0;
box-shadow: 0 0 6px #06d6a0;
}
/* Main nav */
.nav-08__main {
display: flex; align-items: center;
padding: 0 2rem;
height: 56px;
gap: 0;
}
.nav-08__logo {
font-weight: 700; font-size: 1.1rem;
color: var(--text); text-decoration: none;
letter-spacing: -0.02em;
margin-right: 1.5rem;
flex-shrink: 0;
}
/* Breadcrumb */
.nav-08__crumbs {
display: flex; align-items: center; gap: 0;
list-style: none;
flex: 1;
overflow: hidden;
}
.nav-08__crumbs li {
display: flex; align-items: center;
font-size: 0.875rem;
white-space: nowrap;
}
.nav-08__crumbs li + li::before {
content: '/';
color: #d4d4d0;
margin: 0 0.5rem;
font-size: 0.8rem;
}
.nav-08__crumbs a {
color: var(--muted); text-decoration: none; font-weight: 500;
padding: 0.25rem 0.5rem; border-radius: 4px;
transition: color 0.15s, background 0.15s;
}
.nav-08__crumbs a:hover { color: var(--text); background: #f4f4f2; }
.nav-08__crumbs li:last-child a,
.nav-08__crumbs li:last-child span {
color: var(--text); font-weight: 600;
pointer-events: none;
}
.nav-08__sep { width: 1px; height: 24px; background: var(--border); margin: 0 1.25rem; flex-shrink: 0; }
/* Section nav */
.nav-08__sections {
display: flex; list-style: none; gap: 0;
overflow-x: auto; scrollbar-width: none;
}
.nav-08__sections::-webkit-scrollbar { display: none; }
.nav-08__sections a {
display: block;
color: var(--muted); text-decoration: none; font-size: 0.8rem; font-weight: 500;
padding: 0.35rem 0.85rem; border-radius: 999px;
transition: color 0.15s, background 0.15s;
white-space: nowrap;
}
.nav-08__sections a:hover { color: var(--text); background: #f4f4f2; }
.nav-08__sections a.is-active { color: var(--accent); background: rgba(16,185,129,0.08); font-weight: 600; }
/* Right */
.nav-08__actions { margin-left: auto; flex-shrink: 0; display: flex; gap: 0.5rem; align-items: center; }
.nav-08__time { font-size: 0.775rem; color: var(--muted); }
.nav-08__edit {
padding: 0.35rem 0.85rem; border-radius: 6px;
font-size: 0.775rem; font-weight: 600;
cursor: pointer; border: 1px solid var(--border);
font-family: inherit; color: var(--text); background: transparent;
transition: background 0.15s, border-color 0.15s;
}
.nav-08__edit:hover { background: #f4f4f2; border-color: #ccc; }
/* Mobile */
#nav-08-toggle { display: none; }
.nav-08__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; border: none; background: transparent; }
.nav-08__hamburger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
#nav-08-toggle:checked ~ .nav-08__main .nav-08__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-08-toggle:checked ~ .nav-08__main .nav-08__hamburger span:nth-child(2) { opacity: 0; }
#nav-08-toggle:checked ~ .nav-08__main .nav-08__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-08__mobile { display: none; flex-direction: column; gap: 0; padding: 0.75rem 1.5rem 1rem; border-top: 1px solid var(--border); }
.nav-08__mobile a { display: block; color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; padding: 0.6rem 0.5rem; border-radius: 6px; }
.nav-08__mobile a:hover { background: #f4f4f2; color: var(--text); }
#nav-08-toggle:checked ~ .nav-08__mobile { display: flex; }
@media (max-width: 768px) {
.nav-08__crumbs li:not(:first-child):not(:last-child) { display: none; }
.nav-08__sep, .nav-08__sections, .nav-08__time { display: none; }
.nav-08__hamburger { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-08__progress-bar { transition: none; }
.nav-08__hamburger span { transition: none; }
}
```
**JS:**
```js
const bar = document.getElementById('nav08Progress');
function updateProgress() {
const scrolled = window.scrollY;
const total = document.documentElement.scrollHeight - window.innerHeight;
const pct = total > 0 ? (scrolled / total) * 100 : 0;
bar.style.width = pct + '%';
}
window.addEventListener('scroll', updateProgress, { passive: true });
updateProgress();
```
### 09. CSS Split Two-Tone Navbar
**Type:** Pure CSS
**Description:** Split-color navbar with dark left branding panel and light right links panel — bold editorial contrast layout.
**HTML:**
```html
Split Two-Tone Navbar
The angled divider between the dark and yellow sections is achieved with clip-path: polygon() — no pseudo-elements, no borders. The skew angle is 24px offset on the left and right panels.
```
**CSS:**
```css
.nav-09, .nav-09 *, .nav-09 *::before, .nav-09 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-09 {
--left-bg: #1a1a2e;
--right-bg: #f7c948;
--left-text: #f0eeff;
--right-text: #1a1a2e;
--accent: #f7c948;
font-family: 'Space Grotesk', sans-serif;
display: grid;
grid-template-columns: auto 1fr auto;
height: 68px;
position: sticky; top: 0; z-index: 100;
overflow: hidden;
}
.nav-09__left {
background: var(--left-bg);
display: flex; align-items: center;
padding: 0 2.5rem;
clip-path: polygon(0 0, 100% 0, calc(100% - 24px) 100%, 0 100%);
min-width: 220px;
}
.nav-09__logo {
font-weight: 700; font-size: 1.2rem;
color: var(--left-text); text-decoration: none;
letter-spacing: -0.02em;
white-space: nowrap;
}
.nav-09__logo span { color: var(--accent); }
.nav-09__center {
background: var(--left-bg);
display: flex; align-items: center; justify-content: center;
gap: 0;
}
.nav-09__links {
display: flex; list-style: none; gap: 0;
}
.nav-09__links a {
display: block;
color: rgba(240,238,255,0.6);
text-decoration: none; font-size: 0.875rem; font-weight: 500;
padding: 0.5rem 1.1rem; border-radius: 6px;
transition: color 0.2s, background 0.2s;
}
.nav-09__links a:hover { color: var(--left-text); background: rgba(255,255,255,0.08); }
.nav-09__links a.is-active { color: var(--accent); font-weight: 600; }
.nav-09__right {
background: var(--right-bg);
display: flex; align-items: center;
padding: 0 2rem 0 2.5rem;
gap: 0.75rem;
clip-path: polygon(24px 0, 100% 0, 100% 100%, 0 100%);
}
.nav-09__btn {
padding: 0.45rem 1.2rem;
border-radius: 6px; font-size: 0.875rem; font-weight: 700;
cursor: pointer; border: none; font-family: inherit;
transition: all 0.2s;
}
.nav-09__btn--ghost {
background: rgba(26,26,46,0.1); color: var(--right-text);
border: 1.5px solid rgba(26,26,46,0.2);
}
.nav-09__btn--ghost:hover { background: rgba(26,26,46,0.18); }
.nav-09__btn--dark { background: var(--left-bg); color: var(--left-text); }
.nav-09__btn--dark:hover { background: #2a2a4e; transform: translateY(-1px); }
/* Mobile */
#nav-09-toggle { display: none; }
.nav-09__mobile-bar {
display: none;
position: sticky; top: 0; z-index: 100;
background: #1a1a2e;
height: 60px; padding: 0 1.5rem;
align-items: center; justify-content: space-between;
}
.nav-09__mobile-logo { font-weight: 700; font-size: 1.1rem; color: #f0eeff; text-decoration: none; letter-spacing: -0.02em; }
.nav-09__mobile-logo span { color: #f7c948; }
.nav-09__hamburger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; border: none; background: transparent; padding: 8px; }
.nav-09__hamburger span { display: block; width: 22px; height: 2px; background: #f0eeff; border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
#nav-09-toggle:checked ~ .nav-09__mobile-bar .nav-09__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-09-toggle:checked ~ .nav-09__mobile-bar .nav-09__hamburger span:nth-child(2) { opacity: 0; }
#nav-09-toggle:checked ~ .nav-09__mobile-bar .nav-09__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-09__mobile-menu {
display: none; flex-direction: column;
background: #1a1a2e; padding: 0.75rem 1.5rem 1.25rem;
position: sticky; top: 60px; z-index: 99;
border-bottom: 3px solid #f7c948;
}
.nav-09__mobile-menu a { display: block; color: rgba(240,238,255,0.7); text-decoration: none; font-size: 0.95rem; font-weight: 500; padding: 0.65rem 0.5rem; border-radius: 6px; transition: color 0.2s, background 0.2s; }
.nav-09__mobile-menu a:hover { color: #f7c948; background: rgba(247,201,72,0.08); padding-left: 1rem; }
.nav-09__mobile-menu a:last-child { color: #f7c948; font-weight: 700; margin-top: 0.5rem; }
#nav-09-toggle:checked ~ .nav-09__mobile-menu { display: flex; }
@media (max-width: 768px) {
.nav-09 { display: none; }
.nav-09__mobile-bar { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-09__btn, .nav-09__links a { transition: none; }
.nav-09__hamburger span { transition: none; }
.nav-09__mobile-menu a { transition: none; }
}
```
### 10. CSS Bottom Tab Bar Navigation
**Type:** Pure CSS
**Description:** Mobile-first fixed bottom tab bar with icon + label layout, active fill highlight, and animated indicator dot.
**HTML:**
```html
Bottom Tab Bar Navigation
On desktop you see a standard horizontal navbar. Resize below 768px to see the iOS-style bottom tab bar with a floating action button in the center. The FAB uses a negative translateY to lift above the bar.
```
**CSS:**
```css
.nav-10, .nav-10 *, .nav-10 *::before, .nav-10 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-10 {
--bg: #fff;
--text: #1e1b4b;
--muted: #9ca3af;
--accent: #6366f1;
--accent-light: #eef2ff;
font-family: 'Nunito', sans-serif;
}
/* Top desktop nav */
.nav-10__desktop {
background: var(--bg);
border-bottom: 1px solid #e5e7eb;
padding: 0 2rem;
display: flex; align-items: center; height: 64px;
gap: 2rem;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.nav-10__logo {
font-weight: 800; font-size: 1.2rem; color: var(--text);
text-decoration: none; letter-spacing: -0.02em; flex-shrink: 0;
}
.nav-10__logo span { color: var(--accent); }
.nav-10__desktop-links { display: flex; list-style: none; gap: 0; flex: 1; }
.nav-10__desktop-links a {
display: flex; align-items: center; gap: 6px;
color: var(--muted); text-decoration: none; font-size: 0.875rem; font-weight: 600;
padding: 0.5rem 0.9rem; border-radius: 8px;
transition: background 0.15s, color 0.15s;
}
.nav-10__desktop-links a:hover { background: var(--accent-light); color: var(--accent); }
.nav-10__desktop-links a.is-active { color: var(--accent); background: var(--accent-light); }
.nav-10__desktop-actions { margin-left: auto; display: flex; gap: 0.75rem; }
.nav-10__desktop-btn {
padding: 0.45rem 1.1rem; border-radius: 8px;
font-size: 0.875rem; font-weight: 700; cursor: pointer; border: none;
font-family: inherit; background: var(--accent); color: #fff;
transition: background 0.2s, transform 0.15s;
}
.nav-10__desktop-btn:hover { background: #4f46e5; transform: translateY(-1px); }
/* Bottom tab bar */
.nav-10__tab-bar {
position: fixed; bottom: 0; left: 0; right: 0;
background: var(--bg);
border-top: 1px solid #e5e7eb;
display: none;
padding: 0 0.5rem;
padding-bottom: env(safe-area-inset-bottom, 0);
z-index: 200;
box-shadow: 0 -4px 20px rgba(0,0,0,0.07);
}
.nav-10__tabs {
display: flex;
list-style: none;
height: 60px;
}
.nav-10__tabs li { flex: 1; }
.nav-10__tab {
display: flex; flex-direction: column;
align-items: center; justify-content: center;
gap: 3px;
height: 100%;
text-decoration: none;
color: var(--muted);
font-size: 0.625rem; font-weight: 700;
letter-spacing: 0.02em;
border-radius: 8px;
transition: color 0.2s;
position: relative;
}
.nav-10__tab-icon {
font-size: 1.25rem;
display: flex; align-items: center; justify-content: center;
width: 36px; height: 28px;
border-radius: 999px;
transition: background 0.2s, transform 0.2s;
}
.nav-10__tab:hover { color: var(--text); }
.nav-10__tab:hover .nav-10__tab-icon { background: #f3f4f6; }
.nav-10__tab.is-active { color: var(--accent); }
.nav-10__tab.is-active .nav-10__tab-icon {
background: var(--accent-light);
transform: translateY(-2px);
}
.nav-10__tab-badge {
position: absolute; top: 8px; right: calc(50% - 22px);
background: #ef4444; color: #fff;
font-size: 0.55rem; font-weight: 800;
padding: 1px 5px; border-radius: 999px;
min-width: 16px; text-align: center;
border: 2px solid var(--bg);
}
/* Center FAB tab */
.nav-10__tab--fab .nav-10__tab-icon {
background: linear-gradient(135deg, #6366f1, #8b5cf6);
color: #fff;
font-size: 1.4rem;
width: 44px; height: 40px;
border-radius: 14px;
box-shadow: 0 4px 12px rgba(99,102,241,0.45);
transform: translateY(-8px);
}
.nav-10__tab--fab { color: var(--accent); }
.nav-10__tab--fab:hover .nav-10__tab-icon { transform: translateY(-10px) scale(1.05); }
.nav-10__content { padding: 2rem; }
@media (max-width: 768px) {
.nav-10__desktop { display: none; }
.nav-10__tab-bar { display: block; }
.nav-10__content { padding-bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) {
.nav-10__tab-icon, .nav-10__tab { transition: none; }
.nav-10__desktop-btn { transition: none; }
}
```
### 11. CSS Gradient Border Animated Navbar
**Type:** Pure CSS
**Description:** Transparent navbar with a rotating conic-gradient animated bottom border and shimmer hover effects on links.
**HTML:**
```html
Gradient Border Navbar
The animated gradient border uses an ::before pseudo-element positioned 1px outside the card with a border-radius that's 1px larger. The card itself sits on top with a dark semi-transparent background.
```
**CSS:**
```css
.nav-11, .nav-11 *, .nav-11 *::before, .nav-11 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-11 {
--text: #f5f0ff;
--muted: rgba(245,240,255,0.5);
--grad-a: #c026d3;
--grad-b: #7c3aed;
--grad-c: #2563eb;
font-family: 'Raleway', sans-serif;
padding: 1.25rem 2rem;
position: sticky; top: 0; z-index: 100;
}
.nav-11__bar {
max-width: 1100px; margin: 0 auto;
display: flex; align-items: center; gap: 1.5rem;
background: rgba(10,0,22,0.6);
backdrop-filter: blur(20px);
border-radius: 16px;
padding: 0.5rem 0.5rem 0.5rem 1.5rem;
position: relative;
}
/* Gradient border via pseudo-element */
.nav-11__bar::before {
content: '';
position: absolute; inset: -1px;
border-radius: 17px;
background: linear-gradient(135deg, var(--grad-a), var(--grad-b), var(--grad-c));
z-index: -1;
animation: nav-11-rotategrad 4s linear infinite;
}
@keyframes nav-11-rotategrad {
0% { background: linear-gradient(135deg, #c026d3, #7c3aed, #2563eb); }
25% { background: linear-gradient(225deg, #c026d3, #7c3aed, #2563eb); }
50% { background: linear-gradient(315deg, #c026d3, #7c3aed, #2563eb); }
75% { background: linear-gradient(45deg, #c026d3, #7c3aed, #2563eb); }
100% { background: linear-gradient(135deg, #c026d3, #7c3aed, #2563eb); }
}
.nav-11__logo {
font-weight: 800; font-size: 1.2rem; color: var(--text);
text-decoration: none; letter-spacing: -0.02em; flex-shrink: 0;
}
.nav-11__logo em {
font-style: normal;
background: linear-gradient(90deg, #c026d3, #7c3aed);
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-11__links { display: flex; list-style: none; gap: 0.25rem; flex: 1; }
.nav-11__links a {
display: block; color: var(--muted); text-decoration: none;
font-size: 0.875rem; font-weight: 600;
padding: 0.45rem 0.9rem; border-radius: 10px;
transition: color 0.2s, background 0.2s;
}
.nav-11__links a:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.nav-11__links a.is-active { color: var(--text); }
.nav-11__btn {
padding: 0.55rem 1.3rem; border-radius: 10px;
font-size: 0.875rem; font-weight: 700;
cursor: pointer; border: none; font-family: inherit;
background: linear-gradient(135deg, #c026d3, #7c3aed);
color: #fff; flex-shrink: 0;
box-shadow: 0 4px 20px rgba(124,58,237,0.4);
transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
}
.nav-11__btn:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(124,58,237,0.55); }
/* Mobile */
#nav-11-toggle { display: none; }
.nav-11__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; border: none; background: transparent; }
.nav-11__hamburger span { display: block; width: 20px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
#nav-11-toggle:checked ~ .nav-11__bar .nav-11__hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#nav-11-toggle:checked ~ .nav-11__bar .nav-11__hamburger span:nth-child(2) { opacity: 0; }
#nav-11-toggle:checked ~ .nav-11__bar .nav-11__hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-11__mobile {
display: none; flex-direction: column; gap: 0.25rem;
background: rgba(15,5,30,0.95); backdrop-filter: blur(20px);
padding: 0.75rem 1rem 1rem;
border-radius: 0 0 12px 12px;
margin-top: -8px; position: relative; z-index: -1;
border: 1px solid rgba(124,58,237,0.2); border-top: none;
}
.nav-11__mobile a { display: block; color: rgba(245,240,255,0.7); text-decoration: none; font-size: 0.9rem; font-weight: 600; padding: 0.6rem 0.75rem; border-radius: 8px; transition: background 0.15s, color 0.15s; }
.nav-11__mobile a:hover { background: rgba(124,58,237,0.15); color: var(--text); }
#nav-11-toggle:checked ~ .nav-11__mobile { display: flex; }
@media (max-width: 640px) {
.nav-11__links, .nav-11__btn { display: none; }
.nav-11__hamburger { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-11__bar::before { animation: none; background: linear-gradient(135deg, #c026d3, #7c3aed, #2563eb); }
.nav-11__btn, .nav-11__hamburger span { transition: none; }
}
```
### 12. CSS Centered Logo Navbar
**Type:** Pure CSS
**Description:** Classic agency-style navbar with centered logo, symmetrical link groups left and right, and outlined CTA button.
**HTML:**
```html
Centered Logo Navbar
A luxury brand–style navbar using CSS Grid with 1fr auto 1fr columns to perfectly center the logo while allowing left and right link groups to fill equal space.
```
**CSS:**
```css
.nav-12, .nav-12 *, .nav-12 *::before, .nav-12 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-12 {
--bg: #faf8f5;
--text: #1a1612;
--muted: #8c8070;
--accent: #c4a55a;
--border: #e8e0d4;
font-family: 'Jost', sans-serif;
background: var(--bg);
border-bottom: 1px solid var(--border);
position: sticky; top: 0; z-index: 100;
}
.nav-12__bar {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
padding: 0 2.5rem;
height: 72px;
}
.nav-12__left {
display: flex; align-items: center; gap: 0;
list-style: none;
}
.nav-12__left a {
color: var(--muted); text-decoration: none;
font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
padding: 0.5rem 1rem; border-radius: 4px;
transition: color 0.2s;
white-space: nowrap;
}
.nav-12__left a:hover { color: var(--text); }
.nav-12__left a.is-active { color: var(--text); }
.nav-12__logo-wrap {
text-align: center; padding: 0 1.5rem;
}
.nav-12__logo {
font-family: 'Cormorant Garamond', serif;
font-weight: 600; font-size: 1.5rem;
color: var(--text); text-decoration: none;
letter-spacing: 0.08em;
display: block;
white-space: nowrap;
}
.nav-12__logo-sub {
font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
color: var(--accent); font-family: 'Jost', sans-serif; font-weight: 500;
display: block; margin-top: -2px;
}
.nav-12__right {
display: flex; align-items: center; justify-content: flex-end; gap: 0;
list-style: none;
}
.nav-12__right a {
color: var(--muted); text-decoration: none;
font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
padding: 0.5rem 1rem; border-radius: 4px;
transition: color 0.2s;
white-space: nowrap;
}
.nav-12__right a:hover { color: var(--text); }
.nav-12__right a.is-cta {
color: var(--accent); border: 1px solid var(--accent);
border-radius: 4px; padding: 0.4rem 0.9rem;
transition: background 0.2s, color 0.2s;
}
.nav-12__right a.is-cta:hover { background: var(--accent); color: var(--bg); }
/* Mobile */
#nav-12-toggle { display: none; }
.nav-12__mobile-bar {
display: none;
align-items: center; justify-content: space-between;
padding: 0 1.5rem; height: 60px;
}
.nav-12__mobile-logo { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 1.3rem; color: var(--text); text-decoration: none; letter-spacing: 0.08em; }
.nav-12__hamburger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; border: none; background: transparent; padding: 6px; }
.nav-12__hamburger span { display: block; width: 20px; height: 1px; background: var(--text); border-radius: 1px; transition: transform 0.3s, opacity 0.3s; }
#nav-12-toggle:checked ~ .nav-12__mobile-bar .nav-12__hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
#nav-12-toggle:checked ~ .nav-12__mobile-bar .nav-12__hamburger span:nth-child(2) { opacity: 0; }
#nav-12-toggle:checked ~ .nav-12__mobile-bar .nav-12__hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-12__mobile-menu {
display: none; flex-direction: column; gap: 0;
padding: 0.75rem 1.5rem 1.25rem; border-top: 1px solid var(--border);
}
.nav-12__mobile-menu a { display: block; color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.7rem 0.5rem; border-bottom: 1px solid rgba(232,224,212,0.5); transition: color 0.2s; }
.nav-12__mobile-menu a:last-child { border-bottom: none; }
.nav-12__mobile-menu a:hover { color: var(--text); }
#nav-12-toggle:checked ~ .nav-12__mobile-menu { display: flex; }
@media (max-width: 768px) {
.nav-12__bar { display: none; }
.nav-12__mobile-bar { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-12__hamburger span { transition: none; }
}
```
### 13. CSS Icon Dot Indicator Navbar
**Type:** Pure CSS
**Description:** Clean minimal navbar where the active link is marked by an animated accent dot appearing below the text.
**HTML:**
```html
Icon + Dot Indicator Navbar
Each icon tab shows a label below it. The active indicator is a small glowing dot beneath the active item, controlled by :has(a.is-active). Notification badge uses a positioned dot.
```
**CSS:**
```css
.nav-13, .nav-13 *, .nav-13 *::before, .nav-13 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-13 {
--bg: rgba(20,8,40,0.85);
--border: rgba(255,255,255,0.08);
--text: #f0e6ff;
--muted: rgba(240,230,255,0.4);
--accent: #d946ef;
--accent-glow: rgba(217,70,239,0.35);
font-family: 'Poppins', sans-serif;
display: flex;
justify-content: center;
padding: 1.5rem 1rem;
position: sticky; top: 0; z-index: 100;
}
.nav-13__bar {
display: flex; align-items: center; gap: 1.5rem;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 20px;
padding: 0.75rem 1.25rem;
backdrop-filter: blur(20px);
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.nav-13__logo {
font-weight: 700; font-size: 1rem; color: var(--text);
text-decoration: none; letter-spacing: -0.01em;
display: flex; align-items: center; gap: 8px;
}
.nav-13__logo-dot {
width: 8px; height: 8px; border-radius: 50%;
background: var(--accent);
box-shadow: 0 0 8px var(--accent-glow);
}
.nav-13__sep { width: 1px; height: 24px; background: var(--border); }
.nav-13__links {
display: flex; list-style: none; gap: 0.25rem;
}
.nav-13__links li { position: relative; }
.nav-13__links a {
display: flex; flex-direction: column; align-items: center; gap: 4px;
text-decoration: none;
padding: 0.4rem 0.85rem;
border-radius: 12px;
transition: background 0.2s;
min-width: 56px;
}
.nav-13__links a:hover { background: rgba(255,255,255,0.05); }
.nav-13__icon { font-size: 1.1rem; line-height: 1; }
.nav-13__label { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); transition: color 0.2s; }
.nav-13__links a:hover .nav-13__label { color: var(--text); }
.nav-13__links a.is-active { background: rgba(217,70,239,0.12); }
.nav-13__links a.is-active .nav-13__label { color: var(--accent); }
.nav-13__dot-ind {
position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
width: 4px; height: 4px; border-radius: 50%;
background: var(--accent);
box-shadow: 0 0 6px var(--accent-glow);
opacity: 0; transition: opacity 0.2s;
}
.nav-13__links a.is-active + .nav-13__dot-ind,
.nav-13__links li:has(a.is-active) .nav-13__dot-ind { opacity: 1; }
/* notif badge */
.nav-13__badge {
position: absolute; top: 4px; right: 8px;
width: 8px; height: 8px; border-radius: 50%;
background: #f43f5e;
border: 2px solid #14082808;
}
.nav-13__action {
padding: 0.5rem 1.1rem; border-radius: 12px;
font-size: 0.8rem; font-weight: 700;
cursor: pointer; border: none; font-family: inherit;
background: linear-gradient(135deg, #d946ef, #9333ea);
color: #fff;
box-shadow: 0 2px 12px var(--accent-glow);
transition: opacity 0.2s, transform 0.15s;
white-space: nowrap;
}
.nav-13__action:hover { opacity: 0.85; transform: scale(0.97); }
/* Mobile */
#nav-13-toggle { display: none; }
.nav-13__mobile-bar {
display: none; position: sticky; top: 0; z-index: 100;
background: rgba(20,8,40,0.9); backdrop-filter: blur(20px);
border-bottom: 1px solid var(--border);
padding: 0 1.5rem; height: 60px;
align-items: center; justify-content: space-between;
}
.nav-13__mobile-logo { font-weight: 700; font-size: 1rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.nav-13__hamburger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; border: none; background: transparent; padding: 8px; }
.nav-13__hamburger span { display: block; width: 20px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
#nav-13-toggle:checked ~ .nav-13__mobile-bar .nav-13__hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#nav-13-toggle:checked ~ .nav-13__mobile-bar .nav-13__hamburger span:nth-child(2) { opacity: 0; }
#nav-13-toggle:checked ~ .nav-13__mobile-bar .nav-13__hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-13__mobile-menu {
display: none; flex-direction: column; gap: 0.25rem;
background: rgba(20,8,40,0.97); backdrop-filter: blur(20px);
padding: 0.75rem 1.25rem 1rem; border-bottom: 1px solid var(--border);
position: sticky; top: 60px; z-index: 99;
}
.nav-13__mobile-menu a { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; padding: 0.65rem 0.75rem; border-radius: 10px; transition: background 0.15s, color 0.15s; }
.nav-13__mobile-menu a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
#nav-13-toggle:checked ~ .nav-13__mobile-menu { display: flex; }
@media (max-width: 640px) {
.nav-13 { display: none; }
.nav-13__mobile-bar { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-13__links a, .nav-13__action, .nav-13__dot-ind { transition: none; }
.nav-13__hamburger span { transition: none; }
}
```
### 14. CSS Full-Screen Overlay Menu
**Type:** CSS + JS
**Description:** Button-triggered full-viewport overlay menu with staggered link entrance animations and a blurred background.
**HTML:**
```html
Full-Screen Overlay Menu
Click the hamburger icon to see the full-screen overlay slide down. The overlay covers the entire viewport and displays large typographic navigation links. Hover each link to see it accent-colored and shift right.
```
**CSS:**
```css
.nav-14, .nav-14 *, .nav-14 *::before, .nav-14 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-14 {
--bg: #f0ede8;
--text: #1a1612;
--overlay: #1a1612;
--overlay-text: #f0ede8;
--accent: #e85d26;
font-family: 'DM Sans', sans-serif;
position: fixed; top: 0; left: 0; right: 0; z-index: 500;
}
.nav-14__bar {
display: flex; align-items: center; justify-content: space-between;
padding: 1.25rem 2rem;
position: relative; z-index: 510;
transition: color 0.4s;
}
.nav-14__logo {
font-family: 'Bebas Neue', sans-serif;
font-size: 1.6rem; letter-spacing: 0.1em;
text-decoration: none; color: var(--text);
transition: color 0.4s;
}
.nav-14.is-open .nav-14__logo { color: var(--overlay-text); }
.nav-14__toggle {
display: flex; flex-direction: column; gap: 6px;
cursor: pointer; padding: 8px; border: none; background: transparent;
width: 44px; height: 44px; justify-content: center;
border-radius: 50%;
transition: background 0.2s;
}
.nav-14__toggle:hover { background: rgba(0,0,0,0.06); }
.nav-14.is-open .nav-14__toggle:hover { background: rgba(255,255,255,0.1); }
.nav-14__toggle span {
display: block; width: 28px; height: 2px;
background: var(--text); border-radius: 2px;
transition: transform 0.4s cubic-bezier(.4,0,.2,1), opacity 0.3s, background 0.4s, width 0.3s;
}
.nav-14.is-open .nav-14__toggle span { background: var(--overlay-text); }
.nav-14.is-open .nav-14__toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-14.is-open .nav-14__toggle span:nth-child(2) { opacity: 0; width: 0; }
.nav-14.is-open .nav-14__toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
/* Overlay */
.nav-14__overlay {
position: fixed; inset: 0;
background: var(--overlay);
z-index: 505;
display: flex; flex-direction: column;
transform: translateY(-100%);
transition: transform 0.6s cubic-bezier(.4,0,.2,1);
padding: 100px 2.5rem 2.5rem;
}
.nav-14.is-open .nav-14__overlay { transform: translateY(0); }
.nav-14__nav-links {
list-style: none; flex: 1;
display: flex; flex-direction: column; justify-content: center;
}
.nav-14__nav-links li {
overflow: hidden;
border-bottom: 1px solid rgba(240,237,232,0.1);
}
.nav-14__nav-links li:first-child { border-top: 1px solid rgba(240,237,232,0.1); }
.nav-14__nav-links a {
display: flex; align-items: center; justify-content: space-between;
text-decoration: none;
padding: 1.25rem 0;
transition: padding-left 0.25s;
}
.nav-14__nav-links a:hover { padding-left: 1rem; }
.nav-14__nav-num {
font-size: 0.7rem; font-weight: 600; color: rgba(240,237,232,0.3);
letter-spacing: 0.1em; align-self: flex-start; padding-top: 0.5rem;
}
.nav-14__nav-title {
font-family: 'Bebas Neue', sans-serif;
font-size: clamp(2.5rem, 6vw, 5rem);
color: var(--overlay-text); letter-spacing: 0.04em;
line-height: 1; flex: 1; padding: 0 1rem;
transition: color 0.2s;
}
.nav-14__nav-links a:hover .nav-14__nav-title { color: var(--accent); }
.nav-14__nav-arrow { color: rgba(240,237,232,0.3); font-size: 1.5rem; transition: color 0.2s, transform 0.2s; }
.nav-14__nav-links a:hover .nav-14__nav-arrow { color: var(--accent); transform: translateX(4px); }
.nav-14__overlay-footer {
display: flex; justify-content: space-between; align-items: center;
padding-top: 1.5rem; border-top: 1px solid rgba(240,237,232,0.1);
}
.nav-14__social { display: flex; gap: 1.5rem; }
.nav-14__social a { color: rgba(240,237,232,0.4); text-decoration: none; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s; }
.nav-14__social a:hover { color: var(--overlay-text); }
.nav-14__contact { color: rgba(240,237,232,0.4); font-size: 0.8rem; letter-spacing: 0.04em; }
.nav-14__contact a { color: var(--accent); text-decoration: none; }
.nav-14__content { padding-top: 80px; padding: 100px 2rem 2rem; color: #1a1612; }
@media (prefers-reduced-motion: reduce) {
.nav-14__overlay { transition: none; }
.nav-14__toggle span { transition: none; }
.nav-14__nav-links a, .nav-14__logo, .nav-14__toggle span { transition: none; }
}
```
**JS:**
```js
const nav = document.getElementById('nav14');
const btn = document.getElementById('nav14Toggle');
btn.addEventListener('click', function() {
const isOpen = nav.classList.toggle('is-open');
btn.setAttribute('aria-expanded', isOpen);
document.body.style.overflow = isOpen ? 'hidden' : '';
});
```
### 15. CSS Morphing Search Expand Navbar
**Type:** CSS + JS
**Description:** Navbar with a search icon that morphs into a full-width input field using JS and CSS max-width transition.
**HTML:**
```html
Morphing Search Expand Navbar
Click the 🔍 icon to expand the search bar. It grows from 40px to 280px with a smooth width transition, the nav links fade out to give it room, and clicking outside collapses it.
```
**CSS:**
```css
.nav-15, .nav-15 *, .nav-15 *::before, .nav-15 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-15 {
--bg: #fff;
--text: #0f172a;
--muted: #64748b;
--accent: #3b82f6;
--accent-light: #eff6ff;
--border: #e2e8f0;
font-family: 'Figtree', sans-serif;
background: var(--bg);
border-bottom: 1px solid var(--border);
position: sticky; top: 0; z-index: 100;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.nav-15__inner {
max-width: 1200px; margin: 0 auto;
padding: 0 2rem;
display: flex; align-items: center;
height: 64px; gap: 1.5rem;
position: relative;
}
.nav-15__logo {
font-weight: 800; font-size: 1.2rem; color: var(--text);
text-decoration: none; letter-spacing: -0.03em; flex-shrink: 0;
}
.nav-15__logo span { color: var(--accent); }
.nav-15__links {
display: flex; list-style: none; gap: 0.25rem; flex: 1;
transition: opacity 0.3s, visibility 0.3s;
}
.nav-15__links a {
color: var(--muted); text-decoration: none; font-size: 0.875rem; font-weight: 600;
padding: 0.45rem 0.9rem; border-radius: 8px;
transition: color 0.15s, background 0.15s;
}
.nav-15__links a:hover { color: var(--text); background: var(--accent-light); }
.nav-15__links a.is-active { color: var(--accent); }
/* Search */
.nav-15__search-wrap {
display: flex; align-items: center; gap: 0.5rem; margin-left: auto;
}
.nav-15__search {
display: flex; align-items: center;
background: var(--accent-light);
border: 1.5px solid transparent;
border-radius: 10px;
overflow: hidden;
width: 40px;
transition: width 0.4s cubic-bezier(.4,0,.2,1), border-color 0.3s, background 0.3s;
}
.nav-15__search.is-expanded {
width: 280px;
border-color: var(--accent);
background: #fff;
}
.nav-15__search-btn {
width: 40px; height: 40px; flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
background: transparent; border: none; cursor: pointer;
color: var(--accent); font-size: 1rem;
border-radius: 10px;
transition: color 0.2s;
}
.nav-15__search-input {
flex: 1; border: none; outline: none; background: transparent;
font-family: inherit; font-size: 0.875rem; font-weight: 500;
color: var(--text); padding-right: 0.75rem;
opacity: 0; pointer-events: none;
transition: opacity 0.3s;
}
.nav-15__search.is-expanded .nav-15__search-input { opacity: 1; pointer-events: all; }
.nav-15__search-input::placeholder { color: var(--muted); }
/* When expanded, hide links */
.nav-15.is-searching .nav-15__links { opacity: 0; visibility: hidden; pointer-events: none; }
.nav-15__btn {
padding: 0.45rem 1.1rem; border-radius: 8px;
font-size: 0.875rem; font-weight: 700; cursor: pointer; border: none;
font-family: inherit; background: var(--accent); color: #fff;
transition: background 0.2s, transform 0.15s; flex-shrink: 0;
}
.nav-15__btn:hover { background: #2563eb; transform: translateY(-1px); }
/* Mobile */
#nav-15-toggle { display: none; }
.nav-15__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; border: none; background: transparent; }
.nav-15__hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
#nav-15-toggle:checked ~ .nav-15__inner .nav-15__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-15-toggle:checked ~ .nav-15__inner .nav-15__hamburger span:nth-child(2) { opacity: 0; }
#nav-15-toggle:checked ~ .nav-15__inner .nav-15__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-15__mobile { display: none; flex-direction: column; padding: 0.75rem 1.5rem 1rem; border-top: 1px solid var(--border); gap: 0.25rem; }
.nav-15__mobile a { display: block; color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; padding: 0.6rem 0.5rem; border-radius: 8px; transition: background 0.15s, color 0.15s; }
.nav-15__mobile a:hover { background: var(--accent-light); color: var(--accent); }
#nav-15-toggle:checked ~ .nav-15__mobile { display: flex; }
@media (max-width: 768px) {
.nav-15__links, .nav-15__btn { display: none; }
.nav-15__hamburger { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-15__search, .nav-15__links, .nav-15__search-input { transition: none; }
.nav-15__btn, .nav-15__hamburger span { transition: none; }
}
```
**JS:**
```js
const nav = document.getElementById('nav15');
const search = document.getElementById('nav15Search');
const btn = document.getElementById('nav15SearchBtn');
const input = document.getElementById('nav15SearchInput');
let open = false;
function openSearch() {
open = true;
search.classList.add('is-expanded');
nav.classList.add('is-searching');
setTimeout(() => input.focus(), 350);
}
function closeSearch() {
open = false;
search.classList.remove('is-expanded');
nav.classList.remove('is-searching');
input.value = '';
}
btn.addEventListener('click', function(e) {
e.stopPropagation();
open ? closeSearch() : openSearch();
});
document.addEventListener('click', function(e) {
if (open && !search.contains(e.target)) closeSearch();
});
input.addEventListener('keydown', function(e) {
if (e.key === 'Escape') closeSearch();
});
```
### 16. CSS Floating Island Multi-Segment Navbar
**Type:** Pure CSS
**Description:** Detached floating pill navbar with three independently styled segments for branding, links, and actions.
**HTML:**
```html
Join 12k+ members
Get started
Floating Island Multi-Segment Navbar
Three separate floating pill-shaped islands: logo, nav links, and CTA. Each uses backdrop-filter glass effect independently. The islands sit inside a flex row with justify-content: space-between.
```
**CSS:**
```css
.nav-16, .nav-16 *, .nav-16 *::before, .nav-16 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-16 {
--text: #1c2b0e;
--muted: rgba(28,43,14,0.45);
--accent: #4a8c2a;
--bg: rgba(255,255,255,0.85);
--border: rgba(28,43,14,0.1);
font-family: 'Plus Jakarta Sans', sans-serif;
padding: 1.25rem 1.5rem;
position: sticky; top: 0; z-index: 100;
display: flex; align-items: center; justify-content: space-between;
gap: 1rem;
}
/* Each section is its own floating island */
.nav-16__island {
background: var(--bg);
backdrop-filter: blur(20px) saturate(160%);
border: 1px solid var(--border);
border-radius: 999px;
box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,0.6) inset;
display: flex; align-items: center;
}
.nav-16__logo {
font-weight: 800; font-size: 1rem; color: var(--text);
text-decoration: none; letter-spacing: -0.02em;
padding: 0.6rem 1.3rem;
display: flex; align-items: center; gap: 8px;
}
.nav-16__logo-badge {
width: 8px; height: 8px; border-radius: 50%;
background: #6abf40;
box-shadow: 0 0 0 3px rgba(106,191,64,0.2);
}
.nav-16__links {
display: flex; list-style: none; gap: 0;
padding: 0.35rem;
}
.nav-16__links a {
display: block; color: var(--muted); text-decoration: none;
font-size: 0.85rem; font-weight: 600;
padding: 0.45rem 0.9rem; border-radius: 999px;
transition: color 0.2s, background 0.2s;
white-space: nowrap;
}
.nav-16__links a:hover { color: var(--text); background: rgba(74,140,42,0.08); }
.nav-16__links a.is-active { color: var(--accent); background: rgba(74,140,42,0.12); }
.nav-16__cta-island { gap: 0.5rem; padding: 0.35rem 0.35rem 0.35rem 1rem; }
.nav-16__cta-text { font-size: 0.8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.nav-16__cta-btn {
padding: 0.5rem 1.1rem; border-radius: 999px;
font-size: 0.85rem; font-weight: 700;
cursor: pointer; border: none; font-family: inherit;
background: var(--accent); color: #fff;
transition: background 0.2s, transform 0.15s;
box-shadow: 0 2px 8px rgba(74,140,42,0.35);
}
.nav-16__cta-btn:hover { background: #3a6e20; transform: scale(0.97); }
/* Mobile */
#nav-16-toggle { display: none; }
.nav-16__mobile-bar {
display: none; position: sticky; top: 0; z-index: 100;
padding: 1rem 1.25rem;
align-items: center; justify-content: space-between;
}
.nav-16__mobile-logo { font-weight: 800; font-size: 1rem; color: #1c2b0e; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.nav-16__hamburger {
display: flex; flex-direction: column; gap: 5px; cursor: pointer;
padding: 0.5rem 0.75rem; border: none;
background: rgba(255,255,255,0.85); border-radius: 999px;
border: 1px solid rgba(28,43,14,0.1);
backdrop-filter: blur(12px);
}
.nav-16__hamburger span { display: block; width: 18px; height: 1.5px; background: #1c2b0e; border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
#nav-16-toggle:checked ~ .nav-16__mobile-bar .nav-16__hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#nav-16-toggle:checked ~ .nav-16__mobile-bar .nav-16__hamburger span:nth-child(2) { opacity: 0; }
#nav-16-toggle:checked ~ .nav-16__mobile-bar .nav-16__hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-16__mobile-menu {
display: none; flex-direction: column; gap: 0.25rem;
background: rgba(255,255,255,0.9); backdrop-filter: blur(20px);
margin: 0 1.25rem; border-radius: 16px;
padding: 0.75rem 0.75rem 1rem;
border: 1px solid rgba(28,43,14,0.1);
box-shadow: 0 4px 24px rgba(0,0,0,0.08);
position: sticky; top: 70px; z-index: 99;
}
.nav-16__mobile-menu a { display: block; color: rgba(28,43,14,0.6); text-decoration: none; font-size: 0.9rem; font-weight: 600; padding: 0.6rem 0.75rem; border-radius: 10px; transition: background 0.15s, color 0.15s; }
.nav-16__mobile-menu a:hover { background: rgba(74,140,42,0.08); color: #4a8c2a; }
#nav-16-toggle:checked ~ .nav-16__mobile-menu { display: flex; }
@media (max-width: 768px) {
.nav-16 { display: none; }
.nav-16__mobile-bar { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-16__links a, .nav-16__cta-btn { transition: none; }
.nav-16__hamburger span { transition: none; }
}
```
### 17. CSS Step Progress Wizard Navbar
**Type:** Pure CSS
**Description:** Multi-step wizard header showing step numbers, titles, connector lines, and completion state in a horizontal flow.
**HTML:**
```html
Step 3 of 5 — Payment details
Save & exit
Step Progress Wizard Navbar
Used for multi-step forms and checkout flows. Completed steps show a green checkmark, the active step is purple-filled, and connector lines animate to filled when the previous step is done. Built entirely with CSS.
```
**CSS:**
```css
.nav-17, .nav-17 *, .nav-17 *::before, .nav-17 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-17 {
--bg: #fff;
--border: #e5e8f0;
--text: #1e2337;
--muted: #8891a8;
--accent: #5b4ef8;
--done: #22c55e;
--done-light: #f0fdf4;
--accent-light: #f0eeff;
font-family: 'Nunito Sans', sans-serif;
background: var(--bg);
border-bottom: 1px solid var(--border);
box-shadow: 0 1px 4px rgba(0,0,0,0.05);
position: sticky; top: 0; z-index: 100;
}
.nav-17__top {
display: flex; align-items: center; justify-content: space-between;
padding: 0.75rem 2rem;
border-bottom: 1px solid var(--border);
}
.nav-17__logo { font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.nav-17__logo span { color: var(--accent); }
.nav-17__help { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.875rem; font-weight: 600; text-decoration: none; transition: color 0.2s; }
.nav-17__help:hover { color: var(--text); }
/* Steps */
.nav-17__steps {
display: flex; align-items: center;
padding: 1rem 2rem;
overflow-x: auto; scrollbar-width: none;
}
.nav-17__steps::-webkit-scrollbar { display: none; }
.nav-17__step {
display: flex; align-items: center;
flex-shrink: 0;
}
.nav-17__step-content {
display: flex; align-items: center; gap: 0.75rem;
padding: 0.4rem 0.75rem;
border-radius: 10px;
cursor: pointer;
transition: background 0.15s;
}
.nav-17__step-content:hover { background: #f5f6fa; }
.nav-17__step-circle {
width: 32px; height: 32px; border-radius: 50%;
display: flex; align-items: center; justify-content: center;
font-size: 0.75rem; font-weight: 800;
flex-shrink: 0;
transition: background 0.3s, border-color 0.3s;
border: 2px solid var(--border);
color: var(--muted); background: var(--bg);
}
.nav-17__step.is-done .nav-17__step-circle {
background: var(--done); border-color: var(--done); color: #fff;
font-size: 0.9rem;
}
.nav-17__step.is-active .nav-17__step-circle {
background: var(--accent); border-color: var(--accent); color: #fff;
}
.nav-17__step-info { display: flex; flex-direction: column; gap: 1px; }
.nav-17__step-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.nav-17__step.is-done .nav-17__step-label { color: var(--done); }
.nav-17__step.is-active .nav-17__step-label { color: var(--accent); }
.nav-17__step-title { font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.nav-17__step.is-done .nav-17__step-title,
.nav-17__step.is-active .nav-17__step-title { color: var(--text); }
/* Connector line */
.nav-17__connector {
flex: 1; min-width: 2rem; max-width: 5rem;
height: 2px; margin: 0 0.25rem;
background: var(--border);
position: relative; border-radius: 2px;
}
.nav-17__connector::after {
content: '';
position: absolute; inset: 0;
background: var(--done);
border-radius: 2px;
transform: scaleX(0);
transform-origin: left;
transition: transform 0.5s;
}
.nav-17__step.is-done + .nav-17__connector::after { transform: scaleX(1); }
/* Progress summary */
.nav-17__summary {
display: flex; align-items: center; justify-content: space-between;
padding: 0.6rem 2rem;
background: var(--accent-light);
border-top: 1px solid rgba(91,78,248,0.1);
}
.nav-17__summary-text { font-size: 0.8rem; font-weight: 700; color: var(--accent); }
.nav-17__progress-bar-wrap { flex: 1; max-width: 200px; height: 6px; background: rgba(91,78,248,0.15); border-radius: 3px; margin: 0 1rem; }
.nav-17__progress-bar { height: 100%; border-radius: 3px; background: var(--accent); width: 40%; transition: width 0.5s; }
.nav-17__save { font-size: 0.8rem; font-weight: 700; color: var(--muted); text-decoration: none; cursor: pointer; background: none; border: none; font-family: inherit; transition: color 0.2s; }
.nav-17__save:hover { color: var(--text); }
@media (max-width: 640px) {
.nav-17__step-info { display: none; }
.nav-17__connector { min-width: 1rem; max-width: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
.nav-17__connector::after, .nav-17__progress-bar, .nav-17__step-circle { transition: none; }
}
```
### 18. CSS Vertical Rail Sidebar Navbar
**Type:** Pure CSS
**Description:** Persistent left-rail sidebar with icon + label vertical links, section dividers, and a collapsible bottom profile area.
**HTML:**
```html
```
**CSS:**
```css
.nav-18, .nav-18 *, .nav-18 *::before, .nav-18 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-18 {
--bg: #16181f;
--text: #e8eaf2;
--muted: rgba(232,234,242,0.4);
--accent: #f59e0b;
--border: rgba(255,255,255,0.07);
--collapsed-w: 64px;
--expanded-w: 220px;
font-family: 'Inter', sans-serif;
}
#nav-18-toggle { display: none; }
.nav-18__rail {
width: var(--collapsed-w);
min-height: 100vh;
background: var(--bg);
border-right: 1px solid var(--border);
display: flex; flex-direction: column;
transition: width 0.3s cubic-bezier(.4,0,.2,1);
overflow: hidden;
flex-shrink: 0;
position: sticky; top: 0; height: 100vh;
}
#nav-18-toggle:checked ~ .nav-18__layout .nav-18__rail { width: var(--expanded-w); }
.nav-18__rail-top {
height: 56px; display: flex; align-items: center;
padding: 0 0 0 0;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.nav-18__expand-btn {
width: 64px; height: 56px; flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
cursor: pointer; border: none; background: transparent;
color: var(--muted); font-size: 1.1rem;
transition: color 0.2s, background 0.2s;
}
.nav-18__expand-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-18__brand {
font-weight: 700; font-size: 0.95rem; color: var(--text);
text-decoration: none; letter-spacing: -0.02em;
white-space: nowrap; overflow: hidden;
opacity: 0; width: 0;
transition: opacity 0.2s, width 0.3s;
}
.nav-18__brand span { color: var(--accent); }
#nav-18-toggle:checked ~ .nav-18__layout .nav-18__brand { opacity: 1; width: auto; }
.nav-18__nav { flex: 1; padding: 0.75rem 0; overflow-y: auto; scrollbar-width: none; }
.nav-18__nav::-webkit-scrollbar { display: none; }
.nav-18__section-label {
font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
color: var(--muted); padding: 0.75rem 0 0.35rem;
white-space: nowrap; overflow: hidden; opacity: 0;
transition: opacity 0.2s;
padding-left: 1.25rem;
}
#nav-18-toggle:checked ~ .nav-18__layout .nav-18__section-label { opacity: 1; }
.nav-18__item {
display: flex; align-items: center; gap: 0;
text-decoration: none;
height: 44px; padding: 0;
color: var(--muted);
border-radius: 0; position: relative;
transition: color 0.2s;
overflow: hidden;
}
.nav-18__item:hover { color: var(--text); }
.nav-18__item.is-active { color: var(--accent); }
.nav-18__item.is-active::before {
content: '';
position: absolute; left: 0; top: 50%; transform: translateY(-50%);
width: 3px; height: 60%; background: var(--accent); border-radius: 0 2px 2px 0;
}
.nav-18__item:hover { background: rgba(255,255,255,0.03); }
.nav-18__icon {
width: 64px; height: 44px; flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
font-size: 1rem;
}
.nav-18__item-label {
font-size: 0.875rem; font-weight: 500;
white-space: nowrap; overflow: hidden;
opacity: 0; width: 0;
transition: opacity 0.2s, width 0.3s;
}
#nav-18-toggle:checked ~ .nav-18__layout .nav-18__item-label { opacity: 1; width: auto; }
.nav-18__item-badge {
margin-left: auto; margin-right: 1rem;
background: var(--accent); color: #1a1206;
font-size: 0.6rem; font-weight: 800; padding: 1px 5px; border-radius: 10px;
opacity: 0; transition: opacity 0.2s; white-space: nowrap;
}
#nav-18-toggle:checked ~ .nav-18__layout .nav-18__item-badge { opacity: 1; }
.nav-18__rail-bottom {
padding: 0.75rem 0;
border-top: 1px solid var(--border);
flex-shrink: 0;
}
.nav-18__avatar-wrap {
display: flex; align-items: center; gap: 0;
padding: 0.5rem 0; height: 52px;
overflow: hidden;
}
.nav-18__avatar {
width: 64px; height: 52px; flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
}
.nav-18__avatar-img {
width: 32px; height: 32px; border-radius: 50%;
background: linear-gradient(135deg, #f59e0b, #ef4444);
display: flex; align-items: center; justify-content: center;
font-size: 0.75rem; font-weight: 700; color: #fff;
}
.nav-18__user-info { white-space: nowrap; opacity: 0; transition: opacity 0.2s; }
#nav-18-toggle:checked ~ .nav-18__layout .nav-18__user-info { opacity: 1; }
.nav-18__user-name { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.nav-18__user-role { font-size: 0.7rem; color: var(--muted); }
/* Content */
.nav-18__layout { display: flex; flex: 1; min-width: 0; }
.nav-18__content {
flex: 1; padding: 2rem; color: var(--text);
min-width: 0;
}
@media (prefers-reduced-motion: reduce) {
.nav-18__rail, .nav-18__brand, .nav-18__item-label, .nav-18__item-badge,
.nav-18__section-label, .nav-18__user-info { transition: none; }
}
```
### 19. CSS Announcement Bar Dual Navbar
**Type:** CSS + JS
**Description:** Three-layer header: a dismissible announcement strip, a secondary utility bar, and the primary navigation row.
**HTML:**
```html
Announcement Bar + Dual Navbar
Three stacked bars: a dismissible announcement strip, a utility info row, and the main navigation. The dismiss button uses JavaScript to hide the announcement bar. Common e-commerce pattern.
```
**CSS:**
```css
.nav-19, .nav-19 *, .nav-19 *::before, .nav-19 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-19 {
--bg: #fff;
--text: #111;
--muted: #6b7280;
--accent: #7c3aed;
--announce-bg: #7c3aed;
--announce-text: #fff;
--border: #f0f0f0;
font-family: 'Rubik', sans-serif;
position: sticky; top: 0; z-index: 100;
}
/* Announcement bar */
.nav-19__announce {
background: var(--announce-bg);
color: var(--announce-text);
text-align: center;
padding: 0.5rem 2.5rem;
font-size: 0.8rem;
font-weight: 500;
position: relative;
display: flex; align-items: center; justify-content: center; gap: 1rem;
line-height: 1.4;
}
.nav-19__announce a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.nav-19__announce a:hover { opacity: 0.8; }
.nav-19__announce-close {
position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
width: 24px; height: 24px; border-radius: 50%;
background: rgba(255,255,255,0.2); border: none; cursor: pointer;
color: #fff; font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
transition: background 0.15s;
}
.nav-19__announce-close:hover { background: rgba(255,255,255,0.35); }
.nav-19__announce-emoji { font-size: 1rem; }
/* Utility bar */
.nav-19__utility {
background: #f9f9fa;
border-bottom: 1px solid var(--border);
display: flex; align-items: center; justify-content: space-between;
padding: 0.3rem 2rem;
font-size: 0.75rem; color: var(--muted); font-weight: 500;
}
.nav-19__utility-left { display: flex; gap: 1.25rem; }
.nav-19__utility-left span { display: flex; align-items: center; gap: 4px; }
.nav-19__utility-right { display: flex; gap: 1.25rem; align-items: center; }
.nav-19__utility-right a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.nav-19__utility-right a:hover { color: var(--text); }
/* Main nav */
.nav-19__main {
background: var(--bg);
border-bottom: 1px solid var(--border);
display: flex; align-items: center;
padding: 0 2rem;
height: 64px;
gap: 2rem;
}
.nav-19__logo {
font-weight: 800; font-size: 1.3rem; color: var(--text);
text-decoration: none; letter-spacing: -0.03em; flex-shrink: 0;
}
.nav-19__logo span { color: var(--accent); }
.nav-19__links {
display: flex; list-style: none; gap: 0; flex: 1;
}
.nav-19__links a {
display: block; color: var(--muted); text-decoration: none;
font-size: 0.875rem; font-weight: 500;
padding: 0.5rem 0.9rem; border-radius: 6px;
transition: color 0.15s, background 0.15s;
}
.nav-19__links a:hover { color: var(--text); background: #f4f4f8; }
.nav-19__links a.is-active { color: var(--accent); font-weight: 600; }
.nav-19__actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-19__cart {
display: flex; align-items: center; gap: 6px;
color: var(--muted); font-size: 0.875rem; font-weight: 600;
cursor: pointer; border: none; background: transparent;
font-family: inherit; padding: 0.45rem 0.75rem; border-radius: 8px;
transition: color 0.15s, background 0.15s; position: relative;
}
.nav-19__cart:hover { color: var(--text); background: #f4f4f8; }
.nav-19__cart-badge {
position: absolute; top: 2px; right: 4px;
width: 16px; height: 16px; border-radius: 50%;
background: var(--accent); color: #fff;
font-size: 0.6rem; font-weight: 800;
display: flex; align-items: center; justify-content: center;
}
.nav-19__btn {
padding: 0.45rem 1.1rem; border-radius: 8px;
font-size: 0.875rem; font-weight: 700; cursor: pointer; border: none;
font-family: inherit; background: var(--accent); color: #fff;
transition: background 0.2s, transform 0.15s;
}
.nav-19__btn:hover { background: #6d28d9; transform: translateY(-1px); }
/* Mobile */
#nav-19-toggle { display: none; }
.nav-19__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; border: none; background: transparent; margin-left: auto; }
.nav-19__hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
#nav-19-toggle:checked ~ .nav-19__main .nav-19__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-19-toggle:checked ~ .nav-19__main .nav-19__hamburger span:nth-child(2) { opacity: 0; }
#nav-19-toggle:checked ~ .nav-19__main .nav-19__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-19__mobile { display: none; flex-direction: column; gap: 0.25rem; padding: 0.75rem 1.5rem 1rem; border-top: 1px solid var(--border); background: var(--bg); }
.nav-19__mobile a { display: block; color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; padding: 0.6rem 0.5rem; border-radius: 6px; transition: background 0.15s, color 0.15s; }
.nav-19__mobile a:hover { background: #f4f4f8; color: var(--text); }
#nav-19-toggle:checked ~ .nav-19__mobile { display: flex; }
@media (max-width: 768px) {
.nav-19__links, .nav-19__actions, .nav-19__utility { display: none; }
.nav-19__hamburger { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-19__btn, .nav-19__links a, .nav-19__hamburger span { transition: none; }
}
```
**JS:**
```js
document.getElementById('announceDismiss').addEventListener('click', function() {
this.closest('.nav-19__announce').style.display = 'none';
});
```
### 20. CSS Scroll Spy Active Highlight Navbar
**Type:** CSS + JS
**Description:** IntersectionObserver scroll spy that moves a springy pill indicator to the active section link with a reading progress bar.
**HTML:**
```html
About
Scroll down to watch the navbar update
As you scroll through sections below, the active link shifts with a springy pill indicator. A reading progress bar also tracks how far through the page you are.
Work
Selected projects
The scroll spy uses IntersectionObserver to watch each section. When a section crosses the 25% threshold from the top, its matching nav link becomes active.
Services
What we do
The pill indicator moves with a springy CSS cubic-bezier bounce, giving it a physical feel without any animation libraries. Width transitions smoothly between links of different text lengths.
Team
Meet the crew
Four people, one shared obsession: making software feel inevitable. We're small by design — it keeps us fast, honest, and close to the work.
```
**CSS:**
```css
.nav-20, .nav-20 *, .nav-20 *::before, .nav-20 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.nav-20 {
--bg: #0d0d0d;
--text: #e8e4dc;
--text-muted: rgba(232,228,220,0.5);
--accent: #f0c14b;
--accent-bg: rgba(240,193,75,0.12);
--pill-h: 38px;
font-family: 'Bricolage Grotesque', sans-serif;
position: sticky;
top: 0;
z-index: 100;
}
.nav-20__bar {
background: var(--bg);
padding: 0 2rem;
height: 62px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-20__logo {
display: flex;
align-items: center;
gap: 10px;
text-decoration: none;
color: var(--text);
font-weight: 800;
font-size: 1.15rem;
letter-spacing: -0.03em;
flex-shrink: 0;
}
.nav-20__logo-mark {
width: 30px; height: 30px;
background: var(--accent);
border-radius: 6px;
display: grid; place-items: center;
font-size: 14px;
color: #0d0d0d;
}
.nav-20__links {
display: flex;
align-items: center;
list-style: none;
position: relative;
gap: 2px;
}
/* The sliding highlight pill */
.nav-20__indicator {
position: absolute;
top: 50%; transform: translateY(-50%);
height: var(--pill-h);
background: var(--accent-bg);
border: 1px solid rgba(240,193,75,0.25);
border-radius: 999px;
transition: left 0.35s cubic-bezier(0.34,1.56,0.64,1), width 0.35s cubic-bezier(0.34,1.56,0.64,1);
pointer-events: none;
z-index: 0;
}
.nav-20__links li {
position: relative;
z-index: 1;
}
.nav-20__links a {
display: flex;
align-items: center;
gap: 6px;
color: var(--text-muted);
text-decoration: none;
font-size: 0.875rem;
font-weight: 500;
padding: 0 14px;
height: var(--pill-h);
border-radius: 999px;
transition: color 0.2s;
white-space: nowrap;
letter-spacing: -0.01em;
}
.nav-20__links a .nav-20__dot {
width: 6px; height: 6px;
border-radius: 50%;
background: var(--accent);
opacity: 0;
transform: scale(0);
transition: opacity 0.25s, transform 0.25s;
}
.nav-20__links a.is-active {
color: var(--accent);
}
.nav-20__links a.is-active .nav-20__dot {
opacity: 1;
transform: scale(1);
}
.nav-20__links a:hover:not(.is-active) {
color: var(--text);
}
.nav-20__actions {
display: flex;
align-items: center;
gap: 10px;
flex-shrink: 0;
}
.nav-20__cta {
background: var(--accent);
color: #0d0d0d;
border: none;
border-radius: 999px;
padding: 0 18px;
height: 36px;
font-family: inherit;
font-size: 0.83rem;
font-weight: 700;
cursor: pointer;
transition: opacity 0.2s, transform 0.15s;
letter-spacing: -0.01em;
}
.nav-20__cta:hover { opacity: 0.88; transform: scale(1.03); }
.nav-20__ghost {
background: transparent;
color: var(--text-muted);
border: 1px solid rgba(255,255,255,0.12);
border-radius: 999px;
padding: 0 16px;
height: 36px;
font-family: inherit;
font-size: 0.83rem;
font-weight: 500;
cursor: pointer;
transition: border-color 0.2s, color 0.2s;
letter-spacing: -0.01em;
}
.nav-20__ghost:hover { border-color: rgba(255,255,255,0.3); color: var(--text); }
/* Progress bar */
.nav-20__progress {
height: 2px;
background: rgba(255,255,255,0.05);
position: relative;
overflow: hidden;
}
.nav-20__progress-fill {
height: 100%;
width: 0%;
background: var(--accent);
transition: width 0.1s linear;
}
/* Mobile toggle */
.nav-20__toggle { display: none; }
.nav-20__hamburger {
display: none;
flex-direction: column;
gap: 5px;
cursor: pointer;
padding: 6px;
}
.nav-20__hamburger span {
display: block;
width: 22px; height: 2px;
background: var(--text);
border-radius: 2px;
transition: transform 0.3s, opacity 0.3s, width 0.3s;
transform-origin: center;
}
.nav-20__toggle:checked ~ .nav-20__bar .nav-20__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-20__toggle:checked ~ .nav-20__bar .nav-20__hamburger span:nth-child(2) { opacity: 0; width: 0; }
.nav-20__toggle:checked ~ .nav-20__bar .nav-20__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-20__mobile {
display: none;
flex-direction: column;
background: var(--bg);
border-top: 1px solid rgba(255,255,255,0.06);
padding: 0.75rem 1rem 1rem;
}
.nav-20__mobile a {
display: flex; align-items: center; justify-content: space-between;
color: var(--text-muted);
text-decoration: none;
font-size: 0.9rem;
font-weight: 500;
padding: 0.65rem 0.75rem;
border-radius: 8px;
transition: background 0.2s, color 0.2s;
}
.nav-20__mobile a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-20__mobile a.is-active { color: var(--accent); }
.nav-20__mobile a.is-active::after { content: '●'; font-size: 0.5rem; }
.nav-20__mobile-actions {
display: flex; gap: 8px; padding: 0.75rem 0.75rem 0;
border-top: 1px solid rgba(255,255,255,0.06);
margin-top: 0.5rem;
}
.nav-20__mobile-actions button {
flex: 1; height: 38px; border-radius: 8px;
font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.nav-20__mobile-actions .m-cta { background: var(--accent); color: #0d0d0d; border: none; }
.nav-20__mobile-actions .m-ghost { background: transparent; color: var(--text-muted); border: 1px solid rgba(255,255,255,0.12); }
.nav-20__toggle:checked ~ .nav-20__mobile { display: flex; }
@media (max-width: 680px) {
.nav-20__links, .nav-20__actions { display: none !important; }
.nav-20__hamburger { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
.nav-20__indicator { transition: none; }
.nav-20__links a, .nav-20__links a .nav-20__dot,
.nav-20__cta, .nav-20__ghost,
.nav-20__hamburger span,
.nav-20__progress-fill { transition: none; }
}
```
**JS:**
```js
const links = document.querySelectorAll('#nav20Links a');
const mobileLinks = document.querySelectorAll('#nav20Mobile a:not(.m-ghost):not(.m-cta)');
const indicator = document.getElementById('nav20Indicator');
const linksContainer = document.getElementById('nav20Links');
const progress = document.getElementById('nav20Progress');
function moveIndicator(activeLink) {
if (!activeLink || !indicator) return;
const linkRect = activeLink.getBoundingClientRect();
const containerRect = linksContainer.getBoundingClientRect();
indicator.style.left = (linkRect.left - containerRect.left) + 'px';
indicator.style.width = linkRect.width + 'px';
}
function setActive(sectionId) {
links.forEach(function(a) {
const active = a.getAttribute('href') === '#' + sectionId;
a.classList.toggle('is-active', active);
if (active) moveIndicator(a);
});
mobileLinks.forEach(function(a) {
a.classList.toggle('is-active', a.getAttribute('href') === '#' + sectionId);
});
}
// Scroll progress
function updateProgress() {
const scrollTop = window.scrollY;
const docH = document.documentElement.scrollHeight - window.innerHeight;
const pct = docH > 0 ? Math.min(100, (scrollTop / docH) * 100) : 0;
progress.style.width = pct + '%';
}
// IntersectionObserver scroll spy
const sections = document.querySelectorAll('#sec-about, #sec-work, #sec-services, #sec-team, #sec-contact');
const observer = new IntersectionObserver(function(entries) {
entries.forEach(function(entry) {
if (entry.isIntersecting) setActive(entry.target.id);
});
}, { rootMargin: '-25% 0px -60% 0px', threshold: 0 });
sections.forEach(function(s) { observer.observe(s); });
window.addEventListener('scroll', updateProgress, { passive: true });
// Init indicator on first active link
const firstActive = linksContainer ? linksContainer.querySelector('a.is-active') : null;
if (firstActive) setTimeout(function() { moveIndicator(firstActive); }, 50);
window.addEventListener('resize', function() {
const cur = linksContainer ? linksContainer.querySelector('a.is-active') : null;
if (cur) moveIndicator(cur);
});
```
---
## 12 CSS Retro UI Designs
URL: https://codefronts.com/design-styles/css-retro-designs/
Description: 12 hand-coded retro / vintage UI designs covering the era-aesthetics search demand actually targets — pixel-faithful Windows 95 desktop in pure CSS (no framework dependency), CRT terminal with scanlines and boot reveal, 8-bit pixel-art buttons via box-shadow, neo-brutalism component toggle board, skeuomorphic cassette player, vaporwave scene with masked gradients, retro arcade game UI kit, working ASCII art bash interpreter, Web 1.0 / 90s guestbook with hit counter and webring, Y2K aqua-gloss kit, retro clothing-store storefront, and a draggable desktop-portfolio template. 10 truly pure-CSS, 2 with optional vanilla JS for the interactive bash + window-drag. Scoped class names that never collide, prefers-reduced-motion respected, MIT-licensed.
Demo count: 12
### 01. Retro Windows 95 UI (CSS Template)
**Type:** Pure CSS
**Description:** A pixel-faithful Windows 95 desktop rebuilt in pure CSS — raised/inset bevels via split border-colors, the conic-gradient Start orb, a checkbox-hack Start menu, draggable-looking title bars, dotted focus rings and a working taskbar with tray clock. Pixelify Sans + VT323 on the classic teal hatched wallpaper.
**HTML:**
```html
🖥️ My Computer
📁 Documents
🗑️ Recycle Bin
🌐 Network
📝 Welcome.txt — Notepad
_
▢
✕
System Properties
A faithful reconstruction of the 1995 desktop metaphor — raised bevels,
dotted focus rings and the conic Start orb, all in pure CSS.
C:\> The grey box bevel uses split border-colors:
white top-left, charcoal bottom-right.
Click
Start to pop the menu — checkbox hack, zero JS.
OK
Cancel
Apply
⚠️ Error
✕
⚠️
This program has performed an
illegal operation of pure nostalgia.
Close
Details »
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Pixelify+Sans:wght@400;700&display=swap');
.ret-01, .ret-01 *, .ret-01 *::before, .ret-01 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ret-01 ::selection{background:#000080;color:#fff}
.ret-01 ::-moz-selection{background:#000080;color:#fff}
.ret-01{
--teal:#008080;
--gray:#c0c0c0;
--dark:#808080;
--darker:#404040;
--navy:#000080;
--white:#fdfdfd;
--black:#0a0a0a;
font-family:'Pixelify Sans',sans-serif;
background:var(--teal);
min-height:100vh;
position:relative;
overflow:hidden;
color:var(--black);
}
/* desktop icons */
.ret-01__desktop{position:absolute;inset:0;bottom:46px;padding:14px}
.ret-01__icons{display:flex;flex-direction:column;gap:22px;width:84px}
.ret-01__icon{display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer;width:84px;text-align:center}
.ret-01__icon i{width:46px;height:42px;display:grid;place-items:center;font-size:26px;
background:linear-gradient(135deg,#dfe7ef,#9aa9bb);border:1px solid var(--darker);box-shadow:inset 1px 1px 0 #fff}
.ret-01__icon span{color:#fff;font-size:14px;text-shadow:1px 1px 0 #000;padding:1px 3px;line-height:1.1}
.ret-01__icon:hover span{background:var(--navy)}
/* WINDOW with the classic raised bevel: light top-left, dark bottom-right */
.ret-01__win{
position:absolute;top:64px;left:120px;width:min(560px,calc(100% - 40px));
background:var(--gray);
border:2px solid;
border-color:var(--white) var(--darker) var(--darker) var(--white);
box-shadow:1px 1px 0 #000;
}
.ret-01__win--alt{top:300px;left:auto;right:30px;width:min(330px,calc(100% - 40px));display:none}
@media(min-width:880px){.ret-01__win--alt{display:block}}
.ret-01__title{
display:flex;align-items:center;justify-content:space-between;gap:8px;
background:linear-gradient(90deg,var(--navy),#1084d0);
color:#fff;padding:4px 4px 4px 8px;font-weight:700;font-size:15px;letter-spacing:.02em;
}
.ret-01__title .ret-01__tl{display:flex;align-items:center;gap:7px}
.ret-01__title .ret-01__tl b{font-size:16px}
.ret-01__btns{display:flex;gap:3px}
.ret-01__tb{width:20px;height:18px;background:var(--gray);border:1px solid;
border-color:var(--white) var(--darker) var(--darker) var(--white);
display:grid;place-items:center;font-size:11px;font-weight:700;cursor:pointer;color:#000;font-family:'VT323',monospace}
.ret-01__tb:active{border-color:var(--darker) var(--white) var(--white) var(--darker)}
.ret-01__menu{display:flex;gap:0;background:var(--gray);padding:2px 4px;font-size:14px;border-bottom:1px solid var(--dark)}
.ret-01__menu span{padding:2px 8px;cursor:pointer}
.ret-01__menu span u{text-decoration:underline}
.ret-01__menu span:hover{background:var(--navy);color:#fff}
.ret-01__body{padding:16px;font-family:'VT323',monospace;font-size:19px;line-height:1.35}
.ret-01__inset{
background:var(--white);border:2px solid;
border-color:var(--darker) var(--white) var(--white) var(--darker);
padding:14px;margin-top:12px;min-height:120px
}
.ret-01__body h2{font-family:'Pixelify Sans';font-size:20px;margin-bottom:6px}
.ret-01__row{display:flex;gap:10px;margin-top:14px;justify-content:flex-end}
.ret-01__push{
font-family:'Pixelify Sans';font-size:15px;padding:6px 18px;background:var(--gray);cursor:pointer;
border:2px solid;border-color:var(--white) var(--darker) var(--darker) var(--white);
box-shadow:1px 1px 0 #000
}
.ret-01__push:active{border-color:var(--darker) var(--white) var(--white) var(--darker);box-shadow:none}
.ret-01__push--def{outline:1px dotted #000;outline-offset:-5px}
.ret-01__prog{height:22px;background:var(--white);border:2px solid;border-color:var(--darker) var(--white) var(--white) var(--darker);margin-top:10px;display:flex;gap:2px;padding:2px}
.ret-01__prog i{flex:0 0 14px;background:var(--navy)}
.ret-01__prog i:nth-child(n+9){background:transparent}
/* taskbar */
.ret-01__taskbar{
position:absolute;left:0;right:0;bottom:0;height:42px;
background:var(--gray);border-top:2px solid var(--white);
display:flex;align-items:center;gap:6px;padding:4px 6px;
}
.ret-01__start{
display:flex;align-items:center;gap:7px;font-weight:700;font-size:16px;
padding:3px 12px 3px 7px;background:var(--gray);cursor:pointer;
border:2px solid;border-color:var(--white) var(--darker) var(--darker) var(--white);
}
.ret-01__start i{width:22px;height:22px;display:grid;place-items:center;
background:conic-gradient(from 90deg,#f00 0 25%,#0f0 0 50%,#00f 0 75%,#ff0 0);font-size:0;border-radius:2px}
.ret-01__start:active,.ret-01.is-open .ret-01__start{border-color:var(--darker) var(--white) var(--white) var(--darker)}
.ret-01__tasks{display:flex;gap:5px;flex:1;overflow:hidden}
.ret-01__task{padding:3px 12px;font-size:14px;background:var(--gray);border:2px solid;border-color:var(--white) var(--darker) var(--darker) var(--white);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}
.ret-01__task--active{border-color:var(--darker) var(--white) var(--white) var(--darker);font-weight:700}
.ret-01__tray{display:flex;align-items:center;gap:8px;padding:3px 10px;font-family:'VT323',monospace;font-size:17px;
border:2px solid;border-color:var(--darker) var(--white) var(--white) var(--darker)}
/* START MENU via checkbox hack */
.ret-01__chk{position:absolute;opacity:0;pointer-events:none}
.ret-01__startmenu{
position:absolute;left:6px;bottom:46px;width:212px;z-index:30;
background:var(--gray);border:2px solid;border-color:var(--white) var(--darker) var(--darker) var(--white);
box-shadow:2px 2px 0 #000;
display:flex;transform:scaleY(0);transform-origin:bottom;transition:transform .14s steps(4);
}
.ret-01__chk:checked ~ .ret-01__taskbar .ret-01__start{border-color:var(--darker) var(--white) var(--white) var(--darker)}
.ret-01__chk:checked ~ .ret-01__startmenu{transform:scaleY(1)}
.ret-01__spine{width:30px;background:linear-gradient(180deg,var(--navy),#4040a0);writing-mode:vertical-rl;transform:rotate(180deg);
color:#fff;font-weight:700;text-align:center;padding:8px 0;font-size:16px;letter-spacing:.1em}
.ret-01__slist{flex:1;padding:3px}
.ret-01__sitem{display:flex;align-items:center;gap:9px;padding:6px 10px;font-size:15px;cursor:pointer}
.ret-01__sitem i{font-size:18px}
.ret-01__sitem:hover{background:var(--navy);color:#fff}
.ret-01__sep{height:2px;margin:3px 2px;border-top:1px solid var(--dark);border-bottom:1px solid var(--white)}
@media(max-width:680px){.ret-01__win{left:14px;width:calc(100% - 28px)}.ret-01__icons{display:none}}
@media (prefers-reduced-motion: reduce){.ret-01__startmenu{transition:none}}
```
### 02. Retro Futuristic Terminal UI Code
**Type:** Pure CSS
**Description:** A boot-sequence CRT terminal with curved glass: layered scanlines, rolling interlace, vignette curvature, phosphor glow and a flicker keyframe, plus staggered line-by-line teletype reveal and a blinking block cursor. Share Tech Mono / Orbitron on deep green, ANSI-coloured output and ASCII headline — zero JS.
**HTML:**
```html
[ NEXUS//OS v9.84 ]
NODE 0xFA · SECURE LINK · 1984 baud
_ _ _____ __ __ _ _ ____
| \ | | ____| \/ | | | / ___|
| \| | _| | |\/| | | | \___ \
| |\ | |___| | | | |_| |___) |
|_| \_|_____|_| |_|\___/|____/
user@nexus:~$ ./boot --diagnostic
[OK ] mounting /dev/neural0 ............ linked
[OK ] decrypting handshake RSA-4096 ... verified
[OK ] uplink to ORBITAL-7 .......... stable
phosphor calibration
▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰ ▱▱ 92%
WARNING: reality buffer overflow in sector 7G.
// the green glow is real phosphor decay, faked in pure CSS:
// scanlines + vignette + flicker keyframes, layered on glass.
Awaiting input — type a command, jack in.
user@nexus:~$
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@500;700;900&display=swap');
.ret-02, .ret-02 *, .ret-02 *::before, .ret-02 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ret-02 ::selection{background:#00ff9c;color:#02110a}
.ret-02 ::-moz-selection{background:#00ff9c;color:#02110a}
.ret-02{
--bg:#030806;
--green:#27ff9c;
--dim:#13895a;
--amber:#ffb000;
--cyan:#21e6ff;
--scan:rgba(0,0,0,.28);
font-family:'Share Tech Mono',monospace;
background:radial-gradient(120% 120% at 50% 0%,#06170f,#020604 70%);
color:var(--green);
min-height:100vh;
position:relative;
overflow:hidden;
padding:clamp(14px,3vw,40px);
}
/* the CRT glass: curvature via radial vignette + scanlines + flicker */
.ret-02__crt{
position:relative;height:calc(100vh - clamp(28px,6vw,80px));
border-radius:26px;padding:clamp(16px,3vw,38px);
background:linear-gradient(180deg,rgba(39,255,156,.04),transparent),var(--bg);
box-shadow:inset 0 0 120px rgba(39,255,156,.12),inset 0 0 30px rgba(0,0,0,.9),0 0 0 3px #0b1f16,0 0 0 9px #050d09,0 30px 80px rgba(0,0,0,.8);
overflow:hidden;
}
.ret-02__crt::before{content:'';position:absolute;inset:0;pointer-events:none;z-index:8;
background:repeating-linear-gradient(0deg,transparent 0 2px,var(--scan) 2px 4px);mix-blend-mode:multiply;
animation:ret-02-roll 8s linear infinite}
@keyframes ret-02-roll{to{background-position:0 200px}}
.ret-02__crt::after{content:'';position:absolute;inset:0;pointer-events:none;z-index:9;border-radius:26px;
background:radial-gradient(120% 120% at 50% 50%,transparent 55%,rgba(0,0,0,.55) 100%);
box-shadow:inset 0 0 90px rgba(0,0,0,.7)}
.ret-02__glow{position:absolute;inset:0;z-index:7;pointer-events:none;animation:ret-02-flick 5s infinite;mix-blend-mode:screen;
background:linear-gradient(180deg,rgba(39,255,156,.03),transparent)}
@keyframes ret-02-flick{0%,96%,100%{opacity:1}97%{opacity:.78}98%{opacity:.92}}
.ret-02__scr{position:relative;z-index:6;height:100%;overflow-y:auto;font-size:clamp(13px,1.6vw,16px);line-height:1.7;text-shadow:0 0 6px rgba(39,255,156,.6)}
.ret-02__scr::-webkit-scrollbar{width:8px}
.ret-02__scr::-webkit-scrollbar-thumb{background:var(--dim)}
.ret-02__head{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;border-bottom:1px dashed var(--dim);padding-bottom:10px;margin-bottom:14px;color:var(--dim)}
.ret-02__head b{font-family:'Orbitron';color:var(--green);letter-spacing:.2em;font-weight:900;font-size:1.1em}
.ret-02__l{display:block;white-space:pre-wrap;word-break:break-word;opacity:0;transform:translateY(2px);animation:ret-02-type .01s forwards}
.ret-02__l:nth-child(1){animation-delay:.1s}
.ret-02__l:nth-child(2){animation-delay:.35s}
.ret-02__l:nth-child(3){animation-delay:.6s}
.ret-02__l:nth-child(4){animation-delay:.85s}
.ret-02__l:nth-child(5){animation-delay:1.15s}
.ret-02__l:nth-child(6){animation-delay:1.5s}
.ret-02__l:nth-child(7){animation-delay:1.8s}
.ret-02__l:nth-child(8){animation-delay:2.1s}
.ret-02__l:nth-child(9){animation-delay:2.45s}
.ret-02__l:nth-child(10){animation-delay:2.8s}
.ret-02__l:nth-child(11){animation-delay:3.1s}
@keyframes ret-02-type{to{opacity:1;transform:none}}
.ret-02 .amb{color:var(--amber);text-shadow:0 0 6px rgba(255,176,0,.6)}
.ret-02 .cy{color:var(--cyan);text-shadow:0 0 6px rgba(33,230,255,.6)}
.ret-02 .dim{color:var(--dim);text-shadow:none}
.ret-02__ok{color:#02110a;background:var(--green);padding:0 6px}
.ret-02__bar{display:inline-block;color:var(--green)}
.ret-02__ascii{color:var(--dim);font-size:clamp(8px,1.2vw,12px);line-height:1.15;white-space:pre;margin:6px 0 10px}
.ret-02__prompt{display:flex;align-items:center;gap:8px;margin-top:14px;border-top:1px dashed var(--dim);padding-top:12px}
.ret-02__prompt b{color:var(--amber)}
.ret-02__cursor{width:10px;height:1.1em;background:var(--green);box-shadow:0 0 8px var(--green);animation:ret-02-blink 1s steps(2) infinite}
@keyframes ret-02-blink{50%{opacity:0}}
@media (prefers-reduced-motion: reduce){
.ret-02__crt::before,.ret-02__glow,.ret-02__cursor,.ret-02__l{animation:none !important;opacity:1 !important;transform:none !important}
}
```
### 03. 8 Bit Pixel Art UI Elements & Buttons
**Type:** Pure CSS
**Description:** An 8-bit RPG HUD kit drawn entirely with layered box-shadows — no border-radius, no images: chunky pixel panels, a heart-based HP row, a stepped XP bar, coin counter, type-on dialogue box and depressible 3D pixel buttons. Press Start 2P + VT323 on a 16-colour dusk palette with a CRT grid.
**HTML:**
```html
★ QUEST START ★
🧙
OLD WIZARD
Every border here is pure box-shadow...
⚔️ ATTACK
🛡️ DEFEND
🎒 ITEMS
▶ PRESS START ◀
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');
.ret-03, .ret-03 *, .ret-03 *::before, .ret-03 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ret-03 ::selection{background:#ffd23f;color:#1a1c2c}
.ret-03 ::-moz-selection{background:#ffd23f;color:#1a1c2c}
.ret-03{
--bg:#1a1c2c;
--bg2:#29366f;
--ink:#f4f4f4;
--red:#ef476f;
--green:#5fe36c;
--blue:#3fa7ff;
--gold:#ffd23f;
--shadow:#0d0e1a;
font-family:'Press Start 2P',monospace;
background:var(--bg);
background-image:
linear-gradient(rgba(63,167,255,.05) 2px,transparent 2px),
linear-gradient(90deg,rgba(63,167,255,.05) 2px,transparent 2px);
background-size:32px 32px;
color:var(--ink);
min-height:100vh;
image-rendering:pixelated;
padding:clamp(14px,4vw,46px);
display:flex;align-items:center;justify-content:center;
}
.ret-03__stage{width:100%;max-width:760px;display:grid;gap:22px}
/* the chunky pixel border, drawn with layered box-shadows (no border-radius) */
.ret-03__panel{
background:var(--bg2);
padding:22px;position:relative;
box-shadow:
0 -6px 0 0 var(--ink), 0 6px 0 0 var(--shadow),
-6px 0 0 0 var(--ink), 6px 0 0 0 var(--shadow),
0 0 0 6px var(--ink),
-6px -6px 0 6px var(--ink), 6px 6px 0 6px var(--shadow);
}
.ret-03__panel h2{font-size:13px;line-height:1.8;color:var(--gold);text-shadow:2px 2px 0 var(--shadow)}
.ret-03__panel p{font-family:'VT323',monospace;font-size:21px;line-height:1.4;margin-top:14px;color:#cfd3f0}
/* dialog with portrait + typed text */
.ret-03__dialog{display:flex;gap:18px;align-items:flex-start}
.ret-03__avatar{
width:64px;height:64px;flex:0 0 64px;background:var(--shadow);
display:grid;place-items:center;font-size:30px;
box-shadow:0 0 0 4px var(--ink),0 0 0 8px var(--shadow);
}
.ret-03__speech{flex:1}
.ret-03__speech .ret-03__name{color:var(--green);font-size:11px}
.ret-03__type{font-family:'VT323',monospace;font-size:22px;line-height:1.35;margin-top:10px;overflow:hidden;white-space:nowrap;border-right:3px solid var(--gold);
width:0;animation:ret-03-typing 3s steps(38) infinite alternate, ret-03-cur .6s steps(2) infinite}
@keyframes ret-03-typing{0%,8%{width:0}92%,100%{width:30ch}}
@keyframes ret-03-cur{50%{border-color:transparent}}
/* HUD: hearts + XP bar + coins */
.ret-03__hud{display:flex;flex-wrap:wrap;gap:18px;align-items:center;justify-content:space-between}
.ret-03__hearts{display:flex;gap:5px;font-size:20px}
.ret-03__hearts span{filter:drop-shadow(2px 2px 0 var(--shadow))}
.ret-03__hearts .e{opacity:.25}
.ret-03__coins{font-size:11px;color:var(--gold);text-shadow:2px 2px 0 var(--shadow);display:flex;align-items:center;gap:8px}
.ret-03__xp{flex:1 1 200px;min-width:160px}
.ret-03__xp small{font-family:'VT323';font-size:18px;color:#9aa3d8;display:block;margin-bottom:5px}
.ret-03__xpbar{height:18px;background:var(--shadow);box-shadow:0 0 0 3px var(--ink);display:flex;padding:3px;gap:3px}
.ret-03__xpbar i{flex:0 0 16px;background:var(--green);box-shadow:inset 0 -3px 0 rgba(0,0,0,.3)}
.ret-03__xpbar i:nth-child(n+8){background:#3a3f5e;box-shadow:none}
/* pixel buttons that depress on hover/active */
.ret-03__btns{display:flex;gap:16px;flex-wrap:wrap}
.ret-03__btn{
font-family:'Press Start 2P';font-size:11px;color:var(--ink);cursor:pointer;
padding:14px 20px;background:var(--red);position:relative;
box-shadow:0 6px 0 0 #a8264a, 0 0 0 4px var(--shadow);
transition:transform .05s steps(2),box-shadow .05s steps(2);user-select:none;
}
.ret-03__btn--g{background:var(--green);box-shadow:0 6px 0 0 #2f9b3a,0 0 0 4px var(--shadow);color:var(--shadow)}
.ret-03__btn--b{background:var(--blue);box-shadow:0 6px 0 0 #1f6fb0,0 0 0 4px var(--shadow)}
.ret-03__btn:hover{transform:translateY(2px)}
.ret-03__btn:active{transform:translateY(6px);box-shadow:0 0 0 0 #a8264a,0 0 0 4px var(--shadow)}
.ret-03__btn--g:active{box-shadow:0 0 0 0 #2f9b3a,0 0 0 4px var(--shadow)}
.ret-03__btn--b:active{box-shadow:0 0 0 0 #1f6fb0,0 0 0 4px var(--shadow)}
.ret-03__blink{font-family:'Press Start 2P';font-size:10px;color:var(--gold);text-align:center;animation:ret-03-bl 1s steps(2) infinite}
@keyframes ret-03-bl{50%{opacity:0}}
@media(max-width:520px){.ret-03__type{animation:none;width:auto;white-space:normal;border:0}}
@media (prefers-reduced-motion: reduce){.ret-03__type,.ret-03__blink{animation:none !important;width:auto;white-space:normal;border:0}}
```
### 04. Neo Brutalist UI Components Examples
**Type:** Pure CSS
**Description:** A neo-brutalist component board: 3px black strokes, blunt offset hard-shadows that grow on hover, clashing primaries, an inset-shadow text field, a stepped checkbox-hack toggle, badges, stat tiles and a punch-down CTA. Archivo Black + Space Grotesk on a dotted cream grid — deliberately anti-minimal.
**HTML:**
```html
Neo-Brutalism · 2026
Raw edges.Hard shadows. No apologies.
Thick black strokes, blunt offset shadows and clashing primaries — the anti-minimalist system that refuses to whisper.
Components
BUTTONS
TOGGLES
INPUTS
CARDS
BADGES
Your loud opinion
99% Less Gradient
0px Border Radius
Ship it loud.
Grab the kit →
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Space+Grotesk:wght@400;500;700&display=swap');
.ret-04, .ret-04 *, .ret-04 *::before, .ret-04 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ret-04 ::selection{background:#ff4d00;color:#fff}
.ret-04 ::-moz-selection{background:#ff4d00;color:#fff}
.ret-04{
--paper:#fef0d9;
--ink:#0d0d0d;
--orange:#ff4d00;
--lime:#c4f000;
--blue:#2b50ff;
--pink:#ff2e88;
--cyan:#16e0e0;
--shadow:6px 6px 0 var(--ink);
--shadow-lg:10px 10px 0 var(--ink);
font-family:'Space Grotesk',sans-serif;
background:var(--paper);
background-image:radial-gradient(var(--ink) 1.4px,transparent 1.4px);
background-size:26px 26px;
color:var(--ink);
min-height:100vh;
padding:clamp(18px,4vw,52px);
}
.ret-04__grid{max-width:980px;margin:0 auto;display:grid;grid-template-columns:repeat(12,1fr);gap:18px}
.ret-04__card{background:#fff;border:3px solid var(--ink);box-shadow:var(--shadow);padding:22px;transition:transform .12s cubic-bezier(.7,0,.2,1),box-shadow .12s}
.ret-04__card:hover{transform:translate(-3px,-3px);box-shadow:var(--shadow-lg)}
.ret-04 .c-hello{grid-column:span 7;background:var(--lime)}
.ret-04 .c-tag{grid-column:span 5;background:var(--blue);color:#fff}
.ret-04 .c-toggle{grid-column:span 4}
.ret-04 .c-input{grid-column:span 8}
.ret-04 .c-stat{grid-column:span 3;background:var(--pink);color:#fff}
.ret-04 .c-stat2{grid-column:span 3;background:var(--cyan)}
.ret-04 .c-cta{grid-column:span 6;background:var(--orange);color:#fff}
@media(max-width:720px){
.ret-04 .c-hello,.ret-04 .c-tag,.ret-04 .c-input,.ret-04 .c-cta{grid-column:1/-1}
.ret-04 .c-toggle,.ret-04 .c-stat,.ret-04 .c-stat2{grid-column:span 6}
}
.ret-04__eyebrow{display:inline-block;background:var(--ink);color:var(--paper);font-weight:700;font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;padding:5px 12px;border:2px solid var(--ink);margin-bottom:16px}
.ret-04 h1{font-family:'Archivo Black';font-size:clamp(2rem,6vw,3.6rem);line-height:.92;letter-spacing:-.02em;text-transform:uppercase}
.ret-04 h1 mark{background:var(--orange);color:#fff;padding:0 6px;box-decoration-break:clone}
.ret-04__sub{font-weight:500;margin-top:14px;font-size:1.02rem;line-height:1.45;max-width:42ch}
.ret-04 .c-tag h3{font-family:'Archivo Black';font-size:1.3rem;text-transform:uppercase}
.ret-04__chips{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.ret-04__chip{background:#fff;color:var(--ink);border:2px solid var(--ink);box-shadow:3px 3px 0 var(--ink);padding:6px 12px;font-weight:700;font-size:.82rem}
.ret-04 label.ret-04__field{display:block;font-weight:700;font-size:.78rem;letter-spacing:.1em;text-transform:uppercase;margin-bottom:8px}
.ret-04 input[type=text]{width:100%;font-family:'Space Grotesk';font-size:1rem;font-weight:500;padding:13px 14px;border:3px solid var(--ink);background:var(--paper);box-shadow:inset 4px 4px 0 rgba(0,0,0,.08);outline:none}
.ret-04 input[type=text]:focus{background:#fff;box-shadow:inset 4px 4px 0 var(--lime)}
/* toggle switch — checkbox hack */
.ret-04__sw{position:absolute;opacity:0;pointer-events:none}
.ret-04 .c-toggle b{font-family:'Archivo Black';text-transform:uppercase;font-size:.9rem;display:block;margin-bottom:14px}
.ret-04__track{display:inline-flex;align-items:center;width:88px;height:42px;border:3px solid var(--ink);background:#fff;box-shadow:var(--shadow);cursor:pointer;padding:4px;position:relative}
.ret-04__knob{width:30px;height:30px;background:var(--ink);transition:transform .14s steps(3)}
.ret-04__sw:checked ~ .ret-04__track{background:var(--lime)}
.ret-04__sw:checked ~ .ret-04__track .ret-04__knob{transform:translateX(46px);background:var(--orange)}
.ret-04__state{font-weight:700;margin-top:12px;font-size:.82rem}
.ret-04__state::after{content:'OFF'}
.ret-04__sw:checked ~ .ret-04__state::after{content:'ON'}
.ret-04 .c-stat b,.ret-04 .c-stat2 b{font-family:'Archivo Black';font-size:2.4rem;line-height:1;display:block}
.ret-04 .c-stat span,.ret-04 .c-stat2 span{font-weight:700;font-size:.74rem;letter-spacing:.08em;text-transform:uppercase}
.ret-04 .c-cta{display:flex;flex-direction:column;justify-content:space-between;gap:18px}
.ret-04 .c-cta h3{font-family:'Archivo Black';font-size:1.5rem;text-transform:uppercase;line-height:1}
.ret-04__btn{align-self:flex-start;background:#fff;color:var(--ink);border:3px solid var(--ink);box-shadow:5px 5px 0 var(--ink);font-family:'Archivo Black';text-transform:uppercase;font-size:.95rem;padding:13px 24px;cursor:pointer;transition:transform .1s,box-shadow .1s}
.ret-04__btn:hover{transform:translate(-2px,-2px);box-shadow:8px 8px 0 var(--ink)}
.ret-04__btn:active{transform:translate(5px,5px);box-shadow:0 0 0 var(--ink)}
@media (prefers-reduced-motion: reduce){.ret-04 *{transition:none !important}}
```
### 05. Retro Cassette Player UI Web Component
**Type:** Pure CSS
**Description:** A skeuomorphic tape deck modelled in pure CSS gradients — moulded plastic body with inset highlights, a recessed window with two spinning reels, an LCD with an animated VU meter, real pressable transport keys with travel, and three rotary knobs with pointer ticks. Major Mono Display + Oswald, warm 80s-hi-fi tones.
**HTML:**
```html
cassettone
Stereo · Auto-Reverse · Dolby
⏮
▶
⏸
⏭
⏹
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Major+Mono+Display&family=Oswald:wght@300;500;700&display=swap');
.ret-05, .ret-05 *, .ret-05 *::before, .ret-05 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ret-05 ::selection{background:#e8743b;color:#1c140e}
.ret-05{
--case:#d8c5a8;
--case-d:#b39d7c;
--metal:#c9ccd1;
--dark:#2a2420;
--orange:#e8743b;
--cream:#f3e9d6;
--led:#7dff4f;
font-family:'Oswald',sans-serif;
background:radial-gradient(120% 100% at 50% 0%,#5a4632,#2b211a 70%);
min-height:100vh;
display:grid;place-items:center;
padding:clamp(16px,4vw,48px);
color:var(--dark);
}
/* the plastic body: stacked gradients + inset highlights + drop shadow */
.ret-05__deck{
width:min(560px,100%);
background:
linear-gradient(160deg,#e8d7b8,#c3ad88 55%,#a98f6b);
border-radius:22px;
padding:26px;
box-shadow:
inset 0 2px 2px rgba(255,255,255,.7),
inset 0 -4px 8px rgba(0,0,0,.28),
0 30px 60px rgba(0,0,0,.55),
0 2px 0 rgba(0,0,0,.4);
position:relative;
}
.ret-05__deck::before{content:'';position:absolute;inset:11px;border-radius:14px;border:1px solid rgba(255,255,255,.25);pointer-events:none}
.ret-05__brand{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:18px}
.ret-05__brand b{font-family:'Major Mono Display';font-size:1.5rem;letter-spacing:.06em;color:#3a2f25;text-shadow:0 1px 0 rgba(255,255,255,.5)}
.ret-05__brand span{font-size:.7rem;letter-spacing:.3em;text-transform:uppercase;color:#6b5a44;font-weight:500}
/* cassette window: dark recess with spinning reels */
.ret-05__window{
background:linear-gradient(180deg,#1b1612,#322820);
border-radius:12px;padding:22px;margin-bottom:22px;
box-shadow:inset 0 4px 10px rgba(0,0,0,.85),inset 0 -1px 0 rgba(255,255,255,.08),0 1px 0 rgba(255,255,255,.4);
position:relative;overflow:hidden;
}
.ret-05__tape{display:flex;align-items:center;justify-content:center;gap:64px;position:relative}
.ret-05__tape::before{content:'';position:absolute;top:50%;left:18%;right:18%;height:10px;transform:translateY(-50%);
background:linear-gradient(180deg,#1a120b,#0d0805);border-radius:2px;box-shadow:inset 0 1px 1px rgba(0,0,0,.8)}
.ret-05__reel{width:74px;height:74px;border-radius:50%;position:relative;z-index:2;
background:radial-gradient(circle at 35% 30%,#5a5048,#221c16 70%);
box-shadow:inset 0 0 0 6px #15110d,inset 0 0 14px rgba(0,0,0,.9),0 0 0 2px #3a3128;
animation:ret-05-spin 3s linear infinite}
.ret-05__reel::before{content:'';position:absolute;inset:24px;border-radius:50%;background:repeating-conic-gradient(#d8cdbe 0 12deg,#8a7d6c 12deg 24deg);box-shadow:0 0 0 3px #15110d}
.ret-05__reel::after{content:'';position:absolute;inset:32px;border-radius:50%;background:radial-gradient(circle,#2a221a,#0d0805)}
@keyframes ret-05-spin{to{transform:rotate(360deg)}}
.ret-05__label{position:absolute;top:8px;left:50%;transform:translateX(-50%);font-family:'Major Mono Display';font-size:.62rem;letter-spacing:.2em;color:var(--orange);z-index:3;white-space:nowrap}
/* LCD + level meter */
.ret-05__lcd{display:flex;justify-content:space-between;align-items:center;gap:14px;
background:#2f3a2c;border-radius:8px;padding:10px 16px;margin-bottom:22px;
box-shadow:inset 0 2px 6px rgba(0,0,0,.7);font-family:'Major Mono Display';color:var(--led);text-shadow:0 0 6px rgba(125,255,79,.6)}
.ret-05__lcd .t{font-size:1.1rem;letter-spacing:.05em}
.ret-05__meter{display:flex;gap:3px;align-items:flex-end;height:22px}
.ret-05__meter i{width:5px;background:var(--led);border-radius:1px;animation:ret-05-eq 1.1s ease-in-out infinite}
.ret-05__meter i:nth-child(1){height:30%;animation-delay:0s}
.ret-05__meter i:nth-child(2){height:60%;animation-delay:.15s}
.ret-05__meter i:nth-child(3){height:95%;animation-delay:.3s;background:#ffd23f}
.ret-05__meter i:nth-child(4){height:50%;animation-delay:.45s}
.ret-05__meter i:nth-child(5){height:75%;animation-delay:.6s;background:#ffd23f}
.ret-05__meter i:nth-child(6){height:40%;animation-delay:.75s}
@keyframes ret-05-eq{50%{height:20%}}
/* transport buttons: real pressable plastic */
.ret-05__transport{display:flex;gap:12px;margin-bottom:24px}
.ret-05__key{flex:1;height:48px;border-radius:7px;border:none;cursor:pointer;font-size:1rem;color:#2a2018;
background:linear-gradient(180deg,#efe2cb,#c7b18c);
box-shadow:0 4px 0 #9a805e,inset 0 1px 0 rgba(255,255,255,.8);
transition:transform .06s,box-shadow .06s;display:grid;place-items:center}
.ret-05__key:hover{filter:brightness(1.04)}
.ret-05__key:active{transform:translateY(4px);box-shadow:0 0 0 #9a805e,inset 0 1px 3px rgba(0,0,0,.3)}
.ret-05__key--play{background:linear-gradient(180deg,#f29a5c,#d8612a);color:#fff;box-shadow:0 4px 0 #a8451a,inset 0 1px 0 rgba(255,255,255,.5)}
.ret-05__key--play:active{box-shadow:0 0 0 #a8451a,inset 0 1px 3px rgba(0,0,0,.4)}
/* knobs */
.ret-05__knobs{display:flex;justify-content:space-around;align-items:flex-start}
.ret-05__knobwrap{display:flex;flex-direction:column;align-items:center;gap:9px}
.ret-05__knob{width:62px;height:62px;border-radius:50%;cursor:grab;position:relative;
background:conic-gradient(from -135deg,#3a322a,#6a5e4f 50%,#2a241e);
box-shadow:0 5px 10px rgba(0,0,0,.5),inset 0 2px 3px rgba(255,255,255,.25),inset 0 -3px 6px rgba(0,0,0,.6)}
.ret-05__knob::before{content:'';position:absolute;top:6px;left:50%;width:4px;height:18px;background:var(--orange);border-radius:2px;transform:translateX(-50%);box-shadow:0 0 5px rgba(232,116,59,.7)}
.ret-05__knob--2{transform:rotate(80deg)}
.ret-05__knob--3{transform:rotate(-70deg)}
.ret-05__knobwrap small{font-size:.66rem;letter-spacing:.18em;text-transform:uppercase;color:#5a4a36;font-weight:600}
.ret-05__dots{position:relative;width:62px;height:14px;margin-top:-4px}
.ret-05__dots i{position:absolute;width:3px;height:3px;border-radius:50%;background:#5a4a36;top:0}
.ret-05__dots i:nth-child(1){left:0}
.ret-05__dots i:nth-child(2){left:30%;top:-3px}
.ret-05__dots i:nth-child(3){left:50%;top:-5px}
.ret-05__dots i:nth-child(4){left:70%;top:-3px}
.ret-05__dots i:nth-child(5){right:0}
@media(max-width:480px){.ret-05__tape{gap:30px}.ret-05__knob{width:50px;height:50px}}
@media (prefers-reduced-motion: reduce){.ret-05__reel,.ret-05__meter i{animation:none !important}}
```
### 06. Vaporwave Aesthetic Website Theme Design
**Type:** Pure CSS
**Description:** A vaporwave scene assembled from CSS masks and gradients only — a halftone striped sun bobbing on the horizon, an infinite scrolling neon perspective grid floor, chrome gradient-clip title type with a glitch shudder, and a translucent retro window card. Monoton + Yatra One + Space Mono in pink/cyan/purple.
**HTML:**
```html
ヴェイパーウェイヴ
A E S T H E T I C
mall softnone · 1992 · neon dreams
system32 / vibes.exe
Chrome type, a halftone
sun , and an infinite neon grid floor —
the whole scene is layered CSS gradients and masks. No images.
The grid scrolls on a linear keyframe; the sun bobs on the horizon.
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Monoton&family=Yatra+One&family=Space+Mono:wght@400;700&display=swap');
.ret-06, .ret-06 *, .ret-06 *::before, .ret-06 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ret-06 ::selection{background:#ff71ce;color:#1a0b2e}
.ret-06{
--pink:#ff71ce;
--cyan:#05ffa1;
--blue:#01cdfe;
--purple:#b967ff;
--deep:#1a0b2e;
--sun1:#ffd319;
--sun2:#ff2975;
font-family:'Space Mono',monospace;
background:linear-gradient(180deg,#2b1055 0%,#7a2a8f 45%,#ff2975 75%,#ffd319 100%);
min-height:100vh;
position:relative;
overflow:hidden;
color:#fff;
display:grid;place-items:center;
padding:clamp(16px,4vw,40px);
}
/* sun */
.ret-06__sun{position:absolute;top:8%;left:50%;transform:translateX(-50%);width:min(340px,70vw);aspect-ratio:1;border-radius:50%;
background:linear-gradient(180deg,var(--sun1),var(--sun2));z-index:0;
-webkit-mask:repeating-linear-gradient(180deg,#000 0 14px,transparent 14px 20px),linear-gradient(180deg,transparent 52%,#000 52%);
mask:repeating-linear-gradient(180deg,#000 0 14px,transparent 14px 20px),linear-gradient(180deg,transparent 52%,#000 52%);
-webkit-mask-composite:source-out;mask-composite:subtract;
filter:drop-shadow(0 0 60px rgba(255,41,117,.6));animation:ret-06-rise 6s ease-in-out infinite alternate}
@keyframes ret-06-rise{to{transform:translateX(-50%) translateY(-14px)}}
.ret-06__sun::after{content:'';position:absolute;inset:0;border-radius:50%;background:linear-gradient(180deg,var(--sun1),var(--sun2));z-index:-1;-webkit-mask:linear-gradient(180deg,#000 52%,transparent 52%);mask:linear-gradient(180deg,#000 52%,transparent 52%)}
/* perspective grid floor */
.ret-06__floor{position:absolute;left:-25%;right:-25%;bottom:0;height:48%;z-index:0;
background-image:linear-gradient(var(--cyan) 2px,transparent 2px),linear-gradient(90deg,var(--cyan) 2px,transparent 2px);
background-size:48px 48px;
transform:perspective(340px) rotateX(72deg);transform-origin:bottom;
opacity:.55;animation:ret-06-grid 1.4s linear infinite}
@keyframes ret-06-grid{to{background-position:0 48px}}
.ret-06__floor::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,var(--deep) 0%,transparent 40%)}
/* chrome title card */
.ret-06__card{position:relative;z-index:3;text-align:center;max-width:680px}
.ret-06__jp{font-family:'Yatra One',cursive;font-size:1.1rem;letter-spacing:.5em;color:var(--cyan);opacity:.9;margin-bottom:10px;text-shadow:0 0 10px var(--cyan)}
.ret-06__title{font-family:'Monoton';font-size:clamp(2.6rem,12vw,6rem);line-height:1;letter-spacing:.02em;
background:linear-gradient(180deg,#fff 10%,#cdebff 38%,var(--blue) 50%,#fff 52%,var(--pink) 80%);
-webkit-background-clip:text;background-clip:text;color:transparent;
filter:drop-shadow(3px 3px 0 var(--pink)) drop-shadow(-2px -2px 0 var(--cyan));
animation:ret-06-glitch 4s steps(1) infinite}
@keyframes ret-06-glitch{0%,90%,100%{transform:none}92%{transform:translate(-3px,1px) skewX(-3deg)}94%{transform:translate(3px,-1px)}}
.ret-06__sub{margin-top:18px;font-size:.84rem;letter-spacing:.3em;text-transform:uppercase;color:#fff;text-shadow:0 0 8px var(--pink)}
.ret-06__sub b{color:var(--cyan)}
.ret-06__win{margin-top:30px;background:rgba(26,11,46,.55);backdrop-filter:blur(8px);
border:2px solid var(--pink);border-radius:6px;text-align:left;
box-shadow:0 0 0 1px rgba(255,255,255,.1),0 0 30px rgba(255,113,206,.5),8px 8px 0 rgba(1,205,254,.4)}
.ret-06__winbar{display:flex;align-items:center;gap:8px;background:linear-gradient(90deg,var(--purple),var(--pink));padding:7px 12px;border-radius:4px 4px 0 0}
.ret-06__winbar i{width:12px;height:12px;border-radius:50%;background:#fff;opacity:.85}
.ret-06__winbar span{margin-left:6px;font-size:.72rem;letter-spacing:.2em;text-transform:uppercase}
.ret-06__wincontent{padding:18px 20px;font-size:.82rem;line-height:1.7;color:#e9d5ff}
.ret-06__wincontent b{color:var(--cyan)}
.ret-06__row{display:flex;gap:12px;flex-wrap:wrap;margin-top:16px}
.ret-06__btn{flex:1;min-width:130px;text-align:center;text-decoration:none;padding:11px;border:2px solid var(--cyan);color:var(--cyan);
font-weight:700;font-size:.78rem;letter-spacing:.18em;text-transform:uppercase;background:rgba(5,255,161,.06);
box-shadow:0 0 14px rgba(5,255,161,.3);transition:.25s}
.ret-06__btn:hover{background:var(--cyan);color:var(--deep);box-shadow:0 0 26px var(--cyan)}
.ret-06__btn--p{border-color:var(--pink);color:var(--pink);background:rgba(255,113,206,.06);box-shadow:0 0 14px rgba(255,113,206,.3)}
.ret-06__btn--p:hover{background:var(--pink);color:var(--deep);box-shadow:0 0 26px var(--pink)}
@media (prefers-reduced-motion: reduce){.ret-06__sun,.ret-06__floor,.ret-06__title{animation:none !important}}
```
### 07. Retro Arcade Game UI Kit
**Type:** Pure CSS
**Description:** A full arcade cabinet UI kit: an animated rainbow marquee, a bezelled CRT attract-screen with scanlines, hue-shifting logo, marching sprites and a blinking PUSH START, plus a control panel with a wiggling joystick and four glossy convex pressable buttons. Press Start 2P + Silkscreen on a neon-magenta cab.
**HTML:**
```html
NEON RAIDERS
HI 999990
1UP 042150
NEON RAIDERS
👾 🛸 👾 🛸 👾
© 1986 CODEFRONTSinsert coin to continue
▶ PUSH START ◀
◉ INSERT COIN ◉
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Silkscreen:wght@400;700&display=swap');
.ret-07, .ret-07 *, .ret-07 *::before, .ret-07 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ret-07 ::selection{background:#ffcb05;color:#10001f}
.ret-07{
--cab:#1b0033;
--cab2:#33005c;
--magenta:#ff2e97;
--yellow:#ffcb05;
--cyan:#00f0ff;
--green:#39ff14;
--screen:#05010f;
font-family:'Press Start 2P',monospace;
background:
radial-gradient(circle at 50% 0%,#3a006b,#10001f 70%);
min-height:100vh;
display:grid;place-items:center;
padding:clamp(14px,3vw,40px);
color:#fff;
}
.ret-07__cab{
width:min(480px,100%);
background:linear-gradient(180deg,var(--cab2),var(--cab));
border-radius:30px 30px 14px 14px;
padding:18px;
position:relative;
box-shadow:0 0 0 4px #000,0 0 0 8px var(--magenta),0 0 40px rgba(255,46,151,.5),0 30px 60px rgba(0,0,0,.7);
}
/* marquee */
.ret-07__marquee{
background:linear-gradient(90deg,var(--magenta),var(--yellow),var(--cyan),var(--magenta));
background-size:300% 100%;
border-radius:14px;padding:14px;text-align:center;margin-bottom:16px;
box-shadow:inset 0 0 14px rgba(0,0,0,.5),0 0 20px rgba(255,203,5,.4);
animation:ret-07-shift 6s linear infinite}
@keyframes ret-07-shift{to{background-position:300% 0}}
.ret-07__marquee b{font-size:1.1rem;letter-spacing:.06em;color:#10001f;text-shadow:1px 1px 0 #fff}
/* CRT screen with bezel */
.ret-07__bezel{background:#000;border-radius:16px;padding:16px;box-shadow:inset 0 0 0 3px #2a2a2a,inset 0 0 30px #000}
.ret-07__screen{
background:var(--screen);border-radius:8px;padding:22px 18px;position:relative;overflow:hidden;
box-shadow:inset 0 0 40px rgba(0,240,255,.12);min-height:280px;
display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;text-align:center}
.ret-07__screen::after{content:'';position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,transparent 0 3px,rgba(0,0,0,.25) 3px 4px)}
.ret-07__hi{font-family:'Silkscreen';font-size:.7rem;letter-spacing:.2em;color:var(--magenta);position:absolute;top:12px;left:14px}
.ret-07__credit{font-family:'Silkscreen';font-size:.7rem;color:var(--cyan);position:absolute;top:12px;right:14px}
.ret-07__logo{font-size:1.7rem;line-height:1.5;color:var(--yellow);text-shadow:3px 3px 0 var(--magenta),-1px -1px 0 var(--cyan);animation:ret-07-hue 4s linear infinite}
@keyframes ret-07-hue{50%{filter:hue-rotate(40deg)}}
.ret-07__sub{font-family:'Silkscreen';font-size:.8rem;letter-spacing:.1em;color:#fff;line-height:1.6}
.ret-07__sub i{color:var(--green)}
.ret-07__start{font-size:.78rem;color:var(--cyan);animation:ret-07-blink 1s steps(2) infinite}
@keyframes ret-07-blink{50%{opacity:0}}
/* little sprite row */
.ret-07__sprites{display:flex;gap:14px;font-size:1.2rem;animation:ret-07-march 1s steps(2) infinite}
@keyframes ret-07-march{50%{transform:translateY(-3px)}}
/* control panel */
.ret-07__panel{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:18px;padding:16px;
background:linear-gradient(180deg,#000,#1a1a1a);border-radius:12px;box-shadow:inset 0 2px 6px rgba(0,0,0,.8)}
.ret-07__joy{width:58px;height:58px;position:relative}
.ret-07__joy .base{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:46px;height:20px;border-radius:50%;background:radial-gradient(#444,#111)}
.ret-07__joy .stick{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);width:8px;height:30px;background:linear-gradient(90deg,#777,#222);border-radius:4px;transform-origin:bottom;animation:ret-07-wiggle 2s ease-in-out infinite}
.ret-07__joy .ball{position:absolute;top:0;left:50%;transform:translateX(-50%);width:22px;height:22px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#ff6ba8,var(--magenta));box-shadow:0 0 10px var(--magenta)}
@keyframes ret-07-wiggle{0%,100%{transform:translateX(-50%) rotate(-8deg)}50%{transform:translateX(-50%) rotate(10deg)}}
.ret-07__buttons{display:flex;gap:12px}
.ret-07__b{width:44px;height:44px;border-radius:50%;cursor:pointer;border:none;
box-shadow:0 5px 0 rgba(0,0,0,.6),inset 0 2px 4px rgba(255,255,255,.4);transition:transform .06s,box-shadow .06s}
.ret-07__b:active{transform:translateY(4px);box-shadow:0 1px 0 rgba(0,0,0,.6),inset 0 2px 4px rgba(0,0,0,.3)}
.ret-07__b--r{background:radial-gradient(circle at 35% 30%,#ff8da8,#ff2e3c)}
.ret-07__b--y{background:radial-gradient(circle at 35% 30%,#fff0a0,var(--yellow))}
.ret-07__b--c{background:radial-gradient(circle at 35% 30%,#a0fbff,var(--cyan))}
.ret-07__b--g{background:radial-gradient(circle at 35% 30%,#b6ffae,var(--green))}
.ret-07__coin{text-align:center;margin-top:14px;font-family:'Silkscreen';font-size:.72rem;letter-spacing:.18em;color:var(--yellow)}
.ret-07__coin span{display:inline-block;border:2px solid var(--yellow);border-radius:4px;padding:6px 12px}
@media(max-width:420px){.ret-07__logo{font-size:1.3rem}.ret-07__buttons{gap:8px}}
@media (prefers-reduced-motion: reduce){.ret-07 *{animation:none !important}}
```
### 08. ASCII Art Web Interface Code
**Type:** CSS + JS
**Description:** A live, typeable bash shell with an ASCII logo, ANSI-coloured output and a blinking caret — type real commands (help, ls, neofetch, cowsay, echo, clear) and watch them execute. The phosphor look, window chrome and caret are pure CSS; a tiny vanilla-JS interpreter drives the interactivity. IBM Plex Mono on a hatched dark room.
**HTML:**
```html
guest@codefronts: ~/retro — bash
___ _ ___ _
/ __|___ ___| |___ / __|_ _ ___ _ _| |_ ___
| (__/ _ \/ _` / -_) _/ '_/ _ \ ' \ _(_-<
\___\___/\__,_\___\__|_| \___/_||_\__/__/
Last login: Tue Jun 03 on ttys001
# Type a command and hit Enter. Try: help , ls , neofetch , cowsay hi
guest@codefronts:~$
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;700&display=swap');
.ret-08, .ret-08 *, .ret-08 *::before, .ret-08 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ret-08 ::selection{background:#ffaf00;color:#0c0c0c}
.ret-08{
--bg:#0c0c0c;
--panel:#161616;
--fg:#e4e4e4;
--green:#33d17a;
--blue:#5c9eff;
--yellow:#ffaf00;
--red:#f25f5c;
--magenta:#c264f0;
--dim:#6a6a6a;
font-family:'IBM Plex Mono',monospace;
background:repeating-linear-gradient(45deg,#0a0a0a 0 12px,#0c0c0c 12px 24px);
min-height:100vh;display:grid;place-items:center;
padding:clamp(12px,3vw,40px);color:var(--fg);
}
.ret-08__term{
width:min(780px,100%);height:min(560px,82vh);display:flex;flex-direction:column;
background:var(--bg);border-radius:10px;overflow:hidden;
box-shadow:0 24px 60px rgba(0,0,0,.7),0 0 0 1px rgba(255,255,255,.06);
}
.ret-08__bar{display:flex;align-items:center;gap:8px;padding:10px 14px;background:linear-gradient(180deg,#2a2a2a,#1c1c1c);border-bottom:1px solid #000}
.ret-08__bar i{width:12px;height:12px;border-radius:50%}
.ret-08__bar i:nth-child(1){background:#ff5f56}
.ret-08__bar i:nth-child(2){background:#ffbd2e}
.ret-08__bar i:nth-child(3){background:#27c93f}
.ret-08__bar span{margin-left:10px;font-size:.78rem;color:var(--dim)}
.ret-08__body{flex:1;overflow-y:auto;padding:16px 18px;font-size:clamp(12px,1.5vw,14px);line-height:1.55}
.ret-08__body::-webkit-scrollbar{width:8px}
.ret-08__body::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:4px}
.ret-08 pre{white-space:pre;font-family:inherit;color:var(--magenta);line-height:1.1;font-size:clamp(8px,1.4vw,12px);margin-bottom:8px}
.ret-08 .l{white-space:pre-wrap;word-break:break-word}
.ret-08 .g{color:var(--green)}
.ret-08 .b{color:var(--blue)}
.ret-08 .y{color:var(--yellow)}
.ret-08 .r{color:var(--red)}
.ret-08 .m{color:var(--magenta)}
.ret-08 .d{color:var(--dim)}
.ret-08__prompt-l{color:var(--green);font-weight:700}
.ret-08__prompt-l .p{color:var(--blue)}
.ret-08__input-line{display:flex;align-items:baseline;gap:8px;margin-top:4px}
.ret-08__ps1{color:var(--green);font-weight:700;white-space:nowrap}
.ret-08__ps1 .p{color:var(--blue)}
.ret-08__typed{color:var(--fg)}
.ret-08__cur{display:inline-block;width:8px;height:1.05em;background:var(--fg);transform:translateY(2px);animation:ret-08-bl 1.1s steps(2) infinite}
@keyframes ret-08-bl{50%{opacity:0}}
.ret-08__hint{margin-top:10px;color:var(--dim);font-size:.74rem}
.ret-08 a{color:var(--blue);text-decoration:underline}
@media (prefers-reduced-motion: reduce){.ret-08__cur{animation:none}}
```
**JS:**
```js
(() => {
const root = document.querySelector('.ret-08');
if (!root) return;
const body = root.querySelector('#ret-08-body');
const out = root.querySelector('#ret-08-out');
const typedEl = root.querySelector('#ret-08-typed');
let buf = '';
const esc = s => s.replace(/&/g,'&').replace(//g,'>');
const cmds = {
help: () => `Available: help · ls · pwd · whoami · date · neofetch · cowsay <text> · echo <text> · clear`,
ls: () => `projects/ art/ readme.md retro.sh .secret`,
pwd: () => `/home/guest/retro`,
whoami: () => `guest (uid=1000 groups=demos,retro) `,
date: () => new Date().toString(),
neofetch: () => ` ___ guest @codefronts
/ _ \\ OS: RetroLinux 8.6 "Phosphor"
| | | | Shell: bash 5.1 · pure CSS+JS
| |_| | Term: codefronts-term
\\___/ Theme: ANSI green-on-black`,
clear: () => { out.innerHTML=''; return null; }
};
function run(raw){
const line = `guest@codefronts:~$ ${esc(raw)}
`;
let res = '';
const trimmed = raw.trim();
const [c, ...rest] = trimmed.split(/\s+/);
const arg = rest.join(' ');
if (trimmed === '') { res=''; }
else if (c === 'echo') res = esc(arg);
else if (c === 'cowsay') {
const t = esc(arg || 'moo');
const bar = '_'.repeat(t.length + 2);
const bar2 = '-'.repeat(t.length + 2);
res = ` ${bar}\n< ${t} >\n ${bar2}\n \\ ^__^\n \\ (oo)\\_______\n (__)\\ )\\/\\\n ||----w |\n || || `;
}
else if (cmds[c]) { const r = cmds[c](); if (r===null){return;} res = r; }
else res = `bash: ${esc(c)}: command not found (try 'help') `;
out.insertAdjacentHTML('beforeend', line + (res!=='' ? `${res}
` : ''));
body.scrollTop = body.scrollHeight;
}
window.addEventListener('keydown', (e) => {
if (e.metaKey || e.ctrlKey || e.altKey) return;
if (e.key === 'Enter') { run(buf); buf=''; }
else if (e.key === 'Backspace') { buf = buf.slice(0,-1); e.preventDefault(); }
else if (e.key.length === 1) { buf += e.key; }
else return;
typedEl.textContent = buf;
});
// seed one example
run('neofetch');
})();
```
### 09. 90s Website Guestbook Widget
**Type:** Pure CSS
**Description:** An authentic Web 1.0 GeoCities-era homepage: a rainbow banner with a blinking hit counter, a scrolling marquee, ridge/inset bevelled tables, a sign-the-guestbook form with vintage entries, a webring, 88×31-style badges and an animated UNDER CONSTRUCTION sign. Times + Comic Neue + Courier Prime on tiled teal.
**HTML:**
```html
~*~ DAVE'S RAD HOMEPAGE ~*~
★ YOU ARE VISITOR NUMBER 0024891 ★
★彡 WELCOME 2 MY CORNER OF THE WWW!! ★ best viewed in Netscape Navigator 4.0 @ 800x600 ★ sign my guestbook below!! ★彡
Sign My Guestbook!!
Hey there netizen! Thanks 4 stopping by my totally awesome website. Don't forget to bookmark this page and tell all ur friends. Leave me a note below!! :o)
xX_SkaterDude_Xx 06/14/2001 kewl site dude!! how'd u make the spinning skull gif?? l8r
~PrincessSparkle~ 06/12/2001 omg luv the rainbow text!!1! added u 2 my webring :) :) :)
webmaster_steve 06/09/2001 nice tables. all hand-coded HTML, no css frameworks here. RESPECT
Ur Name:
Ur Message:
✎ Sign Guestbook!
WEBRING
◄ ❤
►
The 90s Kids Ring
BADGES
HTML 4.0
NETSCAPE
GEOCITIES
Y2K OK
🚧 UNDER CONSTRUCTION 🚧
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&family=Courier+Prime:wght@400;700&display=swap');
.ret-09, .ret-09 *, .ret-09 *::before, .ret-09 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ret-09 ::selection{background:#000080;color:#fff}
.ret-09{
--teal:#008080;
--silver:#c0c0c0;
--navy:#000080;
--purple:#800080;
--lime:#00ff00;
--yellow:#ffff00;
font-family:'Times New Roman',Times,serif;
background:#008080;
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='%23008080'/%3E%3Cpath d='M0 20h40M20 0v40' stroke='%23007070' stroke-width='1'/%3E%3C/svg%3E");
min-height:100vh;color:#000;padding:14px;
}
.ret-09__page{max-width:760px;margin:0 auto;background:#fff;border:3px ridge var(--silver);padding:0}
/* rainbow top banner */
.ret-09__banner{background:linear-gradient(90deg,#f00,#ff7f00,#ff0,#0f0,#00f,#4b0082,#9400d3);padding:3px}
.ret-09__bannerin{background:#000;text-align:center;padding:14px 10px}
.ret-09__bannerin h1{font-family:'Courier Prime';color:var(--yellow);font-size:clamp(1.4rem,5vw,2.4rem);font-weight:700;text-shadow:2px 2px 0 #f00;letter-spacing:.05em}
.ret-09__bannerin .blink{color:var(--lime);font-family:'Comic Neue';font-weight:700;font-size:.95rem;animation:ret-09-blink 1s steps(2) infinite}
@keyframes ret-09-blink{50%{opacity:0}}
/* marquee */
.ret-09__marquee{background:var(--navy);color:var(--yellow);font-family:'Courier Prime';font-weight:700;padding:6px 0;overflow:hidden;white-space:nowrap;border-top:2px solid #fff;border-bottom:2px solid #404040}
.ret-09__marquee span{display:inline-block;padding-left:100%;animation:ret-09-scroll 16s linear infinite}
@keyframes ret-09-scroll{to{transform:translateX(-100%)}}
.ret-09__nav{background:var(--silver);border-bottom:2px solid #808080;padding:8px;text-align:center;font-family:'Comic Neue';font-size:.9rem}
.ret-09__nav a{color:var(--navy);font-weight:700;text-decoration:underline;margin:0 6px}
.ret-09__nav a:hover{color:#f00;background:var(--yellow)}
.ret-09__body{padding:18px;display:grid;grid-template-columns:1fr 200px;gap:18px}
@media(max-width:640px){.ret-09__body{grid-template-columns:1fr}}
.ret-09__main h2{font-family:'Comic Neue';color:var(--purple);font-size:1.5rem;border-bottom:2px dotted var(--purple);padding-bottom:4px;margin-bottom:10px}
.ret-09__main h2::before{content:'» '}
.ret-09__welcome{font-size:.96rem;line-height:1.5;margin-bottom:14px}
.ret-09__welcome b{background:var(--yellow)}
/* guestbook entries */
.ret-09__gb{border:2px inset var(--silver);background:#fffef0;padding:10px;margin-bottom:14px}
.ret-09__entry{font-family:'Comic Neue';font-size:.88rem;line-height:1.45;padding:8px;border-bottom:1px dashed #999;margin-bottom:8px}
.ret-09__entry:last-child{border:0;margin:0}
.ret-09__entry .who{color:var(--navy);font-weight:700}
.ret-09__entry .when{color:#888;font-size:.78rem;float:right}
.ret-09__entry .msg{display:block;margin-top:4px;color:#222}
.ret-09__entry .msg b{color:#f00}
.ret-09__form{border:2px ridge var(--silver);background:var(--silver);padding:10px;font-family:'Comic Neue'}
.ret-09__form label{display:block;font-weight:700;font-size:.82rem;margin:6px 0 3px}
.ret-09__form input,.ret-09__form textarea{width:100%;border:2px inset #fff;padding:5px;font-family:'Courier Prime';font-size:.85rem}
.ret-09__form textarea{height:54px;resize:none}
.ret-09__sign{margin-top:10px;background:var(--silver);border:2px outset #fff;padding:5px 16px;font-family:'Comic Neue';font-weight:700;cursor:pointer}
.ret-09__sign:active{border-style:inset}
/* sidebar */
.ret-09__side{display:flex;flex-direction:column;gap:14px;font-family:'Comic Neue';font-size:.82rem}
.ret-09__box{border:2px outset var(--silver);background:#fff;padding:8px;text-align:center}
.ret-09__box h3{background:var(--navy);color:#fff;font-size:.8rem;margin:-8px -8px 8px;padding:4px}
.ret-09__counter{display:inline-flex;gap:2px;font-family:'Courier Prime';font-weight:700}
.ret-09__counter span{background:#000;color:var(--lime);padding:3px 5px;border-radius:2px}
.ret-09__webring a{color:var(--navy);text-decoration:none;font-size:1.3rem}
.ret-09__badges{display:flex;flex-wrap:wrap;gap:5px;justify-content:center}
.ret-09__badge{font-family:'Courier Prime';font-size:.6rem;font-weight:700;padding:3px 5px;border:1px solid #000;color:#fff}
.ret-09__badge:nth-child(1){background:#f00}
.ret-09__badge:nth-child(2){background:var(--navy)}
.ret-09__badge:nth-child(3){background:var(--purple)}
.ret-09__badge:nth-child(4){background:#000}
.ret-09__construction{text-align:center;font-family:'Comic Neue';font-weight:700;color:#000;background:repeating-linear-gradient(45deg,var(--yellow) 0 12px,#000 12px 24px);padding:3px;margin-top:6px}
.ret-09__construction span{background:#fff;display:block;padding:6px}
.ret-09__foot{text-align:center;font-family:'Comic Neue';font-size:.74rem;color:#555;padding:12px;border-top:2px groove var(--silver)}
.ret-09__foot a{color:var(--navy)}
@media (prefers-reduced-motion: reduce){.ret-09 *{animation:none !important}.ret-09__marquee span{padding-left:0}}
```
### 10. Y2K Style Web UI Kit
**Type:** Pure CSS
**Description:** A glossy Y2K / Aqua interface — candy jelly buttons with specular top-gloss and a 3D push, a pinstripe-animated progress pill, a frosted aqua titlebar with gel orbs, and a glassy toggle switch. Michroma + Rajdhani on an icy aqua-to-lilac gradient with chrome-clip headline type, pure CSS gloss.
**HTML:**
```html
◈ AquaOS · System Preferences
Y2K · FUTURE READY · 2001
Glossy. Glassy. Gloriously Y2K.
Candy-coated jelly buttons, aqua gradients and pinstripe progress — pure CSS gloss.
Download
Install ✓
Customize
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Michroma&family=Rajdhani:wght@400;500;600;700&display=swap');
.ret-10, .ret-10 *, .ret-10 *::before, .ret-10 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ret-10 ::selection{background:#00e5ff;color:#001018}
.ret-10{
--bg1:#aee9ff;
--bg2:#d6c2ff;
--aqua:#00b4ff;
--aqua-d:#0066cc;
--silver:#dfe8f0;
--ink:#0a2540;
--lime:#9dff3c;
font-family:'Rajdhani',sans-serif;
background:
radial-gradient(circle at 20% 15%,#ffffff,transparent 40%),
linear-gradient(135deg,var(--bg1),var(--bg2) 60%,#ffd1f5);
min-height:100vh;display:grid;place-items:center;
padding:clamp(16px,4vw,46px);color:var(--ink);
}
.ret-10__shell{width:min(700px,100%);
background:linear-gradient(180deg,rgba(255,255,255,.85),rgba(220,235,250,.7));
backdrop-filter:blur(6px);
border-radius:26px;padding:8px;
box-shadow:0 0 0 1px rgba(255,255,255,.9) inset,0 0 0 2px rgba(0,120,200,.25),0 30px 60px rgba(0,80,160,.35);
}
.ret-10__chrome{background:linear-gradient(180deg,#fff,#cfe2f2);border-radius:20px;overflow:hidden;box-shadow:inset 0 1px 0 #fff}
/* glossy titlebar */
.ret-10__tb{display:flex;align-items:center;gap:10px;padding:12px 16px;position:relative;
background:linear-gradient(180deg,#6fc8ff 0%,#1f8fe0 48%,#0a6cc0 52%,#1f8fe0 100%);
box-shadow:inset 0 1px 0 rgba(255,255,255,.7),inset 0 -2px 4px rgba(0,0,0,.2)}
.ret-10__tb::after{content:'';position:absolute;top:0;left:0;right:0;height:45%;background:linear-gradient(180deg,rgba(255,255,255,.55),transparent);pointer-events:none}
.ret-10__tb b{font-family:'Michroma';color:#fff;font-size:.92rem;letter-spacing:.05em;text-shadow:0 1px 2px rgba(0,0,0,.4);position:relative;z-index:2}
.ret-10__orbs{margin-left:auto;display:flex;gap:7px;position:relative;z-index:2}
.ret-10__orb{width:18px;height:18px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff,#cdd 60%,#889);box-shadow:0 1px 2px rgba(0,0,0,.4),inset 0 -2px 3px rgba(0,0,0,.3)}
.ret-10__orb--c{background:radial-gradient(circle at 35% 30%,#d6ffb0,var(--lime) 60%,#5a9e00)}
.ret-10__orb--x{background:radial-gradient(circle at 35% 30%,#ffd0d0,#ff5555 60%,#aa0000)}
.ret-10__win{padding:24px;display:grid;gap:20px}
.ret-10__hero{text-align:center}
.ret-10__chip{display:inline-block;font-family:'Michroma';font-size:.62rem;letter-spacing:.25em;color:var(--aqua-d);
background:linear-gradient(180deg,#fff,#d6ecff);padding:6px 14px;border-radius:20px;box-shadow:inset 0 1px 0 #fff,0 1px 3px rgba(0,80,160,.3);margin-bottom:14px}
.ret-10__hero h1{font-family:'Michroma';font-size:clamp(1.6rem,6vw,2.8rem);line-height:1.05;letter-spacing:-.01em;
background:linear-gradient(180deg,#0a6cc0,#00b4ff);-webkit-background-clip:text;background-clip:text;color:transparent;
filter:drop-shadow(0 2px 1px rgba(255,255,255,.8))}
.ret-10__hero p{font-size:1.05rem;font-weight:500;margin-top:10px;color:#2a5575}
/* the glossy jelly buttons */
.ret-10__btns{display:flex;gap:16px;flex-wrap:wrap;justify-content:center}
.ret-10__jelly{position:relative;border:none;cursor:pointer;font-family:'Rajdhani';font-weight:700;font-size:1.05rem;letter-spacing:.04em;
color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.35);padding:15px 34px;border-radius:30px;overflow:hidden;
background:linear-gradient(180deg,#3fc0ff,#0a78d0 52%,#0a6cc0);
box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 4px 0 #04508f,0 8px 16px rgba(0,80,160,.4);
transition:transform .08s,box-shadow .08s}
.ret-10__jelly::before{content:'';position:absolute;top:3px;left:8%;right:8%;height:42%;border-radius:30px;
background:linear-gradient(180deg,rgba(255,255,255,.85),rgba(255,255,255,0));pointer-events:none}
.ret-10__jelly:hover{filter:brightness(1.06)}
.ret-10__jelly:active{transform:translateY(4px);box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 0 0 #04508f,0 4px 8px rgba(0,80,160,.4)}
.ret-10__jelly--g{background:linear-gradient(180deg,#c8ff7a,#7ec000 52%,#5a9e00);box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 4px 0 #437400,0 8px 16px rgba(80,140,0,.4);color:#1a3000;text-shadow:0 1px 1px rgba(255,255,255,.4)}
.ret-10__jelly--g:active{box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 0 0 #437400,0 4px 8px rgba(80,140,0,.4)}
.ret-10__jelly--p{background:linear-gradient(180deg,#ff9be8,#d63caa 52%,#b01f8f);box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 4px 0 #8a1570,0 8px 16px rgba(160,0,120,.4)}
/* progress pill + toggle */
.ret-10__panel{display:grid;grid-template-columns:1fr 1fr;gap:18px}
@media(max-width:520px){.ret-10__panel{grid-template-columns:1fr}.ret-10__hero h1{font-size:1.5rem}}
.ret-10__glass{background:linear-gradient(180deg,rgba(255,255,255,.9),rgba(210,232,250,.6));border-radius:16px;padding:16px;box-shadow:inset 0 1px 0 #fff,0 2px 6px rgba(0,80,160,.18)}
.ret-10__glass small{font-family:'Michroma';font-size:.6rem;letter-spacing:.18em;color:var(--aqua-d);display:block;margin-bottom:10px}
.ret-10__load{height:18px;border-radius:12px;background:linear-gradient(180deg,#c2d8ea,#e8f2fb);box-shadow:inset 0 2px 3px rgba(0,60,120,.3);overflow:hidden;padding:2px}
.ret-10__load i{display:block;height:100%;width:68%;border-radius:10px;
background:linear-gradient(180deg,#7fe0ff,#00b4ff 50%,#0078c8);
box-shadow:inset 0 1px 0 rgba(255,255,255,.8);position:relative;overflow:hidden}
.ret-10__load i::after{content:'';position:absolute;inset:0;background:repeating-linear-gradient(45deg,rgba(255,255,255,.3) 0 8px,transparent 8px 16px);animation:ret-10-stripe 1s linear infinite}
@keyframes ret-10-stripe{to{background-position:16px 0}}
.ret-10__pct{font-weight:700;color:var(--aqua-d);margin-top:8px;font-size:.9rem}
/* aqua toggle - checkbox hack */
.ret-10__sw{position:absolute;opacity:0;pointer-events:none}
.ret-10__toggle{display:flex;align-items:center;gap:12px;cursor:pointer}
.ret-10__rail{width:64px;height:30px;border-radius:20px;background:linear-gradient(180deg,#c2d8ea,#e8f2fb);box-shadow:inset 0 2px 4px rgba(0,60,120,.35);position:relative;transition:background .2s}
.ret-10__rail::before{content:'';position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;
background:radial-gradient(circle at 35% 30%,#fff,#cdd 70%);box-shadow:0 2px 3px rgba(0,0,0,.3);transition:transform .2s}
.ret-10__sw:checked ~ .ret-10__toggle .ret-10__rail{background:linear-gradient(180deg,#7fe0ff,#00b4ff)}
.ret-10__sw:checked ~ .ret-10__toggle .ret-10__rail::before{transform:translateX(34px);background:radial-gradient(circle at 35% 30%,#fff,#aef)}
.ret-10__toggle b{font-weight:700;font-size:1rem;color:var(--ink)}
@media (prefers-reduced-motion: reduce){.ret-10__load i::after{animation:none}}
```
### 11. Retro Clothing Store Web UI Design
**Type:** Pure CSS
**Description:** A vintage mail-order catalogue storefront: a double-rule masthead, halftone-textured paper, ticket-stub price tags, a wax-seal discount badge, a product grid with diagonal-weave thumbnails that lift on hover, and an old-school phone-order footer. Bebas Neue + DM Serif Display + Courier Prime in rust/mustard/teal.
**HTML:**
```html
◆ Free shipping over $25 ◆
★ Satisfaction guaranteed ★
◆ Order by phone or post ◆
Genuine goods,honest prices.
Hand-picked wares from our warehouse to your doorstep. Halftone textures, double-rule borders and ticket-stub price tags — every pixel is pure CSS, no images.
To order, ring us today —
☎ 1-800-RETRO-CO
🛒 View Cart (3)
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Serif+Display:ital@0;1&family=Courier+Prime:wght@400;700&display=swap');
.ret-11, .ret-11 *, .ret-11 *::before, .ret-11 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ret-11 ::selection{background:#d4451f;color:#f4ecd8}
.ret-11{
--paper:#f4ecd8;
--ink:#2b2118;
--rust:#d4451f;
--mustard:#e0a92e;
--teal:#1f6b5e;
--cream:#fbf6e9;
font-family:'Courier Prime',monospace;
background:var(--paper);
background-image:
radial-gradient(circle at 50% 50%,rgba(212,69,31,.04) 1px,transparent 1px),
radial-gradient(circle,rgba(0,0,0,.025) 1px,transparent 1px);
background-size:8px 8px,4px 4px;
color:var(--ink);
min-height:100vh;padding:clamp(14px,3vw,40px);
}
.ret-11__cat{max-width:920px;margin:0 auto;background:var(--cream);border:2px solid var(--ink);
box-shadow:8px 8px 0 var(--ink);position:relative}
/* aged paper edge */
.ret-11__cat::before{content:'';position:absolute;inset:0;pointer-events:none;
box-shadow:inset 0 0 60px rgba(120,80,30,.12)}
.ret-11__masthead{border-bottom:3px double var(--ink);padding:18px 22px;display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:10px;background:var(--ink);color:var(--paper)}
.ret-11__masthead .ret-11__brand{font-family:'DM Serif Display';font-size:clamp(1.8rem,6vw,3rem);line-height:.9;font-style:italic}
.ret-11__masthead .ret-11__brand b{color:var(--mustard);font-style:normal}
.ret-11__masthead .ret-11__est{font-size:.72rem;letter-spacing:.2em;text-transform:uppercase;text-align:right;line-height:1.6}
.ret-11__est b{color:var(--rust)}
.ret-11__strip{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;background:var(--mustard);color:var(--ink);padding:7px 22px;font-size:.74rem;letter-spacing:.12em;text-transform:uppercase;font-weight:700;border-bottom:2px solid var(--ink)}
.ret-11__hero{padding:22px;display:grid;grid-template-columns:1.1fr 1fr;gap:20px;align-items:center;border-bottom:2px solid var(--ink)}
@media(max-width:640px){.ret-11__hero{grid-template-columns:1fr}}
.ret-11__hero h1{font-family:'Bebas Neue';font-size:clamp(2.4rem,9vw,4.4rem);line-height:.9;letter-spacing:.01em}
.ret-11__hero h1 em{color:var(--rust);font-style:normal}
.ret-11__hero p{margin-top:10px;font-size:.92rem;line-height:1.5}
.ret-11__seal{aspect-ratio:1;max-width:200px;margin:0 auto;border-radius:50%;background:var(--rust);color:var(--cream);
display:grid;place-items:center;text-align:center;padding:20px;position:relative;
box-shadow:0 0 0 4px var(--cream),0 0 0 6px var(--rust)}
.ret-11__seal .big{font-family:'Bebas Neue';font-size:2.6rem;line-height:.85}
.ret-11__seal small{font-size:.62rem;letter-spacing:.2em;text-transform:uppercase;display:block;margin-top:6px}
.ret-11__seal::before{content:'★ ★ ★';position:absolute;bottom:14px;font-size:.6rem;letter-spacing:.3em}
.ret-11__grid{padding:22px;display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
@media(max-width:640px){.ret-11__grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:380px){.ret-11__grid{grid-template-columns:1fr}}
.ret-11__item{border:1.5px solid var(--ink);background:var(--cream);display:flex;flex-direction:column;transition:transform .15s,box-shadow .15s}
.ret-11__item:hover{transform:translate(-3px,-3px);box-shadow:5px 5px 0 var(--ink)}
.ret-11__thumb{aspect-ratio:1;display:grid;place-items:center;font-size:2.6rem;border-bottom:1.5px solid var(--ink);position:relative;overflow:hidden}
.ret-11__thumb.t1{background:repeating-linear-gradient(45deg,#e8c9a0 0 10px,#dcb98a 10px 20px)}
.ret-11__thumb.t2{background:repeating-linear-gradient(45deg,#bcd9d2 0 10px,#a8cdc4 10px 20px)}
.ret-11__thumb.t3{background:repeating-linear-gradient(45deg,#f0cdbf 0 10px,#e8bba8 10px 20px)}
.ret-11__thumb.t4{background:repeating-linear-gradient(45deg,#e4dca0 0 10px,#d8cf88 10px 20px)}
.ret-11__thumb.t5{background:repeating-linear-gradient(45deg,#cfc4e0 0 10px,#bfb2d6 10px 20px)}
.ret-11__thumb.t6{background:repeating-linear-gradient(45deg,#d9d0c4 0 10px,#cabfb0 10px 20px)}
.ret-11__tag{position:absolute;top:8px;left:8px;background:var(--rust);color:var(--cream);font-size:.6rem;font-weight:700;letter-spacing:.1em;padding:3px 7px;text-transform:uppercase}
.ret-11__info{padding:12px;flex:1;display:flex;flex-direction:column}
.ret-11__info h3{font-family:'DM Serif Display';font-size:1.05rem;line-height:1.1}
.ret-11__info .sku{font-size:.66rem;color:#8a7a64;letter-spacing:.1em;margin:3px 0 8px}
.ret-11__price{margin-top:auto;display:flex;align-items:baseline;justify-content:space-between}
.ret-11__price .p{font-family:'Bebas Neue';font-size:1.6rem;color:var(--teal)}
.ret-11__price .was{font-size:.74rem;text-decoration:line-through;color:#a89880}
.ret-11__add{display:block;text-align:center;margin-top:10px;background:var(--ink);color:var(--cream);text-decoration:none;
font-size:.7rem;font-weight:700;letter-spacing:.15em;text-transform:uppercase;padding:8px;transition:background .2s}
.ret-11__add:hover{background:var(--rust)}
.ret-11__order{border-top:3px double var(--ink);padding:20px 22px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:14px;background:var(--teal);color:var(--cream)}
.ret-11__order .t{font-family:'DM Serif Display';font-size:1.2rem;font-style:italic}
.ret-11__order .phone{font-family:'Bebas Neue';font-size:1.8rem;letter-spacing:.04em}
.ret-11__order .cart{background:var(--mustard);color:var(--ink);border:2px solid var(--cream);font-family:'Bebas Neue';font-size:1.2rem;letter-spacing:.05em;padding:8px 22px;cursor:pointer}
@media (prefers-reduced-motion: reduce){.ret-11 *{transition:none !important}}
```
### 12. Retro Desktop Portfolio Website Template
**Type:** CSS + JS
**Description:** A classic desktop-OS portfolio: a System-style menu bar with live clock, desktop folder icons, and stacked windows (about / projects / contact) you can drag and bring-to-focus. The chrome — pin-striped title bars, gel close dots, dashed dividers — is pure CSS; focus + drag are tiny vanilla JS. Pixelify Sans + Space Mono on a dotted teal desktop.
**HTML:**
```html
about_me.txt ▢
🧑💻
Hi, I'm Mara.// CREATIVE DEVELOPER
I build playful interfaces with a soft spot for old machines. Drag these windows around — focus & drag are tiny vanilla JS, everything else is pure CSS.
CSS Motion WebGL Type Pixels
projects ▢
Selected Work
🎨 Pixel Painter Canvas · 2025
→
🎹 Synth Web Toy WebAudio · 2024
→
🌀 CRT Shader Lab GLSL · 2024
→
▲ drag any title bar · click to focus ▲
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Chicago&family=Pixelify+Sans:wght@400;700&family=Space+Mono:wght@400;700&display=swap');
.ret-12, .ret-12 *, .ret-12 *::before, .ret-12 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ret-12 ::selection{background:#000;color:#d6f5e3}
.ret-12{
--bg:#3a6b5e;
--win:#e8e4d8;
--ink:#1a1a1a;
--bar:#1a1a1a;
--accent:#ff5a3c;
--accent2:#3c7dff;
--line:#1a1a1a;
font-family:'Space Mono',monospace;
background:var(--bg);
background-image:radial-gradient(rgba(255,255,255,.06) 1px,transparent 1px);
background-size:6px 6px;
min-height:100vh;position:relative;overflow:hidden;color:var(--ink);
padding:10px;
}
/* menu bar */
.ret-12__menubar{display:flex;align-items:center;gap:18px;background:var(--win);border:2px solid var(--ink);padding:5px 14px;
box-shadow:3px 3px 0 var(--ink);font-family:'Pixelify Sans';font-size:15px;position:relative;z-index:100}
.ret-12__menubar .apple{font-weight:700}
.ret-12__menubar span{cursor:default}
.ret-12__menubar .spacer{margin-left:auto;font-size:13px;display:flex;gap:14px;align-items:center}
.ret-12__menubar .clock{font-family:'Space Mono';font-size:12px}
.ret-12__desk{position:relative;height:calc(100vh - 70px);margin-top:10px}
/* desktop folder icons */
.ret-12__shortcuts{position:absolute;top:6px;right:6px;display:flex;flex-direction:column;gap:18px;z-index:1}
.ret-12__sc{width:74px;text-align:center;cursor:pointer;color:var(--win);text-shadow:1px 1px 0 #000}
.ret-12__sc i{display:block;font-size:30px;filter:drop-shadow(2px 2px 0 rgba(0,0,0,.4))}
.ret-12__sc span{font-size:11px;font-family:'Pixelify Sans';display:inline-block;margin-top:3px;padding:1px 4px}
.ret-12__sc:hover span{background:var(--ink);color:var(--win)}
/* windows */
.ret-12__window{position:absolute;background:var(--win);border:2px solid var(--ink);box-shadow:5px 5px 0 rgba(0,0,0,.5);
display:flex;flex-direction:column;min-width:240px}
.ret-12__window.is-focus{box-shadow:7px 7px 0 var(--ink);z-index:50}
.ret-12__titlebar{display:flex;align-items:center;gap:8px;background:var(--bar);color:var(--win);padding:5px 8px;cursor:grab;user-select:none}
.ret-12__titlebar.is-drag{cursor:grabbing}
.ret-12__titlebar .dot{width:13px;height:13px;border:2px solid var(--win);border-radius:50%;flex:0 0 auto}
.ret-12__titlebar .dot.r{background:var(--accent)}
.ret-12__titlebar b{font-family:'Pixelify Sans';font-size:14px;letter-spacing:.02em;flex:1;
background:repeating-linear-gradient(var(--win) 0 1px,transparent 1px 3px);padding:2px 8px;text-align:center;color:var(--win)}
.ret-12__titlebar .x{margin-left:auto}
.ret-12__content{padding:16px;font-size:12px;line-height:1.55}
.ret-12__content h2{font-family:'Pixelify Sans';font-size:20px;margin-bottom:4px}
.ret-12__content h2 small{display:block;font-family:'Space Mono';font-size:11px;color:#5a6b64;letter-spacing:.1em;margin-top:4px}
.ret-12__content p{color:#3a3a3a}
.ret-12__divider{border:0;border-top:2px dashed var(--ink);margin:12px 0}
/* about window */
.ret-12__about{width:300px;top:18px;left:14px}
.ret-12__avatar{width:64px;height:64px;border:2px solid var(--ink);float:left;margin:0 14px 8px 0;
background:repeating-conic-gradient(var(--accent) 0 90deg,var(--accent2) 0 180deg) 0 0/16px 16px;display:grid;place-items:center;font-size:30px;background-blend-mode:multiply}
.ret-12__tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;clear:both}
.ret-12__tags span{font-size:10px;border:1.5px solid var(--ink);padding:3px 7px;font-family:'Pixelify Sans'}
/* projects window */
.ret-12__projects{width:330px;top:120px;left:230px}
@media(max-width:680px){.ret-12__projects{left:14px;top:300px}}
.ret-12__proj{display:flex;align-items:center;gap:10px;border:1.5px solid var(--ink);padding:9px;margin-bottom:8px;cursor:pointer;transition:transform .1s,background .1s}
.ret-12__proj:hover{transform:translate(-2px,-2px);background:#fff;box-shadow:3px 3px 0 var(--ink)}
.ret-12__proj i{font-size:22px}
.ret-12__proj .meta b{font-family:'Pixelify Sans';font-size:13px;display:block}
.ret-12__proj .meta small{font-size:10px;color:#5a6b64}
.ret-12__proj .arrow{margin-left:auto;font-weight:700}
/* contact window */
.ret-12__contact{width:248px;top:330px;left:30px}
@media(max-width:680px){.ret-12__contact{display:none}}
.ret-12__contact a{display:block;color:var(--accent2);text-decoration:none;border-bottom:1px dotted var(--accent2);padding:4px 0;font-size:12px}
.ret-12__contact a:hover{background:var(--accent2);color:#fff;padding-left:6px}
.ret-12__hint{position:absolute;bottom:6px;left:50%;transform:translateX(-50%);font-size:10px;color:rgba(255,255,255,.7);letter-spacing:.1em;z-index:1}
@media(max-width:680px){.ret-12__about{left:14px;width:calc(100% - 60px);max-width:300px}.ret-12__shortcuts{display:none}}
@media (prefers-reduced-motion: reduce){.ret-12 *{transition:none !important}}
```
**JS:**
```js
(() => {
const root = document.querySelector('.ret-12');
if (!root) return;
const desk = root.querySelector('#ret-12-desk');
const wins = Array.from(root.querySelectorAll('[data-win]'));
let z = 50;
function focus(win){
wins.forEach(w => w.classList.remove('is-focus'));
win.classList.add('is-focus');
win.style.zIndex = ++z;
}
wins.forEach(win => {
win.addEventListener('mousedown', () => focus(win), true);
const bar = win.querySelector('[data-drag]');
let sx, sy, ox, oy, dragging = false;
const start = (cx, cy) => {
dragging = true; focus(win);
const r = win.getBoundingClientRect();
const d = desk.getBoundingClientRect();
ox = r.left - d.left; oy = r.top - d.top; sx = cx; sy = cy;
win.style.left = ox + 'px'; win.style.top = oy + 'px'; win.style.right = 'auto';
bar.classList.add('is-drag');
};
const move = (cx, cy) => {
if (!dragging) return;
let nx = ox + (cx - sx), ny = oy + (cy - sy);
const d = desk.getBoundingClientRect();
nx = Math.max(0, Math.min(nx, d.width - 60));
ny = Math.max(0, Math.min(ny, d.height - 30));
win.style.left = nx + 'px'; win.style.top = ny + 'px';
};
const end = () => { dragging = false; bar.classList.remove('is-drag'); };
bar.addEventListener('mousedown', e => { e.preventDefault(); start(e.clientX, e.clientY); });
window.addEventListener('mousemove', e => move(e.clientX, e.clientY));
window.addEventListener('mouseup', end);
bar.addEventListener('touchstart', e => { start(e.touches[0].clientX, e.touches[0].clientY); }, {passive:true});
window.addEventListener('touchmove', e => { if(dragging){ move(e.touches[0].clientX, e.touches[0].clientY); } }, {passive:true});
window.addEventListener('touchend', end);
});
const clock = root.querySelector('#ret-12-clock');
const tick = () => {
const d = new Date();
let h = d.getHours(), m = String(d.getMinutes()).padStart(2,'0');
const ap = h >= 12 ? 'PM' : 'AM'; h = h % 12 || 12;
clock.textContent = `${h}:${m} ${ap}`;
};
tick(); setInterval(tick, 10000);
})();
```
---
## 12 CSS Ripple Effects
URL: https://codefronts.com/motion/css-ripple-designs/
Description: 12 hand-coded CSS ripple animations covering every production pattern in 2026 — interactive water-surface click ripples with multi-ring concentric expansion, vanilla Material Design ink button ripple, animated pond background with bubble particles, neon glow ripple, pure-CSS ripple loading spinner, sonar ping for live status indicators, heartbeat pulse for medical and fitness UIs, ripple card hover effect, sound wave visualiser (no Web Audio API required), liquid drop animation, ripple-driven login form, and aurora borealis ripple background. All GPU-accelerated via transform + opacity only (no layout thrashing, 60fps on mid-tier mobile), respect prefers-reduced-motion, use scoped .rpl-NN__* class names so multiple can coexist on the same page, and ship MIT-licensed with zero framework dependencies. 6 demos are 100% pure CSS, 6 use vanilla JavaScript for click coordinates / particle spawning / live state.
Demo count: 12
### 01. CSS Water Ripple Click Effect
**Type:** CSS + JS
**Description:** An interactive water-surface pond you click to create realistic multi-ring ripples — four concentric CSS rings (box-shadow glow, fade-out scale) spawn at the exact cursor coordinate via JS, plus a radial-gradient caustic shimmer overlay and animated floating bubble particles. Outfit on a deep ocean radial-gradient with phosphor-blue palette.
**HTML:**
```html
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');
.rpl-01, .rpl-01 *, .rpl-01 *::before, .rpl-01 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.rpl-01 ::selection { background: #00d4ff; color: #001a2e; }
.rpl-01 {
--deep: #001a2e;
--mid: #003a5c;
--water: #00a8cc;
--foam: #00d4ff;
--glint: #7ef7ff;
--text: #e0f7ff;
font-family: 'Outfit', sans-serif;
background: radial-gradient(ellipse at 50% 0%, #003a5c, #001015 70%);
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 40px;
padding: 40px 20px;
color: var(--text);
overflow: hidden;
position: relative;
}
/* Animated depth lines */
.rpl-01::before {
content: '';
position: absolute;
inset: 0;
background:
repeating-linear-gradient(0deg, transparent 0px, transparent 48px, rgba(0,168,204,0.06) 48px, rgba(0,168,204,0.06) 50px);
pointer-events: none;
}
.rpl-01__header {
text-align: center;
z-index: 2;
}
.rpl-01__header h1 {
font-size: clamp(1.8rem, 5vw, 3rem);
font-weight: 700;
letter-spacing: -0.02em;
background: linear-gradient(135deg, var(--glint), var(--foam), var(--water));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.rpl-01__header p {
margin-top: 8px;
font-size: 1rem;
color: rgba(224,247,255,0.55);
font-weight: 300;
}
/* The water surface */
.rpl-01__pond {
width: min(700px, 100%);
height: 400px;
position: relative;
border-radius: 20px;
overflow: hidden;
cursor: crosshair;
border: 1px solid rgba(0,212,255,0.2);
box-shadow: 0 0 60px rgba(0,168,204,0.25), inset 0 0 80px rgba(0,20,40,0.6);
background:
radial-gradient(ellipse at 50% 0%, rgba(0,168,204,0.18), transparent 60%),
linear-gradient(180deg, #001f38 0%, #000e1a 100%);
z-index: 2;
}
/* Caustic shimmer overlay */
.rpl-01__pond::before {
content: '';
position: absolute;
inset: 0;
background:
radial-gradient(ellipse 200% 80% at 50% 100%, rgba(0,168,204,0.12), transparent),
repeating-linear-gradient(60deg, transparent 0px, transparent 20px, rgba(0,212,255,0.03) 20px, rgba(0,212,255,0.03) 21px),
repeating-linear-gradient(-60deg, transparent 0px, transparent 20px, rgba(0,212,255,0.03) 20px, rgba(0,212,255,0.03) 21px);
animation: rpl-01-caustic 8s linear infinite;
pointer-events: none;
z-index: 1;
}
@keyframes rpl-01-caustic { to { background-position: 0 40px, 30px 0, -30px 0; } }
.rpl-01__pond::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(180deg, transparent 60%, rgba(0,10,20,0.5) 100%);
pointer-events: none;
z-index: 3;
}
/* A ripple ring spawned by JS */
.rpl-01__ripple {
position: absolute;
border-radius: 50%;
transform: translate(-50%, -50%) scale(0);
pointer-events: none;
z-index: 2;
animation: rpl-01-wave 2.4s cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
}
@keyframes rpl-01-wave {
0% { transform: translate(-50%,-50%) scale(0); opacity: 1; }
100% { transform: translate(-50%,-50%) scale(1); opacity: 0; }
}
/* Three concentric ring sizes */
.rpl-01__ripple--a {
width: 60px; height: 60px;
border: 2px solid rgba(0,212,255,0.9);
box-shadow: 0 0 12px rgba(0,212,255,0.5), inset 0 0 12px rgba(0,212,255,0.1);
}
.rpl-01__ripple--b {
width: 130px; height: 130px;
border: 1.5px solid rgba(0,168,204,0.65);
box-shadow: 0 0 20px rgba(0,168,204,0.3);
animation-delay: 0.12s;
}
.rpl-01__ripple--c {
width: 220px; height: 220px;
border: 1px solid rgba(0,120,160,0.4);
animation-delay: 0.26s;
}
.rpl-01__ripple--d {
width: 340px; height: 340px;
border: 0.5px solid rgba(0,90,120,0.25);
animation-delay: 0.44s;
}
/* Center drop dot */
.rpl-01__drop {
position: absolute;
width: 8px; height: 8px;
border-radius: 50%;
background: radial-gradient(circle at 35% 30%, #7ef7ff, #00d4ff);
transform: translate(-50%, -50%) scale(0);
pointer-events: none;
z-index: 4;
animation: rpl-01-drop 0.4s cubic-bezier(0.2, 0.9, 0.4, 1) forwards;
box-shadow: 0 0 14px #00d4ff;
}
@keyframes rpl-01-drop {
0% { transform: translate(-50%,-50%) scale(0); opacity: 1; }
60% { transform: translate(-50%,-50%) scale(1.4); opacity: 1; }
100% { transform: translate(-50%,-50%) scale(0.6); opacity: 0; }
}
.rpl-01__label {
position: absolute;
bottom: 18px;
left: 50%;
transform: translateX(-50%);
font-size: 0.75rem;
color: rgba(0,212,255,0.4);
letter-spacing: 0.2em;
text-transform: uppercase;
z-index: 4;
pointer-events: none;
animation: rpl-01-pulse 2s ease-in-out infinite;
}
@keyframes rpl-01-pulse { 50% { opacity: 0.2; } }
/* Ambient floating particles */
.rpl-01__particle {
position: absolute;
border-radius: 50%;
background: rgba(0,212,255,0.6);
pointer-events: none;
z-index: 1;
animation: rpl-01-float linear infinite;
}
@keyframes rpl-01-float {
0% { transform: translateY(0) scale(1); opacity: 0.6; }
50% { opacity: 0.2; }
100% { transform: translateY(-380px) scale(0.3); opacity: 0; }
}
.rpl-01__info {
display: flex;
gap: 32px;
z-index: 2;
flex-wrap: wrap;
justify-content: center;
}
.rpl-01__stat {
text-align: center;
}
.rpl-01__stat b {
display: block;
font-size: 1.8rem;
font-weight: 700;
color: var(--foam);
}
.rpl-01__stat span {
font-size: 0.75rem;
color: rgba(224,247,255,0.4);
letter-spacing: 0.15em;
text-transform: uppercase;
}
@media (prefers-reduced-motion: reduce) {
.rpl-01__pond::before, .rpl-01__label, .rpl-01__particle { animation: none !important; }
.rpl-01__ripple, .rpl-01__drop { animation-duration: 0.01ms !important; }
}
```
**JS:**
```js
(() => {
const pond = document.getElementById('rpl-01-pond');
const countEl = document.getElementById('rpl-01-count');
const ringsEl = document.getElementById('rpl-01-rings');
let dropCount = 0;
let activeRings = 0;
// Spawn ambient particles
for (let i = 0; i < 12; i++) {
const p = document.createElement('div');
p.className = 'rpl-01__particle';
const size = Math.random() * 4 + 1;
p.style.cssText = `
width:${size}px; height:${size}px;
left:${Math.random()*100}%;
bottom:${Math.random()*100}%;
opacity:${Math.random()*0.6+0.1};
animation-duration:${Math.random()*6+4}s;
animation-delay:${Math.random()*-6}s;
`;
pond.appendChild(p);
}
pond.addEventListener('click', (e) => {
const rect = pond.getBoundingClientRect();
const x = e.clientX - rect.left;
const y = e.clientY - rect.top;
dropCount++;
countEl.textContent = dropCount;
// spawn drop dot
const drop = document.createElement('div');
drop.className = 'rpl-01__drop';
drop.style.left = x + 'px';
drop.style.top = y + 'px';
pond.appendChild(drop);
// spawn 4 concentric rings
['a','b','c','d'].forEach((t, i) => {
const r = document.createElement('div');
r.className = `rpl-01__ripple rpl-01__ripple--${t}`;
r.style.left = x + 'px';
r.style.top = y + 'px';
pond.appendChild(r);
activeRings++;
ringsEl.textContent = activeRings;
r.addEventListener('animationend', () => {
r.remove();
activeRings = Math.max(0, activeRings - 1);
ringsEl.textContent = activeRings;
}, { once: true });
});
drop.addEventListener('animationend', () => drop.remove(), { once: true });
});
})();
```
### 02. CSS Ripple Button Click Animation
**Type:** CSS + JS
**Description:** A full Material-style ink-ripple button kit in eight color variants — fire, ocean, emerald, violet, gold, rose, ghost and dark-surface — each with a radial ink span injected at the click coordinate that scales to fill and fades. A live code snippet panel explains the technique. Inter on a near-black surface.
**HTML:**
```html
🔥 Get Started
🌊 Dive In
✓ Confirm
✦ Upgrade
★ Premium
♥ Save
Ghost Style
Dark Surface
How it works
/* On click, inject a positioned ink div */
.btn { position: relative; overflow: hidden; }
.ink {
position: absolute; border-radius: 50%;
animation: ink-expand 0.6s linear forwards;
}
@keyframes ink-expand {
to { transform: scale(4); opacity: 0; }
}
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
.rpl-02, .rpl-02 *, .rpl-02 *::before, .rpl-02 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.rpl-02 ::selection { background: #ff6b35; color: #fff; }
.rpl-02 {
--bg: #0f0f13;
--surface: #1a1a23;
--border: rgba(255,255,255,0.08);
--text: #f0f0f5;
--muted: rgba(240,240,245,0.45);
font-family: 'Inter', sans-serif;
background: var(--bg);
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 56px;
padding: 60px 24px;
color: var(--text);
}
.rpl-02__header {
text-align: center;
}
.rpl-02__header h1 {
font-size: clamp(1.6rem, 4vw, 2.4rem);
font-weight: 700;
letter-spacing: -0.03em;
}
.rpl-02__header p {
margin-top: 10px;
color: var(--muted);
font-weight: 300;
font-size: 0.95rem;
}
.rpl-02__grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
width: min(860px, 100%);
}
/* The core ripple button */
.rpl-02__btn {
position: relative;
overflow: hidden;
border: none;
cursor: pointer;
font-family: 'Inter';
font-weight: 600;
font-size: 0.95rem;
letter-spacing: 0.01em;
padding: 18px 32px;
border-radius: 12px;
color: #fff;
transition: transform 0.15s, filter 0.15s;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
min-height: 60px;
}
.rpl-02__btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.rpl-02__btn:active { transform: translateY(1px); filter: brightness(0.95); }
/* Ripple ink */
.rpl-02__btn .ink {
position: absolute;
border-radius: 50%;
transform: scale(0);
pointer-events: none;
animation: rpl-02-ink 0.6s linear forwards;
}
@keyframes rpl-02-ink {
to { transform: scale(4); opacity: 0; }
}
/* Variant colors */
.rpl-02__btn--fire {
background: linear-gradient(135deg, #ff4500, #ff6b35);
box-shadow: 0 8px 32px rgba(255,69,0,0.35);
}
.rpl-02__btn--fire .ink { background: rgba(255,200,150,0.45); }
.rpl-02__btn--ocean {
background: linear-gradient(135deg, #0077b6, #00b4d8);
box-shadow: 0 8px 32px rgba(0,119,182,0.35);
}
.rpl-02__btn--ocean .ink { background: rgba(160,230,255,0.4); }
.rpl-02__btn--emerald {
background: linear-gradient(135deg, #065f46, #10b981);
box-shadow: 0 8px 32px rgba(16,185,129,0.3);
}
.rpl-02__btn--emerald .ink { background: rgba(160,255,210,0.4); }
.rpl-02__btn--violet {
background: linear-gradient(135deg, #5b21b6, #8b5cf6);
box-shadow: 0 8px 32px rgba(139,92,246,0.35);
}
.rpl-02__btn--violet .ink { background: rgba(220,190,255,0.4); }
.rpl-02__btn--gold {
background: linear-gradient(135deg, #92400e, #f59e0b);
box-shadow: 0 8px 32px rgba(245,158,11,0.3);
}
.rpl-02__btn--gold .ink { background: rgba(255,245,180,0.45); }
.rpl-02__btn--rose {
background: linear-gradient(135deg, #9f1239, #fb7185);
box-shadow: 0 8px 32px rgba(251,113,133,0.35);
}
.rpl-02__btn--rose .ink { background: rgba(255,200,210,0.4); }
/* Outlined ghost variant */
.rpl-02__btn--ghost {
background: transparent;
border: 1.5px solid rgba(255,255,255,0.25);
color: var(--text);
box-shadow: none;
}
.rpl-02__btn--ghost:hover { border-color: rgba(255,255,255,0.55); background: rgba(255,255,255,0.04); }
.rpl-02__btn--ghost .ink { background: rgba(255,255,255,0.15); }
/* Dark surface variant */
.rpl-02__btn--dark {
background: var(--surface);
border: 1.5px solid var(--border);
color: var(--text);
box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.rpl-02__btn--dark .ink { background: rgba(255,255,255,0.12); }
/* Icon pill */
.rpl-02__icon {
font-size: 1.1rem;
line-height: 1;
}
/* Code snippet */
.rpl-02__code {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 24px;
width: min(860px, 100%);
}
.rpl-02__code h3 {
font-size: 0.7rem;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--muted);
margin-bottom: 14px;
}
.rpl-02__code pre {
font-size: 0.82rem;
line-height: 1.65;
color: rgba(240,240,245,0.75);
font-family: 'Courier New', monospace;
white-space: pre-wrap;
word-break: break-word;
}
.rpl-02__code .kw { color: #c084fc; }
.rpl-02__code .str { color: #86efac; }
.rpl-02__code .cm { color: rgba(240,240,245,0.3); font-style: italic; }
@media (prefers-reduced-motion: reduce) {
.rpl-02__btn .ink { animation: none !important; }
.rpl-02__btn { transition: none; }
}
```
**JS:**
```js
document.querySelectorAll('.rpl-02__btn').forEach(btn => {
btn.addEventListener('click', function(e) {
const rect = this.getBoundingClientRect();
const x = e.clientX - rect.left;
const y = e.clientY - rect.top;
const size = Math.max(rect.width, rect.height);
const ink = document.createElement('span');
ink.className = 'ink';
ink.style.cssText = `
left:${x - size/2}px; top:${y - size/2}px;
width:${size}px; height:${size}px;
`;
this.appendChild(ink);
ink.addEventListener('animationend', () => ink.remove(), { once: true });
});
});
```
### 03. CSS Pond Ripple Background Animation
**Type:** CSS + JS
**Description:** A multi-origin pond ripple hero with four separate drop-sources — each triggering 2–4 staggered ring keyframes at different radii and speeds — plus pulsing drop-center dots, a frosted-glass editorial card and drifting leaf particles, all pure CSS. DM Serif Display + DM Sans on a deep emerald gradient.
**HTML:**
```html
Pure CSS Background
Still waters,endless ripples.
A multi-origin pond ripple background built from layered CSS keyframes — no canvas, no JavaScript, just rings that breathe.
Explore the Demo →
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500&display=swap');
.rpl-03, .rpl-03 *, .rpl-03 *::before, .rpl-03 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.rpl-03 ::selection { background: #5eead4; color: #042f2e; }
.rpl-03 {
font-family: 'DM Sans', sans-serif;
background: linear-gradient(160deg, #042f2e 0%, #064e3b 35%, #065f46 60%, #022c22 100%);
min-height: 100vh;
position: relative;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 24px;
}
/* ─── Animated pond ripple rings (pure CSS, no JS) ─── */
.rpl-03__ring {
position: absolute;
border-radius: 50%;
border: 1.5px solid rgba(94,234,212,0.5);
transform: translate(-50%, -50%) scale(0);
pointer-events: none;
}
/* Ripple group A — center-left */
.rpl-03__ring--a1 { left: 28%; top: 55%; width: 400px; height: 400px; animation: rpl-03-expand 4s ease-out infinite; }
.rpl-03__ring--a2 { left: 28%; top: 55%; width: 400px; height: 400px; animation: rpl-03-expand 4s ease-out 0.8s infinite; border-color: rgba(94,234,212,0.3); }
.rpl-03__ring--a3 { left: 28%; top: 55%; width: 400px; height: 400px; animation: rpl-03-expand 4s ease-out 1.6s infinite; border-color: rgba(94,234,212,0.15); }
.rpl-03__ring--a4 { left: 28%; top: 55%; width: 400px; height: 400px; animation: rpl-03-expand 4s ease-out 2.4s infinite; border-color: rgba(94,234,212,0.07); }
/* Ripple group B — right */
.rpl-03__ring--b1 { left: 72%; top: 38%; width: 320px; height: 320px; animation: rpl-03-expand 5s ease-out 1.2s infinite; border-color: rgba(52,211,153,0.45); }
.rpl-03__ring--b2 { left: 72%; top: 38%; width: 320px; height: 320px; animation: rpl-03-expand 5s ease-out 2.2s infinite; border-color: rgba(52,211,153,0.25); }
.rpl-03__ring--b3 { left: 72%; top: 38%; width: 320px; height: 320px; animation: rpl-03-expand 5s ease-out 3.2s infinite; border-color: rgba(52,211,153,0.1); }
/* Ripple group C — top-right (small) */
.rpl-03__ring--c1 { left: 85%; top: 20%; width: 200px; height: 200px; animation: rpl-03-expand 3.2s ease-out 0.4s infinite; border-color: rgba(110,231,183,0.6); }
.rpl-03__ring--c2 { left: 85%; top: 20%; width: 200px; height: 200px; animation: rpl-03-expand 3.2s ease-out 1.1s infinite; border-color: rgba(110,231,183,0.3); }
/* Ripple group D — bottom-left (tiny) */
.rpl-03__ring--d1 { left: 12%; top: 78%; width: 160px; height: 160px; animation: rpl-03-expand 2.8s ease-out 1.8s infinite; border-color: rgba(167,243,208,0.55); }
.rpl-03__ring--d2 { left: 12%; top: 78%; width: 160px; height: 160px; animation: rpl-03-expand 2.8s ease-out 2.5s infinite; border-color: rgba(167,243,208,0.25); }
@keyframes rpl-03-expand {
0% { transform: translate(-50%,-50%) scale(0); opacity: 1; }
70% { opacity: 0.6; }
100% { transform: translate(-50%,-50%) scale(1); opacity: 0; }
}
/* Drop-point dots */
.rpl-03__drop {
position: absolute;
width: 8px; height: 8px;
border-radius: 50%;
background: radial-gradient(circle at 35% 30%, #a7f3d0, #5eead4);
transform: translate(-50%, -50%);
box-shadow: 0 0 12px rgba(94,234,212,0.8);
animation: rpl-03-drip 4s ease-in-out infinite;
}
.rpl-03__drop--a { left: 28%; top: 55%; }
.rpl-03__drop--b { left: 72%; top: 38%; animation-delay: 1.2s; animation-duration: 5s; }
.rpl-03__drop--c { left: 85%; top: 20%; animation-delay: 0.4s; animation-duration: 3.2s; width: 5px; height: 5px; }
.rpl-03__drop--d { left: 12%; top: 78%; animation-delay: 1.8s; animation-duration: 2.8s; width: 5px; height: 5px; }
@keyframes rpl-03-drip {
0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
40% { transform: translate(-50%,-50%) scale(1.5); opacity: 0.6; }
50% { transform: translate(-50%,-50%) scale(0.5); opacity: 1; }
}
/* Soft gradient fog layers */
.rpl-03__fog {
position: absolute;
inset: 0;
background:
radial-gradient(ellipse 60% 40% at 28% 55%, rgba(16,185,129,0.12), transparent 70%),
radial-gradient(ellipse 50% 40% at 72% 38%, rgba(52,211,153,0.10), transparent 70%),
radial-gradient(ellipse 35% 30% at 85% 20%, rgba(110,231,183,0.08), transparent 70%);
pointer-events: none;
}
/* Content card */
.rpl-03__card {
position: relative;
z-index: 10;
background: rgba(4,47,46,0.55);
backdrop-filter: blur(16px);
border: 1px solid rgba(94,234,212,0.2);
border-radius: 24px;
padding: clamp(32px, 5vw, 56px) clamp(28px, 6vw, 64px);
text-align: center;
max-width: 560px;
box-shadow: 0 0 0 1px rgba(94,234,212,0.05) inset, 0 40px 80px rgba(0,0,0,0.4);
}
.rpl-03__card .eyebrow {
font-size: 0.7rem;
letter-spacing: 0.25em;
text-transform: uppercase;
color: #5eead4;
margin-bottom: 16px;
}
.rpl-03__card h1 {
font-family: 'DM Serif Display';
font-size: clamp(2.2rem, 7vw, 3.6rem);
line-height: 1.0;
color: #f0fdfb;
}
.rpl-03__card h1 em {
color: #5eead4;
font-style: italic;
}
.rpl-03__card p {
margin-top: 16px;
font-size: 1rem;
color: rgba(209,250,229,0.65);
line-height: 1.6;
font-weight: 300;
}
.rpl-03__cta {
display: inline-flex;
align-items: center;
gap: 10px;
margin-top: 28px;
background: linear-gradient(135deg, #059669, #10b981);
color: #fff;
font-weight: 600;
font-size: 0.9rem;
padding: 14px 30px;
border-radius: 40px;
text-decoration: none;
box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset, 0 8px 24px rgba(5,150,105,0.4);
transition: transform 0.2s, box-shadow 0.2s;
}
.rpl-03__cta:hover {
transform: translateY(-2px);
box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset, 0 16px 40px rgba(5,150,105,0.5);
}
/* Floating leaf particles */
.rpl-03__leaf {
position: absolute;
width: 6px; height: 6px;
border-radius: 50%;
background: rgba(52,211,153,0.5);
pointer-events: none;
animation: rpl-03-drift linear infinite;
}
@keyframes rpl-03-drift {
0% { transform: translateY(0) translateX(0) scale(1); opacity: 0.7; }
50% { transform: translateY(-80px) translateX(20px) scale(0.7); opacity: 0.3; }
100% { transform: translateY(-160px) translateX(-10px) scale(0.3); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
.rpl-03__ring, .rpl-03__drop, .rpl-03__leaf { animation: none !important; opacity: 0.2; }
.rpl-03__cta { transition: none; }
}
```
**JS:**
```js
// Spawn floating particles
(function() {
const scene = document.querySelector('.rpl-03');
for (let i = 0; i < 16; i++) {
const el = document.createElement('div');
el.className = 'rpl-03__leaf';
const size = Math.random() * 5 + 3;
el.style.cssText = `
width:${size}px;height:${size}px;
left:${Math.random()*100}%;
top:${Math.random()*100}%;
animation-duration:${Math.random()*8+6}s;
animation-delay:${Math.random()*-8}s;
opacity:${Math.random()*0.5+0.1};
`;
scene.appendChild(el);
}
})();
```
### 04. CSS Neon Glow Ripple Effect
**Type:** Pure CSS
**Description:** Six neon-core ripple emitters on a dark grid: magenta, cyan, lime, orange, electric-blue and plasma-white — each a 24px glowing core with four rings that scale from 0 to 100% with staggered delays, box-shadow neon glow and color-matched hues. Orbitron + Rajdhani on a near-black #050008 background.
**HTML:**
```html
Neon Glow Ripple Effects
CSS box-shadow glow · keyframe scale
Every ring is a single div, scaled from 0 to 1 with a staggered delay. The neon glow comes from layered box-shadow — no SVG filters required.
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;600&display=swap');
.rpl-04, .rpl-04 *, .rpl-04 *::before, .rpl-04 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.rpl-04 ::selection { background: #f0ff00; color: #0a0010; }
.rpl-04 {
font-family: 'Rajdhani', sans-serif;
background: #050008;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 60px;
padding: 60px 24px;
color: #e8e0ff;
overflow: hidden;
position: relative;
}
/* Subtle grid */
.rpl-04::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(160,80,255,0.06) 1px, transparent 1px),
linear-gradient(90deg, rgba(160,80,255,0.06) 1px, transparent 1px);
background-size: 40px 40px;
pointer-events: none;
}
.rpl-04__title {
font-family: 'Orbitron';
font-size: clamp(1.4rem, 4vw, 2.4rem);
font-weight: 900;
text-align: center;
letter-spacing: 0.08em;
background: linear-gradient(135deg, #ff00ff, #a000ff, #00ffff);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
filter: drop-shadow(0 0 20px rgba(160,0,255,0.5));
z-index: 2;
}
/* ─── Main neon ripple display ─── */
.rpl-04__stage {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 40px;
z-index: 2;
width: min(900px, 100%);
}
@media (max-width: 640px) { .rpl-04__stage { grid-template-columns: repeat(2, 1fr); gap: 28px; } }
@media (max-width: 420px) { .rpl-04__stage { grid-template-columns: 1fr; } }
.rpl-04__node {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.rpl-04__ripple-wrap {
position: relative;
width: 120px; height: 120px;
display: grid;
place-items: center;
}
/* Center core */
.rpl-04__core {
position: absolute;
border-radius: 50%;
z-index: 2;
}
/* Neon rings — 4 per node */
.rpl-04__ring {
position: absolute;
border-radius: 50%;
transform: scale(0);
inset: 0;
animation: rpl-04-glow 3s ease-out infinite;
}
/* MAGENTA node */
.rpl-04__node--mag .rpl-04__core {
width: 24px; height: 24px;
background: radial-gradient(circle at 35% 30%, #ff80ff, #ff00cc);
box-shadow: 0 0 20px #ff00cc, 0 0 40px rgba(255,0,204,0.5);
}
.rpl-04__node--mag .rpl-04__ring { border: 1.5px solid #ff00cc; box-shadow: 0 0 8px #ff00cc; }
.rpl-04__node--mag .rpl-04__ring:nth-child(2) { animation-delay: 0.6s; }
.rpl-04__node--mag .rpl-04__ring:nth-child(3) { animation-delay: 1.2s; }
.rpl-04__node--mag .rpl-04__ring:nth-child(4) { animation-delay: 1.8s; }
/* CYAN node */
.rpl-04__node--cyn .rpl-04__core {
width: 24px; height: 24px;
background: radial-gradient(circle at 35% 30%, #80ffff, #00ffee);
box-shadow: 0 0 20px #00ffee, 0 0 40px rgba(0,255,238,0.5);
}
.rpl-04__node--cyn .rpl-04__ring { border: 1.5px solid #00ffee; box-shadow: 0 0 8px #00ffee; }
.rpl-04__node--cyn .rpl-04__ring:nth-child(2) { animation-delay: 0.5s; }
.rpl-04__node--cyn .rpl-04__ring:nth-child(3) { animation-delay: 1.0s; }
.rpl-04__node--cyn .rpl-04__ring:nth-child(4) { animation-delay: 1.5s; }
/* YELLOW-GREEN node */
.rpl-04__node--lim .rpl-04__core {
width: 24px; height: 24px;
background: radial-gradient(circle at 35% 30%, #eeff80, #aaff00);
box-shadow: 0 0 20px #aaff00, 0 0 40px rgba(170,255,0,0.5);
}
.rpl-04__node--lim .rpl-04__ring { border: 1.5px solid #aaff00; box-shadow: 0 0 8px #aaff00; }
.rpl-04__node--lim .rpl-04__ring:nth-child(2) { animation-delay: 0.7s; }
.rpl-04__node--lim .rpl-04__ring:nth-child(3) { animation-delay: 1.4s; }
.rpl-04__node--lim .rpl-04__ring:nth-child(4) { animation-delay: 2.1s; }
/* ORANGE node */
.rpl-04__node--org .rpl-04__core {
width: 24px; height: 24px;
background: radial-gradient(circle at 35% 30%, #ffcc80, #ff6600);
box-shadow: 0 0 20px #ff6600, 0 0 40px rgba(255,102,0,0.5);
}
.rpl-04__node--org .rpl-04__ring { border: 1.5px solid #ff6600; box-shadow: 0 0 8px #ff6600; }
.rpl-04__node--org .rpl-04__ring:nth-child(2) { animation-delay: 0.55s; }
.rpl-04__node--org .rpl-04__ring:nth-child(3) { animation-delay: 1.1s; }
.rpl-04__node--org .rpl-04__ring:nth-child(4) { animation-delay: 1.65s; }
/* BLUE node */
.rpl-04__node--blu .rpl-04__core {
width: 24px; height: 24px;
background: radial-gradient(circle at 35% 30%, #80b0ff, #0055ff);
box-shadow: 0 0 20px #0055ff, 0 0 40px rgba(0,85,255,0.5);
}
.rpl-04__node--blu .rpl-04__ring { border: 1.5px solid #4488ff; box-shadow: 0 0 8px #4488ff; }
.rpl-04__node--blu .rpl-04__ring:nth-child(2) { animation-delay: 0.65s; }
.rpl-04__node--blu .rpl-04__ring:nth-child(3) { animation-delay: 1.3s; }
.rpl-04__node--blu .rpl-04__ring:nth-child(4) { animation-delay: 1.95s; }
/* WHITE/PURPLE node */
.rpl-04__node--wht .rpl-04__core {
width: 24px; height: 24px;
background: radial-gradient(circle at 35% 30%, #fff, #cc88ff);
box-shadow: 0 0 20px #fff, 0 0 40px rgba(200,136,255,0.6);
}
.rpl-04__node--wht .rpl-04__ring { border: 1.5px solid rgba(220,180,255,0.9); box-shadow: 0 0 8px rgba(220,180,255,0.7); }
.rpl-04__node--wht .rpl-04__ring:nth-child(2) { animation-delay: 0.4s; }
.rpl-04__node--wht .rpl-04__ring:nth-child(3) { animation-delay: 0.8s; }
.rpl-04__node--wht .rpl-04__ring:nth-child(4) { animation-delay: 1.2s; }
@keyframes rpl-04-glow {
0% { transform: scale(0); opacity: 1; }
100% { transform: scale(1); opacity: 0; }
}
.rpl-04__label {
font-family: 'Orbitron';
font-size: 0.62rem;
letter-spacing: 0.18em;
text-transform: uppercase;
opacity: 0.55;
}
/* Bottom hero text */
.rpl-04__hero {
text-align: center;
z-index: 2;
max-width: 560px;
}
.rpl-04__hero h2 {
font-family: 'Orbitron';
font-size: clamp(0.8rem, 2vw, 1.1rem);
font-weight: 400;
letter-spacing: 0.25em;
text-transform: uppercase;
color: rgba(232,224,255,0.5);
margin-bottom: 10px;
}
.rpl-04__hero p {
font-size: 1rem;
color: rgba(232,224,255,0.4);
line-height: 1.6;
font-weight: 300;
}
@media (prefers-reduced-motion: reduce) {
.rpl-04__ring { animation: none !important; opacity: 0.15; }
}
```
### 05. CSS Ripple Loading Spinner
**Type:** Pure CSS
**Description:** A six-spinner loading kit, all CSS ripple variants: an orbit-ring trio, a pulse-expand sequence, a conic-gradient radar sweep, a dot-wave orbit, a morphing square ripple and a dual-arc contrarotating spinner. Space Grotesk on a deep charcoal-brown background with amber, violet, green, cyan, rose and gold accents.
**HTML:**
```html
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
.rpl-05, .rpl-05 *, .rpl-05 *::before, .rpl-05 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.rpl-05 ::selection { background: #f97316; color: #fff; }
.rpl-05 {
font-family: 'Space Grotesk', sans-serif;
background: linear-gradient(135deg, #0c0a09 0%, #1c1410 50%, #0c0a09 100%);
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 64px;
padding: 60px 24px;
color: #faf5f0;
}
.rpl-05__header {
text-align: center;
}
.rpl-05__header h1 {
font-size: clamp(1.6rem, 4vw, 2.2rem);
font-weight: 700;
color: #faf5f0;
letter-spacing: -0.02em;
}
.rpl-05__header p {
margin-top: 8px;
font-size: 0.9rem;
color: rgba(250,245,240,0.4);
font-weight: 300;
}
/* Spinner grid */
.rpl-05__grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
gap: 40px 32px;
width: min(860px, 100%);
align-items: start;
}
.rpl-05__item {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
}
/* ─── Spinner 1: Classic ripple ─── */
.rpl-05__spin-1 {
position: relative;
width: 80px; height: 80px;
}
.rpl-05__spin-1 span {
position: absolute;
inset: 0;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #f97316;
animation: rpl-05-s1 1.2s linear infinite;
}
.rpl-05__spin-1 span:nth-child(2) {
inset: 12px;
border-top-color: #fb923c;
animation-duration: 1.6s;
animation-direction: reverse;
}
.rpl-05__spin-1 span:nth-child(3) {
inset: 24px;
border-top-color: #fdba74;
animation-duration: 1s;
}
@keyframes rpl-05-s1 { to { transform: rotate(360deg); } }
/* ─── Spinner 2: Ripple pulse ─── */
.rpl-05__spin-2 {
position: relative;
width: 80px; height: 80px;
display: grid;
place-items: center;
}
.rpl-05__spin-2 span {
position: absolute;
border-radius: 50%;
border: 2px solid #a78bfa;
animation: rpl-05-s2 2.4s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}
.rpl-05__spin-2 span:nth-child(1) { width: 24px; height: 24px; animation-delay: 0s; }
.rpl-05__spin-2 span:nth-child(2) { width: 24px; height: 24px; animation-delay: 0.6s; }
.rpl-05__spin-2 span:nth-child(3) { width: 24px; height: 24px; animation-delay: 1.2s; }
.rpl-05__spin-2 span:nth-child(4) { width: 24px; height: 24px; animation-delay: 1.8s; }
@keyframes rpl-05-s2 {
0% { width: 0; height: 0; opacity: 1; border-color: #c4b5fd; }
70% { opacity: 0.4; border-color: #7c3aed; }
100% { width: 80px; height: 80px; opacity: 0; }
}
/* ─── Spinner 3: Radar sweep ─── */
.rpl-05__spin-3 {
position: relative;
width: 80px; height: 80px;
border-radius: 50%;
background: conic-gradient(from 0deg, transparent 70%, rgba(34,197,94,0.8) 100%);
animation: rpl-05-s3 1.4s linear infinite;
box-shadow: 0 0 20px rgba(34,197,94,0.2);
}
.rpl-05__spin-3::before {
content: '';
position: absolute;
inset: 6px;
border-radius: 50%;
background: #0c0a09;
}
.rpl-05__spin-3::after {
content: '';
position: absolute;
inset: 0;
border-radius: 50%;
border: 2px solid rgba(34,197,94,0.3);
}
@keyframes rpl-05-s3 { to { transform: rotate(360deg); } }
/* ─── Spinner 4: Dots ripple ─── */
.rpl-05__spin-4 {
position: relative;
width: 80px; height: 80px;
display: grid;
place-items: center;
}
.rpl-05__spin-4 span {
position: absolute;
width: 10px; height: 10px;
border-radius: 50%;
background: #06b6d4;
animation: rpl-05-s4 1.4s ease-in-out infinite;
}
.rpl-05__spin-4 span:nth-child(1) { transform: rotate(0deg) translateX(28px); animation-delay: 0s; }
.rpl-05__spin-4 span:nth-child(2) { transform: rotate(60deg) translateX(28px); animation-delay: 0.23s; }
.rpl-05__spin-4 span:nth-child(3) { transform: rotate(120deg) translateX(28px); animation-delay: 0.46s; }
.rpl-05__spin-4 span:nth-child(4) { transform: rotate(180deg) translateX(28px); animation-delay: 0.69s; }
.rpl-05__spin-4 span:nth-child(5) { transform: rotate(240deg) translateX(28px); animation-delay: 0.92s; }
.rpl-05__spin-4 span:nth-child(6) { transform: rotate(300deg) translateX(28px); animation-delay: 1.15s; }
@keyframes rpl-05-s4 {
0%, 100% { transform: rotate(var(--r,0deg)) translateX(28px) scale(0.5); opacity: 0.3; }
50% { transform: rotate(var(--r,0deg)) translateX(28px) scale(1.2); opacity: 1; }
}
.rpl-05__spin-4 span:nth-child(1) { --r: 0deg; }
.rpl-05__spin-4 span:nth-child(2) { --r: 60deg; }
.rpl-05__spin-4 span:nth-child(3) { --r: 120deg; }
.rpl-05__spin-4 span:nth-child(4) { --r: 180deg; }
.rpl-05__spin-4 span:nth-child(5) { --r: 240deg; }
.rpl-05__spin-4 span:nth-child(6) { --r: 300deg; }
/* ─── Spinner 5: Square ripple ─── */
.rpl-05__spin-5 {
position: relative;
width: 80px; height: 80px;
display: grid;
place-items: center;
}
.rpl-05__spin-5 span {
position: absolute;
border: 2px solid #f43f5e;
animation: rpl-05-s5 2s ease-out infinite;
}
.rpl-05__spin-5 span:nth-child(1) { width: 0; height: 0; animation-delay: 0s; }
.rpl-05__spin-5 span:nth-child(2) { width: 0; height: 0; animation-delay: 0.5s; }
.rpl-05__spin-5 span:nth-child(3) { width: 0; height: 0; animation-delay: 1.0s; }
.rpl-05__spin-5 span:nth-child(4) { width: 0; height: 0; animation-delay: 1.5s; }
@keyframes rpl-05-s5 {
0% { width: 0; height: 0; opacity: 1; border-radius: 0; }
100% { width: 80px; height: 80px; opacity: 0; border-radius: 4px; }
}
/* ─── Spinner 6: Double arc ─── */
.rpl-05__spin-6 {
position: relative;
width: 80px; height: 80px;
}
.rpl-05__spin-6::before, .rpl-05__spin-6::after {
content: '';
position: absolute;
border-radius: 50%;
}
.rpl-05__spin-6::before {
inset: 0;
border: 3px solid transparent;
border-top-color: #fbbf24;
border-bottom-color: #fbbf24;
animation: rpl-05-s1 1.1s linear infinite;
}
.rpl-05__spin-6::after {
inset: 14px;
border: 3px solid transparent;
border-left-color: #f59e0b;
border-right-color: #f59e0b;
animation: rpl-05-s1 0.8s linear infinite reverse;
}
.rpl-05__label {
font-size: 0.78rem;
color: rgba(250,245,240,0.4);
text-transform: uppercase;
letter-spacing: 0.12em;
text-align: center;
}
@media (max-width: 520px) { .rpl-05__grid { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) {
.rpl-05 * { animation-play-state: paused !important; }
}
```
### 06. CSS Sonar Ping Ripple Animation
**Type:** Pure CSS
**Description:** A military-grade sonar scope: conic-gradient sweep arm with a glowing edge, four concentric range-circle grids, four animated blips that appear as the sweep passes and each sprout their own CSS ripple ring. Data readout panels and a blinking status line. Share Tech Mono + Orbitron on phosphor-green #001408.
**HTML:**
```html
SONAR PING RIPPLE
CSS conic-gradient sweep · animated contact blips
▌ SCANNING · PURE CSS · NO CANVAS ▌
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;500;700&display=swap');
.rpl-06, .rpl-06 *, .rpl-06 *::before, .rpl-06 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.rpl-06 ::selection { background: #22c55e; color: #001408; }
.rpl-06 {
font-family: 'Share Tech Mono', monospace;
background: #001408;
min-height: 100vh;
display: grid;
place-items: center;
padding: 24px;
color: #22c55e;
position: relative;
overflow: hidden;
}
/* dark grid lines */
.rpl-06::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(34,197,94,0.06) 1px, transparent 1px),
linear-gradient(90deg, rgba(34,197,94,0.06) 1px, transparent 1px);
background-size: 40px 40px;
}
.rpl-06__panel {
position: relative;
z-index: 2;
width: min(520px, 100%);
display: flex;
flex-direction: column;
align-items: center;
gap: 28px;
}
/* ─── Sonar scope ─── */
.rpl-06__scope {
position: relative;
width: min(420px, 100%);
aspect-ratio: 1;
border-radius: 50%;
background: radial-gradient(circle at 50% 50%, #002810, #000c04 70%);
border: 2px solid rgba(34,197,94,0.3);
box-shadow:
0 0 0 1px rgba(34,197,94,0.1),
0 0 40px rgba(34,197,94,0.15),
inset 0 0 60px rgba(0,0,0,0.7);
overflow: hidden;
}
/* Crosshairs */
.rpl-06__scope::before {
content: '';
position: absolute;
inset: 0;
background:
linear-gradient(0deg, transparent 49.5%, rgba(34,197,94,0.15) 49.5%, rgba(34,197,94,0.15) 50.5%, transparent 50.5%),
linear-gradient(90deg, transparent 49.5%, rgba(34,197,94,0.15) 49.5%, rgba(34,197,94,0.15) 50.5%, transparent 50.5%);
pointer-events: none;
z-index: 3;
}
/* Concentric range rings */
.rpl-06__grid-ring {
position: absolute;
border-radius: 50%;
border: 1px solid rgba(34,197,94,0.18);
top: 50%; left: 50%;
transform: translate(-50%,-50%);
}
.rpl-06__grid-ring:nth-child(1) { width: 25%; height: 25%; }
.rpl-06__grid-ring:nth-child(2) { width: 50%; height: 50%; }
.rpl-06__grid-ring:nth-child(3) { width: 75%; height: 75%; }
.rpl-06__grid-ring:nth-child(4) { width: 100%; height: 100%; border-color: rgba(34,197,94,0.3); }
/* Rotating sweep arm */
.rpl-06__sweep {
position: absolute;
inset: 0;
border-radius: 50%;
background: conic-gradient(from 0deg, rgba(34,197,94,0.45) 0deg, rgba(34,197,94,0.15) 25deg, transparent 90deg);
animation: rpl-06-sweep 3s linear infinite;
z-index: 2;
}
@keyframes rpl-06-sweep { to { transform: rotate(360deg); } }
/* Sweep edge glow */
.rpl-06__sweep::after {
content: '';
position: absolute;
top: 50%; left: 50%;
width: 50%; height: 2px;
background: linear-gradient(90deg, transparent, rgba(34,197,94,0.9));
transform-origin: left center;
transform: translateY(-1px) rotate(0deg);
animation: rpl-06-sweep 3s linear infinite;
filter: blur(1px);
}
/* Contact blips */
.rpl-06__blip {
position: absolute;
border-radius: 50%;
background: radial-gradient(circle, #86efac, #22c55e);
box-shadow: 0 0 8px #22c55e, 0 0 16px rgba(34,197,94,0.5);
z-index: 4;
animation: rpl-06-blip 3s linear infinite;
}
.rpl-06__blip--a { width: 8px; height: 8px; left: 65%; top: 32%; animation-delay: 0.6s; }
.rpl-06__blip--b { width: 6px; height: 6px; left: 28%; top: 61%; animation-delay: 1.8s; }
.rpl-06__blip--c { width: 10px; height: 10px; left: 72%; top: 68%; animation-delay: 2.3s; }
.rpl-06__blip--d { width: 5px; height: 5px; left: 42%; top: 22%; animation-delay: 0.1s; }
@keyframes rpl-06-blip {
0%, 30% { opacity: 0; }
35% { opacity: 1; }
60% { opacity: 0.6; }
90%,100% { opacity: 0; }
}
/* Blip ripple effect */
.rpl-06__blip-ring {
position: absolute;
border-radius: 50%;
border: 1px solid rgba(34,197,94,0.7);
z-index: 3;
animation: rpl-06-blip-ring 3s linear infinite;
}
.rpl-06__blip-ring--a { left: 65%; top: 32%; width: 0; height: 0; animation-delay: 0.7s; }
.rpl-06__blip-ring--b { left: 28%; top: 61%; width: 0; height: 0; animation-delay: 1.9s; }
.rpl-06__blip-ring--c { left: 72%; top: 68%; width: 0; height: 0; animation-delay: 2.4s; }
.rpl-06__blip-ring--d { left: 42%; top: 22%; width: 0; height: 0; animation-delay: 0.2s; }
@keyframes rpl-06-blip-ring {
0%, 30% { width: 0; height: 0; opacity: 0; transform: translate(-50%,-50%); }
35% { opacity: 1; }
80% { width: 30px; height: 30px; opacity: 0; transform: translate(-50%,-50%); }
100% { opacity: 0; }
}
/* Center dot */
.rpl-06__center {
position: absolute;
width: 10px; height: 10px;
border-radius: 50%;
background: #22c55e;
top: 50%; left: 50%;
transform: translate(-50%,-50%);
box-shadow: 0 0 10px #22c55e;
z-index: 5;
}
/* Readout panel */
.rpl-06__readout {
width: 100%;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}
.rpl-06__data {
background: rgba(34,197,94,0.05);
border: 1px solid rgba(34,197,94,0.2);
border-radius: 6px;
padding: 12px 14px;
}
.rpl-06__data .key {
font-size: 0.62rem;
letter-spacing: 0.2em;
text-transform: uppercase;
color: rgba(34,197,94,0.5);
margin-bottom: 4px;
}
.rpl-06__data .val {
font-family: 'Orbitron';
font-size: 1rem;
font-weight: 500;
color: #86efac;
}
/* Header */
.rpl-06__hdr {
text-align: center;
width: 100%;
}
.rpl-06__hdr h1 {
font-family: 'Orbitron';
font-size: clamp(1rem, 3vw, 1.5rem);
font-weight: 700;
letter-spacing: 0.12em;
color: #22c55e;
text-shadow: 0 0 20px rgba(34,197,94,0.5);
}
.rpl-06__hdr p {
font-size: 0.75rem;
color: rgba(34,197,94,0.45);
margin-top: 6px;
letter-spacing: 0.1em;
}
/* Scrolling status line */
.rpl-06__status {
font-size: 0.72rem;
color: rgba(34,197,94,0.5);
text-align: center;
letter-spacing: 0.1em;
animation: rpl-06-blink 1.4s steps(2) infinite;
}
@keyframes rpl-06-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
.rpl-06__sweep, .rpl-06__sweep::after { animation: none !important; }
.rpl-06__blip, .rpl-06__blip-ring, .rpl-06__status { animation: none !important; opacity: 0.5; }
}
```
### 07. CSS Heartbeat Pulse Ripple Effect
**Type:** CSS + JS
**Description:** A cardiac monitor UI — a large animated heart icon with three concentric fill-pulse rings and two stroke rings, a looping SVG ECG trace with animated stroke-dashoffset, vital-signs stat tiles and a blinking LIVE indicator. All pulse timing matches a 72 BPM heartbeat rhythm. Nunito on deep maroon-black.
**HTML:**
```html
Live monitoring · CSS animation only
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800&display=swap');
.rpl-07, .rpl-07 *, .rpl-07 *::before, .rpl-07 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.rpl-07 ::selection { background: #fb2d5c; color: #fff; }
.rpl-07 {
font-family: 'Nunito', sans-serif;
background: linear-gradient(160deg, #0d0009 0%, #1a0010 40%, #0d000b 100%);
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 48px;
padding: 60px 24px;
color: #ffe8ee;
overflow: hidden;
position: relative;
}
/* subtle particles background */
.rpl-07__bg {
position: absolute;
inset: 0;
pointer-events: none;
overflow: hidden;
}
.rpl-07__bg-dot {
position: absolute;
border-radius: 50%;
background: rgba(251,45,92,0.35);
animation: rpl-07-float linear infinite;
}
@keyframes rpl-07-float {
0% { transform: translateY(0) scale(1); opacity: 0.6; }
100% { transform: translateY(-100vh) scale(0.2); opacity: 0; }
}
.rpl-07__header {
text-align: center;
z-index: 2;
}
.rpl-07__header h1 {
font-size: clamp(1.6rem, 4vw, 2.4rem);
font-weight: 800;
letter-spacing: -0.02em;
color: #ffe8ee;
}
.rpl-07__header p {
margin-top: 8px;
color: rgba(255,232,238,0.45);
font-weight: 300;
font-size: 0.9rem;
}
/* ─── Hero heartbeat ─── */
.rpl-07__hero {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 220px; height: 220px;
z-index: 2;
}
/* Pulse rings */
.rpl-07__pulse {
position: absolute;
border-radius: 50%;
background: rgba(251,45,92,0.15);
animation: rpl-07-pulse 1.5s ease-out infinite;
}
.rpl-07__pulse:nth-child(1) { width: 100%; height: 100%; animation-delay: 0s; }
.rpl-07__pulse:nth-child(2) { width: 100%; height: 100%; animation-delay: 0.5s; }
.rpl-07__pulse:nth-child(3) { width: 100%; height: 100%; animation-delay: 1.0s; }
@keyframes rpl-07-pulse {
0% { transform: scale(0.8); opacity: 1; }
100% { transform: scale(1.7); opacity: 0; }
}
/* Ring borders */
.rpl-07__ring-border {
position: absolute;
border-radius: 50%;
border: 2px solid rgba(251,45,92,0.6);
animation: rpl-07-ring 1.5s ease-out infinite;
}
.rpl-07__ring-border:nth-child(4) { width: 100%; height: 100%; animation-delay: 0s; }
.rpl-07__ring-border:nth-child(5) { width: 100%; height: 100%; animation-delay: 0.5s; }
@keyframes rpl-07-ring {
0% { transform: scale(0.85); opacity: 0.9; }
100% { transform: scale(1.65); opacity: 0; }
}
/* The heart itself */
.rpl-07__heart {
position: relative;
z-index: 3;
font-size: 72px;
line-height: 1;
animation: rpl-07-beat 1.5s ease-in-out infinite;
filter: drop-shadow(0 0 20px rgba(251,45,92,0.7)) drop-shadow(0 0 40px rgba(251,45,92,0.3));
}
@keyframes rpl-07-beat {
0%, 100% { transform: scale(1); }
14% { transform: scale(1.18); }
28% { transform: scale(1); }
42% { transform: scale(1.12); }
70% { transform: scale(1); }
}
/* BPM display */
.rpl-07__bpm {
position: absolute;
bottom: -36px;
font-size: 0.75rem;
color: rgba(255,232,238,0.5);
letter-spacing: 0.1em;
}
.rpl-07__bpm b { color: #fb2d5c; font-weight: 800; font-size: 1.1rem; }
/* ECG line SVG */
.rpl-07__ecg {
z-index: 2;
width: min(560px, 100%);
background: rgba(251,45,92,0.04);
border: 1px solid rgba(251,45,92,0.15);
border-radius: 12px;
padding: 18px 20px;
overflow: hidden;
position: relative;
}
.rpl-07__ecg-label {
font-size: 0.65rem;
color: rgba(251,45,92,0.5);
letter-spacing: 0.2em;
text-transform: uppercase;
margin-bottom: 10px;
}
.rpl-07__ecg svg {
width: 100%;
height: 64px;
overflow: visible;
}
.rpl-07__ecg-line {
fill: none;
stroke: #fb2d5c;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
filter: drop-shadow(0 0 4px rgba(251,45,92,0.6));
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
animation: rpl-07-draw 3s linear infinite;
}
@keyframes rpl-07-draw {
to { stroke-dashoffset: 0; }
}
/* Stats row */
.rpl-07__stats {
display: flex;
gap: 24px;
z-index: 2;
flex-wrap: wrap;
justify-content: center;
}
.rpl-07__stat {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
background: rgba(251,45,92,0.06);
border: 1px solid rgba(251,45,92,0.15);
border-radius: 12px;
padding: 16px 22px;
min-width: 100px;
}
.rpl-07__stat .num {
font-size: 1.5rem;
font-weight: 800;
color: #fb2d5c;
line-height: 1;
}
.rpl-07__stat .lbl {
font-size: 0.7rem;
color: rgba(255,232,238,0.4);
text-transform: uppercase;
letter-spacing: 0.1em;
}
/* Animated live indicator */
.rpl-07__live {
display: flex;
align-items: center;
gap: 8px;
z-index: 2;
font-size: 0.75rem;
color: rgba(255,232,238,0.4);
letter-spacing: 0.12em;
text-transform: uppercase;
}
.rpl-07__dot {
width: 8px; height: 8px;
border-radius: 50%;
background: #fb2d5c;
box-shadow: 0 0 8px #fb2d5c;
animation: rpl-07-blink 1.5s steps(2) infinite;
}
@keyframes rpl-07-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
.rpl-07__pulse, .rpl-07__ring-border, .rpl-07__heart, .rpl-07__bg-dot, .rpl-07__ecg-line, .rpl-07__dot { animation: none !important; }
.rpl-07__pulse { opacity: 0.2; }
}
```
**JS:**
```js
(function() {
const bg = document.getElementById('rpl-07-bg');
for (let i = 0; i < 20; i++) {
const d = document.createElement('div');
d.className = 'rpl-07__bg-dot';
const size = Math.random() * 4 + 1;
d.style.cssText = `
width:${size}px;height:${size}px;
left:${Math.random()*100}%;
top:${Math.random()*100}%;
animation-duration:${Math.random()*8+6}s;
animation-delay:${Math.random()*-8}s;
`;
bg.appendChild(d);
}
})();
```
### 08. CSS Ripple Card Hover Effect
**Type:** Pure CSS
**Description:** A six-card portfolio grid where each card fires a radial-gradient ripple from its center on hover via a CSS ::before pseudo-element — the ripple scale transitions from 0 to 2.5x with opacity fade. Six distinct warm palettes: amber, charcoal, terracotta, cream, deep-rust and oat. The icon bounces and an arrow link slides in. Syne + Syne Mono on linen.
**HTML:**
```html
01 / DESIGN
🎨
Visual Systems
Cohesive design languages built from the ground up — color, type, motion.
Explore →
02 / CODE
⌨️
Frontend Engineering
Production-grade CSS, zero-dependency animations, WebGL experiments.
View work →
03 / MOTION
✦
Interaction Design
Micro-interactions, page transitions and haptic-inspired feedback loops.
See demos →
04 / BRAND
◈
Identity & Type
Custom wordmarks, editorial typography and brand system documentation.
Browse →
05 / LAB
🧪
Experiments
Weird CSS, generative art, shader sketches and ideas with no brief.
Open lab →
06 / ABOUT
👤
Hello, I'm Mara
Designer-developer. I believe the best interfaces feel inevitable.
Say hi →
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Syne+Mono&display=swap');
.rpl-08, .rpl-08 *, .rpl-08 *::before, .rpl-08 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.rpl-08 ::selection { background: #ff9500; color: #1a0e00; }
.rpl-08 {
font-family: 'Syne', sans-serif;
background: #f5f0eb;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
gap: 56px;
padding: 64px 24px;
color: #1a1209;
}
.rpl-08__header {
text-align: center;
}
.rpl-08__header h1 {
font-size: clamp(1.8rem, 5vw, 2.8rem);
font-weight: 800;
letter-spacing: -0.04em;
color: #1a1209;
}
.rpl-08__header p {
margin-top: 10px;
font-size: 0.95rem;
color: rgba(26,18,9,0.5);
}
/* ─── Card grid ─── */
.rpl-08__grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 24px;
width: min(920px, 100%);
}
/* Base card */
.rpl-08__card {
position: relative;
overflow: hidden;
border-radius: 20px;
padding: 32px;
cursor: pointer;
transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.3s;
}
.rpl-08__card:hover { transform: translateY(-6px) scale(1.01); }
/* Ripple on hover: pseudoelement that expands from center */
.rpl-08__card::before {
content: '';
position: absolute;
inset: 0;
border-radius: 50%;
transform: scale(0);
transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.4s;
opacity: 0;
pointer-events: none;
transform-origin: center;
}
.rpl-08__card:hover::before {
transform: scale(2.5);
opacity: 1;
}
/* Card A — sand/amber */
.rpl-08__card--a {
background: #ffd185;
box-shadow: 0 4px 20px rgba(255,149,0,0.2), inset 0 1px 0 rgba(255,255,255,0.6);
}
.rpl-08__card--a:hover { box-shadow: 0 20px 60px rgba(255,149,0,0.3); }
.rpl-08__card--a::before { background: radial-gradient(circle, rgba(255,200,80,0.6), transparent); }
/* Card B — warm charcoal */
.rpl-08__card--b {
background: #2a2016;
box-shadow: 0 4px 20px rgba(0,0,0,0.25);
color: #f5ede0;
}
.rpl-08__card--b:hover { box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
.rpl-08__card--b::before { background: radial-gradient(circle, rgba(255,149,0,0.25), transparent); }
/* Card C — terracotta */
.rpl-08__card--c {
background: #e07050;
box-shadow: 0 4px 20px rgba(224,112,80,0.3);
color: #fff;
}
.rpl-08__card--c:hover { box-shadow: 0 20px 60px rgba(224,112,80,0.5); }
.rpl-08__card--c::before { background: radial-gradient(circle, rgba(255,200,170,0.5), transparent); }
/* Card D — cream */
.rpl-08__card--d {
background: #fffaf3;
border: 2px solid rgba(26,18,9,0.1);
box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.rpl-08__card--d:hover { box-shadow: 0 20px 60px rgba(0,0,0,0.1); }
.rpl-08__card--d::before { background: radial-gradient(circle, rgba(255,200,100,0.35), transparent); }
/* Card E — deep rust */
.rpl-08__card--e {
background: #5c1a00;
box-shadow: 0 4px 20px rgba(92,26,0,0.4);
color: #ffd185;
}
.rpl-08__card--e:hover { box-shadow: 0 20px 60px rgba(92,26,0,0.6); }
.rpl-08__card--e::before { background: radial-gradient(circle, rgba(255,149,0,0.3), transparent); }
/* Card F — oat */
.rpl-08__card--f {
background: linear-gradient(135deg, #e8dcc8, #d4c4a8);
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.rpl-08__card--f:hover { box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.rpl-08__card--f::before { background: radial-gradient(circle, rgba(255,255,220,0.5), transparent); }
/* Card content */
.rpl-08__card-num {
font-family: 'Syne Mono';
font-size: 0.72rem;
opacity: 0.45;
letter-spacing: 0.1em;
margin-bottom: 16px;
position: relative;
z-index: 2;
}
.rpl-08__card-icon {
font-size: 2.2rem;
margin-bottom: 14px;
display: block;
position: relative;
z-index: 2;
transition: transform 0.3s;
}
.rpl-08__card:hover .rpl-08__card-icon { transform: scale(1.15) rotate(-5deg); }
.rpl-08__card h3 {
font-size: 1.2rem;
font-weight: 700;
line-height: 1.2;
position: relative;
z-index: 2;
margin-bottom: 8px;
}
.rpl-08__card p {
font-size: 0.88rem;
line-height: 1.5;
opacity: 0.65;
font-weight: 400;
position: relative;
z-index: 2;
}
.rpl-08__card .rpl-08__arrow {
position: relative;
z-index: 2;
margin-top: 20px;
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 0.82rem;
font-weight: 600;
opacity: 0;
transform: translateX(-8px);
transition: opacity 0.3s, transform 0.3s;
}
.rpl-08__card:hover .rpl-08__arrow {
opacity: 1;
transform: translateX(0);
}
@media (max-width: 640px) { .rpl-08__grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
.rpl-08__card, .rpl-08__card::before,
.rpl-08__card-icon, .rpl-08__arrow { transition: none !important; }
}
```
### 09. CSS Sound Wave Ripple Visualizer
**Type:** Pure CSS
**Description:** An audio player UI with a central speaker icon surrounded by five CSS ripple waves at staggered delays, twelve animated EQ bars (alternating height keyframes), a looping dashed SVG sine-wave path with stroke-dashoffset scroll, and minimal player controls. Outfit + Space Mono on deep purple-black #0a0015.
**HTML:**
```html
Midnight Frequencies
The Static Assembly — Transmit EP
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Outfit:wght@300;600;700&display=swap');
.rpl-09, .rpl-09 *, .rpl-09 *::before, .rpl-09 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.rpl-09 ::selection { background: #e879f9; color: #0f0021; }
.rpl-09 {
font-family: 'Outfit', sans-serif;
background: #0a0015;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 48px;
padding: 48px 24px;
color: #f5e8ff;
overflow: hidden;
position: relative;
}
/* Grid bg */
.rpl-09::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(232,121,249,0.04) 1px, transparent 1px),
linear-gradient(90deg, rgba(232,121,249,0.04) 1px, transparent 1px);
background-size: 32px 32px;
pointer-events: none;
}
.rpl-09__header {
text-align: center;
z-index: 2;
}
.rpl-09__header h1 {
font-size: clamp(1.6rem, 4vw, 2.4rem);
font-weight: 700;
background: linear-gradient(135deg, #e879f9, #c026d3, #7c3aed);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
letter-spacing: -0.02em;
}
.rpl-09__header p {
margin-top: 8px;
color: rgba(245,232,255,0.4);
font-weight: 300;
font-size: 0.9rem;
}
/* ─── Central speaker ripple ─── */
.rpl-09__speaker {
position: relative;
width: 160px; height: 160px;
display: grid;
place-items: center;
z-index: 2;
}
.rpl-09__wave {
position: absolute;
border-radius: 50%;
border: 2px solid rgba(232,121,249,0.7);
animation: rpl-09-wave 2s ease-out infinite;
}
.rpl-09__wave:nth-child(1) { inset: 0; animation-delay: 0s; }
.rpl-09__wave:nth-child(2) { inset: 0; animation-delay: 0.4s; border-color: rgba(192,38,211,0.55); }
.rpl-09__wave:nth-child(3) { inset: 0; animation-delay: 0.8s; border-color: rgba(124,58,237,0.4); }
.rpl-09__wave:nth-child(4) { inset: 0; animation-delay: 1.2s; border-color: rgba(109,40,217,0.25); }
.rpl-09__wave:nth-child(5) { inset: 0; animation-delay: 1.6s; border-color: rgba(91,33,182,0.12); }
@keyframes rpl-09-wave {
0% { transform: scale(0.5); opacity: 1; }
100% { transform: scale(2.2); opacity: 0; }
}
.rpl-09__icon {
position: relative;
z-index: 3;
font-size: 48px;
filter: drop-shadow(0 0 16px rgba(232,121,249,0.7));
animation: rpl-09-throb 2s ease-in-out infinite;
}
@keyframes rpl-09-throb {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.06); }
}
/* ─── EQ Bars ─── */
.rpl-09__eq {
display: flex;
align-items: flex-end;
gap: 5px;
height: 80px;
z-index: 2;
}
.rpl-09__bar {
width: 14px;
border-radius: 3px 3px 0 0;
animation: rpl-09-bar ease-in-out infinite alternate;
background: linear-gradient(0deg, #7c3aed, #c026d3, #e879f9);
box-shadow: 0 0 8px rgba(232,121,249,0.4);
min-height: 4px;
}
.rpl-09__bar:nth-child(1) { height: 35%; animation-duration: 0.7s; animation-delay: 0s; }
.rpl-09__bar:nth-child(2) { height: 70%; animation-duration: 0.5s; animation-delay: 0.1s; }
.rpl-09__bar:nth-child(3) { height: 55%; animation-duration: 0.9s; animation-delay: 0.05s; }
.rpl-09__bar:nth-child(4) { height: 90%; animation-duration: 0.4s; animation-delay: 0.2s; }
.rpl-09__bar:nth-child(5) { height: 45%; animation-duration: 0.6s; animation-delay: 0.15s; }
.rpl-09__bar:nth-child(6) { height: 100%; animation-duration: 0.35s; animation-delay: 0s; }
.rpl-09__bar:nth-child(7) { height: 75%; animation-duration: 0.55s; animation-delay: 0.08s; }
.rpl-09__bar:nth-child(8) { height: 60%; animation-duration: 0.8s; animation-delay: 0.12s; }
.rpl-09__bar:nth-child(9) { height: 85%; animation-duration: 0.45s; animation-delay: 0.18s; }
.rpl-09__bar:nth-child(10) { height: 50%; animation-duration: 0.65s; animation-delay: 0.06s; }
.rpl-09__bar:nth-child(11) { height: 30%; animation-duration: 0.75s; animation-delay: 0.22s; }
.rpl-09__bar:nth-child(12) { height: 65%; animation-duration: 0.5s; animation-delay: 0.3s; }
@keyframes rpl-09-bar { to { height: 8%; opacity: 0.3; } }
/* ─── Waveform line ─── */
.rpl-09__waveform {
width: min(560px, 100%);
height: 100px;
position: relative;
z-index: 2;
display: flex;
align-items: center;
}
.rpl-09__waveform svg {
width: 100%;
height: 100%;
overflow: visible;
}
.rpl-09__wave-path {
fill: none;
stroke: url(#waveGrad);
stroke-width: 2.5;
stroke-linecap: round;
filter: drop-shadow(0 0 6px rgba(232,121,249,0.5));
animation: rpl-09-shift 2s linear infinite;
}
@keyframes rpl-09-shift {
to { stroke-dashoffset: -120; }
}
/* Track info */
.rpl-09__track {
z-index: 2;
text-align: center;
display: flex;
flex-direction: column;
gap: 6px;
}
.rpl-09__track .title {
font-size: 1.1rem;
font-weight: 700;
letter-spacing: -0.01em;
}
.rpl-09__track .artist {
font-size: 0.82rem;
color: rgba(245,232,255,0.45);
font-weight: 300;
}
/* Controls */
.rpl-09__controls {
display: flex;
align-items: center;
gap: 20px;
z-index: 2;
}
.rpl-09__ctrl {
width: 44px; height: 44px;
border-radius: 50%;
background: rgba(232,121,249,0.1);
border: 1px solid rgba(232,121,249,0.25);
display: grid;
place-items: center;
font-size: 1.1rem;
cursor: pointer;
transition: background 0.2s, transform 0.15s;
color: #e879f9;
}
.rpl-09__ctrl:hover { background: rgba(232,121,249,0.2); transform: scale(1.08); }
.rpl-09__ctrl--play {
width: 56px; height: 56px;
background: linear-gradient(135deg, #c026d3, #7c3aed);
border-color: transparent;
font-size: 1.4rem;
color: #fff;
box-shadow: 0 0 24px rgba(192,38,211,0.5);
}
.rpl-09__ctrl--play:hover { transform: scale(1.1); }
@media (prefers-reduced-motion: reduce) {
.rpl-09__wave, .rpl-09__icon, .rpl-09__bar, .rpl-09__wave-path { animation: none !important; }
.rpl-09__bar { height: 50% !important; }
}
```
### 10. CSS Liquid Drop Ripple Animation
**Type:** Pure CSS
**Description:** Three liquid-drop simulations with physically accurate CSS morphing — each drop shape-shifts border-radius from oval to sphere on fall then squishes on impact — followed by elliptical concentric ripple rings (width and height animated separately for perspective foreshortening). Amber, indigo and rose on a warm cream background. Playfair Display + Lato.
**HTML:**
```html
Each drop uses a border-radius morph on fall, then elliptical scale + fade rings on impact — the perspective foreshortening is achieved by animating height and width separately. Pure CSS, no JavaScript.
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Lato:wght@300;400;700&display=swap');
.rpl-10, .rpl-10 *, .rpl-10 *::before, .rpl-10 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.rpl-10 ::selection { background: #fb923c; color: #fff; }
.rpl-10 {
font-family: 'Lato', sans-serif;
background: linear-gradient(160deg, #fff8f0 0%, #fef3e2 50%, #fff8f0 100%);
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 64px;
padding: 60px 24px;
color: #2c1a08;
}
.rpl-10__header {
text-align: center;
}
.rpl-10__header h1 {
font-family: 'Playfair Display';
font-size: clamp(2rem, 6vw, 3.4rem);
font-weight: 700;
color: #2c1a08;
line-height: 1.1;
}
.rpl-10__header p {
margin-top: 12px;
color: rgba(44,26,8,0.5);
font-weight: 300;
font-size: 0.95rem;
letter-spacing: 0.02em;
}
/* ─── Drop showcase ─── */
.rpl-10__stage {
display: flex;
gap: 56px;
align-items: flex-end;
flex-wrap: wrap;
justify-content: center;
}
.rpl-10__drop-group {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
/* The "liquid surface" */
.rpl-10__surface {
width: 180px;
position: relative;
}
/* The drop falling */
.rpl-10__falling-drop {
position: absolute;
border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
left: 50%;
transform: translateX(-50%);
background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.8), currentColor 60%);
box-shadow: inset 2px 2px 4px rgba(255,255,255,0.5), inset -2px -2px 4px rgba(0,0,0,0.1);
animation: rpl-10-fall linear infinite;
}
/* Ripple circles on surface */
.rpl-10__ripple-set {
position: relative;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
}
.rpl-10__r {
position: absolute;
border-radius: 50%;
animation: rpl-10-ring ease-out infinite;
}
@keyframes rpl-10-fall {
0% { top: -50px; height: 12px; width: 10px; opacity: 0; }
40% { opacity: 1; }
80% { top: -8px; height: 14px; width: 10px; opacity: 1; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; }
85% { top: -4px; height: 8px; width: 16px; opacity: 1; border-radius: 50%; }
90% { top: 0; height: 4px; width: 20px; opacity: 0.7; }
100% { top: 0; height: 0; width: 22px; opacity: 0; }
}
@keyframes rpl-10-ring {
0% { width: 0; height: 0; opacity: 0.9; }
100% { opacity: 0; }
}
/* DROP A — amber */
.rpl-10__group--a .rpl-10__falling-drop {
color: #f59e0b;
width: 12px;
animation-duration: 2.2s;
animation-delay: 0s;
}
.rpl-10__group--a .rpl-10__r {
border: 1.5px solid rgba(245,158,11,0.7);
animation-duration: 2s;
}
.rpl-10__group--a .rpl-10__r:nth-child(1) { animation-delay: 0.5s; }
.rpl-10__group--a .rpl-10__r:nth-child(2) { animation-delay: 0.8s; border-color: rgba(245,158,11,0.45); }
.rpl-10__group--a .rpl-10__r:nth-child(3) { animation-delay: 1.1s; border-color: rgba(245,158,11,0.2); }
.rpl-10__group--a .rpl-10__label { color: #d97706; }
.rpl-10__group--a .rpl-10__r:nth-child(1) { animation-timing-function: ease-out; }
.rpl-10__group--a .rpl-10__r { --max: 100px; }
@keyframes rpl-10-ring-a {
0% { width: 0; height: 0; opacity: 0.9; }
100% { width: 100px; height: 40px; opacity: 0; }
}
.rpl-10__group--a .rpl-10__r { animation-name: rpl-10-ring-a; }
/* DROP B — indigo */
.rpl-10__group--b .rpl-10__falling-drop {
color: #6366f1;
width: 14px;
animation-duration: 2.8s;
animation-delay: 0.6s;
}
.rpl-10__group--b .rpl-10__r {
border: 1.5px solid rgba(99,102,241,0.7);
}
.rpl-10__group--b .rpl-10__r:nth-child(1) { animation-delay: 1.2s; animation-duration: 2.4s; }
.rpl-10__group--b .rpl-10__r:nth-child(2) { animation-delay: 1.6s; animation-duration: 2.4s; border-color: rgba(99,102,241,0.4); }
.rpl-10__group--b .rpl-10__r:nth-child(3) { animation-delay: 2.0s; animation-duration: 2.4s; border-color: rgba(99,102,241,0.18); }
@keyframes rpl-10-ring-b {
0% { width: 0; height: 0; opacity: 0.9; }
100% { width: 120px; height: 50px; opacity: 0; }
}
.rpl-10__group--b .rpl-10__r { animation-name: rpl-10-ring-b; }
.rpl-10__group--b .rpl-10__label { color: #4f46e5; }
/* DROP C — rose */
.rpl-10__group--c .rpl-10__falling-drop {
color: #ec4899;
width: 10px;
animation-duration: 1.8s;
animation-delay: 1.1s;
}
.rpl-10__group--c .rpl-10__r {
border: 1.5px solid rgba(236,72,153,0.7);
}
.rpl-10__group--c .rpl-10__r:nth-child(1) { animation-delay: 1.6s; animation-duration: 1.6s; }
.rpl-10__group--c .rpl-10__r:nth-child(2) { animation-delay: 1.9s; animation-duration: 1.6s; border-color: rgba(236,72,153,0.4); }
.rpl-10__group--c .rpl-10__r:nth-child(3) { animation-delay: 2.2s; animation-duration: 1.6s; border-color: rgba(236,72,153,0.18); }
@keyframes rpl-10-ring-c {
0% { width: 0; height: 0; opacity: 0.9; }
100% { width: 80px; height: 32px; opacity: 0; }
}
.rpl-10__group--c .rpl-10__r { animation-name: rpl-10-ring-c; }
.rpl-10__group--c .rpl-10__label { color: #db2777; }
/* Surface line */
.rpl-10__line {
width: 100%;
height: 2px;
border-radius: 1px;
background: linear-gradient(90deg, transparent, currentColor, transparent);
opacity: 0.3;
}
.rpl-10__group--a .rpl-10__line { color: #f59e0b; }
.rpl-10__group--b .rpl-10__line { color: #6366f1; }
.rpl-10__group--c .rpl-10__line { color: #ec4899; }
.rpl-10__label {
font-size: 0.72rem;
letter-spacing: 0.15em;
text-transform: uppercase;
opacity: 0.7;
}
/* Info text */
.rpl-10__info {
max-width: 520px;
text-align: center;
}
.rpl-10__info p {
font-size: 0.95rem;
line-height: 1.7;
color: rgba(44,26,8,0.5);
font-weight: 300;
}
.rpl-10__info strong {
color: #2c1a08;
font-weight: 700;
}
@media (prefers-reduced-motion: reduce) {
.rpl-10__falling-drop, .rpl-10__r { animation: none !important; opacity: 0.3; }
}
```
### 11. CSS Ripple Login Form UI
**Type:** CSS + JS
**Description:** A split-screen login page: the left panel features multi-origin CSS ripple rings expanding from a glowing contact point over a teal-green gradient; the right panel is a polished dark-surface form with teal focus rings and a JS ink-ripple on the submit and social-login buttons. Plus Jakarta Sans on deep #0a1412.
**HTML:**
```html
◈
Welcome to Ripple Studio
A login form where even the background is a CSS ripple animation.
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');
.rpl-11, .rpl-11 *, .rpl-11 *::before, .rpl-11 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.rpl-11 ::selection { background: #14b8a6; color: #fff; }
.rpl-11 {
font-family: 'Plus Jakarta Sans', sans-serif;
min-height: 100vh;
display: grid;
grid-template-columns: 1fr 1fr;
overflow: hidden;
background: #040f0e;
}
@media (max-width: 720px) {
.rpl-11 { grid-template-columns: 1fr; }
.rpl-11__left { display: none; }
}
/* ─── Left: animated ripple background ─── */
.rpl-11__left {
position: relative;
background: linear-gradient(135deg, #042f2e 0%, #065f46 50%, #0d4a40 100%);
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
/* Layered ripple rings from bottom-left */
.rpl-11__bg-ring {
position: absolute;
border-radius: 50%;
border: 1px solid rgba(20,184,166,0.3);
animation: rpl-11-expand ease-out infinite;
}
.rpl-11__bg-ring:nth-child(1) { left: 10%; bottom: 15%; width: 0; height: 0; animation-duration: 5s; animation-delay: 0s; }
.rpl-11__bg-ring:nth-child(2) { left: 10%; bottom: 15%; width: 0; height: 0; animation-duration: 5s; animation-delay: 1.0s; border-color: rgba(20,184,166,0.2); }
.rpl-11__bg-ring:nth-child(3) { left: 10%; bottom: 15%; width: 0; height: 0; animation-duration: 5s; animation-delay: 2.0s; border-color: rgba(20,184,166,0.12); }
.rpl-11__bg-ring:nth-child(4) { left: 10%; bottom: 15%; width: 0; height: 0; animation-duration: 5s; animation-delay: 3.0s; border-color: rgba(20,184,166,0.06); }
.rpl-11__bg-ring:nth-child(5) { left: 75%; top: 20%; width: 0; height: 0; animation-duration: 7s; animation-delay: 1.5s; border-color: rgba(52,211,153,0.25); }
.rpl-11__bg-ring:nth-child(6) { left: 75%; top: 20%; width: 0; height: 0; animation-duration: 7s; animation-delay: 3.0s; border-color: rgba(52,211,153,0.12); }
@keyframes rpl-11-expand {
0% { transform: translate(-50%,-50%) scale(0); opacity: 1; }
100% { transform: translate(-50%,-50%) scale(1); opacity: 0;
width: 700px; height: 700px; }
}
/* Branded content */
.rpl-11__brand {
position: relative;
z-index: 2;
text-align: center;
padding: 40px;
color: #e8fffe;
}
.rpl-11__brand-icon {
font-size: 3.5rem;
margin-bottom: 20px;
filter: drop-shadow(0 0 20px rgba(20,184,166,0.6));
}
.rpl-11__brand h2 {
font-size: 2rem;
font-weight: 700;
line-height: 1.1;
letter-spacing: -0.02em;
margin-bottom: 14px;
}
.rpl-11__brand p {
font-size: 0.92rem;
color: rgba(232,255,254,0.55);
line-height: 1.6;
font-weight: 300;
max-width: 280px;
}
/* Glow dot */
.rpl-11__glow {
position: absolute;
left: 10%; bottom: 15%;
width: 14px; height: 14px;
border-radius: 50%;
background: #14b8a6;
box-shadow: 0 0 20px #14b8a6, 0 0 40px rgba(20,184,166,0.5);
transform: translate(-50%, 50%);
}
/* ─── Right: Login form ─── */
.rpl-11__right {
background: #0a1412;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 32px;
}
.rpl-11__form-wrap {
width: 100%;
max-width: 380px;
}
.rpl-11__form-header {
margin-bottom: 36px;
}
.rpl-11__form-header .tag {
font-size: 0.7rem;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #14b8a6;
margin-bottom: 10px;
display: block;
}
.rpl-11__form-header h1 {
font-size: 1.8rem;
font-weight: 700;
color: #e8fffe;
letter-spacing: -0.02em;
line-height: 1.2;
}
.rpl-11__form-header p {
margin-top: 8px;
font-size: 0.88rem;
color: rgba(232,255,254,0.4);
font-weight: 300;
}
/* Form fields */
.rpl-11__field {
margin-bottom: 20px;
}
.rpl-11__field label {
display: block;
font-size: 0.78rem;
font-weight: 500;
color: rgba(232,255,254,0.5);
margin-bottom: 8px;
letter-spacing: 0.04em;
}
.rpl-11__field input {
width: 100%;
background: rgba(20,184,166,0.05);
border: 1.5px solid rgba(20,184,166,0.15);
border-radius: 10px;
padding: 14px 16px;
font-family: 'Plus Jakarta Sans';
font-size: 0.95rem;
color: #e8fffe;
outline: none;
transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.rpl-11__field input::placeholder { color: rgba(232,255,254,0.2); }
.rpl-11__field input:focus {
border-color: #14b8a6;
background: rgba(20,184,166,0.08);
box-shadow: 0 0 0 3px rgba(20,184,166,0.15);
}
/* Submit button with ripple */
.rpl-11__submit {
position: relative;
overflow: hidden;
width: 100%;
padding: 16px;
border: none;
border-radius: 10px;
background: linear-gradient(135deg, #0d9488, #14b8a6);
color: #fff;
font-family: 'Plus Jakarta Sans';
font-size: 1rem;
font-weight: 600;
cursor: pointer;
box-shadow: 0 4px 20px rgba(20,184,166,0.35);
transition: transform 0.15s, box-shadow 0.15s;
margin-top: 8px;
}
.rpl-11__submit:hover { transform: translateY(-1px); box-shadow: 0 8px 32px rgba(20,184,166,0.5); }
.rpl-11__submit:active { transform: translateY(1px); }
.rpl-11__submit .ink {
position: absolute;
border-radius: 50%;
background: rgba(255,255,255,0.35);
transform: scale(0);
pointer-events: none;
animation: rpl-11-ink 0.6s linear forwards;
}
@keyframes rpl-11-ink { to { transform: scale(4); opacity: 0; } }
/* Social logins */
.rpl-11__divider {
display: flex;
align-items: center;
gap: 12px;
margin: 24px 0;
color: rgba(232,255,254,0.2);
font-size: 0.78rem;
}
.rpl-11__divider::before, .rpl-11__divider::after {
content: '';
flex: 1;
height: 1px;
background: rgba(232,255,254,0.1);
}
.rpl-11__socials {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}
.rpl-11__social {
position: relative;
overflow: hidden;
padding: 12px;
border: 1.5px solid rgba(232,255,254,0.1);
border-radius: 10px;
background: transparent;
color: rgba(232,255,254,0.65);
font-family: 'Plus Jakarta Sans';
font-size: 0.85rem;
font-weight: 500;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
transition: border-color 0.2s, background 0.2s;
}
.rpl-11__social:hover { border-color: rgba(20,184,166,0.4); background: rgba(20,184,166,0.05); }
.rpl-11__social .ink {
position: absolute;
border-radius: 50%;
background: rgba(20,184,166,0.25);
transform: scale(0);
pointer-events: none;
animation: rpl-11-ink 0.5s linear forwards;
}
.rpl-11__footer {
text-align: center;
margin-top: 24px;
font-size: 0.82rem;
color: rgba(232,255,254,0.3);
}
.rpl-11__footer a {
color: #14b8a6;
text-decoration: none;
font-weight: 500;
}
@media (prefers-reduced-motion: reduce) {
.rpl-11__bg-ring { animation: none !important; opacity: 0.1; }
.rpl-11__submit, .rpl-11__social, .rpl-11__field input { transition: none; }
.ink { animation: none !important; }
}
```
**JS:**
```js
document.querySelectorAll('.rpl-11__submit, .rpl-11__social-btn').forEach(btn => {
btn.addEventListener('click', function(e) {
const rect = this.getBoundingClientRect();
const x = e.clientX - rect.left;
const y = e.clientY - rect.top;
const size = Math.max(rect.width, rect.height);
const ink = document.createElement('span');
ink.className = 'ink';
ink.style.cssText = `left:${x-size/2}px;top:${y-size/2}px;width:${size}px;height:${size}px;`;
this.appendChild(ink);
ink.addEventListener('animationend', () => ink.remove(), { once: true });
});
});
```
### 12. CSS Aurora Borealis Ripple Background
**Type:** CSS + JS
**Description:** A night-sky hero with four drifting blur-filtered aurora blob layers (mix-blend-mode: screen), concentric ripple rings expanding from multiple anchor points in teal, indigo and cyan, 80 JS-seeded twinkling stars and floating editorial badges. Cormorant Garamond + Outfit on deep #020617 midnight.
**HTML:**
```html
Pure CSS
No Canvas
CSS Ripple
Keyframes
Aurora Ripple Effect
Where light ripples endlessly.
Aurora blobs drift across a starfield while concentric rings expand outward — layered CSS gradients, blur filters and keyframe animations. Zero JavaScript for the background.
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,600;1,300;1,600&family=Outfit:wght@300;400;500&display=swap');
.rpl-12, .rpl-12 *, .rpl-12 *::before, .rpl-12 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.rpl-12 ::selection { background: #a5f3fc; color: #020617; }
.rpl-12 {
font-family: 'Outfit', sans-serif;
background: #020617;
min-height: 100vh;
position: relative;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
padding: 60px 24px;
}
/* ─── Aurora layers: radial blobs that drift and pulse ─── */
.rpl-12__aurora {
position: absolute;
inset: 0;
pointer-events: none;
}
/* Blob A — teal/green */
.rpl-12__blob {
position: absolute;
border-radius: 50%;
filter: blur(80px);
mix-blend-mode: screen;
animation: rpl-12-drift ease-in-out infinite alternate;
}
.rpl-12__blob--a {
width: 70vw; height: 50vh;
top: -10%; left: -10%;
background: radial-gradient(ellipse, rgba(52,211,153,0.4) 0%, rgba(16,185,129,0.2) 50%, transparent 100%);
animation-duration: 12s;
}
.rpl-12__blob--b {
width: 60vw; height: 60vh;
top: 20%; right: -15%;
background: radial-gradient(ellipse, rgba(99,102,241,0.35) 0%, rgba(79,70,229,0.15) 50%, transparent 100%);
animation-duration: 16s;
animation-delay: -4s;
}
.rpl-12__blob--c {
width: 55vw; height: 45vh;
bottom: -10%; left: 20%;
background: radial-gradient(ellipse, rgba(6,182,212,0.3) 0%, rgba(14,165,233,0.15) 50%, transparent 100%);
animation-duration: 10s;
animation-delay: -7s;
}
.rpl-12__blob--d {
width: 40vw; height: 35vh;
top: 30%; left: 30%;
background: radial-gradient(ellipse, rgba(167,243,208,0.25) 0%, rgba(52,211,153,0.1) 50%, transparent 100%);
animation-duration: 20s;
animation-delay: -10s;
}
@keyframes rpl-12-drift {
0% { transform: translate(0, 0) scale(1); }
33% { transform: translate(4%, 6%) scale(1.08); }
66% { transform: translate(-3%, 4%) scale(0.95); }
100% { transform: translate(6%, -4%) scale(1.05); }
}
/* ─── Ripple rings that expand from center ─── */
.rpl-12__ripple-field {
position: absolute;
inset: 0;
pointer-events: none;
}
.rpl-12__arc {
position: absolute;
border-radius: 50%;
border: 1px solid;
top: 50%; left: 50%;
transform: translate(-50%, -50%) scale(0);
animation: rpl-12-ring ease-out infinite;
}
/* Teal rings */
.rpl-12__arc--t1 { width: 100px; height: 100px; border-color: rgba(52,211,153,0.6); animation-duration: 6s; animation-delay: 0s; }
.rpl-12__arc--t2 { width: 100px; height: 100px; border-color: rgba(52,211,153,0.35); animation-duration: 6s; animation-delay: 1.5s; }
.rpl-12__arc--t3 { width: 100px; height: 100px; border-color: rgba(52,211,153,0.18); animation-duration: 6s; animation-delay: 3.0s; }
.rpl-12__arc--t4 { width: 100px; height: 100px; border-color: rgba(52,211,153,0.08); animation-duration: 6s; animation-delay: 4.5s; }
/* Indigo rings */
.rpl-12__arc--i1 { width: 100px; height: 100px; border-color: rgba(129,140,248,0.5); animation-duration: 8s; animation-delay: 2s; }
.rpl-12__arc--i2 { width: 100px; height: 100px; border-color: rgba(129,140,248,0.25); animation-duration: 8s; animation-delay: 4s; }
.rpl-12__arc--i3 { width: 100px; height: 100px; border-color: rgba(129,140,248,0.12); animation-duration: 8s; animation-delay: 6s; }
/* Cyan rings — slightly offset */
.rpl-12__arc--c1 { width: 100px; height: 100px; border-color: rgba(34,211,238,0.45); animation-duration: 9s; animation-delay: 1s; top: 40%; left: 55%; }
.rpl-12__arc--c2 { width: 100px; height: 100px; border-color: rgba(34,211,238,0.22); animation-duration: 9s; animation-delay: 3.5s; top: 40%; left: 55%; }
@keyframes rpl-12-ring {
0% { transform: translate(-50%,-50%) scale(0); opacity: 1; }
100% { transform: translate(-50%,-50%) scale(14); opacity: 0; }
}
/* Stars */
.rpl-12__stars {
position: absolute;
inset: 0;
pointer-events: none;
}
.rpl-12__star {
position: absolute;
border-radius: 50%;
background: #fff;
animation: rpl-12-twinkle ease-in-out infinite alternate;
}
@keyframes rpl-12-twinkle {
to { opacity: 0.1; transform: scale(0.6); }
}
/* Content */
.rpl-12__content {
position: relative;
z-index: 10;
text-align: center;
max-width: 600px;
}
.rpl-12__content .eyebrow {
display: inline-block;
font-size: 0.72rem;
letter-spacing: 0.28em;
text-transform: uppercase;
color: rgba(165,243,252,0.6);
margin-bottom: 20px;
border: 1px solid rgba(165,243,252,0.2);
border-radius: 40px;
padding: 6px 16px;
}
.rpl-12__content h1 {
font-family: 'Cormorant Garamond';
font-size: clamp(3rem, 10vw, 6rem);
font-weight: 300;
line-height: 0.9;
color: #f0fdff;
letter-spacing: -0.01em;
}
.rpl-12__content h1 em {
font-style: italic;
font-weight: 600;
background: linear-gradient(135deg, #5eead4, #22d3ee, #818cf8);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.rpl-12__content p {
margin-top: 24px;
font-size: 1rem;
color: rgba(240,253,255,0.5);
line-height: 1.7;
font-weight: 300;
max-width: 440px;
margin-left: auto;
margin-right: auto;
}
.rpl-12__ctas {
display: flex;
gap: 14px;
justify-content: center;
flex-wrap: wrap;
margin-top: 36px;
}
.rpl-12__cta {
padding: 14px 30px;
border-radius: 40px;
font-size: 0.88rem;
font-weight: 500;
text-decoration: none;
letter-spacing: 0.02em;
transition: transform 0.2s, box-shadow 0.2s;
}
.rpl-12__cta--primary {
background: linear-gradient(135deg, #14b8a6, #6366f1);
color: #fff;
box-shadow: 0 8px 32px rgba(99,102,241,0.35), 0 0 0 1px rgba(255,255,255,0.1) inset;
}
.rpl-12__cta--primary:hover {
transform: translateY(-2px);
box-shadow: 0 16px 48px rgba(99,102,241,0.5);
}
.rpl-12__cta--ghost {
border: 1px solid rgba(165,243,252,0.25);
color: rgba(240,253,255,0.75);
background: rgba(255,255,255,0.04);
}
.rpl-12__cta--ghost:hover {
border-color: rgba(165,243,252,0.5);
background: rgba(255,255,255,0.06);
transform: translateY(-2px);
}
/* Floating badges */
.rpl-12__badge {
position: absolute;
background: rgba(255,255,255,0.04);
border: 1px solid rgba(165,243,252,0.15);
border-radius: 40px;
padding: 8px 16px;
font-size: 0.72rem;
color: rgba(165,243,252,0.5);
letter-spacing: 0.12em;
text-transform: uppercase;
z-index: 5;
animation: rpl-12-float ease-in-out infinite alternate;
}
.rpl-12__badge--1 { top: 14%; left: 8%; animation-duration: 6s; }
.rpl-12__badge--2 { top: 20%; right: 6%; animation-duration: 8s; animation-delay: -2s; }
.rpl-12__badge--3 { bottom: 18%; left: 6%; animation-duration: 7s; animation-delay: -4s; }
.rpl-12__badge--4 { bottom: 14%; right: 8%; animation-duration: 5s; animation-delay: -1s; }
@keyframes rpl-12-float {
to { transform: translateY(-10px); }
}
@media (max-width: 640px) {
.rpl-12__badge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.rpl-12__blob, .rpl-12__arc, .rpl-12__star, .rpl-12__badge { animation: none !important; }
.rpl-12__cta { transition: none; }
}
```
**JS:**
```js
(function() {
const stars = document.getElementById('rpl-12-stars');
for (let i = 0; i < 80; i++) {
const s = document.createElement('div');
s.className = 'rpl-12__star';
const size = Math.random() * 2.5 + 0.5;
const delay = Math.random() * 4;
const dur = Math.random() * 3 + 2;
s.style.cssText = `
width:${size}px;height:${size}px;
left:${Math.random()*100}%;
top:${Math.random()*100}%;
opacity:${Math.random()*0.8+0.1};
animation-duration:${dur}s;
animation-delay:${delay}s;
`;
stars.appendChild(s);
}
})();
```
---
## 12 CSS Scroll Animations
URL: https://codefronts.com/motion/css-scroll-animations/
Description: 12 full-page CSS scroll animation demos — sticky parallax cosmos, kinetic typography, staggered grid waves, animated data stats, clip-path reveals, 3D card entrances, scrollytelling product tours and more. Each demo is a complete, copy-paste-ready HTML document built with IntersectionObserver and scroll-linked motion.
Demo count: 12
### 01. Parallax Cosmos
**Type:** CSS + JS
**Description:** A 320vh sticky scene with six depth layers and a canvas starfield drifting at independent speeds, depth labels, and a scroll-progress bar.
**HTML:**
```html
Scroll to feel the layers
01 — Atmosphere
02 — Orbit
03 — Core
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:#04040B;overflow-x:hidden}
#pw{height:320vh;position:relative}
#pi{
position:sticky;top:0;height:100vh;overflow:hidden;
background:#04040B;display:flex;align-items:center;justify-content:center;
}
canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.ly{
position:absolute;inset:0;
display:flex;align-items:center;justify-content:center;
will-change:transform;pointer-events:none;
}
.ghost{
font-family:'Bebas Neue',sans-serif;
font-size:clamp(100px,17vw,250px);
color:transparent;
-webkit-text-stroke:1px rgba(201,169,110,0.11);
letter-spacing:0.05em;user-select:none;white-space:nowrap;
}
.orb{
width:clamp(320px,46vw,580px);height:clamp(320px,46vw,580px);
border-radius:50%;
background:radial-gradient(circle at 38% 34%,rgba(201,169,110,0.16),rgba(140,80,220,0.05) 48%,transparent 72%);
}
.ring{border-radius:50%;border:1px solid rgba(201,169,110,0.07)}
.r1{width:clamp(200px,33vw,430px);height:clamp(200px,33vw,430px)}
.r2{width:clamp(450px,72vw,840px);height:clamp(450px,72vw,840px);border-color:rgba(201,169,110,0.04)}
.r3{width:clamp(520px,88vw,1020px);height:clamp(520px,88vw,1020px);border-color:rgba(201,169,110,0.025)}
.tagline{
font-family:'Fraunces',serif;font-style:italic;
font-size:clamp(16px,2.2vw,28px);
color:rgba(201,169,110,0.72);text-align:center;
white-space:nowrap;
}
.dot{
width:3px;height:3px;border-radius:50%;background:#C9A96E;
box-shadow:0 0 14px 5px rgba(201,169,110,0.22);
}
.d1{position:absolute;top:30%;right:24%}
.d2{position:absolute;bottom:26%;left:20%}
.d3{position:absolute;top:58%;right:17%}
/* scroll progress */
.prog{
position:fixed;bottom:0;left:0;height:1px;
background:linear-gradient(to right,#C9A96E 0%,rgba(201,169,110,0.15) 100%);
width:0%;z-index:100;transition:width 0.08s linear;
}
/* depth labels */
.depth-label{
position:absolute;
font-family:'Fraunces',serif;font-style:italic;
font-size:clamp(11px,1.2vw,15px);
color:rgba(201,169,110,0.0);
letter-spacing:0.1em;
transition:color 0.6s ease;
}
.depth-label.a1{top:18%;left:8%}
.depth-label.a2{bottom:20%;right:9%}
.depth-label.a3{top:50%;left:50%;transform:translate(-50%,-50%)}
```
**JS:**
```js
const cv = document.getElementById('cv');
const ctx = cv.getContext('2d');
function drawStars(){
cv.width = window.innerWidth;
cv.height = window.innerHeight;
ctx.clearRect(0,0,cv.width,cv.height);
for(let i=0;i<280;i++){
const x=Math.random()*cv.width, y=Math.random()*cv.height;
const r=Math.random()*1.5+0.15;
ctx.beginPath();ctx.arc(x,y,r,0,Math.PI*2);
ctx.fillStyle=`rgba(255,252,215,${Math.random()*0.55+0.07})`;
ctx.fill();
}
for(let i=0;i<12;i++){
const x=Math.random()*cv.width, y=Math.random()*cv.height;
ctx.beginPath();ctx.arc(x,y,1.8,0,Math.PI*2);
ctx.fillStyle='rgba(255,250,200,0.75)';ctx.fill();
}
}
drawStars();
window.addEventListener('resize',drawStars);
const pw = document.getElementById('pw');
const prog = document.getElementById('prog');
const layers = [
{el:document.getElementById('l-r3'), range:60},
{el:document.getElementById('l-r2'), range:110},
{el:document.getElementById('l-orb'), range:180},
{el:document.getElementById('l-r1'), range:270},
{el:document.getElementById('l-ghost'),range:480},
{el:document.getElementById('l-tag'), range:90},
];
const lbl1=document.getElementById('lbl1');
const lbl2=document.getElementById('lbl2');
const lbl3=document.getElementById('lbl3');
window.addEventListener('scroll',()=>{
const rect = pw.getBoundingClientRect();
const scrolled = -rect.top;
const maxScroll = pw.offsetHeight - window.innerHeight;
const p = Math.max(0,Math.min(1, scrolled/maxScroll));
prog.style.width = (p*100)+'%';
layers.forEach(l=>{
const offset = (p - 0.5) * l.range;
l.el.style.transform = `translateY(${offset}px)`;
});
lbl1.style.color = p > 0.15 ? `rgba(201,169,110,${Math.min((p-0.15)*4,0.45)})` : 'rgba(201,169,110,0)';
lbl2.style.color = p > 0.45 ? `rgba(201,169,110,${Math.min((p-0.45)*4,0.45)})` : 'rgba(201,169,110,0)';
lbl3.style.color = p > 0.72 ? `rgba(201,169,110,${Math.min((p-0.72)*4,0.45)})` : 'rgba(201,169,110,0)';
document.getElementById('l-ghost').firstElementChild.style.webkitTextStroke =
`1px rgba(201,169,110,${0.06 + p * 0.22})`;
},{passive:true});
```
### 02. Kinetic Typography
**Type:** CSS + JS
**Description:** Five full-screen type blocks where words slide, stagger, and settle into place as each panel enters the viewport.
**HTML:**
```html
01 / 05
DE
DESIGN that
MOVES
PEOPLE
Scroll-driven motion. Cinematic reveals. Zero libraries.
02 / 05
GO
EVERY
WORD earns
ITS PLACE
Typography as choreography. Each line its own entrance.
03 / 05
MO
MOTION
is the
MESSAGE
The way it arrives matters as much as what it says.
04 / 05
AR
ARRIVE
ON cue,
ALWAYS
Timing is everything. Precision in every millisecond.
05 / 05
SC
SCROLL
IS THE
INPUT
USER_SCROLL → ANIMATION_TRIGGER → REVEAL_STATE
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{overflow-x:hidden}
.block{
min-height:100vh;
display:flex;flex-direction:column;justify-content:center;
padding:8rem 7vw;position:relative;overflow:hidden;
}
/* Block themes */
.b1{background:#0E0C09}
.b2{background:#EDE8DF}
.b3{background:#100A08}
.b4{background:#F0EDE6}
.b5{background:#080C10}
/* Kinetic lines */
.kl{
font-family:'Bebas Neue',sans-serif;
font-size:clamp(62px,12vw,180px);
line-height:0.91;
overflow:hidden;display:block;
}
.kl .w{
display:inline-block;
transform:translateY(115%);opacity:0;
transition:transform 0.95s cubic-bezier(0.16,1,0.3,1),opacity 0.38s ease;
}
.kl.in .w{transform:translateY(0);opacity:1}
.kl.in .w:nth-child(2){transition-delay:0.07s}
.kl.in .w:nth-child(3){transition-delay:0.14s}
.kl.in .w:nth-child(4){transition-delay:0.21s}
.kl.in .w:nth-child(5){transition-delay:0.28s}
/* per-block text colors */
.b1 .kl,.b3 .kl,.b5 .kl{color:#F0EBE0}
.b2 .kl,.b4 .kl{color:#16110C}
/* accent color per block */
.b1 .em{color:#C9A96E}
.b2 .em{color:#B34A38}
.b3 .em{color:#9B7FE8}
.b4 .em{color:#2E6B8A}
.b5 .em{color:#39FF14}
.em{font-family:'Fraunces',serif;font-style:italic}
/* rule */
.rule{
height:2px;width:0;opacity:0;margin:2.5rem 0 2rem;
transition:width 1s cubic-bezier(0.16,1,0.3,1) 0.45s,opacity 0.4s ease 0.45s;
}
.rule.in{width:80px;opacity:1}
.b1 .rule,.b3 .rule,.b5 .rule{background:#C9A96E}
.b2 .rule{background:#B34A38}
.b4 .rule{background:#2E6B8A}
.b5 .rule{background:#39FF14}
/* sub */
.sub{
font-family:'Fraunces',serif;font-style:italic;
font-size:clamp(14px,1.7vw,22px);
opacity:0;transform:translateY(14px);
transition:opacity 0.8s ease 0.7s,transform 0.8s cubic-bezier(0.16,1,0.3,1) 0.7s;
}
.sub.in{opacity:1;transform:translateY(0)}
.b1 .sub,.b3 .sub,.b5 .sub{color:rgba(240,235,224,0.35)}
.b2 .sub,.b4 .sub{color:rgba(22,17,12,0.38)}
/* ghost watermark */
.ghost{
position:absolute;user-select:none;pointer-events:none;
font-family:'Bebas Neue',sans-serif;font-size:28vw;line-height:1;
color:transparent;
}
.b1 .ghost,.b3 .ghost,.b5 .ghost{-webkit-text-stroke:1px rgba(255,255,255,0.03);bottom:-8%;right:-4%}
.b2 .ghost,.b4 .ghost{-webkit-text-stroke:1px rgba(0,0,0,0.04);bottom:-8%;right:-4%}
/* counter tag */
.counter-tag{
position:absolute;top:3rem;right:4rem;
font-family:'Fraunces',serif;font-style:italic;
font-size:13px;letter-spacing:0.05em;
}
.b1 .counter-tag,.b3 .counter-tag,.b5 .counter-tag{color:rgba(240,235,224,0.2)}
.b2 .counter-tag,.b4 .counter-tag{color:rgba(22,17,12,0.2)}
/* large italic solo line */
.solo{
font-family:'Fraunces',serif;font-style:italic;
font-size:clamp(40px,7vw,110px);
line-height:1;overflow:hidden;display:block;
}
.solo .w{
display:inline-block;
transform:translateY(115%);opacity:0;
transition:transform 1.1s cubic-bezier(0.16,1,0.3,1),opacity 0.5s ease;
}
.solo.in .w{transform:translateY(0);opacity:1}
.solo.in .w:nth-child(2){transition-delay:0.09s}
.solo.in .w:nth-child(3){transition-delay:0.18s}
.b5{font-family:monospace}
.mono{
font-family:'Courier New',monospace;
font-size:clamp(48px,9vw,140px);
font-weight:700;line-height:0.9;
color:#39FF14;overflow:hidden;display:block;
}
.mono .w{
display:inline-block;
transform:translateX(-40px);opacity:0;
transition:transform 0.8s cubic-bezier(0.16,1,0.3,1),opacity 0.4s ease;
}
.mono.in .w{transform:translateX(0);opacity:1}
.mono.in .w:nth-child(2){transition-delay:0.06s}
.mono.in .w:nth-child(3){transition-delay:0.12s}
.mono.in .w:nth-child(4){transition-delay:0.18s}
.mono.in .w:nth-child(5){transition-delay:0.24s}
```
**JS:**
```js
const io = new IntersectionObserver(entries=>{
entries.forEach(e=>{
if(!e.isIntersecting)return;
e.target.classList.add('in');
});
},{threshold:0.25});
document.querySelectorAll('.kl,.solo,.mono,.rule,.sub').forEach(el=>io.observe(el));
```
### 03. Staggered Grid Waves
**Type:** CSS + JS
**Description:** Four waves of nine-card grids, each wave entering with a different physics — rise, scale, rotate, and depth burst.
**HTML:**
```html
🌊
Ocean
Deep Currents
Photography · 2024
🔮
Crystal
Refraction
Abstract · 2024
🌿
Botanic
Overgrowth
Nature · 2024
🔥
Ember
Controlled Burn
Documentary · 2024
⚡
Storm
Discharge
Science · 2024
🌸
Bloom
First Light
Portrait · 2024
🍄
Mycelium
Spore Networks
Macro · 2024
🏔️
Geology
Pressure Points
Aerial · 2024
🌌
Cosmos
Deep Field
Astro · 2024
🦋
Fauna
Wing Patterns
Macro · 2024
🏞️
Alpine
Ridge at Dusk
Landscape · 2024
🌙
Lunar
Crescent
Astrophoto · 2024
🐚
Tidal
Low Tide
Seascape · 2024
🔬
Micro
Cell Division
Science · 2024
🌅
Golden
Hour Break
Portrait · 2024
🏜️
Desert
Arid Season
Travel · 2024
🐠
Pelagic
Open Water
Underwater · 2024
🌺
Tropics
Hibiscus
Flora · 2024
🪸
Reef
Coral Maze
Underwater · 2024
🌾
Field
Harvest Wind
Rural · 2024
🏙️
Urban
Neon Spill
Street · 2024
❄️
Arctic
Ice Sheet
Expedition · 2024
🌊
Biolume
Night Shore
Nature · 2024
🦅
Raptor
Thermal Ride
Wildlife · 2024
🌲
Forest
Old Growth
Nature · 2024
🌫️
Mist
Valley Floor
Landscape · 2024
🪐
Orbit
Ring Shadow
Astro · 2024
🐙
Deep Sea
Ink Cloud
Marine · 2024
🌃
Nocturne
City After Rain
Street · 2024
🌤️
Aerial
Cloudbreak
Sky · 2024
🌳
Canopy
Sunbeam Path
Forest · 2024
🧊
Glacial
Blue Cavern
Expedition · 2024
🌶️
Harvest
Spice Market
Travel · 2024
🦩
Wading
Still Pool
Wildlife · 2024
🌊
Surge
Wave Break
Ocean · 2024
🌑
Eclipse
Total Shadow
Astro · 2024
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:#0E0C09;overflow-x:hidden;padding:4vw}
.grid{
display:grid;
grid-template-columns:repeat(3,1fr);
gap:1.1rem;
margin-bottom:1.1rem;
}
.card{
border-radius:14px;overflow:hidden;
opacity:0;
transition:opacity 0.78s cubic-bezier(0.16,1,0.3,1),transform 0.78s cubic-bezier(0.16,1,0.3,1);
}
.card.in{opacity:1;transform:none !important}
/* stagger delays */
.card:nth-child(1){transition-delay:0s}
.card:nth-child(2){transition-delay:0.08s}
.card:nth-child(3){transition-delay:0.16s}
.card:nth-child(4){transition-delay:0.06s}
.card:nth-child(5){transition-delay:0.14s}
.card:nth-child(6){transition-delay:0.22s}
.card:nth-child(7){transition-delay:0.04s}
.card:nth-child(8){transition-delay:0.12s}
.card:nth-child(9){transition-delay:0.20s}
/* wave 1: slide up + slight scale */
.wave1 .card{transform:translateY(64px) scale(0.93)}
/* wave 2: slide from alternating sides */
.wave2 .card:nth-child(odd){transform:translateX(-48px) rotate(-1.5deg)}
.wave2 .card:nth-child(even){transform:translateX(48px) rotate(1.5deg)}
/* wave 3: fall from above */
.wave3 .card{transform:translateY(-52px) scale(0.95)}
.wave3 .card:nth-child(2){transform:translateY(-70px) scale(0.92)}
.wave3 .card:nth-child(5){transform:translateY(-85px) scale(0.9)}
.wave3 .card:nth-child(8){transform:translateY(-60px) scale(0.94)}
/* wave 4: fan out from center */
.wave4 .card:nth-child(1){transform:rotate(-4deg) translate(-30px,30px) scale(0.9)}
.wave4 .card:nth-child(2){transform:translateY(50px) scale(0.92)}
.wave4 .card:nth-child(3){transform:rotate(4deg) translate(30px,30px) scale(0.9)}
.wave4 .card:nth-child(4){transform:rotate(-3deg) translateX(-20px) scale(0.93)}
.wave4 .card:nth-child(5){transform:scale(0.85)}
.wave4 .card:nth-child(6){transform:rotate(3deg) translateX(20px) scale(0.93)}
.wave4 .card:nth-child(7){transform:rotate(-5deg) translate(-30px,-20px) scale(0.9)}
.wave4 .card:nth-child(8){transform:translateY(-40px) scale(0.93)}
.wave4 .card:nth-child(9){transform:rotate(5deg) translate(30px,-20px) scale(0.9)}
.img{
height:190px;display:flex;align-items:center;
justify-content:center;font-size:2.8rem;
position:relative;overflow:hidden;
}
.img::after{
content:'';position:absolute;inset:0;
background:linear-gradient(to bottom,transparent 50%,rgba(0,0,0,0.3));
}
.body{background:#1C1915;padding:1.1rem}
.cat{
font-family:'Space Mono',monospace;font-size:10px;
letter-spacing:0.18em;text-transform:uppercase;margin-bottom:0.45rem;
}
.name{
font-family:'Syne',sans-serif;font-weight:700;
font-size:16px;color:#F0EBE0;margin-bottom:0.3rem;
}
.meta{font-size:12px;color:rgba(240,235,224,0.28)}
/* divider between waves */
.divider{
height:1px;background:rgba(255,255,255,0.05);
margin:3rem 0;opacity:0;
transition:opacity 0.8s ease,width 1s cubic-bezier(0.16,1,0.3,1);
width:0%;
}
.divider.in{opacity:1;width:100%}
/* gradient image backgrounds */
.g1{background:linear-gradient(145deg,#0D2340,#1B3A6B)}
.g2{background:linear-gradient(145deg,#1A0E35,#2E1B5A)}
.g3{background:linear-gradient(145deg,#0D2016,#173A25)}
.g4{background:linear-gradient(145deg,#2E0E0A,#4A1A14)}
.g5{background:linear-gradient(145deg,#0A1628,#162440)}
.g6{background:linear-gradient(145deg,#22102A,#3A1840)}
.g7{background:linear-gradient(145deg,#0A1C12,#142B1C)}
.g8{background:linear-gradient(145deg,#1E0E08,#341A0D)}
.g9{background:linear-gradient(145deg,#0A1828,#14243A)}
```
**JS:**
```js
const io = new IntersectionObserver(entries=>{
entries.forEach(e=>{
if(!e.isIntersecting)return;
e.target.classList.add('in');
});
},{threshold:0.1,rootMargin:'0px 0px -60px 0px'});
document.querySelectorAll('.card,.divider').forEach(el=>io.observe(el));
```
### 04. Animated Data Stats
**Type:** CSS + JS
**Description:** Counters that ease toward their value, eight scroll-triggered progress bars, and five SVG ring gauges that fill on reveal.
**HTML:**
```html
0
Global Users
↑ +18% this quarter
0
Uptime SLA
↑ +0.3pp vs last year
0
Avg Response
↓ -12% latency
0
API Calls / sec
↑ +31% throughput
0
Data Accuracy
↑ +0.8pp precision
0
Faster Ingestion
↑ vs legacy stack
Regional coverage
Market penetration by geography · fiscal year 2024
Product health
Core metrics · rolling 90-day average
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:#030508;overflow-x:hidden;color:#fff}
.section{min-height:100vh;padding:8rem 6vw;position:relative;overflow:hidden}
/* glow */
.glow{
position:absolute;border-radius:50%;pointer-events:none;
background:radial-gradient(circle,var(--gc),transparent 65%);
}
/* S1: COUNTERS */
.s1-glow{
--gc:rgba(57,255,20,0.045);
width:800px;height:800px;
top:50%;left:50%;transform:translate(-50%,-50%);
}
.counter-grid{
display:grid;grid-template-columns:repeat(3,1fr);gap:2rem;
max-width:900px;margin:0 auto;
}
.c-card{
border:1px solid rgba(57,255,20,0.12);border-radius:14px;
padding:2.5rem 2rem;background:rgba(57,255,20,0.015);
opacity:0;transform:translateY(44px);
transition:opacity 0.9s cubic-bezier(0.16,1,0.3,1),transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.c-card.in{opacity:1;transform:translateY(0)}
.c-card:nth-child(2){transition-delay:0.13s}
.c-card:nth-child(3){transition-delay:0.26s}
.c-num{
font-family:'Space Mono',monospace;font-weight:700;
font-size:clamp(48px,6vw,80px);
color:#39FF14;line-height:1;margin-bottom:0.6rem;
}
.c-lbl{
font-family:'Space Mono',monospace;font-size:11px;
letter-spacing:0.14em;text-transform:uppercase;
color:rgba(255,255,255,0.28);
}
.c-sub{
font-family:'Space Mono',monospace;font-size:11px;
color:rgba(57,255,20,0.45);margin-top:1rem;
}
.c-sub span{color:#39FF14}
/* S2: BARS */
.s2{background:#040608}
.s2-glow{
--gc:rgba(0,200,255,0.035);
width:700px;height:700px;
top:40%;left:30%;transform:translate(-50%,-50%);
}
.s2-head{
font-family:'Syne',sans-serif;font-weight:800;
font-size:clamp(28px,4vw,48px);
margin-bottom:0.5rem;
opacity:0;transform:translateX(-30px);
transition:opacity 0.8s ease,transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.s2-head.in{opacity:1;transform:translateX(0)}
.s2-desc{
font-family:'Space Mono',monospace;font-size:12px;
color:rgba(0,200,255,0.5);margin-bottom:4rem;
opacity:0;transition:opacity 0.7s ease 0.3s;
}
.s2-desc.in{opacity:1}
.bars{display:flex;flex-direction:column;gap:2rem;max-width:760px}
.bar-row{
opacity:0;transform:translateX(-28px);
transition:opacity 0.7s ease,transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.bar-row.in{opacity:1;transform:translateX(0)}
.bar-row:nth-child(2){transition-delay:0.08s}
.bar-row:nth-child(3){transition-delay:0.16s}
.bar-row:nth-child(4){transition-delay:0.24s}
.bar-row:nth-child(5){transition-delay:0.32s}
.bar-row:nth-child(6){transition-delay:0.40s}
.bar-row:nth-child(7){transition-delay:0.48s}
.bar-row:nth-child(8){transition-delay:0.56s}
.br-top{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px}
.br-name{font-family:'Space Mono',monospace;font-size:12px;color:rgba(255,255,255,0.4)}
.br-val{font-family:'Space Mono',monospace;font-size:12px;color:var(--bc)}
.br-track{height:4px;background:rgba(255,255,255,0.05);border-radius:2px;overflow:hidden}
.br-fill{
height:100%;border-radius:2px;width:0%;
background:linear-gradient(to right,var(--bc),var(--bc2));
transition:width 1.4s cubic-bezier(0.16,1,0.3,1) 0.1s;
}
.bar-row.in .br-fill{width:var(--w)}
/* S3: RINGS + DETAILED STATS */
.s3{background:#030407}
.s3-glow{
--gc:rgba(170,80,255,0.04);
width:700px;height:700px;
top:50%;left:60%;transform:translate(-50%,-50%);
}
.s3-head{
font-family:'Syne',sans-serif;font-weight:800;
font-size:clamp(28px,4vw,48px);margin-bottom:0.5rem;
opacity:0;transform:translateX(-30px);
transition:opacity 0.8s ease,transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.s3-head.in{opacity:1;transform:translateX(0)}
.s3-desc{
font-family:'Space Mono',monospace;font-size:12px;
color:rgba(170,80,255,0.5);margin-bottom:5rem;
opacity:0;transition:opacity 0.7s ease 0.3s;
}
.s3-desc.in{opacity:1}
.rings{display:flex;gap:3.5rem;flex-wrap:wrap;justify-content:center;margin-bottom:5rem}
.ring-item{
display:flex;flex-direction:column;align-items:center;gap:1rem;
opacity:0;transform:scale(0.65);
transition:opacity 0.9s ease,transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.ring-item.in{opacity:1;transform:scale(1)}
.ring-item:nth-child(2){transition-delay:0.15s}
.ring-item:nth-child(3){transition-delay:0.30s}
.ring-item:nth-child(4){transition-delay:0.45s}
.ring-item:nth-child(5){transition-delay:0.60s}
.r-bg{fill:none;stroke:rgba(255,255,255,0.06);stroke-width:8}
.r-arc{
fill:none;stroke-width:8;stroke-linecap:round;
stroke-dasharray:283;stroke-dashoffset:283;
transform-box:fill-box;transform-origin:center;
transform:rotate(-90deg);
transition:stroke-dashoffset 1.7s cubic-bezier(0.16,1,0.3,1) 0.15s;
}
.ring-item.in .r-arc{stroke-dashoffset:var(--off)}
.r-label{
font-family:'Space Mono',monospace;font-size:10px;
color:rgba(255,255,255,0.28);text-transform:uppercase;
letter-spacing:0.1em;text-align:center;
}
.r-txt{font-family:'Space Mono',monospace;font-size:15px;font-weight:700;text-anchor:middle;dominant-baseline:middle}
/* detail row */
.detail-grid{
display:grid;grid-template-columns:repeat(4,1fr);gap:1.5rem;
max-width:800px;margin:0 auto;
}
.detail-item{
text-align:center;
opacity:0;transform:translateY(24px);
transition:opacity 0.7s ease,transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.detail-item.in{opacity:1;transform:translateY(0)}
.detail-item:nth-child(2){transition-delay:0.1s}
.detail-item:nth-child(3){transition-delay:0.2s}
.detail-item:nth-child(4){transition-delay:0.3s}
.d-num{
font-family:'Space Mono',monospace;font-size:clamp(22px,2.5vw,34px);
font-weight:700;color:#fff;margin-bottom:0.4rem;
}
.d-lbl{font-family:'Space Mono',monospace;font-size:10px;color:rgba(255,255,255,0.28);text-transform:uppercase;letter-spacing:0.1em}
.d-trend{font-family:'Space Mono',monospace;font-size:11px;margin-top:0.4rem}
```
**JS:**
```js
function animCount(el){
const target=parseFloat(el.dataset.target);
const suffix=el.dataset.suffix||'';
const dec=String(target).includes('.');
const dur=1900,start=performance.now();
const tick=now=>{
const p=Math.min((now-start)/dur,1);
const ease=1-Math.pow(1-p,4);
el.textContent=(dec?(ease*target).toFixed(1):Math.round(ease*target))+suffix;
if(p<1)requestAnimationFrame(tick);
};
requestAnimationFrame(tick);
}
const io=new IntersectionObserver(entries=>{
entries.forEach(e=>{
if(!e.isIntersecting)return;
e.target.classList.add('in');
const n=e.target.querySelector('.c-num');
if(n&&!n.dataset.done){n.dataset.done='1';animCount(n);}
});
},{threshold:0.2});
document.querySelectorAll('.c-card,.s2-head,.s2-desc,.bar-row,.s3-head,.s3-desc,.ring-item,.detail-item')
.forEach(el=>io.observe(el));
```
### 05. Clip-Path Reveals
**Type:** CSS + JS
**Description:** Six full-width panels each unveiled with a different clip-path wipe — bottom-up, horizontal, radial burst, drop, inset zoom.
**HTML:**
```html
Architecture
01
Vertical ascent, horizontal ambition — form in tension with itself
Landscape
02
Where fog meets stone and neither gives way
Portrait
03
Light finds its own angles, always
Aerial
04
Patterns visible only from above, invisible to those who live inside them
Abstract
05
Form without function. Beauty without purpose. Both are enough.
Seascape
06
Where the tide forgets itself in the sound of its own return
Mineral
Crystalline structure
Nocturne
After the city sleeps
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:#060606;overflow-x:hidden}
/* Full-width panels (one per row) */
.row{
width:100%;overflow:hidden;position:relative;
margin-bottom:0;
}
.panel{
width:100%;height:52vh;min-height:280px;
display:flex;align-items:flex-end;
padding:2.5rem 5vw;position:relative;overflow:hidden;
}
.panel::before{content:'';position:absolute;inset:0;z-index:0}
/* Atmospheric backgrounds */
.p1{background:#0E0A1C}
.p1::before{background:radial-gradient(ellipse at 70% 30%,rgba(140,60,220,0.4),rgba(80,20,160,0.2) 45%,transparent 70%)}
.p2{background:#08150E}
.p2::before{background:radial-gradient(ellipse at 25% 60%,rgba(20,170,110,0.42),rgba(10,100,60,0.15) 45%,transparent 70%)}
.p3{background:#160A08}
.p3::before{background:radial-gradient(ellipse at 55% 35%,rgba(210,70,50,0.4),rgba(140,30,20,0.2) 45%,transparent 70%)}
.p4{background:#080E18}
.p4::before{background:radial-gradient(ellipse at 38% 65%,rgba(40,100,220,0.42),rgba(20,60,160,0.15) 45%,transparent 70%)}
.p5{background:#141008}
.p5::before{background:radial-gradient(ellipse at 65% 45%,rgba(210,140,30,0.4),rgba(160,90,10,0.2) 45%,transparent 70%)}
.p6{background:#081418}
.p6::before{background:radial-gradient(ellipse at 42% 55%,rgba(20,170,210,0.38),rgba(10,100,160,0.18) 45%,transparent 70%)}
/* Clip-path reveal states */
/* 1: bottom-up wipe */
.row:nth-child(1) .panel{
clip-path:polygon(0 100%,100% 100%,100% 100%,0 100%);
transition:clip-path 1.2s cubic-bezier(0.16,1,0.3,1);
}
.row:nth-child(1).in .panel{clip-path:polygon(0 0,100% 0,100% 100%,0 100%)}
/* 2: horizontal left-to-right */
.row:nth-child(2) .panel{
clip-path:inset(0 100% 0 0);
transition:clip-path 1.2s cubic-bezier(0.16,1,0.3,1);
}
.row:nth-child(2).in .panel{clip-path:inset(0 0% 0 0)}
/* 3: radial circle burst from center */
.row:nth-child(3) .panel{
clip-path:circle(0% at 50% 50%);
transition:clip-path 1.3s cubic-bezier(0.16,1,0.3,1);
}
.row:nth-child(3).in .panel{clip-path:circle(80% at 50% 50%)}
/* 4: top-down drop */
.row:nth-child(4) .panel{
clip-path:polygon(0 0,100% 0,100% 0,0 0);
transition:clip-path 1.2s cubic-bezier(0.16,1,0.3,1);
}
.row:nth-child(4).in .panel{clip-path:polygon(0 0,100% 0,100% 100%,0 100%)}
/* 5: right-to-left */
.row:nth-child(5) .panel{
clip-path:inset(0 0 0 100%);
transition:clip-path 1.2s cubic-bezier(0.16,1,0.3,1);
}
.row:nth-child(5).in .panel{clip-path:inset(0 0 0 0%)}
/* 6: inset zoom from center outward */
.row:nth-child(6) .panel{
clip-path:inset(50% 50%);
transition:clip-path 1.3s cubic-bezier(0.16,1,0.3,1);
}
.row:nth-child(6).in .panel{clip-path:inset(0% 0%)}
/* 3-column grid section */
.cp-3{
display:grid;grid-template-columns:repeat(3,1fr);gap:0.8rem;
padding:0.8rem 0;
}
.cp-3 .row{margin-bottom:0}
.cp-3 .panel{height:40vh;min-height:220px}
/* Text inside panels */
.p-cat{
position:absolute;top:1.75rem;left:5vw;
font-family:'Space Mono',monospace;font-size:10px;
letter-spacing:0.16em;text-transform:uppercase;
color:rgba(255,255,255,0.3);z-index:2;
opacity:0;transition:opacity 0.5s ease 0.95s;
}
.row.in .p-cat{opacity:1}
.p-num{
position:absolute;top:1.75rem;right:5vw;
font-family:'Space Mono',monospace;font-size:11px;
color:rgba(255,255,255,0.15);z-index:2;
opacity:0;transition:opacity 0.5s ease 1s;
}
.row.in .p-num{opacity:1}
.p-cap{
font-family:'DM Serif Display',serif;font-style:italic;
font-size:clamp(20px,2.4vw,36px);
color:rgba(255,255,255,0.9);
position:relative;z-index:2;
opacity:0;transform:translateY(12px);
transition:opacity 0.65s ease 0.88s,transform 0.65s ease 0.88s;
max-width:700px;line-height:1.3;
}
.row.in .p-cap{opacity:1;transform:translateY(0)}
/* section gap */
.gap{height:2px;background:#111}
.gap-lg{height:5rem}
/* 3-col panel text size */
.cp-3 .p-cap{font-size:clamp(16px,1.6vw,24px)}
.cp-3 .p-cat{left:1.5rem}
.cp-3 .p-num{right:1.5rem}
```
**JS:**
```js
const io = new IntersectionObserver(entries=>{
entries.forEach(e=>{
if(!e.isIntersecting)return;
e.target.classList.add('in');
io.unobserve(e.target);
});
},{threshold:0.15});
document.querySelectorAll('.row').forEach(el=>io.observe(el));
```
### 06. 3D Card Entrances
**Type:** CSS + JS
**Description:** Four rows of cards that rotate, flip, and burst in from 3D space on scroll, then respond to live mouse tilt.
**HTML:**
```html
01 — Y-axis rotation
⚡
Turbine Analytics
Real-time processing at massive scale, built for teams moving fast without breaking trust.
🌱
Grove CMS
Content management reimagined for editorial teams who think in systems, not pages.
🧭
Meridian Maps
Geospatial intelligence for logistics, urban planning, and field operations at any scale.
02 — Compound diagonal
🔐
Vault Security
Zero-knowledge auth and encryption middleware for developer-first security stacks.
📡
Signal Comms
Unified messaging across channels. One API for email, push, SMS, and webhooks globally.
🧩
Mosaic UI
Component library tuned for enterprise design systems. Dark mode native, accessible first.
03 — Flip entry
🚀
Launch Ops
Ship faster with automated deployment pipelines, rollback controls, and real-time observability.
🌐
Nexus CDN
Global edge delivery with sub-20ms latency. Smart caching, compression, and DDoS protection.
📊
Prism Reports
Scheduled and live reporting for finance, ops, and executive teams. Export-ready outputs.
04 — Z-depth burst
🤖
Aria AI
Embedded AI assistant for any workflow. Train on your data, deploy in hours, iterate endlessly.
🔗
Bridge APIs
Unified API gateway with rate limiting, auth, versioning, and auto-generated documentation.
🛡️
Shield IAM
Identity and access management for multi-cloud environments. RBAC, SSO, and audit trails built-in.
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:#F2F0EB;overflow-x:hidden;font-family:'Outfit',sans-serif}
.section{padding:5rem 4vw;position:relative}
.section + .section{border-top:1px solid rgba(0,0,0,0.06)}
/* perspective context on section */
.grid{
display:grid;grid-template-columns:repeat(3,1fr);
gap:1.5rem;perspective:1200px;
}
/* card base */
.card{
background:#fff;border-radius:22px;padding:2.25rem 1.75rem;
border:1px solid rgba(0,0,0,0.07);
opacity:0;
transition:opacity 0.85s ease,transform 0.95s cubic-bezier(0.16,1,0.3,1);
transform-style:preserve-3d;
cursor:default;
will-change:transform;
}
.card.in{opacity:1;transform:none !important}
/* Wave A: rotate in from left/right/top */
.wa .card:nth-child(1){transform:perspective(900px) rotateY(-42deg) translateX(-25px);transition-delay:0s}
.wa .card:nth-child(2){transform:perspective(900px) rotateX(45deg) translateY(35px);transition-delay:0.1s}
.wa .card:nth-child(3){transform:perspective(900px) rotateY(42deg) translateX(25px);transition-delay:0.2s}
/* Wave B: compound diagonal */
.wb .card:nth-child(1){transform:perspective(900px) rotateX(-38deg) rotateZ(-5deg) translateY(-30px);transition-delay:0.05s}
.wb .card:nth-child(2){transform:perspective(900px) rotateY(-20deg) rotateX(30deg) scale(0.82);transition-delay:0.18s}
.wb .card:nth-child(3){transform:perspective(900px) rotateX(-38deg) rotateZ(5deg) translateY(-30px);transition-delay:0.05s}
/* Wave C: flip in */
.wc .card:nth-child(1){transform:perspective(900px) rotateY(90deg) translateX(-40px);transition-delay:0s}
.wc .card:nth-child(2){transform:perspective(900px) rotateY(-90deg);transition-delay:0.15s}
.wc .card:nth-child(3){transform:perspective(900px) rotateX(-90deg) translateY(-30px);transition-delay:0.05s}
/* Wave D: z-depth burst */
.wd .card:nth-child(1){transform:perspective(900px) translateZ(-200px) rotate(-8deg);transition-delay:0.1s}
.wd .card:nth-child(2){transform:perspective(900px) translateZ(-300px) scale(0.7);transition-delay:0s}
.wd .card:nth-child(3){transform:perspective(900px) translateZ(-200px) rotate(8deg);transition-delay:0.1s}
/* card internals */
.icon{
width:46px;height:46px;border-radius:12px;
margin-bottom:1.5rem;
display:flex;align-items:center;justify-content:center;font-size:22px;
}
.name{
font-family:'Syne',sans-serif;font-weight:700;
font-size:17px;color:#111;margin-bottom:0.5rem;
}
.desc{font-size:13px;line-height:1.65;color:#9CA3AF}
.foot{
margin-top:1.75rem;padding-top:1.1rem;
border-top:1px solid rgba(0,0,0,0.06);
display:flex;align-items:center;justify-content:space-between;
}
.badge{
font-family:'Space Mono',monospace;font-size:10px;
letter-spacing:0.08em;text-transform:uppercase;
padding:4px 10px;border-radius:20px;
}
.arr{font-size:16px;color:#D1D5DB;transition:color 0.2s,transform 0.2s}
.card:hover .arr{color:#111;transform:translateX(5px)}
/* subtle shine on hover */
.card::after{
content:'';
position:absolute;inset:0;border-radius:22px;
background:radial-gradient(circle at var(--mx,50%) var(--my,50%),rgba(255,255,255,0.12),transparent 60%);
opacity:0;transition:opacity 0.3s;pointer-events:none;
}
.card:hover::after{opacity:1}
/* alternating section backgrounds */
.section:nth-child(even){background:#F8F7F2}
.section:nth-child(odd){background:#EEECE6}
/* wave labels */
.wave-tag{
font-family:'Space Mono',monospace;font-size:10px;
letter-spacing:0.15em;text-transform:uppercase;
color:rgba(0,0,0,0.2);margin-bottom:2rem;
}
```
**JS:**
```js
// scroll reveal
const io = new IntersectionObserver(entries=>{
entries.forEach(e=>{
if(!e.isIntersecting)return;
e.target.classList.add('in');
});
},{threshold:0.18});
document.querySelectorAll('.card').forEach(el=>io.observe(el));
// mouse tilt per card (runs after .in is set)
document.querySelectorAll('.card').forEach(card=>{
card.addEventListener('mousemove',e=>{
if(!card.classList.contains('in'))return;
const rect=card.getBoundingClientRect();
const cx=rect.left+rect.width/2;
const cy=rect.top+rect.height/2;
const dx=(e.clientX-cx)/(rect.width/2);
const dy=(e.clientY-cy)/(rect.height/2);
const tilt=10;
card.style.transform=`perspective(900px) rotateY(${dx*tilt}deg) rotateX(${-dy*tilt}deg) scale(1.025)`;
card.style.setProperty('--mx',(((e.clientX-rect.left)/rect.width)*100)+'%');
card.style.setProperty('--my',(((e.clientY-rect.top)/rect.height)*100)+'%');
card.style.transition='transform 0.1s ease,opacity 0.85s ease';
});
card.addEventListener('mouseleave',()=>{
if(!card.classList.contains('in'))return;
card.style.transform='perspective(900px) rotateY(0deg) rotateX(0deg) scale(1)';
card.style.transition='transform 0.6s cubic-bezier(0.16,1,0.3,1),opacity 0.85s ease';
});
});
```
### 07. Scroll Reveal Suite
**Type:** CSS + JS
**Description:** An architecture-studio portfolio showcasing six reveal techniques: mask-slide, lift, scale-curtain, clip, wipe, and blur dissolve.
**HTML:**
```html
Architectural Practice · Est. 2009
We design spaces that endure — buildings that carry their own silence, interiors that remember why they were made.
2024
Our philosophy
Architecture is not about buildings.
It is about what buildings make possible —
the meetings, the silences, the accidental
encounters that shape a life.
Selected Work
2019 — 2024
01
Meridian House
Residential · Copenhagen, 2022
02
Tidal Pavilion
Cultural · Oslo, 2023
03
Thermal Baths
Public · Reykjavik, 2021
04
Canopy Hall
Education · Amsterdam, 2024
"Good architecture makes you forget the building. You only remember what happened inside it."
— Founder, Murano Studio
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{--ink:#0A0806;--paper:#F4F0E8;--gold:#C8A252;--smoke:rgba(200,162,82,0.12)}
body{background:var(--ink);color:var(--paper);font-family:'Outfit',sans-serif;overflow-x:hidden}
/* REVEAL PRIMITIVES */
/* 1: mask slide — text rises from below a hidden overflow */
.m-wrap{overflow:hidden;display:block}
.m-inner{
display:block;
transform:translateY(108%);
transition:transform 1.05s cubic-bezier(0.16,1,0.3,1);
}
.m-inner.in{transform:translateY(0)}
/* 2: fade + lift — classic, refined */
[data-r="lift"]{
opacity:0;transform:translateY(36px);
transition:opacity 0.9s ease,transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
[data-r="lift"].in{opacity:1;transform:translateY(0)}
/* 3: scale reveal — panel expands from compressed */
[data-r="scale"]{
opacity:0;transform:scaleY(0.6) translateY(20px);transform-origin:top center;
transition:opacity 0.85s ease,transform 0.85s cubic-bezier(0.16,1,0.3,1);
}
[data-r="scale"].in{opacity:1;transform:scaleY(1) translateY(0)}
/* 4: clip from bottom — curtain rises.
The clip lives on the INNER child, not the [data-r] element itself:
a fully clip-path-clipped element has zero visible area, so an
IntersectionObserver watching it would report ratio 0 forever and
the reveal could never fire (chicken-and-egg). The observed
[data-r="curtain"] element stays unclipped (just overflow:hidden);
its child carries the curtain. */
[data-r="curtain"]{overflow:hidden}
[data-r="curtain"]>*{
display:block;
clip-path:inset(0 0 100% 0);
transition:clip-path 1.1s cubic-bezier(0.16,1,0.3,1);
}
[data-r="curtain"].in>*{clip-path:inset(0 0 0% 0)}
/* 5: horizontal wipe */
[data-r="wipe"]{
clip-path:inset(0 100% 0 0);
transition:clip-path 1s cubic-bezier(0.16,1,0.3,1);
}
[data-r="wipe"].in{clip-path:inset(0 0% 0 0)}
/* 6: blur dissolve */
[data-r="dissolve"]{
opacity:0;filter:blur(18px);transform:scale(1.04);
transition:opacity 1.1s ease,filter 1s ease,transform 1.1s ease;
}
[data-r="dissolve"].in{opacity:1;filter:blur(0);transform:scale(1)}
/* stagger helpers */
[data-d="1"]{transition-delay:0.08s}
[data-d="2"]{transition-delay:0.16s}
[data-d="3"]{transition-delay:0.24s}
[data-d="4"]{transition-delay:0.32s}
[data-d="5"]{transition-delay:0.4s}
[data-d="6"]{transition-delay:0.48s}
/* LAYOUT */
section{padding:8rem 6vw;position:relative}
hr.rule{border:none;border-top:1px solid rgba(244,240,232,0.1);margin:0 6vw}
/* HERO */
.hero{
min-height:100vh;display:flex;flex-direction:column;
justify-content:flex-end;padding-bottom:6rem;
border-bottom:1px solid rgba(244,240,232,0.08);
}
.hero-eyebrow{
font-size:11px;letter-spacing:0.22em;text-transform:uppercase;
color:var(--gold);margin-bottom:3rem;
display:flex;align-items:center;gap:1rem;
}
.hero-eyebrow::before{content:'';width:40px;height:1px;background:var(--gold)}
.hero-wordmark{
font-family:'Bebas Neue',sans-serif;
font-size:clamp(80px,14vw,200px);
line-height:0.88;letter-spacing:-0.01em;
color:var(--paper);
}
.hero-sub{
margin-top:3rem;display:flex;justify-content:space-between;align-items:flex-end;
}
.hero-desc{
font-size:clamp(14px,1.4vw,18px);font-weight:300;
color:rgba(244,240,232,0.5);max-width:400px;line-height:1.7;
}
.hero-year{
font-family:'DM Serif Display',serif;font-style:italic;
font-size:clamp(60px,8vw,120px);color:transparent;
-webkit-text-stroke:1px rgba(244,240,232,0.12);
}
/* APPROACH */
.approach-label{
font-size:10px;letter-spacing:0.22em;text-transform:uppercase;
color:var(--gold);margin-bottom:5rem;
}
.approach-text{
font-family:'DM Serif Display',serif;
font-size:clamp(28px,3.8vw,60px);line-height:1.25;
max-width:860px;
}
.approach-text em{font-style:italic;color:var(--gold)}
.approach-text .line{overflow:hidden;display:block;padding-bottom:0.05em}
/* PROJECTS */
.projects-head{
display:flex;justify-content:space-between;align-items:baseline;
margin-bottom:4rem;
}
.projects-head h2{
font-family:'Bebas Neue',sans-serif;
font-size:clamp(36px,5vw,72px);letter-spacing:0.02em;
}
.projects-head span{
font-size:11px;letter-spacing:0.18em;text-transform:uppercase;
color:rgba(244,240,232,0.3);
}
.project-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:rgba(244,240,232,0.08)}
.project-card{
background:var(--ink);padding:3rem 2.5rem;
border:none;position:relative;overflow:hidden;
}
.project-card::after{
content:'';position:absolute;inset:0;
background:var(--smoke);opacity:0;
transition:opacity 0.4s ease;pointer-events:none;
}
.project-card:hover::after{opacity:1}
.proj-num{
font-family:'DM Serif Display',serif;font-size:11px;
color:var(--gold);letter-spacing:0.1em;margin-bottom:2rem;
}
.proj-panel{
height:240px;margin-bottom:2rem;border-radius:4px;overflow:hidden;
position:relative;
}
.proj-img{width:100%;height:100%;position:relative}
.pi1{background:linear-gradient(145deg,#1A1408 0%,#2E240E 40%,#3D320F 100%)}
.pi2{background:linear-gradient(145deg,#0A0E14 0%,#141E2A 40%,#1E2E40 100%)}
.pi3{background:linear-gradient(145deg,#100A0A 0%,#201010 40%,#2A1212 100%)}
.pi4{background:linear-gradient(145deg,#0A100A 0%,#121C10 40%,#1A2A14 100%)}
.proj-name{
font-family:'Bebas Neue',sans-serif;font-size:clamp(28px,3vw,44px);
letter-spacing:0.02em;margin-bottom:0.5rem;
}
.proj-meta{font-size:12px;color:rgba(244,240,232,0.3);letter-spacing:0.06em}
/* NUMBERS */
.numbers{background:#0E0C09;border-top:1px solid rgba(244,240,232,0.06)}
.numbers-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:0;border:1px solid rgba(244,240,232,0.06)}
.num-cell{padding:3rem 2rem;border-right:1px solid rgba(244,240,232,0.06)}
.num-cell:last-child{border-right:none}
.num-val{
font-family:'Bebas Neue',sans-serif;
font-size:clamp(48px,5vw,80px);line-height:1;
color:var(--gold);margin-bottom:0.5rem;
}
.num-lbl{font-size:11px;letter-spacing:0.14em;text-transform:uppercase;color:rgba(244,240,232,0.3)}
/* MANIFESTO QUOTE */
.quote-section{background:#0A0906}
.quote-rule{width:60px;height:1px;background:var(--gold);margin-bottom:4rem}
.quote-text{
font-family:'DM Serif Display',serif;font-style:italic;
font-size:clamp(28px,4vw,64px);line-height:1.2;max-width:900px;
}
.quote-attr{
margin-top:3rem;font-size:12px;letter-spacing:0.16em;text-transform:uppercase;
color:rgba(244,240,232,0.3);
}
/* CLOSE */
.close-section{
min-height:60vh;display:flex;flex-direction:column;
justify-content:center;border-top:1px solid rgba(244,240,232,0.08);
}
.cta-label{font-size:11px;letter-spacing:0.2em;text-transform:uppercase;color:var(--gold);margin-bottom:2rem}
.cta-text{
font-family:'Bebas Neue',sans-serif;font-size:clamp(48px,8vw,120px);
line-height:0.9;letter-spacing:0.01em;
}
.cta-link{
margin-top:4rem;display:inline-flex;align-items:center;gap:1rem;
font-size:13px;letter-spacing:0.12em;text-transform:uppercase;
color:var(--gold);text-decoration:none;border-bottom:1px solid var(--gold);
padding-bottom:4px;width:fit-content;
transition:gap 0.3s ease;
}
.cta-link:hover{gap:2rem}
```
**JS:**
```js
const io = new IntersectionObserver(entries=>{
entries.forEach(e=>{
if(!e.isIntersecting)return;
if(e.target.classList.contains('m-inner')){e.target.classList.add('in');return}
if(e.target.dataset.r){e.target.classList.add('in');return}
});
},{threshold:0.15,rootMargin:'0px 0px -40px 0px'});
document.querySelectorAll('.m-inner,[data-r]').forEach(el=>io.observe(el));
```
### 08. Triple Scroll Progress
**Type:** CSS + JS
**Description:** A long-form essay reader with three synced progress indicators — a top gradient bar, a chapter rail, and a circular reading-time orb.
**HTML:**
```html
I — Attention
II — Friction
III — Depth
IV — Rhythm
V — Closure
Essay · Reading Experience
The Quiet Architecture of Long-Form Attention
Three progress signals — a bar, a rail, an orb — each answering a different question the reader never asks aloud.
I — Attention
Reading on a screen is an act of sustained negotiation. The text wants forward motion; the eye wants reassurance. A good interface offers both without demanding either, and the simplest gift it can give is a sense of place.
The top bar is the most literal of these signals. It maps the scroll to a single horizontal line, and that line says only one thing: this much remains.
A progress bar is a promise the page makes — small, honest, and easy to keep.
II — Friction
Friction is not the enemy of reading. The right kind of friction — a heading, a pause, a turn of phrase — slows the eye on purpose, and a chapter rail formalises those pauses into navigable anchors.
Click a dot and the page travels. Scroll naturally and the active dot keeps pace. The reader is never told where they are; they simply notice.
III — Depth
Depth is the feeling that a piece has more underneath it than the surface admits. Typography carries most of that weight — the drop cap, the measured line length, the italic standfirst that sets a tone before the argument begins.
None of it is decoration. Each choice is a quiet instruction about how fast to move and how much to trust.
The page that respects its reader rarely raises its voice.
IV — Rhythm
Rhythm is the cadence of revelation. Paragraphs of even weight lull; paragraphs that vary — short, long, short — keep the eye awake. The orb in the corner tracks this rhythm as a percentage, a number that climbs while the reader forgets it exists.
That forgetting is the point. The best progress indicator is the one you only consult when you wonder, not the one that nags.
V — Closure
Closure is the reward. The bar reaches full width, the final dot lights, the orb completes its circle — three small confirmations that the journey had a shape and the shape has ended.
Long-form reading survives not because screens improved but because a few quiet signals learned to respect the time a reader gives.
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:#FBFAF7;font-family:'Inter',sans-serif;color:#1A1A1A}
/* top gradient progress bar */
.bar{
position:fixed;top:0;left:0;height:3px;width:0%;
background:linear-gradient(90deg,#6D28D9,#DB2777,#F59E0B);
z-index:50;transition:width 0.1s linear;
}
/* left chapter rail */
.rail{
position:fixed;left:2.5vw;top:50%;transform:translateY(-50%);
display:flex;flex-direction:column;gap:1.1rem;z-index:40;
}
.dot{
display:flex;align-items:center;gap:0.65rem;
cursor:pointer;border:none;background:none;text-align:left;
}
.dot .ring{
width:11px;height:11px;border-radius:50%;
border:1.5px solid rgba(0,0,0,0.25);
transition:background 0.3s,border-color 0.3s,transform 0.3s;
}
.dot.active .ring{background:#6D28D9;border-color:#6D28D9;transform:scale(1.35)}
.dot .lbl{
font-size:11px;letter-spacing:0.04em;color:rgba(0,0,0,0.35);
opacity:0;transform:translateX(-6px);
transition:opacity 0.3s,transform 0.3s,color 0.3s;
}
.dot:hover .lbl,.dot.active .lbl{opacity:1;transform:translateX(0)}
.dot.active .lbl{color:#1A1A1A}
/* circular reading-time orb */
.orb{
position:fixed;right:2.5vw;bottom:2.5vw;width:62px;height:62px;z-index:40;
}
.orb svg{transform:rotate(-90deg)}
.orb .track{fill:none;stroke:rgba(0,0,0,0.08);stroke-width:4}
.orb .prog{fill:none;stroke:#6D28D9;stroke-width:4;stroke-linecap:round;
stroke-dasharray:163;stroke-dashoffset:163;transition:stroke-dashoffset 0.1s linear}
.orb .pct{
position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
font-size:12px;font-weight:600;font-family:'Fraunces',serif;
}
/* article */
article{max-width:660px;margin:0 auto;padding:9rem 1.5rem 12rem}
.eyebrow{
font-size:11px;letter-spacing:0.18em;text-transform:uppercase;
color:#DB2777;margin-bottom:1.25rem;
}
h1{
font-family:'Fraunces',serif;font-weight:600;
font-size:clamp(34px,5vw,56px);line-height:1.08;
margin-bottom:1.5rem;letter-spacing:-0.02em;
}
.standfirst{
font-size:19px;line-height:1.6;color:#555;
margin-bottom:3.5rem;font-style:italic;
}
.chapter{padding-top:5rem;scroll-margin-top:5rem}
.chapter h2{
font-family:'Fraunces',serif;font-weight:600;font-size:28px;
margin-bottom:1.5rem;letter-spacing:-0.01em;
}
.chapter p{font-size:17px;line-height:1.78;color:#333;margin-bottom:1.4rem}
/* drop cap */
.chapter:first-of-type p:first-of-type::first-letter{
font-family:'Fraunces',serif;font-weight:600;
font-size:64px;float:left;line-height:0.82;
margin:6px 12px 0 0;color:#6D28D9;
}
/* pull quote */
.pull{
font-family:'Fraunces',serif;font-style:italic;
font-size:25px;line-height:1.4;color:#1A1A1A;
border-left:3px solid #DB2777;padding:0.4rem 0 0.4rem 1.6rem;
margin:2.75rem 0;
}
```
**JS:**
```js
const bar=document.getElementById('bar');
const orbProg=document.getElementById('orbProg');
const orbPct=document.getElementById('orbPct');
const dots=[...document.querySelectorAll('.dot')];
const chapters=dots.map(d=>document.getElementById(d.dataset.target));
const CIRC=2*Math.PI*26; // 2πr
function update(){
const doc=document.documentElement;
const max=doc.scrollHeight-doc.clientHeight;
const p=max>0?Math.min(window.scrollY/max,1):0;
bar.style.width=(p*100)+'%';
orbProg.style.strokeDashoffset=CIRC*(1-p);
orbPct.textContent=Math.round(p*100)+'%';
const mid=window.scrollY+window.innerHeight*0.35;
let active=0;
chapters.forEach((c,i)=>{if(c.offsetTop<=mid)active=i});
dots.forEach((d,i)=>d.classList.toggle('active',i===active));
}
window.addEventListener('scroll',update,{passive:true});
window.addEventListener('resize',update);
update();
dots.forEach(d=>{
d.addEventListener('click',()=>{
document.getElementById(d.dataset.target)
.scrollIntoView({behavior:'smooth',block:'start'});
});
});
```
### 09. Staggered Portfolio List
**Type:** CSS + JS
**Description:** A work index whose rows arrive one at a time with a staggered slide-up, plus a hover sweep and arrow nudge.
**HTML:**
```html
01
Halcyon Identity System Branding · Art Direction
2026 ↗
02
Northwind Commerce Platform Product Design · Engineering
2025 ↗
03
Atlas Editorial Redesign Web · Typography
2025 ↗
04
Lumen Motion Library Animation · Systems
2024 ↗
05
Verdant Sustainability Report Data Viz · Layout
2023 ↗
06
Strata Mobile Banking UX · Prototyping
2022 ↗
07
Cinder Festival Campaign Brand · Print
2021 ↗
08
Orbit Developer Portal Docs · Information Design
2019 ↗
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:#0B0B0C;color:#EDEDED;font-family:'Bricolage Grotesque',sans-serif;overflow-x:hidden}
header{
padding:8rem 6vw 4rem;
}
.kicker{
font-family:'JetBrains Mono',monospace;font-size:11px;
letter-spacing:0.2em;text-transform:uppercase;
color:#7C7C82;margin-bottom:1.5rem;
}
header h1{
font-size:clamp(38px,6vw,76px);font-weight:800;
line-height:1;letter-spacing:-0.03em;max-width:14ch;
}
/* list */
.list{padding:2rem 6vw 10rem}
.item{
display:grid;
grid-template-columns:64px 1fr auto;
align-items:center;gap:2rem;
padding:2.4rem 0;
border-top:1px solid rgba(255,255,255,0.1);
position:relative;cursor:pointer;
opacity:0;transform:translateY(46px);
transition:opacity 0.8s cubic-bezier(0.16,1,0.3,1),
transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.item.in{opacity:1;transform:none}
.item:last-child{border-bottom:1px solid rgba(255,255,255,0.1)}
.idx{
font-family:'JetBrains Mono',monospace;font-size:13px;
color:#5A5A60;
}
.mid .title{
font-size:clamp(22px,3vw,38px);font-weight:600;
letter-spacing:-0.02em;transition:transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.mid .meta{
font-family:'JetBrains Mono',monospace;font-size:12px;
color:#7C7C82;margin-top:0.5rem;
}
.year{
font-family:'JetBrains Mono',monospace;font-size:13px;
color:#7C7C82;
}
/* hover sweep */
.item::before{
content:'';position:absolute;left:-6vw;right:-6vw;top:0;bottom:0;
background:linear-gradient(90deg,transparent,rgba(124,58,237,0.12),transparent);
opacity:0;transition:opacity 0.35s;pointer-events:none;
}
.item:hover::before{opacity:1}
.item:hover .title{transform:translateX(14px)}
.item:hover .arrow{transform:translate(6px,-6px);color:#A78BFA}
.arrow{
font-size:22px;color:#5A5A60;
transition:transform 0.35s cubic-bezier(0.16,1,0.3,1),color 0.35s;
}
.mid{display:flex;flex-direction:column}
.right{display:flex;align-items:center;gap:1.6rem}
```
**JS:**
```js
const io=new IntersectionObserver((entries)=>{
entries.forEach(e=>{
if(!e.isIntersecting)return;
// stagger by index within the list
const items=[...document.querySelectorAll('.item')];
const i=items.indexOf(e.target);
e.target.style.transitionDelay=(Math.min(i,7)*0.07)+'s';
e.target.classList.add('in');
io.unobserve(e.target);
});
},{threshold:0.2});
document.querySelectorAll('.item').forEach(el=>io.observe(el));
```
### 10. Mountain Parallax Layers
**Type:** CSS + JS
**Description:** A sticky 340vh landscape where five mountain ridges, clouds, and a rising sun move at independent parallax speeds.
**HTML:**
```html
The summit was never the point — only the layers you crossed to find it.
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:#10131C;font-family:'Space Grotesk',sans-serif;overflow-x:hidden}
/* sticky scene */
.scene{
position:sticky;top:0;height:100vh;overflow:hidden;
background:linear-gradient(180deg,#1B2238 0%,#33324A 45%,#7A5C66 78%,#D89A6E 100%);
}
.scroll-space{height:340vh;position:relative}
/* sun */
.sun{
position:absolute;left:50%;top:60%;
width:160px;height:160px;border-radius:50%;
margin-left:-80px;
background:radial-gradient(circle,#FFE7B8,#FBBF6E 55%,rgba(251,191,110,0) 72%);
will-change:transform;
}
/* mountain layers */
.layer{
position:absolute;left:0;right:0;bottom:0;
will-change:transform;
}
.layer svg{display:block;width:100%}
.l1 path{fill:#2A3252}
.l2 path{fill:#3D3F5C}
.l3 path{fill:#5A5063}
.l4 path{fill:#7E5F62}
.l5 path{fill:#A06E5C}
/* drifting cloud band */
.cloud{
position:absolute;width:280px;height:60px;border-radius:60px;
background:rgba(255,255,255,0.08);filter:blur(8px);
will-change:transform;
}
.c1{top:18%;left:10%}
.c2{top:30%;left:55%;width:200px}
/* foreground title */
.title{
position:absolute;left:0;right:0;top:18%;
text-align:center;will-change:transform,opacity;
}
.title .sub{
font-family:'Space Grotesk',sans-serif;font-size:12px;
letter-spacing:0.32em;text-transform:uppercase;
color:rgba(255,255,255,0.5);margin-bottom:0.9rem;
}
.title h1{
font-family:'Cormorant Garamond',serif;font-weight:600;
font-size:clamp(46px,9vw,128px);line-height:0.95;
color:#F4ECE0;letter-spacing:-0.01em;
}
/* after-scene content */
.outro{
background:#D89A6E;padding:7rem 6vw 10rem;text-align:center;
}
.outro p{
font-family:'Cormorant Garamond',serif;font-style:italic;
font-size:clamp(22px,3.4vw,40px);line-height:1.4;
color:#3A2418;max-width:20ch;margin:0 auto;
}
```
**JS:**
```js
const sun=document.getElementById('sun');
const cl1=document.getElementById('cl1');
const cl2=document.getElementById('cl2');
const title=document.getElementById('title');
const L=[1,2,3,4,5].map(i=>document.getElementById('L'+i));
const space=document.querySelector('.scroll-space');
function frame(){
const rect=space.getBoundingClientRect();
const total=space.offsetHeight-window.innerHeight;
const p=Math.min(Math.max(-rect.top/total,0),1); // 0..1
// sun rises
sun.style.transform=`translateY(${ -p*420 }px)`;
// clouds drift sideways
cl1.style.transform=`translateX(${ p*260 }px)`;
cl2.style.transform=`translateX(${ -p*320 }px)`;
// title floats up + fades
title.style.transform=`translateY(${ -p*200 }px)`;
title.style.opacity=String(Math.max(1-p*1.6,0));
// layers rise at different speeds (far slower, near faster)
const speeds=[40,90,150,220,300];
L.forEach((el,i)=>{
el.style.transform=`translateY(${ -p*speeds[i] }px)`;
});
requestAnimationFrame(frame);
}
requestAnimationFrame(frame);
```
### 11. Cinematic Image Wipe
**Type:** CSS + JS
**Description:** Full-viewport frames revealed by a directional clip-path wipe that alternates side to side, captions riding in a beat behind.
**HTML:**
```html
A Cinematic Sequence
Frames That Wipe In
Reel 01
Dusk Over the Ridge
The first frame slides in from the left, edge sweeping across the image like a curtain pulled fast.
Reel 02
Cold Harbour Light
The wipe reverses — entering from the right, the direction alternating frame to frame.
Reel 03
Violet Hour Interior
A long easing curve gives the reveal weight, the way a film cut lands rather than snaps.
Reel 04
Embers, After
The caption rides in a beat behind the wipe — image first, words second.
— End of Sequence —
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:#070707;font-family:'Archivo',sans-serif;color:#fff;overflow-x:hidden}
.intro{
height:60vh;display:flex;flex-direction:column;
align-items:center;justify-content:center;text-align:center;gap:1rem;
}
.intro .tag{
font-size:11px;letter-spacing:0.3em;text-transform:uppercase;
color:#666;
}
.intro h1{
font-family:'Anton',sans-serif;font-size:clamp(40px,8vw,110px);
line-height:0.95;letter-spacing:0.01em;text-transform:uppercase;
}
/* each frame is full-viewport, image revealed by a wipe */
.frame{
position:relative;height:118vh;
display:flex;align-items:center;justify-content:center;
overflow:hidden;
}
.media{
position:absolute;inset:0;
/* clip starts collapsed; widens on .in */
clip-path:inset(0 100% 0 0);
transition:clip-path 1.35s cubic-bezier(0.76,0,0.24,1);
}
.frame.in .media{clip-path:inset(0 0 0 0)}
.frame:nth-child(even) .media{clip-path:inset(0 0 0 100%)}
.frame:nth-child(even).in .media{clip-path:inset(0 0 0 0)}
/* atmospheric "photographs" */
.m1{background:linear-gradient(135deg,#3A1C71,#D76D77 55%,#FFAF7B)}
.m2{background:linear-gradient(135deg,#0F2027,#203A43 55%,#2C5364)}
.m3{background:linear-gradient(135deg,#42275A,#734B6D)}
.m4{background:linear-gradient(135deg,#1F1C18,#8E0E00 60%,#1F1C18)}
.media::after{
content:'';position:absolute;inset:0;
background:radial-gradient(ellipse at center,transparent 30%,rgba(0,0,0,0.55))
}
/* caption rides in behind the wipe */
.cap{
position:relative;z-index:2;text-align:center;
opacity:0;transform:translateY(28px);
transition:opacity 0.8s ease 0.6s,transform 0.8s ease 0.6s;
}
.frame.in .cap{opacity:1;transform:none}
.cap .no{
font-family:'Anton',sans-serif;font-size:14px;
letter-spacing:0.2em;color:rgba(255,255,255,0.55);margin-bottom:0.6rem;
}
.cap h2{
font-family:'Anton',sans-serif;text-transform:uppercase;
font-size:clamp(34px,6vw,84px);line-height:1;letter-spacing:0.01em;
}
.cap p{
margin-top:1rem;font-size:14px;color:rgba(255,255,255,0.7);
max-width:34ch;margin-left:auto;margin-right:auto;line-height:1.6;
}
.end{
height:50vh;display:flex;align-items:center;justify-content:center;
font-family:'Anton',sans-serif;font-size:clamp(24px,4vw,52px);
text-transform:uppercase;color:#1F1F1F;
}
```
**JS:**
```js
const io=new IntersectionObserver((entries)=>{
entries.forEach(e=>{
if(!e.isIntersecting)return;
e.target.classList.add('in');
io.unobserve(e.target);
});
},{threshold:0.35});
document.querySelectorAll('.frame').forEach(el=>io.observe(el));
```
### 12. Sticky Product Tour
**Type:** CSS + JS
**Description:** Classic scrollytelling — a sticky device on the left swaps its screen to match each step as the copy scrolls past on the right.
**HTML:**
```html
Product Tour
Watch the interface change as you read.
A sticky device on the left holds its place while the steps on the right scroll past — each step swaps the screen to match.
🔍
Capture
Drop in any source — the workspace ingests it instantly.
🧩
Organise
Auto-grouped into boards you can rearrange by hand.
⚡
Automate
Rules fire on change — no manual upkeep.
📤
Ship
Publish anywhere with one reviewed export.
Step 01
Capture everything in one inbox
Links, files, notes, screenshots — anything you feed the workspace lands in a single capture stream, parsed and tagged the moment it arrives.
Step 02
Organise without the busywork
Captured items group themselves into boards. You stay in control — drag, merge, or split — but you never start from an empty canvas.
Step 03
Automate the parts you repeat
Set a rule once and it runs forever. When something changes upstream, the workspace reacts before you'd think to.
Step 04
Ship to anywhere, reviewed
A single export pipeline pushes to every destination — with a review gate so nothing leaves before you say so.
```
**CSS:**
```css
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{background:#0A0A0F;font-family:'Sora',sans-serif;color:#E8E8EC}
.lead{
padding:8rem 6vw 5rem;max-width:760px;
}
.lead .badge{
display:inline-block;font-family:'IBM Plex Mono',monospace;
font-size:11px;letter-spacing:0.14em;text-transform:uppercase;
color:#34D399;border:1px solid rgba(52,211,153,0.3);
padding:5px 12px;border-radius:20px;margin-bottom:1.5rem;
}
.lead h1{
font-size:clamp(34px,5.5vw,62px);font-weight:700;
line-height:1.05;letter-spacing:-0.025em;
}
.lead p{margin-top:1.25rem;font-size:17px;color:#9A9AA5;line-height:1.7;max-width:54ch}
/* scrollytelling section: sticky visual + scrolling steps */
.tour{
display:grid;grid-template-columns:1fr 1fr;gap:4vw;
padding:0 6vw 8rem;
}
/* left: sticky device */
.stage{position:relative}
.sticky{
position:sticky;top:14vh;height:72vh;
display:flex;align-items:center;justify-content:center;
}
.device{
width:300px;height:430px;border-radius:34px;
background:#16161E;border:1px solid rgba(255,255,255,0.08);
padding:14px;position:relative;overflow:hidden;
box-shadow:0 40px 80px -30px rgba(0,0,0,0.8);
}
.screen{
width:100%;height:100%;border-radius:22px;overflow:hidden;
position:relative;background:#0A0A0F;
}
/* each panel stacked, cross-faded */
.panel{
position:absolute;inset:0;
display:flex;flex-direction:column;
align-items:center;justify-content:center;gap:1rem;
opacity:0;transform:scale(1.05);
transition:opacity 0.6s ease,transform 0.6s ease;
padding:2rem;text-align:center;
}
.panel.on{opacity:1;transform:scale(1)}
.panel .glyph{font-size:54px}
.panel .pt{font-weight:600;font-size:18px}
.panel .pd{font-size:12px;color:#9A9AA5;line-height:1.6}
.pA{background:linear-gradient(160deg,#1E1B4B,#0A0A0F)}
.pB{background:linear-gradient(160deg,#064E3B,#0A0A0F)}
.pC{background:linear-gradient(160deg,#7C2D12,#0A0A0F)}
.pD{background:linear-gradient(160deg,#4C1D95,#0A0A0F)}
/* step progress pips on device frame */
.pips{
position:absolute;bottom:26px;left:50%;transform:translateX(-50%);
display:flex;gap:7px;
}
.pip{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,0.18);
transition:background 0.4s,width 0.4s}
.pip.on{background:#34D399;width:18px;border-radius:4px}
/* right: scrolling steps */
.steps{display:flex;flex-direction:column}
.step{
min-height:78vh;display:flex;flex-direction:column;justify-content:center;
}
.step .n{
font-family:'IBM Plex Mono',monospace;font-size:13px;
color:#34D399;margin-bottom:0.9rem;
}
.step h2{
font-size:clamp(24px,3vw,38px);font-weight:600;
letter-spacing:-0.015em;line-height:1.15;margin-bottom:1rem;
}
.step p{font-size:15px;color:#9A9AA5;line-height:1.75;max-width:42ch}
@media(max-width:760px){
.tour{grid-template-columns:1fr}
.sticky{height:auto;position:relative;top:0;margin-bottom:2rem}
}
```
**JS:**
```js
const panels=[...document.querySelectorAll('.panel')];
const pips=[...document.querySelectorAll('.pip')];
const steps=[...document.querySelectorAll('.step')];
function setActive(i){
panels.forEach(p=>p.classList.toggle('on',+p.dataset.i===i));
pips.forEach((p,j)=>p.classList.toggle('on',j===i));
}
const io=new IntersectionObserver((entries)=>{
entries.forEach(e=>{
if(e.isIntersecting) setActive(+e.target.dataset.step);
});
},{rootMargin:'-45% 0px -45% 0px'});
steps.forEach(s=>io.observe(s));
```
---
## 32 CSS Search Box & Search Bar Designs
URL: https://codefronts.com/components/css-search-boxes/
Description: 32 hand-coded CSS search boxes and search bars — minimal underline, voice, autocomplete dropdown, recent searches, ⌘K command palette and more. Semantic forms, drop-in ready.
Demo count: 32
### 01. Minimal Underline
**Type:** Pure CSS
**Description:** Borderless input with a thin bottom rule that animates outward from the centre on focus — the cleanest pattern that still signals interactivity.
**HTML:**
```html
```
**CSS:**
```css
.csb-min { position: relative; display: inline-block; }
.csb-min input {
width: 240px; padding: 8px 0;
border: 0; outline: none;
background: transparent;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
border-bottom: 1px solid #2a2a3e;
}
.csb-min input::placeholder { color: #b8b6d4; }
.csb-min::after {
content: ''; position: absolute;
left: 50%; bottom: 0;
width: 0; height: 2px;
background: #7c6cff;
transform: translateX(-50%);
transition: width 0.3s ease;
}
.csb-min:focus-within::after { width: 100%; }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 02. Pill with Submit
**Type:** Pure CSS
**Description:** Rounded pill shell with an inline submit button — the de facto pattern for site search and product search.
**HTML:**
```html
```
**CSS:**
```css
.csb-pill {
display: inline-flex; align-items: center;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 999px;
padding: 4px 4px 4px 14px;
transition: border-color 0.2s, background 0.2s;
}
.csb-pill:focus-within { border-color: #7c6cff; background: #1f1f28; }
.csb-pill svg { width: 16px; height: 16px; fill: none; stroke: #7a7899; stroke-width: 2; stroke-linecap: round; }
.csb-pill input {
flex: 1; min-width: 180px; padding: 8px 12px;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 13px/1 system-ui, sans-serif;
}
.csb-pill input::placeholder { color: #b8b6d4; }
.csb-pill button {
padding: 8px 18px; border: 0; cursor: pointer;
background: linear-gradient(135deg, #7c6cff, #a78bfa);
color: #fff; font: 600 12px/1 system-ui, sans-serif;
border-radius: 999px;
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 03. Glass Search
**Type:** Pure CSS
**Description:** Frosted-glass shell with backdrop blur — sits beautifully over hero images and gradient backgrounds.
**HTML:**
```html
```
**CSS:**
```css
.csb-glass {
display: inline-flex; align-items: center; gap: 10px;
padding: 10px 18px;
background: rgba(255,255,255,0.06);
border: 1px solid rgba(255,255,255,0.18);
border-radius: 14px;
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
transition: background 0.25s, border-color 0.25s;
}
.csb-glass:focus-within { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.32); }
.csb-glass svg { width: 16px; height: 16px; fill: none; stroke: rgba(255,255,255,0.7); stroke-width: 2; stroke-linecap: round; }
.csb-glass input {
width: 220px; padding: 0;
border: 0; outline: none; background: transparent;
color: #fff; font: 500 14px/1 system-ui, sans-serif;
}
.csb-glass input::placeholder { color: rgba(255,255,255,0.55); }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 04. Neon Outline
**Type:** Pure CSS
**Description:** Synthwave neon ring with a soft glow that intensifies on focus — built for dark dashboards and game UIs.
**HTML:**
```html
```
**CSS:**
```css
.csb-neon {
position: relative; display: inline-block;
}
.csb-neon input {
width: 260px;
padding: 12px 16px;
background: #0a0014;
border: 1.5px solid #6cffff;
border-radius: 4px;
color: #6cffff;
font: 500 13px/1 'Courier New', monospace;
letter-spacing: 0.06em;
outline: none;
box-shadow: 0 0 8px rgba(108,255,255,0.25), inset 0 0 6px rgba(108,255,255,0.1);
transition: box-shadow 0.25s, border-color 0.25s;
}
.csb-neon input::placeholder { color: rgba(108,255,255,0.5); }
.csb-neon input:focus {
border-color: #ff6cff;
box-shadow: 0 0 18px rgba(255,108,255,0.6), 0 0 36px rgba(255,108,255,0.2), inset 0 0 10px rgba(255,108,255,0.15);
color: #ff6cff;
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 05. Floating Label
**Type:** Pure CSS
**Description:** Material-style floating label that snaps up when the input is focused or filled — uses :placeholder-shown for a JS-free implementation.
**HTML:**
```html
```
**CSS:**
```css
.csb-float {
position: relative; display: inline-block;
}
.csb-float input {
width: 240px; padding: 18px 14px 8px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 8px;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
outline: none;
transition: border-color 0.2s;
}
.csb-float input:focus { border-color: #7c6cff; }
.csb-float label {
position: absolute;
left: 14px; top: 50%;
transform: translateY(-50%);
color: #7a7899; font: 500 14px/1 system-ui, sans-serif;
pointer-events: none;
transition: top 0.2s, font-size 0.2s, color 0.2s;
}
.csb-float input:focus + label,
.csb-float input:not(:placeholder-shown) + label {
top: 12px;
font-size: 10.5px;
color: #a78bfa;
letter-spacing: 0.06em;
text-transform: uppercase;
}
```
### 06. Caret Highlight
**Type:** Pure CSS
**Description:** On focus, a single accent line sweeps left-to-right across the bottom of the input — a one-shot reveal that signals "this field is active" without any perpetual motion.
**HTML:**
```html
```
**CSS:**
```css
.csb-caret {
position: relative; display: inline-block;
overflow: hidden;
border-radius: 10px;
}
.csb-caret input {
display: block; width: 240px;
padding: 11px 14px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
outline: none;
transition: border-color 0.2s;
}
.csb-caret input::placeholder { color: #b8b6d4; }
.csb-caret:focus-within input { border-color: #7c6cff; }
.csb-caret::after {
content: ''; position: absolute;
left: 0; bottom: 0;
height: 2px; width: 100%;
background: linear-gradient(90deg, transparent, #7c6cff 40%, #ff6c8a 60%, transparent);
transform: translateX(-100%);
pointer-events: none;
}
.csb-caret:focus-within::after {
animation: csb-caret-sweep 0.7s cubic-bezier(0.65,0,0.35,1) forwards;
}
@keyframes csb-caret-sweep {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@media (prefers-reduced-motion: reduce) {
.csb-caret,
.csb-caret * {
animation: none !important;
}
}
```
### 07. Voice Search
**Type:** CSS + JS
**Description:** Microphone button that pulses while "listening" — toggles a recording state that demonstrates the visual feedback pattern (not real audio).
**HTML:**
```html
```
**CSS:**
```css
.csb-voice {
display: inline-flex; align-items: center;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
padding: 4px;
}
.csb-voice:focus-within { border-color: #7c6cff; }
.csb-voice input {
flex: 1; min-width: 180px; padding: 8px 12px;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 13px/1 system-ui, sans-serif;
}
.csb-voice input::placeholder { color: #b8b6d4; }
.csb-voice-mic {
width: 34px; height: 34px;
border: 0; cursor: pointer;
background: transparent;
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
position: relative;
transition: background 0.2s;
}
.csb-voice-mic:hover { background: rgba(124,108,255,0.08); }
.csb-voice-mic svg { width: 16px; height: 16px; fill: none; stroke: #a78bfa; stroke-width: 2; stroke-linecap: round; }
.csb-voice-mic[aria-pressed="true"] svg { stroke: #ff6c8a; }
.csb-voice-mic[aria-pressed="true"]::after {
content: ''; position: absolute; inset: 4px;
border-radius: 6px; border: 1.5px solid #ff6c8a;
animation: csb-voice-pulse 1.2s ease-out infinite;
}
@keyframes csb-voice-pulse {
0% { transform: scale(0.8); opacity: 1; }
100% { transform: scale(1.4); opacity: 0; }
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@media (prefers-reduced-motion: reduce) {
.csb-voice,
.csb-voice * {
animation: none !important;
}
}
```
**JS:**
```js
document.querySelectorAll('.csb-voice-mic').forEach(function(btn) {
btn.addEventListener('click', function() {
var on = btn.getAttribute('aria-pressed') === 'true';
btn.setAttribute('aria-pressed', on ? 'false' : 'true');
});
});
```
### 08. Loading Spinner
**Type:** CSS + JS
**Description:** Magnifying glass icon morphs into a spinner while the form is "searching" — paired with a class that simulates the loading state.
**HTML:**
```html
```
**CSS:**
```css
.csb-load {
display: inline-flex; align-items: center; gap: 10px;
padding: 10px 14px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
}
.csb-load:focus-within { border-color: #7c6cff; }
.csb-load-icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.csb-load-glass, .csb-load-spin {
position: absolute; inset: 0;
transition: opacity 0.2s;
}
.csb-load-glass { fill: none; stroke: #7a7899; stroke-width: 2; stroke-linecap: round; }
.csb-load-spin {
border: 2px solid rgba(124,108,255,0.2);
border-top-color: #7c6cff;
border-radius: 50%;
opacity: 0;
animation: csb-load-rot 0.7s linear infinite;
}
.csb-load.is-loading .csb-load-glass { opacity: 0; }
.csb-load.is-loading .csb-load-spin { opacity: 1; }
.csb-load input {
flex: 1; min-width: 200px; padding: 0;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
}
.csb-load input::placeholder { color: #b8b6d4; }
@keyframes csb-load-rot { to { transform: rotate(360deg); } }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@media (prefers-reduced-motion: reduce) {
.csb-load,
.csb-load * {
animation: none !important;
}
}
```
**JS:**
```js
document.querySelectorAll('.csb-load').forEach(function(form) {
form.addEventListener('submit', function(e) {
e.preventDefault();
form.classList.add('is-loading');
setTimeout(function() { form.classList.remove('is-loading'); }, 1500);
});
});
```
### 09. Clear-on-Type
**Type:** Pure CSS
**Description:** An × clear button appears as soon as the user types — pure CSS via :placeholder-shown, no JS state needed.
**HTML:**
```html
```
**CSS:**
```css
.csb-clear {
display: inline-flex; align-items: center;
padding: 4px 6px 4px 14px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
}
.csb-clear:focus-within { border-color: #7c6cff; }
.csb-clear input {
width: 220px; padding: 8px 0;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
-webkit-appearance: none; appearance: none;
}
.csb-clear input::-webkit-search-decoration,
.csb-clear input::-webkit-search-cancel-button { display: none; }
.csb-clear input::placeholder { color: #b8b6d4; }
.csb-clear-x {
width: 24px; height: 24px;
border: 0; cursor: pointer;
background: rgba(255,255,255,0.06);
border-radius: 50%;
position: relative;
margin-left: 6px;
opacity: 0; transform: scale(0.6);
transition: opacity 0.2s, transform 0.2s;
}
.csb-clear input:not(:placeholder-shown) ~ .csb-clear-x {
opacity: 1; transform: scale(1);
}
.csb-clear-x::before, .csb-clear-x::after {
content: ''; position: absolute;
top: 50%; left: 50%;
width: 9px; height: 1.5px;
background: #f0eeff; border-radius: 1px;
}
.csb-clear-x::before { transform: translate(-50%,-50%) rotate(45deg); }
.csb-clear-x::after { transform: translate(-50%,-50%) rotate(-45deg); }
.csb-clear-x:hover { background: rgba(255,108,138,0.2); }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 10. Expanding Input
**Type:** CSS + JS
**Description:** Compact icon-only at rest; click expands it into a full-width input. Collapses back when blurred and empty.
**HTML:**
```html
```
**CSS:**
```css
.csb-expand {
display: inline-flex; align-items: center;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 999px;
padding: 4px;
transition: border-color 0.2s;
}
.csb-expand:focus-within, .csb-expand.is-open { border-color: #7c6cff; }
.csb-expand-toggle {
width: 36px; height: 36px;
border: 0; cursor: pointer; background: transparent;
border-radius: 50%;
display: flex; align-items: center; justify-content: center;
}
.csb-expand-toggle svg { width: 16px; height: 16px; fill: none; stroke: #a78bfa; stroke-width: 2; stroke-linecap: round; }
.csb-expand input {
width: 0; padding: 0; border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
transition: width 0.35s cubic-bezier(0.65,0,0.35,1), padding 0.35s;
}
.csb-expand input::placeholder { color: #b8b6d4; }
.csb-expand.is-open input { width: 200px; padding: 0 14px; }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
**JS:**
```js
document.querySelectorAll('.csb-expand').forEach(function(form) {
var toggle = form.querySelector('.csb-expand-toggle');
var input = form.querySelector('input');
toggle.addEventListener('click', function() {
form.classList.add('is-open');
setTimeout(function() { input.focus(); }, 200);
});
input.addEventListener('blur', function() {
if (!input.value) form.classList.remove('is-open');
});
});
```
### 11. Inline Suggestions
**Type:** CSS + JS
**Description:** Real autocomplete dropdown — keyboard-navigable (↑ ↓ Enter Esc) with five live results that filter as you type.
**HTML:**
```html
```
**CSS:**
```css
.csb-sug { position: relative; display: inline-block; }
.csb-sug input {
width: 240px; padding: 10px 14px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
outline: none;
transition: border-color 0.2s, border-radius 0.15s;
}
.csb-sug input::placeholder { color: #b8b6d4; }
.csb-sug input:focus { border-color: #7c6cff; }
.csb-sug input[aria-expanded="true"] { border-radius: 10px 10px 0 0; border-bottom-color: transparent; }
.csb-sug-list {
position: absolute; top: 100%; left: 0; right: 0;
margin: 0; padding: 4px;
list-style: none;
background: #1a1a28;
border: 1px solid #7c6cff; border-top: 0;
border-radius: 0 0 10px 10px;
z-index: 10;
max-height: 220px; overflow-y: auto;
}
.csb-sug-list li {
padding: 8px 10px;
font: 500 13px/1.2 system-ui, sans-serif;
color: #cbd5e1; cursor: pointer;
border-radius: 6px;
}
.csb-sug-list li[aria-selected="true"], .csb-sug-list li:hover {
background: rgba(124,108,255,0.12); color: #fff;
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
**JS:**
```js
document.querySelectorAll('.csb-sug').forEach(function(form) {
var input = form.querySelector('input');
var list = form.querySelector('.csb-sug-list');
var items = Array.from(list.querySelectorAll('li'));
var idx = -1;
function open() { list.hidden = false; input.setAttribute('aria-expanded', 'true'); }
function close() { list.hidden = true; input.setAttribute('aria-expanded', 'false'); idx = -1; items.forEach(function(li){ li.removeAttribute('aria-selected'); }); }
function filter(q) {
var any = false;
items.forEach(function(li) {
var match = !q || li.textContent.toLowerCase().includes(q.toLowerCase());
li.style.display = match ? '' : 'none';
if (match) any = true;
});
return any;
}
function select(n) {
items.forEach(function(li){ li.removeAttribute('aria-selected'); });
var visible = items.filter(function(li){ return li.style.display !== 'none'; });
if (visible.length === 0) return;
idx = (n + visible.length) % visible.length;
visible[idx].setAttribute('aria-selected', 'true');
}
input.addEventListener('focus', function() { if (filter(input.value)) open(); });
input.addEventListener('input', function() { if (filter(input.value)) open(); else close(); });
input.addEventListener('blur', function() { setTimeout(close, 150); });
input.addEventListener('keydown', function(e) {
if (list.hidden) return;
if (e.key === 'ArrowDown') { e.preventDefault(); select(idx + 1); }
else if (e.key === 'ArrowUp') { e.preventDefault(); select(idx - 1); }
else if (e.key === 'Escape') { close(); input.blur(); }
else if (e.key === 'Enter') {
var visible = items.filter(function(li){ return li.style.display !== 'none'; });
if (idx >= 0 && visible[idx]) { e.preventDefault(); input.value = visible[idx].textContent; close(); }
}
});
list.addEventListener('mousedown', function(e) {
var li = e.target.closest('li[role="option"]');
if (li) { input.value = li.textContent; close(); }
});
});
```
### 12. Keyboard Hint
**Type:** Pure CSS
**Description:** A subtle ⌘K kbd badge sits inside the input as a hint to power users — fades when the field is focused.
**HTML:**
```html
```
**CSS:**
```css
.csb-kbd {
display: inline-flex; align-items: center; gap: 10px;
padding: 9px 8px 9px 14px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
}
.csb-kbd:focus-within { border-color: #7c6cff; }
.csb-kbd svg { width: 15px; height: 15px; fill: none; stroke: #7a7899; stroke-width: 2; stroke-linecap: round; }
.csb-kbd input {
width: 200px; padding: 0;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 13px/1 system-ui, sans-serif;
}
.csb-kbd input::placeholder { color: #b8b6d4; }
.csb-kbd-key {
font-family: 'JetBrains Mono', monospace; font-size: 11px;
padding: 3px 7px;
color: #b8b6d4;
background: #0c0c12;
border: 1px solid rgba(255,255,255,0.1);
border-radius: 5px;
transition: opacity 0.2s;
}
.csb-kbd:focus-within .csb-kbd-key { opacity: 0.3; }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 13. Tagged Filter
**Type:** CSS + JS
**Description:** Active filter chips live inside the search bar — click × on a chip to remove it. Real interaction, not a mock.
**HTML:**
```html
```
**CSS:**
```css
.csb-tag {
display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px;
padding: 6px 10px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
max-width: 320px;
}
.csb-tag:focus-within { border-color: #7c6cff; }
.csb-tag-chip {
display: inline-flex; align-items: center; gap: 4px;
padding: 3px 4px 3px 10px;
background: rgba(124,108,255,0.15);
color: #a78bfa;
border-radius: 999px;
font: 600 11px/1 system-ui, sans-serif;
}
.csb-tag-chip button {
width: 16px; height: 16px;
border: 0; cursor: pointer;
background: rgba(255,255,255,0.08);
color: #cbd5e1;
border-radius: 50%;
font: 400 14px/1 system-ui, sans-serif;
display: flex; align-items: center; justify-content: center;
padding: 0;
}
.csb-tag-chip button:hover { background: rgba(255,108,138,0.3); color: #fff; }
.csb-tag input {
flex: 1; min-width: 90px; padding: 4px 0;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 13px/1 system-ui, sans-serif;
}
.csb-tag input::placeholder { color: #b8b6d4; }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
**JS:**
```js
document.querySelectorAll('.csb-tag-chip button').forEach(function(btn) {
btn.addEventListener('click', function() { btn.closest('.csb-tag-chip').remove(); });
});
```
### 14. Recent Searches
**Type:** CSS + JS
**Description:** Dropdown of recent queries on focus, with a "Clear all" action — production-grade pattern for site search and command palettes.
**HTML:**
```html
```
**CSS:**
```css
.csb-recent { position: relative; display: inline-block; }
.csb-recent input {
width: 260px; padding: 10px 14px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
outline: none;
}
.csb-recent input::placeholder { color: #b8b6d4; }
.csb-recent input:focus { border-color: #7c6cff; }
.csb-recent input[aria-expanded="true"] { border-radius: 10px 10px 0 0; border-bottom-color: transparent; }
.csb-recent-list {
position: absolute; top: 100%; left: 0; right: 0;
background: #1a1a28;
border: 1px solid #7c6cff; border-top: 0;
border-radius: 0 0 10px 10px;
padding: 6px;
z-index: 10;
}
.csb-recent-head {
display: flex; justify-content: space-between; align-items: center;
padding: 4px 8px;
font: 600 10px/1 'JetBrains Mono', monospace;
letter-spacing: 0.08em; text-transform: uppercase;
color: #b8b6d4;
}
.csb-recent-clear {
border: 0; background: transparent;
color: #ff6c8a; cursor: pointer;
font: 600 10px/1 'JetBrains Mono', monospace;
}
.csb-recent-list [role="option"] {
display: block; width: 100%; text-align: left;
padding: 7px 10px;
border: 0; cursor: pointer;
background: transparent;
color: #cbd5e1; font: 500 13px/1 system-ui, sans-serif;
border-radius: 6px;
}
.csb-recent-list [role="option"]:hover { background: rgba(124,108,255,0.12); color: #fff; }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
**JS:**
```js
document.querySelectorAll('.csb-recent').forEach(function(form) {
var input = form.querySelector('input');
var list = form.querySelector('.csb-recent-list');
function open() { list.hidden = false; input.setAttribute('aria-expanded', 'true'); }
function close() { list.hidden = true; input.setAttribute('aria-expanded', 'false'); }
input.addEventListener('focus', open);
input.addEventListener('blur', function() { setTimeout(close, 150); });
list.addEventListener('mousedown', function(e) {
var btn = e.target.closest('[role="option"]');
if (btn) { input.value = btn.textContent; close(); }
});
var clear = form.querySelector('.csb-recent-clear');
if (clear) clear.addEventListener('click', function() {
form.querySelectorAll('[role="option"]').forEach(function(b){ b.remove(); });
});
});
```
### 15. Animated Placeholder
**Type:** Pure CSS
**Description:** Placeholder text cycles through example queries on a typewriter loop — pure CSS using steps() animation on a marquee track.
**HTML:**
```html
```
**CSS:**
```css
.csb-anim { position: relative; display: inline-block; }
.csb-anim input {
width: 240px; padding: 11px 14px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
outline: none; position: relative; z-index: 1;
}
.csb-anim input:focus { border-color: #7c6cff; }
.csb-anim-placeholder {
position: absolute;
left: 14px; right: 14px; top: 0; bottom: 0;
overflow: hidden; pointer-events: none;
display: flex; align-items: center;
}
.csb-anim-placeholder span {
flex-shrink: 0; width: 100%;
font: 500 14px/1 system-ui, sans-serif; color: #b8b6d4;
white-space: nowrap;
}
.csb-anim:not(:focus-within) .csb-anim-placeholder span:first-child {
animation: csb-anim-cycle 9s steps(1) infinite;
}
.csb-anim input:not(:placeholder-shown) ~ .csb-anim-placeholder,
.csb-anim:focus-within .csb-anim-placeholder { display: none; }
@keyframes csb-anim-cycle {
0%, 33% { margin-left: 0; }
33.5%, 66% { margin-left: -100%; }
66.5%, 99% { margin-left: -200%; }
100% { margin-left: 0; }
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@media (prefers-reduced-motion: reduce) {
.csb-anim,
.csb-anim * {
animation: none !important;
}
}
```
### 16. Avatar Search
**Type:** Pure CSS
**Description:** Search bar with the logged-in user avatar at the right edge — common in dashboards. Subtle but communicates "this search is yours".
**HTML:**
```html
```
**CSS:**
```css
.csb-avatar {
display: inline-flex; align-items: center; gap: 10px;
padding: 5px 5px 5px 14px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 999px;
min-width: 280px;
}
.csb-avatar:focus-within { border-color: #7c6cff; }
.csb-avatar svg { width: 15px; height: 15px; fill: none; stroke: #7a7899; stroke-width: 2; stroke-linecap: round; }
.csb-avatar input {
flex: 1; padding: 8px 0;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 13px/1 system-ui, sans-serif;
}
.csb-avatar input::placeholder { color: #b8b6d4; }
.csb-avatar-pic {
width: 28px; height: 28px;
border-radius: 50%;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: #fff; font: 700 11px/1 system-ui, sans-serif;
display: flex; align-items: center; justify-content: center;
flex-shrink: 0;
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 17. Brutalist Stamp
**Type:** Pure CSS
**Description:** Hard offset shadow, zero radius, bold mono — a search bar that doesn't apologize for itself.
**HTML:**
```html
```
**CSS:**
```css
.csb-brut {
display: inline-flex; align-items: stretch;
background: #f0eeff;
border: 2.5px solid #1a1a2e;
box-shadow: 5px 5px 0 #ff6c8a;
transition: transform 0.1s, box-shadow 0.1s;
}
.csb-brut:focus-within { transform: translate(-1px,-1px); box-shadow: 6px 6px 0 #ff6c8a; }
.csb-brut input {
width: 220px; padding: 11px 14px;
border: 0; outline: none; background: transparent;
color: #1a1a2e; font: 700 13px/1 'Courier New', monospace;
letter-spacing: 0.08em;
}
.csb-brut input::placeholder { color: rgba(26,26,46,0.5); }
.csb-brut button {
padding: 0 20px;
border: 0; border-left: 2.5px solid #1a1a2e;
cursor: pointer;
background: #1a1a2e; color: #fff;
font: 800 12px/1 'Courier New', monospace;
letter-spacing: 0.12em;
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 18. Compact Toolbar
**Type:** Pure CSS
**Description:** Search slotted between filter chips and an action button — the toolbar pattern most apps actually need.
**HTML:**
```html
```
**CSS:**
```css
.csb-tool {
display: inline-flex; align-items: center; gap: 6px;
padding: 6px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
}
.csb-tool:focus-within { border-color: #7c6cff; }
.csb-tool-chip {
padding: 5px 10px;
background: rgba(124,108,255,0.15);
color: #a78bfa;
border-radius: 6px;
font: 600 11px/1 system-ui, sans-serif;
cursor: pointer;
}
.csb-tool input {
flex: 1; min-width: 160px; padding: 5px 6px;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 13px/1 system-ui, sans-serif;
}
.csb-tool input::placeholder { color: #b8b6d4; }
.csb-tool-action {
width: 28px; height: 28px;
border: 0; cursor: pointer;
background: rgba(255,255,255,0.05);
border-radius: 6px;
display: flex; align-items: center; justify-content: center;
}
.csb-tool-action:hover { background: rgba(255,255,255,0.1); }
.csb-tool-action svg { width: 14px; height: 14px; fill: none; stroke: #cbd5e1; stroke-width: 2; stroke-linecap: round; }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 19. Hero Search
**Type:** Pure CSS
**Description:** Big landing-page search with a subtle gradient halo behind it — the kind you put front-and-centre on a marketing site.
**HTML:**
```html
```
**CSS:**
```css
.csb-hero {
position: relative; display: inline-flex; align-items: center;
padding: 5px 5px 5px 14px; gap: 10px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 14px;
isolation: isolate;
max-width: 100%;
}
.csb-hero::before {
content: ''; position: absolute; inset: -20px; z-index: -1;
background: radial-gradient(ellipse at center, rgba(124,108,255,0.4), transparent 70%);
filter: blur(20px); opacity: 0.5;
transition: opacity 0.3s;
}
.csb-hero:focus-within::before { opacity: 1; }
.csb-hero svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: #a78bfa; stroke-width: 2; stroke-linecap: round; }
.csb-hero input {
width: 180px; padding: 10px 0;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 15px/1 system-ui, sans-serif;
min-width: 0;
}
.csb-hero input::placeholder { color: #b8b6d4; }
.csb-hero button {
padding: 9px 16px; flex-shrink: 0;
border: 0; cursor: pointer;
background: linear-gradient(135deg, #7c6cff, #ff6c8a);
color: #fff; font: 600 13px/1 system-ui, sans-serif;
border-radius: 10px;
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 20. Side Indicator
**Type:** Pure CSS
**Description:** A 3px coloured rail on the left edge of the input shifts colour on focus — minimal but unmistakable signal.
**HTML:**
```html
```
**CSS:**
```css
.csb-side {
position: relative; display: inline-block;
}
.csb-side input {
width: 240px; padding: 11px 14px 11px 18px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 0 8px 8px 0;
border-left: 3px solid #2a2a3e;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
outline: none;
transition: border-left-color 0.25s;
}
.csb-side input::placeholder { color: #b8b6d4; }
.csb-side input:focus { border-left-color: #2ecc8a; }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 21. Drop Shadow Float
**Type:** Pure CSS
**Description:** Subtle elevation lift on focus — a soft transform + larger drop-shadow makes the input feel like it raised toward the user.
**HTML:**
```html
```
**CSS:**
```css
.csb-float-s {
display: inline-flex; align-items: center; gap: 10px;
padding: 11px 14px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
box-shadow: 0 1px 2px rgba(0,0,0,0.3);
transform: translateY(0);
transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}
.csb-float-s:focus-within {
transform: translateY(-2px);
box-shadow: 0 8px 24px rgba(124,108,255,0.25), 0 2px 4px rgba(0,0,0,0.3);
border-color: rgba(124,108,255,0.5);
}
.csb-float-s svg { width: 15px; height: 15px; fill: none; stroke: #7a7899; stroke-width: 2; stroke-linecap: round; }
.csb-float-s input {
width: 220px; padding: 0;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
}
.csb-float-s input::placeholder { color: #b8b6d4; }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 22. Search + Filter
**Type:** Pure CSS
**Description:** Two-column shell: input on the left, scope dropdown on the right, divided by a vertical hairline. The pattern of choice for ecommerce.
**HTML:**
```html
```
**CSS:**
```css
.csb-filter {
display: inline-flex; align-items: stretch;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
}
.csb-filter:focus-within { border-color: #7c6cff; }
.csb-filter input {
flex: 1; padding: 11px 14px;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
min-width: 200px;
}
.csb-filter input::placeholder { color: #b8b6d4; }
.csb-filter select {
padding: 11px 14px;
border: 0; border-left: 1px solid rgba(255,255,255,0.08);
outline: none; cursor: pointer;
background: transparent;
color: #a78bfa; font: 600 12px/1 system-ui, sans-serif;
appearance: none; -webkit-appearance: none;
padding-right: 28px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%23a78bfa' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 10px center;
background-size: 10px;
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 23. Inline Loading Bar
**Type:** CSS + JS
**Description:** A thin progress bar slides across the bottom of the input while results are loading — gentler than a full spinner for live-search UX.
**HTML:**
```html
```
**CSS:**
```css
.csb-bar {
position: relative; display: inline-flex; align-items: center; gap: 10px;
padding: 11px 14px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
overflow: hidden;
}
.csb-bar:focus-within { border-color: #7c6cff; }
.csb-bar svg { width: 15px; height: 15px; fill: none; stroke: #7a7899; stroke-width: 2; stroke-linecap: round; }
.csb-bar input {
width: 220px; padding: 0;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
}
.csb-bar input::placeholder { color: #b8b6d4; }
.csb-bar-progress {
position: absolute; bottom: 0; left: 0;
height: 2px; width: 30%;
background: linear-gradient(90deg, transparent, #7c6cff, transparent);
transform: translateX(-100%);
transition: opacity 0.2s;
opacity: 0;
}
.csb-bar.is-loading .csb-bar-progress {
opacity: 1;
animation: csb-bar-slide 1.2s linear infinite;
}
@keyframes csb-bar-slide {
0% { transform: translateX(-100%); }
100% { transform: translateX(400%); }
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@media (prefers-reduced-motion: reduce) {
.csb-bar,
.csb-bar * {
animation: none !important;
}
}
```
**JS:**
```js
document.querySelectorAll('.csb-bar').forEach(function(form) {
var input = form.querySelector('input');
var t;
input.addEventListener('input', function() {
form.classList.add('is-loading');
clearTimeout(t);
t = setTimeout(function() { form.classList.remove('is-loading'); }, 900);
});
});
```
### 24. Dual Tone Outline
**Type:** Pure CSS
**Description:** The border is split into two halves — left edge stays neutral while the right half lights up violet on focus. A subtle "active half" cue.
**HTML:**
```html
```
**CSS:**
```css
.csb-dual {
position: relative; display: inline-block;
padding: 1.5px;
background: linear-gradient(90deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.08) 50%, #7c6cff 50%, #7c6cff 100%);
background-size: 200% 100%;
background-position: 0% 0%;
border-radius: 10px;
transition: background-position 0.4s ease;
}
.csb-dual:focus-within { background-position: 100% 0%; }
.csb-dual input {
display: block;
width: 240px; padding: 11px 14px;
border: 0; outline: none;
background: #1a1a28;
border-radius: 9px;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
}
.csb-dual input::placeholder { color: #b8b6d4; }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 25. Glitch Search
**Type:** Pure CSS
**Description:** RGB-split glitch shudders across the placeholder when focused — leans into a hacker / dev-tool aesthetic.
**HTML:**
```html
```
**CSS:**
```css
.csb-glitch {
position: relative; display: inline-block;
}
.csb-glitch input {
width: 240px; padding: 11px 14px;
background: #0c0c12;
border: 1px solid rgba(46,204,138,0.4);
border-radius: 4px;
color: #2ecc8a; font: 500 13px/1 'Courier New', monospace;
letter-spacing: 0.06em;
outline: none;
transition: border-color 0.2s;
}
.csb-glitch input::placeholder { color: rgba(46,204,138,0.6); }
.csb-glitch input:focus {
border-color: #ff6c8a;
animation: csb-glitch-shake 0.4s steps(2);
}
@keyframes csb-glitch-shake {
0%,100% { transform: translateX(0); }
20% { transform: translateX(-2px); text-shadow: 2px 0 #ff6c8a, -2px 0 #06b6d4; }
40% { transform: translateX(2px); text-shadow: -2px 0 #ff6c8a, 2px 0 #06b6d4; }
60% { transform: translateX(-1px); text-shadow: 1px 0 #ff6c8a, -1px 0 #06b6d4; }
80% { transform: translateX(1px); text-shadow: 0 0 transparent; }
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@media (prefers-reduced-motion: reduce) {
.csb-glitch,
.csb-glitch * {
animation: none !important;
}
}
```
### 26. Compact Mobile
**Type:** Pure CSS
**Description:** Mobile-first compact pattern — generous tap target, soft rounded chrome, single-line visual rhythm. Ideal for thumb-reach.
**HTML:**
```html
```
**CSS:**
```css
.csb-mob {
display: inline-flex; align-items: center; gap: 8px;
padding: 12px 16px;
background: #2a2a3e;
border-radius: 14px;
min-height: 44px;
min-width: 280px;
}
.csb-mob:focus-within { background: #1f1f28; box-shadow: 0 0 0 2px rgba(124,108,255,0.4); }
.csb-mob svg { width: 18px; height: 18px; fill: none; stroke: #b8b6d4; stroke-width: 2; stroke-linecap: round; }
.csb-mob input {
flex: 1; padding: 0;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 16px/1 system-ui, sans-serif;
}
.csb-mob input::placeholder { color: #b8b6d4; }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 27. Focus Ring Bloom
**Type:** Pure CSS
**Description:** A soft expanding violet halo blooms outward when the input gains focus — disappears smoothly on blur.
**HTML:**
```html
```
**CSS:**
```css
.csb-bloom {
position: relative; display: inline-block;
}
.csb-bloom input {
width: 240px; padding: 11px 14px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
outline: none;
transition: border-color 0.2s;
}
.csb-bloom input::placeholder { color: #b8b6d4; }
.csb-bloom::after {
content: ''; position: absolute; inset: 0;
border-radius: 10px;
pointer-events: none;
box-shadow: 0 0 0 0 rgba(124,108,255,0.6);
}
.csb-bloom:focus-within input { border-color: #7c6cff; }
.csb-bloom:focus-within::after {
animation: csb-bloom-pulse 1.6s ease-out infinite;
}
@keyframes csb-bloom-pulse {
0%,100% { box-shadow: 0 0 0 0 rgba(124,108,255,0.6); }
50% { box-shadow: 0 0 0 8px rgba(124,108,255,0); }
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@media (prefers-reduced-motion: reduce) {
.csb-bloom,
.csb-bloom * {
animation: none !important;
}
}
```
### 28. Combo with Scope
**Type:** CSS + JS
**Description:** Scope dropdown ("All / People / Posts / Files") inline with the input — the pattern Slack, Linear, and GitHub all converged on.
**HTML:**
```html
```
**CSS:**
```css
.csb-scope {
position: relative; display: inline-flex; align-items: stretch;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 10px;
}
.csb-scope:focus-within { border-color: #7c6cff; }
.csb-scope-btn {
display: inline-flex; align-items: center; gap: 6px;
padding: 0 14px;
border: 0; border-right: 1px solid rgba(255,255,255,0.08);
background: transparent; cursor: pointer;
color: #a78bfa; font: 600 12px/1 system-ui, sans-serif;
}
.csb-scope-btn svg { width: 10px; height: 10px; fill: none; stroke: #a78bfa; stroke-width: 1.5; }
.csb-scope-list {
position: absolute; top: calc(100% + 4px); left: 0;
margin: 0; padding: 4px;
list-style: none;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.1);
border-radius: 8px;
z-index: 10;
min-width: 120px;
}
.csb-scope-list li {
padding: 7px 10px;
font: 500 13px/1 system-ui, sans-serif;
color: #cbd5e1; cursor: pointer;
border-radius: 5px;
}
.csb-scope-list li[aria-selected="true"] { color: #a78bfa; }
.csb-scope-list li:hover { background: rgba(124,108,255,0.12); }
.csb-scope input {
flex: 1; padding: 11px 14px;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
min-width: 200px;
}
.csb-scope input::placeholder { color: #b8b6d4; }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
**JS:**
```js
document.querySelectorAll('.csb-scope').forEach(function(form) {
var btn = form.querySelector('.csb-scope-btn');
var list = form.querySelector('.csb-scope-list');
var label = btn.querySelector('span');
btn.addEventListener('click', function(e) {
e.stopPropagation();
var open = list.hidden;
list.hidden = !open;
btn.setAttribute('aria-expanded', open ? 'true' : 'false');
});
list.addEventListener('click', function(e) {
var li = e.target.closest('li[role="option"]');
if (!li) return;
list.querySelectorAll('li').forEach(function(x){ x.removeAttribute('aria-selected'); });
li.setAttribute('aria-selected', 'true');
label.textContent = li.textContent;
list.hidden = true;
btn.setAttribute('aria-expanded', 'false');
});
document.addEventListener('click', function() {
list.hidden = true;
btn.setAttribute('aria-expanded', 'false');
});
});
```
### 29. Inset Pressed
**Type:** Pure CSS
**Description:** Skeuomorphic inset shadow makes the input look pressed into the surface — a return to depth without the kitsch.
**HTML:**
```html
```
**CSS:**
```css
.csb-inset {
display: inline-flex; align-items: center; gap: 10px;
padding: 11px 16px;
background: #15151d;
border: 1px solid #0c0c12;
border-radius: 10px;
box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.04);
transition: box-shadow 0.2s;
}
.csb-inset:focus-within {
box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 0 0 2px rgba(124,108,255,0.3);
}
.csb-inset svg { width: 15px; height: 15px; fill: none; stroke: #6b6987; stroke-width: 2; stroke-linecap: round; }
.csb-inset input {
width: 220px; padding: 0;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
}
.csb-inset input::placeholder { color: #b8b6d4; }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 30. Border Trace
**Type:** Pure CSS
**Description:** On focus, two halves of a border trace simultaneously around the input — a clean line-drawing reveal. No box-shadow, no gradients.
**HTML:**
```html
```
**CSS:**
```css
.csb-trace {
position: relative; display: inline-block;
padding: 0;
}
.csb-trace input {
width: 240px; padding: 11px 14px;
background: #1a1a28;
border: 1px solid rgba(255,255,255,0.08);
border-radius: 8px;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
outline: none;
transition: border-color 0.15s;
}
.csb-trace:focus-within input { border-color: transparent; }
.csb-trace input::placeholder { color: #b8b6d4; }
.csb-trace-tl, .csb-trace-br {
position: absolute; pointer-events: none;
border-color: #7c6cff;
border-radius: 8px;
}
.csb-trace-tl {
top: 0; left: 0;
width: 0; height: 0;
border-top: 1.5px solid transparent;
border-left: 1.5px solid transparent;
}
.csb-trace-br {
bottom: 0; right: 0;
width: 0; height: 0;
border-bottom: 1.5px solid transparent;
border-right: 1.5px solid transparent;
}
.csb-trace:focus-within .csb-trace-tl {
width: 100%; height: 100%;
border-top-color: #7c6cff;
border-left-color: #7c6cff;
transition: width 0.25s ease, height 0.25s ease 0.25s;
}
.csb-trace:focus-within .csb-trace-br {
width: 100%; height: 100%;
border-bottom-color: #7c6cff;
border-right-color: #7c6cff;
transition: width 0.25s ease 0.5s, height 0.25s ease 0.25s;
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 31. Floating Card
**Type:** Pure CSS
**Description:** The whole search bar lifts off the page on focus with a soft shadow and a tiny scale-up — a tactile "pick me up" feel.
**HTML:**
```html
```
**CSS:**
```css
.csb-card {
display: inline-flex; align-items: center; gap: 10px;
padding: 12px 16px;
background: #1f1f28;
border-radius: 12px;
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
transform: scale(1) translateY(0);
transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s;
}
.csb-card:focus-within {
transform: scale(1.02) translateY(-3px);
box-shadow: 0 12px 32px rgba(124,108,255,0.3), 0 4px 8px rgba(0,0,0,0.4);
}
.csb-card svg { width: 16px; height: 16px; fill: none; stroke: #a78bfa; stroke-width: 2; stroke-linecap: round; }
.csb-card input {
width: 220px; padding: 0;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
}
.csb-card input::placeholder { color: #b8b6d4; }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
```
### 32. Aurora Drift
**Type:** Pure CSS
**Description:** A soft aurora-style gradient blob drifts gently behind the input on a slow, subtle loop — the premium-feel signal without spinning chrome aberration.
**HTML:**
```html
```
**CSS:**
```css
.csb-aurora {
position: relative; display: inline-block;
padding: 4px;
border-radius: 14px;
background: #15151d;
overflow: hidden;
isolation: isolate;
}
.csb-aurora::before {
content: ''; position: absolute;
top: -40%; left: -20%;
width: 140%; height: 220%;
background:
radial-gradient(ellipse 240px 120px at 20% 50%, rgba(124,108,255,0.55), transparent 60%),
radial-gradient(ellipse 200px 100px at 60% 50%, rgba(255,108,138,0.45), transparent 60%),
radial-gradient(ellipse 220px 120px at 100% 50%, rgba(46,204,138,0.35), transparent 60%);
filter: blur(18px);
z-index: -1;
animation: csb-aurora-drift 14s ease-in-out infinite;
opacity: 0.85;
}
.csb-aurora input {
display: block;
width: 240px; padding: 12px 16px;
border: 1px solid rgba(255,255,255,0.06);
outline: none;
background: rgba(21,21,29,0.85);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
border-radius: 10px;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
transition: border-color 0.25s;
}
.csb-aurora:focus-within input { border-color: rgba(167,139,250,0.5); }
.csb-aurora input::placeholder { color: #b8b6d4; }
@keyframes csb-aurora-drift {
0%, 100% { transform: translateX(0) translateY(0); }
50% { transform: translateX(-8%) translateY(2%); }
}
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
@media (prefers-reduced-motion: reduce) {
.csb-aurora,
.csb-aurora * {
animation: none !important;
}
}
```
---
## 16 CSS Side Menu Designs
URL: https://codefronts.com/navigation/css-side-menu/
Description: 16 hand-coded CSS side menu designs with live demos — slide-in checkbox-hack drawer, smooth-overlay panel, off-canvas push sidebar, expandable icon-only rail, responsive hidden-to-visible menu, sticky fixed vertical nav, multi-level accordion, full-height flexbox, neumorphic inset, glassmorphism blurred, dark-mode cyberpunk neon, brutalist left-hand border, hamburger checkbox-hack, hover-triggered drawer, collapsible width-transition, and CSS-only accordion side navigation. 100% Pure CSS — no JavaScript, no framework. WCAG 2.2 friendly with prefers-reduced-motion on every animation, MIT licensed, copy-paste ready.
Demo count: 16
### 01. Pure CSS Slide-In Side Menu
**Type:** Pure CSS
**Description:** A navigation drawer that slides in from off-screen left when a burger icon is clicked, driven entirely by a hidden checkbox and CSS sibling selectors.
**HTML:**
```html
```
**CSS:**
```css
.sm-01, .sm-01 *, .sm-01 *::before, .sm-01 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-01 ::selection { background: #7c3aed; color: #fff; }
.sm-01 {
--bg: #0f172a;
--surface: #1e293b;
--menu-bg: #1a1033;
--accent: #7c3aed;
--accent2: #a78bfa;
--text: #e2e8f0;
--muted: #94a3b8;
--border: rgba(124,58,237,0.2);
--font: 'Plus Jakarta Sans', system-ui, sans-serif;
--menu-w: 280px;
--duration: 0.4s;
font-family: var(--font);
background: var(--bg);
color: var(--text);
min-height: 100vh;
position: relative;
overflow: hidden;
border-radius: 12px;
}
/* Hidden checkbox toggle */
.sm-01__toggle {
position: absolute;
opacity: 0;
width: 0;
height: 0;
pointer-events: none;
}
/* Burger label */
.sm-01__burger {
position: absolute;
top: 20px;
left: 20px;
z-index: 50;
width: 42px;
height: 42px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 5px;
transition: background 0.2s, border-color 0.2s;
}
.sm-01__burger:hover { background: var(--accent); border-color: var(--accent); }
.sm-01__burger span {
display: block;
width: 20px;
height: 2px;
background: var(--text);
border-radius: 2px;
transition: transform var(--duration), opacity var(--duration);
transform-origin: center;
}
/* Burger → X animation */
.sm-01__toggle:checked ~ .sm-01__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sm-01__toggle:checked ~ .sm-01__burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.sm-01__toggle:checked ~ .sm-01__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Slide-in panel */
.sm-01__nav {
position: absolute;
top: 0; left: 0;
width: var(--menu-w);
height: 100%;
background: var(--menu-bg);
border-right: 1px solid var(--border);
transform: translateX(-100%);
transition: transform var(--duration) cubic-bezier(0.4, 0, 0.2, 1);
z-index: 40;
display: flex;
flex-direction: column;
padding: 80px 0 24px;
box-shadow: 4px 0 32px rgba(0,0,0,0.4);
}
.sm-01__toggle:checked ~ .sm-01__nav { transform: translateX(0); }
/* Brand */
.sm-01__brand {
padding: 0 24px 24px;
border-bottom: 1px solid var(--border);
margin-bottom: 16px;
display: flex;
align-items: center;
gap: 12px;
}
.sm-01__logo {
width: 36px; height: 36px;
background: linear-gradient(135deg, var(--accent), var(--accent2));
border-radius: 9px;
display: flex; align-items: center; justify-content: center;
font-weight: 700; font-size: 16px;
}
.sm-01__brand-name { font-weight: 700; font-size: 16px; }
.sm-01__brand-sub { font-size: 11px; color: var(--muted); }
/* Nav links */
.sm-01__links { flex: 1; padding: 0 12px; }
.sm-01__link {
display: flex;
align-items: center;
gap: 14px;
padding: 13px 16px;
border-radius: 10px;
color: var(--muted);
text-decoration: none;
font-size: 14px;
font-weight: 500;
transition: all 0.2s;
margin-bottom: 4px;
cursor: pointer;
}
.sm-01__link:hover { color: var(--text); background: rgba(124,58,237,0.15); }
.sm-01__link--active { color: var(--text); background: rgba(124,58,237,0.2); }
.sm-01__link-icon {
width: 36px; height: 36px;
background: rgba(255,255,255,0.05);
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-size: 18px;
flex-shrink: 0;
transition: background 0.2s;
}
.sm-01__link:hover .sm-01__link-icon,
.sm-01__link--active .sm-01__link-icon {
background: var(--accent);
}
/* Footer */
.sm-01__nav-footer {
padding: 16px 24px 0;
border-top: 1px solid var(--border);
}
.sm-01__avatar {
display: flex; align-items: center; gap: 12px;
}
.sm-01__avatar-img {
width: 36px; height: 36px;
background: linear-gradient(135deg, #f59e0b, #ef4444);
border-radius: 50%;
display: flex; align-items: center; justify-content: center;
font-weight: 700; font-size: 13px;
}
.sm-01__avatar-name { font-size: 13px; font-weight: 600; }
.sm-01__avatar-role { font-size: 11px; color: var(--muted); }
/* Main content */
.sm-01__content {
padding: 80px 24px 24px 24px;
transition: transform var(--duration) cubic-bezier(0.4, 0, 0.2, 1);
}
.sm-01__heading { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.sm-01__subhead { font-size: 14px; color: var(--muted); margin-bottom: 24px; line-height: 1.6; }
.sm-01__cards {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}
.sm-01__card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 16px;
}
.sm-01__card-val { font-size: 22px; font-weight: 700; color: var(--accent2); }
.sm-01__card-lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) {
.sm-01__nav, .sm-01__burger span { transition: none; }
}
```
### 02. CSS Side Menu with Smooth Overlay
**Type:** Pure CSS
**Description:** A sliding drawer that reveals a frosted-glass backdrop blur overlay over the main content area, using backdrop-filter and a second label element as the click-to-close target.
**HTML:**
```html
Navigation
Overview
Open the drawer to see a frosted backdrop blur overlay appear behind the menu. Clicking the backdrop also closes it.
```
**CSS:**
```css
.sm-02, .sm-02 *, .sm-02 *::before, .sm-02 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-02 ::selection { background: #0ea5e9; color: #000; }
.sm-02 {
--bg: #030712;
--surface: #111827;
--drawer-bg: #060e1e;
--accent: #0ea5e9;
--accent2: #38bdf8;
--text: #f1f5f9;
--muted: #64748b;
--border: rgba(14,165,233,0.15);
--font: 'Syne', system-ui, sans-serif;
--w: 300px;
--ease: cubic-bezier(0.25, 0, 0.1, 1);
--dur: 0.45s;
font-family: var(--font);
background: var(--bg);
color: var(--text);
min-height: 100vh;
position: relative;
overflow: hidden;
border-radius: 12px;
}
.sm-02__toggle { position: absolute; opacity: 0; width: 0; height: 0; }
/* Overlay backdrop */
.sm-02__backdrop {
position: absolute; inset: 0;
background: rgba(0,0,0,0);
backdrop-filter: blur(0px);
-webkit-backdrop-filter: blur(0px);
transition: background var(--dur) var(--ease), backdrop-filter var(--dur) var(--ease);
z-index: 30;
pointer-events: none;
}
.sm-02__toggle:checked ~ .sm-02__backdrop {
background: rgba(0,0,0,0.6);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
pointer-events: all;
}
/* Burger */
.sm-02__burger {
position: absolute;
top: 18px; left: 18px;
z-index: 50;
display: flex;
flex-direction: column;
gap: 5px;
width: 40px; height: 40px;
justify-content: center;
align-items: center;
cursor: pointer;
background: rgba(14,165,233,0.1);
border: 1px solid var(--border);
border-radius: 10px;
transition: background 0.2s;
}
.sm-02__burger:hover { background: rgba(14,165,233,0.25); }
.sm-02__burger span {
width: 18px; height: 2px;
background: var(--accent2);
border-radius: 2px;
transition: transform var(--dur), opacity var(--dur);
transform-origin: center;
}
.sm-02__toggle:checked ~ .sm-02__burger { z-index: 50; }
.sm-02__toggle:checked ~ .sm-02__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sm-02__toggle:checked ~ .sm-02__burger span:nth-child(2) { opacity: 0; }
.sm-02__toggle:checked ~ .sm-02__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Drawer */
.sm-02__nav {
position: absolute;
top: 0; left: 0;
width: var(--w);
height: 100%;
background: var(--drawer-bg);
border-right: 1px solid var(--border);
transform: translateX(-100%);
transition: transform var(--dur) var(--ease), box-shadow var(--dur);
z-index: 40;
display: flex;
flex-direction: column;
padding: 72px 0 20px;
}
.sm-02__toggle:checked ~ .sm-02__nav {
transform: translateX(0);
box-shadow: 0 0 60px rgba(14,165,233,0.12), 8px 0 40px rgba(0,0,0,0.6);
}
/* Top glow strip */
.sm-02__nav::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 2px;
background: linear-gradient(90deg, transparent, var(--accent), var(--accent2), transparent);
}
.sm-02__section-label {
font-size: 10px;
font-weight: 700;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--muted);
padding: 0 20px 8px;
margin-top: 4px;
}
.sm-02__links { padding: 0 12px; flex: 1; }
.sm-02__link {
display: flex;
align-items: center;
gap: 12px;
padding: 11px 14px;
border-radius: 9px;
color: var(--muted);
text-decoration: none;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
position: relative;
margin-bottom: 2px;
}
.sm-02__link::before {
content: '';
position: absolute;
left: 0; top: 50%; transform: translateY(-50%);
width: 3px; height: 0;
background: var(--accent);
border-radius: 3px;
transition: height 0.2s;
}
.sm-02__link:hover, .sm-02__link--active {
color: var(--text);
background: rgba(14,165,233,0.1);
}
.sm-02__link--active::before, .sm-02__link:hover::before { height: 70%; }
.sm-02__link-dot {
width: 8px; height: 8px;
border-radius: 50%;
background: var(--muted);
transition: background 0.2s, box-shadow 0.2s;
flex-shrink: 0;
}
.sm-02__link--active .sm-02__link-dot,
.sm-02__link:hover .sm-02__link-dot {
background: var(--accent);
box-shadow: 0 0 8px var(--accent);
}
.sm-02__badge {
margin-left: auto;
background: rgba(14,165,233,0.2);
color: var(--accent2);
font-size: 10px;
font-weight: 700;
padding: 2px 7px;
border-radius: 99px;
}
/* User footer */
.sm-02__footer {
padding: 16px 20px 0;
border-top: 1px solid var(--border);
display: flex;
align-items: center;
gap: 10px;
}
.sm-02__avatar {
width: 34px; height: 34px;
border-radius: 50%;
background: linear-gradient(135deg, #0ea5e9, #6366f1);
display: flex; align-items: center; justify-content: center;
font-size: 12px; font-weight: 700;
flex-shrink: 0;
}
.sm-02__uname { font-size: 13px; font-weight: 700; }
.sm-02__urole { font-size: 11px; color: var(--muted); }
/* Main content */
.sm-02__content {
padding: 20px;
}
.sm-02__topbar {
display: flex;
align-items: center;
gap: 14px;
margin-bottom: 28px;
padding-top: 6px;
}
.sm-02__page-title { font-size: 20px; font-weight: 800; margin-left: 50px; }
.sm-02__body p { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }
.sm-02__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sm-02__tile {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 18px;
}
.sm-02__tile-num { font-size: 26px; font-weight: 800; color: var(--accent2); }
.sm-02__tile-lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) {
.sm-02__nav, .sm-02__backdrop, .sm-02__burger span, .sm-02__link::before { transition: none; }
}
```
### 03. Off-Canvas Push Sidebar
**Type:** Pure CSS
**Description:** A side navigation that physically shifts the entire main content area horizontally when it opens rather than overlapping it, creating a genuine off-canvas push effect.
**HTML:**
```html
```
**CSS:**
```css
.sm-03, .sm-03 *, .sm-03 *::before, .sm-03 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-03 ::selection { background: #10b981; color: #000; }
.sm-03 {
--bg: #0a0f0d;
--surface: #131a16;
--nav-bg: #0d1a13;
--accent: #10b981;
--accent2: #34d399;
--text: #ecfdf5;
--muted: #6b7280;
--border: rgba(16,185,129,0.15);
--w: 260px;
--dur: 0.4s;
--ease: cubic-bezier(0.4, 0, 0.2, 1);
font-family: 'DM Sans', system-ui, sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
position: relative;
overflow: hidden;
border-radius: 12px;
}
.sm-03__toggle { position: absolute; opacity: 0; width: 0; height: 0; }
/* Layout shell: nav + main side by side */
.sm-03__shell {
display: flex;
height: 100%;
min-height: 440px;
transform: translateX(0);
transition: transform var(--dur) var(--ease);
}
.sm-03__toggle:checked ~ .sm-03__shell {
transform: translateX(var(--w));
}
/* Fixed nav (off-canvas) */
.sm-03__nav {
position: absolute;
left: 0; top: 0;
width: var(--w);
height: 100%;
background: var(--nav-bg);
border-right: 1px solid var(--border);
transform: translateX(calc(-1 * var(--w)));
transition: transform var(--dur) var(--ease);
display: flex;
flex-direction: column;
padding: 24px 0;
z-index: 20;
}
.sm-03__toggle:checked ~ .sm-03__nav {
transform: translateX(0);
}
.sm-03__nav-header {
display: flex; align-items: center; gap: 10px;
padding: 0 20px 20px;
border-bottom: 1px solid var(--border);
margin-bottom: 16px;
}
.sm-03__logo {
width: 32px; height: 32px;
background: var(--accent);
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-weight: 700; font-size: 14px; color: #000;
}
.sm-03__brand { font-weight: 700; font-size: 15px; }
.sm-03__links { flex: 1; padding: 0 10px; }
.sm-03__link {
display: flex; align-items: center; gap: 12px;
padding: 11px 14px;
border-radius: 8px;
color: var(--muted);
font-size: 14px; font-weight: 500;
cursor: pointer;
transition: all 0.2s;
margin-bottom: 3px;
text-decoration: none;
}
.sm-03__link:hover { color: var(--text); background: rgba(16,185,129,0.1); }
.sm-03__link--active { color: var(--accent2); background: rgba(16,185,129,0.12); font-weight: 600; }
.sm-03__link-icon { font-size: 16px; }
/* Main content area */
.sm-03__main {
flex: 1;
min-width: 0;
background: var(--bg);
position: relative;
z-index: 10;
}
.sm-03__topbar {
display: flex;
align-items: center;
gap: 14px;
padding: 18px 20px;
border-bottom: 1px solid var(--border);
}
.sm-03__burger {
width: 38px; height: 38px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 5px;
cursor: pointer;
flex-shrink: 0;
transition: background 0.2s;
}
.sm-03__burger:hover { background: rgba(16,185,129,0.2); }
.sm-03__burger span {
width: 16px; height: 2px;
background: var(--accent2);
border-radius: 2px;
transition: transform var(--dur), opacity var(--dur);
}
.sm-03__toggle:checked ~ .sm-03__shell .sm-03__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sm-03__toggle:checked ~ .sm-03__shell .sm-03__burger span:nth-child(2) { opacity: 0; }
.sm-03__toggle:checked ~ .sm-03__shell .sm-03__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.sm-03__page-title { font-size: 17px; font-weight: 700; }
.sm-03__body { padding: 20px; }
.sm-03__desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }
.sm-03__stats {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.sm-03__stat {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 14px;
}
.sm-03__stat-val { font-size: 22px; font-weight: 700; color: var(--accent2); }
.sm-03__stat-lbl { font-size: 11px; color: var(--muted); margin-top: 3px; }
@media (prefers-reduced-motion: reduce) {
.sm-03__shell, .sm-03__nav, .sm-03__burger span { transition: none; }
}
```
### 04. Expandable Icon-Only Sidebar
**Type:** Pure CSS
**Description:** A persistent narrow icon rail that smoothly expands on hover to reveal full text labels and notification badges, using a CSS width transition with no toggle required.
**HTML:**
```html
Z
Dashboard
Hover the icon rail on the left to expand. Labels and badges appear without any JavaScript.
```
**CSS:**
```css
.sm-04, .sm-04 *, .sm-04 *::before, .sm-04 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-04 ::selection { background: #f59e0b; color: #000; }
.sm-04 {
--bg: #09090b;
--surface: #18181b;
--rail-bg: #0f0f12;
--accent: #f59e0b;
--accent2: #fbbf24;
--text: #fafafa;
--muted: #71717a;
--border: rgba(245,158,11,0.15);
--collapsed: 60px;
--expanded: 230px;
--dur: 0.35s;
--ease: cubic-bezier(0.4, 0, 0.2, 1);
font-family: 'Inter', system-ui, sans-serif;
background: var(--bg);
color: var(--text);
display: flex;
min-height: 100vh;
position: relative;
overflow: hidden;
border-radius: 12px;
}
/* Sidebar rail */
.sm-04__rail {
width: var(--collapsed);
min-height: 440px;
background: var(--rail-bg);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
align-items: center;
padding: 16px 0;
overflow: hidden;
transition: width var(--dur) var(--ease);
flex-shrink: 0;
position: relative;
z-index: 5;
}
.sm-04__rail:hover { width: var(--expanded); }
/* Logo */
.sm-04__logo {
width: 36px; height: 36px;
background: var(--accent);
border-radius: 9px;
display: flex; align-items: center; justify-content: center;
font-weight: 800; font-size: 16px; color: #000;
flex-shrink: 0;
margin-bottom: 24px;
transition: border-radius 0.3s;
}
.sm-04__rail:hover .sm-04__logo { border-radius: 50%; }
/* Nav items */
.sm-04__links { width: 100%; flex: 1; }
.sm-04__link {
display: flex;
align-items: center;
gap: 0;
width: 100%;
padding: 0;
color: var(--muted);
cursor: pointer;
text-decoration: none;
transition: color 0.2s, background 0.2s;
position: relative;
overflow: hidden;
white-space: nowrap;
height: 48px;
}
.sm-04__link:hover, .sm-04__link--active { color: var(--text); background: rgba(245,158,11,0.08); }
.sm-04__link--active::after {
content: '';
position: absolute;
right: 0; top: 50%;
transform: translateY(-50%);
width: 3px; height: 60%;
background: var(--accent);
border-radius: 3px 0 0 3px;
transition: opacity 0.2s;
}
.sm-04__link-icon {
width: var(--collapsed);
height: 48px;
display: flex; align-items: center; justify-content: center;
font-size: 18px;
flex-shrink: 0;
transition: background 0.2s;
}
.sm-04__link:hover .sm-04__link-icon { color: var(--accent); }
.sm-04__link--active .sm-04__link-icon { color: var(--accent2); }
.sm-04__link-text {
font-size: 13px;
font-weight: 600;
opacity: 0;
transition: opacity 0.2s 0.05s;
pointer-events: none;
flex: 1;
}
.sm-04__rail:hover .sm-04__link-text { opacity: 1; }
.sm-04__link-badge {
margin-right: 12px;
background: rgba(245,158,11,0.2);
color: var(--accent2);
font-size: 10px;
font-weight: 700;
padding: 1px 6px;
border-radius: 99px;
opacity: 0;
transition: opacity 0.2s 0.05s;
}
.sm-04__rail:hover .sm-04__link-badge { opacity: 1; }
/* Divider */
.sm-04__divider {
width: 80%;
height: 1px;
background: var(--border);
margin: 8px auto;
flex-shrink: 0;
}
/* Bottom user */
.sm-04__user {
width: 100%;
display: flex;
align-items: center;
gap: 0;
overflow: hidden;
padding: 8px 0 0;
border-top: 1px solid var(--border);
}
.sm-04__user-icon {
width: var(--collapsed);
display: flex; align-items: center; justify-content: center;
flex-shrink: 0;
}
.sm-04__user-avatar {
width: 30px; height: 30px;
border-radius: 50%;
background: linear-gradient(135deg, #f59e0b, #ef4444);
display: flex; align-items: center; justify-content: center;
font-size: 11px; font-weight: 700; color: #000;
}
.sm-04__user-info {
opacity: 0;
transition: opacity 0.2s 0.05s;
white-space: nowrap;
}
.sm-04__rail:hover .sm-04__user-info { opacity: 1; }
.sm-04__user-name { font-size: 12px; font-weight: 600; }
.sm-04__user-role { font-size: 10px; color: var(--muted); }
/* Main */
.sm-04__main { flex: 1; padding: 24px; min-width: 0; }
.sm-04__heading { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.sm-04__sub { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 22px; }
.sm-04__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sm-04__card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 14px;
}
.sm-04__card-val { font-size: 20px; font-weight: 700; color: var(--accent2); }
.sm-04__card-lbl { font-size: 11px; color: var(--muted); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) {
.sm-04__rail, .sm-04__link-text, .sm-04__link-badge, .sm-04__user-info { transition: none; }
}
```
### 05. Responsive Sidebar Menu (Hidden-to-Visible)
**Type:** Pure CSS
**Description:** A sidebar permanently visible as a fixed column on desktop that hides off-screen on mobile and is revealed by a burger toggle, all handled by CSS media queries alone.
**HTML:**
```html
Main Menu
Account
Good morning, Sam 🌤
Sidebar is always visible on wide screens. Resize to mobile to see it hide off-screen with a burger toggle — no JS.
```
**CSS:**
```css
.sm-05, .sm-05 *, .sm-05 *::before, .sm-05 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-05 ::selection { background: #6366f1; color: #fff; }
.sm-05 {
--bg: #f8fafc;
--surface: #fff;
--nav-bg: #fff;
--accent: #6366f1;
--accent2: #818cf8;
--text: #1e293b;
--muted: #94a3b8;
--border: #e2e8f0;
--font: 'Nunito', system-ui, sans-serif;
--w: 240px;
--dur: 0.35s;
font-family: var(--font);
background: var(--bg);
color: var(--text);
min-height: 100vh;
display: flex;
position: relative;
overflow: hidden;
border-radius: 12px;
}
/* Mobile toggle */
.sm-05__toggle { position: absolute; opacity: 0; width: 0; height: 0; }
/* Nav */
.sm-05__nav {
width: var(--w);
min-height: 460px;
background: var(--nav-bg);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
padding: 20px 0;
flex-shrink: 0;
position: relative;
box-shadow: 2px 0 12px rgba(99,102,241,0.06);
}
/* Desktop: always visible — simulated here by having the wrapper at full width */
/* On mobile the sidebar is off-canvas */
@media (max-width: 600px) {
.sm-05__nav {
position: absolute;
top: 0; left: 0;
height: 100%;
transform: translateX(-100%);
transition: transform var(--dur) cubic-bezier(0.4,0,0.2,1);
z-index: 20;
}
.sm-05__toggle:checked ~ .sm-05__nav { transform: translateX(0); }
}
.sm-05__brand {
display: flex; align-items: center; gap: 10px;
padding: 0 20px 18px;
border-bottom: 1px solid var(--border);
margin-bottom: 12px;
}
.sm-05__logo {
width: 34px; height: 34px;
background: linear-gradient(135deg, var(--accent), var(--accent2));
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-weight: 800; font-size: 15px; color: #fff;
}
.sm-05__brand-name { font-size: 15px; font-weight: 800; }
.sm-05__section-title {
font-size: 10px; font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--muted);
padding: 8px 20px 4px;
}
.sm-05__links { flex: 1; padding: 0 10px; }
.sm-05__link {
display: flex; align-items: center; gap: 10px;
padding: 10px 14px;
border-radius: 9px;
color: #64748b;
font-size: 14px; font-weight: 600;
cursor: pointer; text-decoration: none;
transition: all 0.2s;
margin-bottom: 2px;
}
.sm-05__link:hover { color: var(--accent); background: rgba(99,102,241,0.07); }
.sm-05__link--active { color: var(--accent); background: rgba(99,102,241,0.1); }
.sm-05__link-icon { font-size: 16px; }
.sm-05__badge {
margin-left: auto;
background: var(--accent);
color: #fff;
font-size: 10px;
font-weight: 700;
padding: 2px 7px;
border-radius: 99px;
}
.sm-05__divider { height: 1px; background: var(--border); margin: 10px 20px; }
/* User bottom */
.sm-05__footer {
padding: 14px 16px 0;
border-top: 1px solid var(--border);
display: flex; align-items: center; gap: 10px;
}
.sm-05__avatar {
width: 32px; height: 32px;
border-radius: 50%;
background: linear-gradient(135deg, #6366f1, #a855f7);
display: flex; align-items: center; justify-content: center;
font-size: 12px; font-weight: 700; color: #fff;
}
.sm-05__uname { font-size: 13px; font-weight: 700; }
.sm-05__urole { font-size: 11px; color: var(--muted); }
/* Main */
.sm-05__main { flex: 1; min-width: 0; }
.sm-05__topbar {
display: flex; align-items: center; gap: 14px;
padding: 18px 20px;
border-bottom: 1px solid var(--border);
background: var(--surface);
}
.sm-05__burger {
display: none;
width: 36px; height: 36px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 8px;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
cursor: pointer;
transition: background 0.2s;
}
@media (max-width: 600px) { .sm-05__burger { display: flex; } }
.sm-05__burger span { width: 14px; height: 2px; background: #64748b; border-radius: 2px; }
.sm-05__topbar-title { font-size: 16px; font-weight: 800; }
.sm-05__topbar-breadcrumb { font-size: 12px; color: var(--muted); margin-left: auto; }
.sm-05__content { padding: 22px 20px; }
.sm-05__welcome { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.sm-05__sub { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.sm-05__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sm-05__card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 14px;
box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.sm-05__card-val { font-size: 22px; font-weight: 800; color: var(--accent); }
.sm-05__card-lbl { font-size: 12px; color: var(--muted); margin-top: 3px; }
@media (prefers-reduced-motion: reduce) {
.sm-05__nav { transition: none; }
}
```
### 06. Sticky Fixed Vertical Navigation Sidebar
**Type:** Pure CSS
**Description:** A full-height sidebar that remains anchored to the viewport top while long-form main content scrolls independently alongside it using position:sticky.
**HTML:**
```html
Upgrade to Team
Collaborate with up to 20 members and unlock analytics.
View Plans →
Articles
The sidebar stays fixed while this content area scrolls. Scroll down to verify.
Getting Started with CSS Grid Layout
A comprehensive guide to modern CSS Grid including template areas, named lines, and implicit grids for professional web layouts.
Published · 4 min read
Mastering the CSS Cascade & Specificity
Deep dive into how browsers resolve style conflicts, the cascade algorithm, and why understanding layers beats specificity hacks.
Draft · 7 min read
Container Queries: A New Era of Responsive UI
Explore how container queries enable truly component-level responsiveness without relying on the viewport width at all.
Published · 5 min read
Advanced CSS Custom Properties Techniques
Beyond basic theming: learn how to use custom properties as data channels, calculation bridges, and runtime animation drivers.
Published · 6 min read
```
**CSS:**
```css
.sm-06, .sm-06 *, .sm-06 *::before, .sm-06 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-06 ::selection { background: #db2777; color: #fff; }
.sm-06 {
--bg: #0c0c14;
--surface: #15151f;
--nav-bg: #0e0e19;
--accent: #db2777;
--accent2: #f472b6;
--text: #f8fafc;
--muted: #6b7280;
--border: rgba(219,39,119,0.15);
--font: 'Manrope', system-ui, sans-serif;
--nav-w: 240px;
font-family: var(--font);
background: var(--bg);
color: var(--text);
display: flex;
min-height: 100vh;
position: relative;
overflow: hidden;
border-radius: 12px;
}
/* Sticky sidebar */
.sm-06__nav {
width: var(--nav-w);
position: sticky;
top: 0;
height: 100vh;
background: var(--nav-bg);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
padding: 20px 0;
flex-shrink: 0;
overflow: hidden;
}
/* Top glow */
.sm-06__nav::after {
content: '';
position: absolute;
bottom: 0; left: 50%;
transform: translateX(-50%);
width: 120px; height: 120px;
background: radial-gradient(circle, rgba(219,39,119,0.15), transparent 70%);
pointer-events: none;
}
.sm-06__brand {
display: flex; align-items: center; gap: 10px;
padding: 0 18px 18px;
border-bottom: 1px solid var(--border);
margin-bottom: 16px;
}
.sm-06__logo {
width: 34px; height: 34px;
background: linear-gradient(135deg, var(--accent), var(--accent2));
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-weight: 800; font-size: 14px; color: #fff;
}
.sm-06__brand-name { font-size: 15px; font-weight: 800; }
.sm-06__brand-plan {
font-size: 10px;
color: var(--accent2);
font-weight: 700;
background: rgba(219,39,119,0.12);
padding: 1px 6px;
border-radius: 99px;
margin-left: 4px;
}
.sm-06__section { padding: 0 18px; flex: 1; }
.sm-06__section-lbl {
font-size: 10px; font-weight: 700;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--muted);
margin-bottom: 6px;
margin-top: 4px;
}
.sm-06__link {
display: flex; align-items: center; gap: 12px;
padding: 10px 12px;
border-radius: 9px;
color: var(--muted);
font-size: 13px; font-weight: 600;
cursor: pointer; text-decoration: none;
transition: all 0.2s;
margin-bottom: 1px;
position: relative;
}
.sm-06__link:hover { color: var(--text); background: rgba(219,39,119,0.1); }
.sm-06__link--active {
color: var(--text);
background: rgba(219,39,119,0.15);
}
.sm-06__link--active .sm-06__link-pip {
background: var(--accent);
box-shadow: 0 0 8px var(--accent);
}
.sm-06__link-pip {
width: 6px; height: 6px;
border-radius: 50%;
background: var(--muted);
flex-shrink: 0;
transition: background 0.2s, box-shadow 0.2s;
}
.sm-06__link:hover .sm-06__link-pip { background: var(--accent2); }
.sm-06__badge {
margin-left: auto;
background: rgba(219,39,119,0.2);
color: var(--accent2);
font-size: 10px;
font-weight: 700;
padding: 2px 6px;
border-radius: 99px;
}
.sm-06__divider { height: 1px; background: var(--border); margin: 10px 0; }
.sm-06__upgrade {
margin: 0 10px 16px;
padding: 14px;
background: linear-gradient(135deg, rgba(219,39,119,0.15), rgba(244,114,182,0.08));
border: 1px solid rgba(219,39,119,0.25);
border-radius: 10px;
}
.sm-06__upgrade-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.sm-06__upgrade-sub { font-size: 11px; color: var(--muted); line-height: 1.5; }
.sm-06__upgrade-btn {
display: inline-block;
margin-top: 10px;
padding: 6px 14px;
background: var(--accent);
color: #fff;
font-size: 12px; font-weight: 700;
border-radius: 7px;
cursor: pointer;
}
/* Main content — scrollable */
.sm-06__main {
flex: 1;
min-width: 0;
overflow-y: auto;
padding: 24px;
}
.sm-06__main::-webkit-scrollbar { width: 4px; }
.sm-06__main::-webkit-scrollbar-track { background: transparent; }
.sm-06__main::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sm-06__page-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.sm-06__page-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; line-height: 1.6; }
.sm-06__article {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 16px;
margin-bottom: 12px;
}
.sm-06__article-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.sm-06__article-body { font-size: 13px; color: var(--muted); line-height: 1.7; }
.sm-06__article-meta { font-size: 11px; color: rgba(219,39,119,0.7); margin-top: 8px; font-weight: 600; }
@container (max-width: 720px), (max-width: 720px) {
.sm-06 { --nav-w: 64px; }
.sm-06__brand { padding: 0 12px 14px; justify-content: center; }
.sm-06__brand > div:last-child { display: none; }
.sm-06__section { padding: 0 8px; }
.sm-06__link { padding: 10px 8px; justify-content: center; gap: 0; font-size: 0; }
.sm-06__link-pip { width: 8px; height: 8px; }
.sm-06__badge, .sm-06__section-lbl { display: none; }
.sm-06__upgrade { display: none; }
.sm-06__main { padding: 16px; min-width: 0; }
.sm-06__article { padding: 14px; }
.sm-06__article-title, .sm-06__article-body { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
.sm-06__link, .sm-06__link-pip { transition: none; }
}
```
### 07. Multi-Level Accordion Side Menu
**Type:** Pure CSS
**Description:** A hierarchical documentation sidebar where each top-level section expands independently using hidden checkboxes and max-height transitions, supporting deep nested navigation trees.
**HTML:**
```html
⬡ Overview
⬙ Settings
Components
Multi-level accordion sidebar using only :checked state on hidden inputs and max-height transitions. No JavaScript.
Buttons
Primary, secondary, ghost, destructive, and icon-only button variants with loading states and accessible focus rings.
Modals
Layered dialog system with focus trap, ARIA role management, and backdrop dismiss behaviour.
Forms
Input, select, textarea, checkbox, radio, and date picker components with unified error state styling.
```
**CSS:**
```css
.sm-07, .sm-07 *, .sm-07 *::before, .sm-07 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-07 ::selection { background: #0891b2; color: #fff; }
.sm-07 {
--bg: #0a1628;
--surface: #102040;
--nav-bg: #0c1e38;
--accent: #0891b2;
--accent2: #22d3ee;
--text: #e2e8f0;
--muted: #64748b;
--border: rgba(8,145,178,0.18);
--font: 'IBM Plex Sans', system-ui, sans-serif;
font-family: var(--font);
background: var(--bg);
color: var(--text);
display: flex;
min-height: 100vh;
border-radius: 12px;
overflow: hidden;
}
/* Accordion uses :checked on hidden inputs */
.sm-07__acc-toggle { display: none; }
.sm-07__nav {
width: 240px;
background: var(--nav-bg);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
flex-shrink: 0;
overflow-y: auto;
overflow-x: hidden;
}
.sm-07__nav::-webkit-scrollbar { width: 3px; }
.sm-07__nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.sm-07__brand {
padding: 18px 16px;
border-bottom: 1px solid var(--border);
display: flex; align-items: center; gap: 10px;
}
.sm-07__logo {
width: 32px; height: 32px;
background: linear-gradient(135deg, var(--accent), var(--accent2));
border-radius: 7px;
display: flex; align-items: center; justify-content: center;
font-weight: 700; font-size: 13px; color: #fff;
}
.sm-07__brand-name { font-weight: 700; font-size: 14px; }
/* Flat link */
.sm-07__flat {
display: flex; align-items: center; gap: 10px;
padding: 11px 16px;
color: var(--muted);
font-size: 13px; font-weight: 500;
cursor: pointer; text-decoration: none;
transition: all 0.18s;
border-left: 2px solid transparent;
}
.sm-07__flat:hover, .sm-07__flat--active {
color: var(--text);
background: rgba(8,145,178,0.1);
border-left-color: var(--accent);
}
.sm-07__flat-icon { font-size: 14px; }
/* Accordion group */
.sm-07__group { border-bottom: 1px solid var(--border); }
.sm-07__group-label {
display: flex; align-items: center; gap: 10px;
padding: 11px 16px;
color: var(--muted);
font-size: 13px; font-weight: 600;
cursor: pointer;
transition: all 0.18s;
user-select: none;
position: relative;
}
.sm-07__group-label:hover { color: var(--text); background: rgba(8,145,178,0.07); }
.sm-07__group-label::after {
content: '›';
position: absolute;
right: 14px;
font-size: 16px;
transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
color: var(--muted);
}
.sm-07__acc-toggle:checked + .sm-07__group-label {
color: var(--accent2);
}
.sm-07__acc-toggle:checked + .sm-07__group-label::after { transform: rotate(90deg); color: var(--accent2); }
/* Sub-links expand */
.sm-07__sub {
max-height: 0;
overflow: hidden;
transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
}
.sm-07__acc-toggle:checked + .sm-07__group-label + .sm-07__sub {
max-height: 300px;
}
.sm-07__sub-link {
display: flex; align-items: center; gap: 8px;
padding: 9px 16px 9px 38px;
color: var(--muted);
font-size: 12px; font-weight: 500;
cursor: pointer; text-decoration: none;
transition: all 0.18s;
position: relative;
}
.sm-07__sub-link::before {
content: '';
position: absolute;
left: 22px; top: 50%;
transform: translateY(-50%);
width: 5px; height: 5px;
border-radius: 50%;
background: var(--muted);
transition: background 0.18s;
}
.sm-07__sub-link:hover { color: var(--text); background: rgba(8,145,178,0.1); }
.sm-07__sub-link:hover::before { background: var(--accent2); }
.sm-07__sub-link--active { color: var(--accent2); }
.sm-07__sub-link--active::before { background: var(--accent2); box-shadow: 0 0 6px var(--accent); }
/* Main */
.sm-07__main { flex: 1; padding: 24px; }
.sm-07__page-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.sm-07__page-sub { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }
.sm-07__panel {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 18px;
margin-bottom: 12px;
}
.sm-07__panel-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.sm-07__panel-body { font-size: 13px; color: var(--muted); line-height: 1.6; }
@media (prefers-reduced-motion: reduce) {
.sm-07__sub, .sm-07__group-label::after { transition: none; }
}
```
### 08. Full-Height Flexbox Sidebar
**Type:** Pure CSS
**Description:** A sidebar that uses CSS Flexbox column direction to perfectly space a brand header, navigation links, an informational card, and a pinned user footer without absolute positioning.
**HTML:**
```html
Storage 68% full
6.8 GB of 10 GB used. Upgrade for unlimited storage.
Sidebar uses display:flex; flex-direction:column. The links region has flex:1 to grow and pin header/footer to top and bottom without position:absolute.
```
**CSS:**
```css
.sm-08, .sm-08 *, .sm-08 *::before, .sm-08 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-08 ::selection { background: #7c3aed; color: #fff; }
.sm-08 {
--bg: #fafaf9;
--surface: #fff;
--nav-bg: #1c1917;
--accent: #7c3aed;
--accent2: #a78bfa;
--text: #fafaf9;
--muted: #78716c;
--text-dark: #1c1917;
--border-nav: rgba(255,255,255,0.08);
--border-main: #e7e5e4;
--font: 'Outfit', system-ui, sans-serif;
font-family: var(--font);
background: var(--bg);
color: var(--text-dark);
display: flex;
min-height: 100vh;
border-radius: 12px;
overflow: hidden;
}
/* Sidebar nav using flexbox for perfect spacing */
.sm-08__nav {
width: 240px;
background: var(--nav-bg);
display: flex;
flex-direction: column;
flex-shrink: 0;
padding: 0;
}
/* Top: brand */
.sm-08__brand {
padding: 22px 18px;
border-bottom: 1px solid var(--border-nav);
display: flex; align-items: center; gap: 11px;
}
.sm-08__logo {
width: 36px; height: 36px;
background: linear-gradient(135deg, var(--accent), var(--accent2));
border-radius: 9px;
display: flex; align-items: center; justify-content: center;
font-weight: 800; font-size: 16px; color: #fff;
}
.sm-08__brand-name { font-size: 16px; font-weight: 700; color: var(--text); }
/* Middle: links — flex: 1 stretches this to fill available space */
.sm-08__links {
flex: 1;
padding: 14px 10px;
display: flex;
flex-direction: column;
gap: 2px;
}
.sm-08__section-lbl {
font-size: 10px;
font-weight: 700;
letter-spacing: 0.14em;
text-transform: uppercase;
color: #57534e;
padding: 8px 10px 4px;
}
.sm-08__link {
display: flex; align-items: center; gap: 11px;
padding: 10px 12px;
border-radius: 9px;
color: #a8a29e;
font-size: 13px; font-weight: 600;
cursor: pointer; text-decoration: none;
transition: all 0.2s;
}
.sm-08__link:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.sm-08__link--active { color: var(--text); background: rgba(124,58,237,0.25); }
.sm-08__link-icon { font-size: 15px; }
.sm-08__badge {
margin-left: auto;
background: rgba(167,139,250,0.2);
color: var(--accent2);
font-size: 10px;
font-weight: 700;
padding: 2px 7px;
border-radius: 99px;
}
/* Spacer pushes bottom content down */
.sm-08__spacer { flex: 1; }
/* Notification card in nav */
.sm-08__nav-card {
margin: 0 10px 14px;
padding: 14px;
background: rgba(124,58,237,0.15);
border: 1px solid rgba(124,58,237,0.25);
border-radius: 10px;
}
.sm-08__nav-card-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.sm-08__nav-card-sub { font-size: 11px; color: #a8a29e; line-height: 1.5; }
/* Bottom: user profile pinned to base */
.sm-08__user {
padding: 16px 18px;
border-top: 1px solid var(--border-nav);
display: flex; align-items: center; gap: 10px;
}
.sm-08__user-avatar {
width: 34px; height: 34px;
border-radius: 50%;
background: linear-gradient(135deg, #f59e0b, #ef4444);
display: flex; align-items: center; justify-content: center;
font-size: 12px; font-weight: 700; color: #fff;
flex-shrink: 0;
}
.sm-08__user-name { font-size: 13px; font-weight: 700; color: var(--text); }
.sm-08__user-plan { font-size: 10px; color: #a78bfa; }
.sm-08__logout {
margin-left: auto;
width: 28px; height: 28px;
background: rgba(255,255,255,0.07);
border-radius: 7px;
display: flex; align-items: center; justify-content: center;
cursor: pointer;
font-size: 14px;
transition: background 0.2s;
}
.sm-08__logout:hover { background: rgba(255,255,255,0.15); }
/* Main */
.sm-08__main { flex: 1; display: flex; flex-direction: column; }
.sm-08__topbar {
padding: 18px 22px;
border-bottom: 1px solid var(--border-main);
display: flex; align-items: center; justify-content: space-between;
}
.sm-08__page-title { font-size: 18px; font-weight: 800; }
.sm-08__topbar-actions { display: flex; gap: 8px; }
.sm-08__btn {
padding: 8px 16px;
border-radius: 8px;
font-size: 13px; font-weight: 700;
cursor: pointer;
font-family: var(--font);
}
.sm-08__btn--ghost { background: transparent; border: 1px solid var(--border-main); color: var(--text-dark); }
.sm-08__btn--primary { background: var(--accent); border: none; color: #fff; }
.sm-08__content { flex: 1; padding: 22px; }
.sm-08__desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }
.sm-08__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sm-08__card {
background: var(--surface);
border: 1px solid var(--border-main);
border-radius: 10px;
padding: 16px;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.sm-08__card-val { font-size: 24px; font-weight: 800; color: var(--accent); }
.sm-08__card-lbl { font-size: 12px; color: var(--muted); margin-top: 3px; }
@media (prefers-reduced-motion: reduce) {
.sm-08__link, .sm-08__logout { transition: none; }
}
```
### 09. Neumorphic Inset Side Menu
**Type:** Pure CSS
**Description:** A dark-mode dashboard sidebar using soft extruded box-shadows and recessed inset-shadow interactive states to simulate a tactile raised and pressed surface aesthetic.
**HTML:**
```html
Dashboard
Neumorphic UI using layered box-shadow — extruded hover, inset active state, all driven by CSS transitions alone.
```
**CSS:**
```css
.sm-09, .sm-09 *, .sm-09 *::before, .sm-09 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-09 ::selection { background: #6366f1; color: #fff; }
.sm-09 {
--bg: #1a1a2e;
--bg-neu: #1e1e35;
--bg-dark: #16162a;
--accent: #818cf8;
--accent2: #c084fc;
--text: #e2e8f0;
--muted: #64748b;
--font: 'Poppins', system-ui, sans-serif;
font-family: var(--font);
background: var(--bg);
color: var(--text);
display: flex;
min-height: 100vh;
border-radius: 12px;
overflow: hidden;
}
/* Neumorphic sidebar */
.sm-09__nav {
width: 220px;
background: var(--bg-neu);
/* Neu shadow — extruded outward */
box-shadow: inset 2px 2px 6px rgba(255,255,255,0.04), inset -2px -2px 8px rgba(0,0,0,0.4);
display: flex;
flex-direction: column;
padding: 22px 0;
flex-shrink: 0;
}
.sm-09__brand {
padding: 0 18px 18px;
border-bottom: 1px solid rgba(255,255,255,0.04);
margin-bottom: 18px;
display: flex; align-items: center; gap: 12px;
}
/* Neumorphic logo */
.sm-09__logo {
width: 38px; height: 38px;
background: var(--bg-neu);
border-radius: 11px;
display: flex; align-items: center; justify-content: center;
font-weight: 700; font-size: 16px;
background: linear-gradient(145deg, #24243e, #181828);
box-shadow: 4px 4px 10px rgba(0,0,0,0.5), -2px -2px 8px rgba(255,255,255,0.05);
color: var(--accent);
}
.sm-09__brand-name { font-size: 14px; font-weight: 700; }
.sm-09__links { flex: 1; padding: 0 10px; }
.sm-09__link {
display: flex; align-items: center; gap: 11px;
padding: 11px 14px;
border-radius: 12px;
color: var(--muted);
font-size: 13px; font-weight: 600;
cursor: pointer; text-decoration: none;
margin-bottom: 6px;
transition: color 0.2s, box-shadow 0.2s, background 0.2s;
background: transparent;
/* resting state — flat */
box-shadow: none;
}
/* Hover: extruded */
.sm-09__link:hover {
color: var(--text);
background: var(--bg-neu);
box-shadow: 3px 3px 8px rgba(0,0,0,0.5), -2px -2px 6px rgba(255,255,255,0.04);
}
/* Active: pressed/inset */
.sm-09__link--active {
color: var(--accent);
background: var(--bg-dark);
box-shadow: inset 3px 3px 8px rgba(0,0,0,0.6), inset -2px -2px 6px rgba(255,255,255,0.04);
}
.sm-09__link-icon { font-size: 16px; }
.sm-09__link-text { flex: 1; }
.sm-09__dot {
width: 7px; height: 7px;
border-radius: 50%;
background: var(--accent);
box-shadow: 0 0 8px var(--accent);
opacity: 0;
transition: opacity 0.2s;
}
.sm-09__link--active .sm-09__dot { opacity: 1; }
/* Neu divider */
.sm-09__divider {
height: 1px;
margin: 8px 10px;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}
/* User card at bottom — neu inset card */
.sm-09__user-card {
margin: 8px 10px 0;
padding: 14px;
border-radius: 14px;
background: var(--bg-dark);
box-shadow: inset 3px 3px 8px rgba(0,0,0,0.5), inset -2px -2px 6px rgba(255,255,255,0.04);
display: flex; align-items: center; gap: 10px;
}
.sm-09__avatar {
width: 32px; height: 32px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent), var(--accent2));
display: flex; align-items: center; justify-content: center;
font-size: 12px; font-weight: 700;
box-shadow: 3px 3px 8px rgba(0,0,0,0.5);
flex-shrink: 0;
}
.sm-09__uname { font-size: 12px; font-weight: 700; }
.sm-09__urole { font-size: 10px; color: var(--muted); }
/* Main */
.sm-09__main { flex: 1; padding: 22px; }
.sm-09__heading { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.sm-09__sub { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }
/* Neu stat cards */
.sm-09__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sm-09__card {
padding: 16px;
border-radius: 14px;
background: var(--bg-neu);
box-shadow: 4px 4px 12px rgba(0,0,0,0.5), -2px -2px 8px rgba(255,255,255,0.04);
}
.sm-09__card-val { font-size: 22px; font-weight: 700; color: var(--accent); }
.sm-09__card-lbl { font-size: 11px; color: var(--muted); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) {
.sm-09__link { transition: none; }
}
```
### 10. Glassmorphism Blurred Sidebar
**Type:** Pure CSS
**Description:** A frosted-glass sidebar panel using backdrop-filter blur over animated gradient colour blobs, with a semi-transparent border and layered glass card components.
**HTML:**
```html
Home Feed
Frosted glass sidebar using backdrop-filter:blur(20px) over animated gradient blobs. The glass blurs whatever colour passes behind it.
```
**CSS:**
```css
.sm-10, .sm-10 *, .sm-10 *::before, .sm-10 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-10 ::selection { background: rgba(255,255,255,0.3); color: #fff; }
.sm-10 {
--font: 'Space Grotesk', system-ui, sans-serif;
font-family: var(--font);
min-height: 100vh;
display: flex;
border-radius: 12px;
overflow: hidden;
position: relative;
}
/* Vivid gradient background blobs (what passes THROUGH the glass) */
.sm-10__bg {
position: absolute; inset: 0;
background: #0d0d1a;
z-index: 0;
overflow: hidden;
}
.sm-10__blob {
position: absolute;
border-radius: 50%;
filter: blur(60px);
opacity: 0.6;
}
.sm-10__blob--a { width: 280px; height: 280px; background: #7c3aed; top: -60px; left: 20px; animation: sm-10-drift1 12s ease-in-out infinite alternate; }
.sm-10__blob--b { width: 220px; height: 220px; background: #0ea5e9; bottom: -40px; left: 100px; animation: sm-10-drift2 14s ease-in-out infinite alternate; }
.sm-10__blob--c { width: 200px; height: 200px; background: #10b981; top: 40%; right: 5%; animation: sm-10-drift3 10s ease-in-out infinite alternate; }
@keyframes sm-10-drift1 { to { transform: translate(30px, 40px) scale(1.1); } }
@keyframes sm-10-drift2 { to { transform: translate(-20px, -30px) scale(0.9); } }
@keyframes sm-10-drift3 { to { transform: translate(10px, 20px) scale(1.05); } }
/* Glass sidebar */
.sm-10__nav {
position: relative;
z-index: 10;
width: 230px;
background: rgba(255,255,255,0.06);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border-right: 1px solid rgba(255,255,255,0.1);
display: flex;
flex-direction: column;
padding: 22px 0;
flex-shrink: 0;
box-shadow: 4px 0 40px rgba(0,0,0,0.3);
}
.sm-10__brand {
padding: 0 18px 18px;
border-bottom: 1px solid rgba(255,255,255,0.07);
margin-bottom: 16px;
display: flex; align-items: center; gap: 11px;
}
.sm-10__logo {
width: 36px; height: 36px;
background: rgba(255,255,255,0.12);
border: 1px solid rgba(255,255,255,0.2);
border-radius: 10px;
display: flex; align-items: center; justify-content: center;
font-weight: 700; font-size: 16px; color: #fff;
backdrop-filter: blur(10px);
}
.sm-10__brand-name { font-size: 15px; font-weight: 700; color: #fff; }
.sm-10__links { flex: 1; padding: 0 10px; }
.sm-10__link {
display: flex; align-items: center; gap: 11px;
padding: 11px 14px;
border-radius: 10px;
color: rgba(255,255,255,0.5);
font-size: 13px; font-weight: 600;
cursor: pointer; text-decoration: none;
transition: all 0.25s;
margin-bottom: 3px;
border: 1px solid transparent;
}
.sm-10__link:hover {
color: rgba(255,255,255,0.9);
background: rgba(255,255,255,0.09);
border-color: rgba(255,255,255,0.12);
}
.sm-10__link--active {
color: #fff;
background: rgba(255,255,255,0.12);
border-color: rgba(255,255,255,0.18);
box-shadow: 0 0 20px rgba(255,255,255,0.05);
}
.sm-10__link-icon { font-size: 16px; }
.sm-10__badge {
margin-left: auto;
background: rgba(255,255,255,0.15);
color: #fff;
font-size: 10px;
font-weight: 700;
padding: 2px 7px;
border-radius: 99px;
}
.sm-10__divider { height: 1px; background: rgba(255,255,255,0.07); margin: 8px 10px; }
/* Glass user footer */
.sm-10__user {
margin: 8px 10px 0;
padding: 12px;
background: rgba(255,255,255,0.07);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 12px;
display: flex; align-items: center; gap: 10px;
backdrop-filter: blur(8px);
}
.sm-10__avatar {
width: 32px; height: 32px;
border-radius: 50%;
background: linear-gradient(135deg, #7c3aed, #0ea5e9);
display: flex; align-items: center; justify-content: center;
font-size: 12px; font-weight: 700; color: #fff;
flex-shrink: 0;
}
.sm-10__uname { font-size: 12px; font-weight: 700; color: #fff; }
.sm-10__urole { font-size: 10px; color: rgba(255,255,255,0.5); }
/* Main content */
.sm-10__main {
flex: 1;
position: relative; z-index: 10;
padding: 24px;
color: #fff;
}
.sm-10__heading { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.sm-10__sub { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.7; margin-bottom: 22px; }
/* Glass cards */
.sm-10__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sm-10__card {
background: rgba(255,255,255,0.07);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 12px;
padding: 16px;
backdrop-filter: blur(10px);
}
.sm-10__card-val { font-size: 22px; font-weight: 700; color: #fff; }
.sm-10__card-lbl { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) {
.sm-10__blob { animation: none; }
.sm-10__link { transition: none; }
}
```
### 11. Dark Mode Cyberpunk Neon Sidebar
**Type:** Pure CSS
**Description:** A futuristic dark-themed navigation sidebar with pulsing neon text-shadow glows, CSS scanline overlays, sharp geometric accents, and a subtle logo flicker animation.
**HTML:**
```html
// THREAT MATRIX
Dark cyberpunk sidebar with neon text-shadow glows, scanline overlays, and a CSS flicker animation — all without a single image or external asset.
```
**CSS:**
```css
.sm-11, .sm-11 *, .sm-11 *::before, .sm-11 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-11 ::selection { background: #ff2d78; color: #000; }
.sm-11 {
--bg: #020409;
--surface: #07080f;
--nav-bg: #040610;
--neon-pink: #ff2d78;
--neon-cyan: #00e5ff;
--neon-purple: #a855f7;
--text: #e2e8f0;
--muted: #374151;
--font-head: 'Orbitron', monospace;
--font-body: 'Rajdhani', system-ui, sans-serif;
font-family: var(--font-body);
background: var(--bg);
color: var(--text);
display: flex;
min-height: 100vh;
border-radius: 12px;
overflow: hidden;
}
.sm-11__nav {
width: 220px;
background: var(--nav-bg);
border-right: 1px solid var(--neon-pink);
box-shadow: 2px 0 20px rgba(255,45,120,0.1);
display: flex;
flex-direction: column;
padding: 0;
flex-shrink: 0;
position: relative;
overflow: hidden;
}
/* Scanlines overlay */
.sm-11__nav::before {
content: '';
position: absolute; inset: 0;
background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,229,255,0.015) 2px, rgba(0,229,255,0.015) 4px);
pointer-events: none;
z-index: 0;
}
/* Neon corner accent */
.sm-11__nav::after {
content: '';
position: absolute;
top: 0; right: 0;
width: 1px; height: 60px;
background: linear-gradient(180deg, var(--neon-cyan), transparent);
box-shadow: 0 0 8px var(--neon-cyan);
}
.sm-11__brand {
position: relative; z-index: 1;
padding: 20px 16px;
border-bottom: 1px solid rgba(255,45,120,0.3);
}
.sm-11__brand-label {
font-family: var(--font-head);
font-size: 10px;
font-weight: 400;
letter-spacing: 0.2em;
color: var(--neon-cyan);
margin-bottom: 4px;
text-shadow: 0 0 8px var(--neon-cyan);
}
.sm-11__brand-name {
font-family: var(--font-head);
font-size: 18px;
font-weight: 900;
color: #fff;
text-shadow: 0 0 12px var(--neon-pink), 0 0 30px rgba(255,45,120,0.4);
letter-spacing: 0.05em;
}
.sm-11__links {
flex: 1;
padding: 12px 0;
position: relative; z-index: 1;
}
.sm-11__link {
display: flex; align-items: center; gap: 10px;
padding: 11px 16px;
color: #4b5563;
font-size: 14px; font-weight: 700;
letter-spacing: 0.08em;
cursor: pointer; text-decoration: none;
transition: all 0.2s;
border-left: 2px solid transparent;
position: relative;
text-transform: uppercase;
}
.sm-11__link:hover {
color: var(--neon-cyan);
border-left-color: var(--neon-cyan);
text-shadow: 0 0 8px var(--neon-cyan);
background: rgba(0,229,255,0.04);
}
.sm-11__link--active {
color: var(--neon-pink);
border-left-color: var(--neon-pink);
text-shadow: 0 0 10px var(--neon-pink);
background: rgba(255,45,120,0.06);
}
/* Glowing bullet */
.sm-11__link-bullet {
width: 6px; height: 6px;
border-radius: 50%;
background: currentColor;
box-shadow: 0 0 8px currentColor;
flex-shrink: 0;
}
.sm-11__status-bar {
position: relative; z-index: 1;
padding: 12px 16px;
border-top: 1px solid rgba(255,45,120,0.2);
font-family: var(--font-head);
font-size: 9px;
letter-spacing: 0.1em;
}
.sm-11__status-row {
display: flex; justify-content: space-between;
margin-bottom: 4px;
color: #374151;
}
.sm-11__status-row span:last-child { color: var(--neon-cyan); }
.sm-11__progress {
height: 2px;
background: rgba(0,229,255,0.15);
border-radius: 2px;
margin-top: 6px;
overflow: hidden;
}
.sm-11__progress-fill {
height: 100%;
width: 73%;
background: var(--neon-cyan);
box-shadow: 0 0 6px var(--neon-cyan);
border-radius: 2px;
}
/* Main */
.sm-11__main { flex: 1; padding: 22px; position: relative; overflow: hidden; }
.sm-11__main::before {
content: '';
position: absolute; inset: 0;
background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,229,255,0.008) 3px, rgba(0,229,255,0.008) 6px);
pointer-events: none;
}
.sm-11__heading {
font-family: var(--font-head);
font-size: 16px;
font-weight: 900;
color: var(--neon-pink);
text-shadow: 0 0 12px var(--neon-pink);
letter-spacing: 0.1em;
margin-bottom: 6px;
}
.sm-11__sub {
font-size: 13px;
color: #4b5563;
line-height: 1.7;
margin-bottom: 22px;
font-weight: 600;
}
.sm-11__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sm-11__card {
background: var(--surface);
border: 1px solid rgba(0,229,255,0.15);
border-radius: 6px;
padding: 14px;
position: relative;
overflow: hidden;
}
/* Corner glow */
.sm-11__card::before {
content: '';
position: absolute;
top: 0; left: 0;
width: 40px; height: 1px;
background: var(--neon-cyan);
box-shadow: 0 0 8px var(--neon-cyan);
}
.sm-11__card::after {
content: '';
position: absolute;
top: 0; left: 0;
width: 1px; height: 30px;
background: var(--neon-cyan);
box-shadow: 0 0 8px var(--neon-cyan);
}
.sm-11__card-val {
font-family: var(--font-head);
font-size: 20px;
font-weight: 700;
color: var(--neon-cyan);
text-shadow: 0 0 10px var(--neon-cyan);
}
.sm-11__card-lbl {
font-size: 10px;
color: #374151;
margin-top: 4px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
}
@keyframes sm-11-flicker {
0%, 95%, 100% { opacity: 1; }
96% { opacity: 0.7; }
98% { opacity: 0.9; }
}
.sm-11__brand-name { animation: sm-11-flicker 6s step-end infinite; }
@media (prefers-reduced-motion: reduce) {
.sm-11__brand-name { animation: none; }
.sm-11__link { transition: none; }
}
```
### 12. Brutalist Left-Hand Border Navigation
**Type:** Pure CSS
**Description:** A high-contrast brutalist sidebar using only thick black borders, a bold red accent rule, raw condensed typography, and zero gradients or rounded corners.
**HTML:**
```html
Brutalist sidebar using raw black borders, zero gradients, high-contrast type, and a thick red rule as the only decorative element.
```
**CSS:**
```css
.sm-12, .sm-12 *, .sm-12 *::before, .sm-12 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-12 ::selection { background: #000; color: #fff; }
.sm-12 {
--bg: #f5f0e8;
--text: #0a0a0a;
--accent: #e63329;
--yellow: #f7e733;
--nav-bg: #0a0a0a;
--nav-text: #f5f0e8;
--font-head: 'Barlow Condensed', system-ui, sans-serif;
--font-mono: 'Space Mono', monospace;
font-family: var(--font-head);
background: var(--bg);
color: var(--text);
display: flex;
min-height: 100vh;
border-radius: 0;
overflow: hidden;
border: 3px solid var(--text);
border-radius: 2px;
}
.sm-12__nav {
width: 200px;
background: var(--nav-bg);
color: var(--nav-text);
border-right: 4px solid var(--accent);
display: flex;
flex-direction: column;
flex-shrink: 0;
}
.sm-12__brand {
padding: 18px 16px;
border-bottom: 3px solid var(--accent);
}
.sm-12__brand-eyebrow {
font-family: var(--font-mono);
font-size: 8px;
letter-spacing: 0.2em;
color: #666;
margin-bottom: 4px;
}
.sm-12__brand-name {
font-size: 26px;
font-weight: 900;
letter-spacing: -0.02em;
line-height: 1;
text-transform: uppercase;
color: var(--nav-text);
}
.sm-12__brand-tag {
display: inline-block;
background: var(--accent);
color: #fff;
font-size: 10px;
font-weight: 800;
letter-spacing: 0.1em;
padding: 1px 6px;
margin-top: 6px;
text-transform: uppercase;
}
.sm-12__links { flex: 1; }
.sm-12__link {
display: block;
padding: 13px 16px;
color: #666;
font-size: 18px;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.04em;
cursor: pointer; text-decoration: none;
border-bottom: 1px solid #1a1a1a;
transition: color 0.1s, background 0.1s;
position: relative;
}
.sm-12__link::before {
content: '//';
color: #333;
margin-right: 8px;
font-family: var(--font-mono);
font-size: 12px;
}
.sm-12__link:hover {
color: var(--yellow);
background: #111;
}
.sm-12__link--active {
color: var(--nav-text);
background: var(--accent);
border-bottom-color: var(--accent);
}
.sm-12__link--active::before { color: rgba(255,255,255,0.5); }
.sm-12__link--active::after {
content: '→';
position: absolute;
right: 12px;
top: 50%; transform: translateY(-50%);
font-size: 16px;
font-family: var(--font-mono);
}
.sm-12__count {
position: absolute;
right: 32px; top: 50%;
transform: translateY(-50%);
font-family: var(--font-mono);
font-size: 10px;
color: var(--yellow);
}
.sm-12__link--active .sm-12__count { color: rgba(255,255,255,0.7); right: 36px; }
.sm-12__footer {
border-top: 3px solid var(--accent);
padding: 12px 16px;
}
.sm-12__footer-label {
font-family: var(--font-mono);
font-size: 8px;
color: #444;
margin-bottom: 4px;
letter-spacing: 0.15em;
}
.sm-12__footer-user {
font-size: 14px;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.05em;
}
/* Main */
.sm-12__main { flex: 1; border-left: none; }
.sm-12__topbar {
padding: 16px 22px;
border-bottom: 3px solid var(--text);
display: flex; align-items: baseline; gap: 12px;
}
.sm-12__topbar-num {
font-family: var(--font-mono);
font-size: 11px;
color: var(--accent);
}
.sm-12__page-title {
font-size: 28px;
font-weight: 900;
text-transform: uppercase;
letter-spacing: -0.01em;
line-height: 1;
}
.sm-12__content { padding: 22px; }
.sm-12__intro {
font-size: 15px;
line-height: 1.6;
color: #444;
margin-bottom: 22px;
font-weight: 600;
max-width: 380px;
}
.sm-12__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 3px solid var(--text); }
.sm-12__cell {
padding: 14px;
border-right: 2px solid var(--text);
border-bottom: 2px solid var(--text);
}
.sm-12__cell:nth-child(even) { border-right: none; }
.sm-12__cell:nth-child(n+3) { border-bottom: none; }
.sm-12__cell-val {
font-size: 28px;
font-weight: 900;
letter-spacing: -0.03em;
line-height: 1;
color: var(--text);
}
.sm-12__cell-lbl {
font-family: var(--font-mono);
font-size: 10px;
color: #888;
margin-top: 4px;
text-transform: uppercase;
letter-spacing: 0.1em;
}
@media (prefers-reduced-motion: reduce) {
.sm-12__link { transition: none; }
}
```
### 13. Hamburger Checkbox-Hack Side Menu
**Type:** Pure CSS
**Description:** A classic pure-CSS interaction using a hidden checkbox input and the :checked general sibling combinator to toggle menu visibility and animate the burger icon into an X.
**HTML:**
```html
Checkbox Hack Menu
Uses a hidden <input type="checkbox"> and the CSS sibling combinator. No JavaScript at all.
#chk:checked ~ .nav {
transform : translateX(0);
}
#chk:checked ~ .burger span:nth-child(1) {
transform : translateY(8px) rotate(45deg);
}
```
**CSS:**
```css
.sm-13, .sm-13 *, .sm-13 *::before, .sm-13 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-13 ::selection { background: #f97316; color: #fff; }
.sm-13 {
--bg: #111113;
--surface: #1c1c1f;
--nav-bg: #18181b;
--accent: #f97316;
--accent2: #fb923c;
--text: #f4f4f5;
--muted: #71717a;
--border: rgba(249,115,22,0.15);
--font: 'Rubik', system-ui, sans-serif;
--w: 270px;
--dur: 0.38s;
font-family: var(--font);
background: var(--bg);
color: var(--text);
min-height: 100vh;
position: relative;
overflow: hidden;
border-radius: 12px;
}
/* Hidden checkbox — the :checked hack engine */
#sm-13-chk { display: none; }
/* ======== BURGER LABEL ======== */
.sm-13__burger {
position: absolute;
top: 18px; left: 18px;
z-index: 100;
width: 44px; height: 44px;
display: flex; flex-direction: column;
align-items: center; justify-content: center;
gap: 6px;
cursor: pointer;
border-radius: 10px;
background: var(--surface);
border: 1px solid var(--border);
transition: background 0.2s;
}
.sm-13__burger:hover { background: rgba(249,115,22,0.15); }
/* Three bars — animated via :checked ~ sibling combinator */
.sm-13__burger span {
width: 20px; height: 2px;
background: var(--text);
border-radius: 2px;
transition: transform var(--dur) cubic-bezier(0.4,0,0.2,1), opacity var(--dur), width var(--dur);
transform-origin: center;
display: block;
}
/* :checked ~ .burger targets the burger because both are children of .sm-13 */
#sm-13-chk:checked ~ .sm-13__burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#sm-13-chk:checked ~ .sm-13__burger span:nth-child(2) { opacity: 0; width: 0; }
#sm-13-chk:checked ~ .sm-13__burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
/* ======== OVERLAY (backdrop close area) ======== */
.sm-13__overlay {
position: absolute; inset: 0;
z-index: 40;
pointer-events: none;
transition: background var(--dur);
}
#sm-13-chk:checked ~ .sm-13__overlay {
background: rgba(0,0,0,0.5);
pointer-events: all;
}
/* ======== DRAWER ======== */
.sm-13__nav {
position: absolute;
top: 0; left: 0;
width: var(--w);
height: 100%;
background: var(--nav-bg);
border-right: 1px solid var(--border);
z-index: 50;
transform: translateX(calc(-1 * var(--w)));
transition: transform var(--dur) cubic-bezier(0.4,0,0.2,1);
display: flex;
flex-direction: column;
padding: 74px 0 20px;
}
#sm-13-chk:checked ~ .sm-13__nav {
transform: translateX(0);
box-shadow: 8px 0 32px rgba(0,0,0,0.5);
}
/* Orange top accent line */
.sm-13__nav::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 2px;
background: linear-gradient(90deg, var(--accent), var(--accent2), transparent);
}
.sm-13__links { flex: 1; padding: 0 10px; }
.sm-13__link {
display: flex; align-items: center; gap: 13px;
padding: 12px 14px;
border-radius: 9px;
color: var(--muted);
font-size: 14px; font-weight: 600;
cursor: pointer; text-decoration: none;
transition: all 0.18s;
margin-bottom: 4px;
}
.sm-13__link:hover { color: var(--text); background: rgba(249,115,22,0.1); }
.sm-13__link--active { color: var(--accent2); background: rgba(249,115,22,0.12); }
.sm-13__link-chip {
width: 8px; height: 8px;
background: var(--muted);
border-radius: 2px;
transition: background 0.18s;
transform: rotate(45deg);
flex-shrink: 0;
}
.sm-13__link:hover .sm-13__link-chip { background: var(--accent2); }
.sm-13__link--active .sm-13__link-chip { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.sm-13__divider { height: 1px; background: var(--border); margin: 8px 14px; }
.sm-13__user {
padding: 16px 18px 0;
border-top: 1px solid var(--border);
display: flex; align-items: center; gap: 10px;
}
.sm-13__avatar {
width: 32px; height: 32px;
border-radius: 8px;
background: linear-gradient(135deg, var(--accent), #ef4444);
display: flex; align-items: center; justify-content: center;
font-size: 12px; font-weight: 700; color: #fff;
}
.sm-13__uname { font-size: 13px; font-weight: 700; }
.sm-13__urole { font-size: 10px; color: var(--muted); }
/* ======== MAIN CONTENT ======== */
.sm-13__content {
padding: 80px 22px 22px;
}
.sm-13__heading { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.sm-13__sub {
font-size: 13px; color: var(--muted);
line-height: 1.7; margin-bottom: 22px;
}
/* Explain the checkbox hack technique */
.sm-13__code-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 14px 16px;
font-size: 12px;
font-family: monospace;
color: #a1a1aa;
line-height: 1.8;
margin-bottom: 14px;
}
.sm-13__code-card .kw { color: var(--accent); }
.sm-13__code-card .sel { color: #60a5fa; }
.sm-13__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sm-13__card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 9px;
padding: 13px;
}
.sm-13__card-val { font-size: 20px; font-weight: 700; color: var(--accent2); }
.sm-13__card-lbl { font-size: 11px; color: var(--muted); margin-top: 3px; }
@media (prefers-reduced-motion: reduce) {
.sm-13__nav, .sm-13__overlay, .sm-13__burger span { transition: none; }
}
```
### 14. CSS Hover-Triggered Sidebar Drawer
**Type:** Pure CSS
**Description:** A side navigation for wide viewports that slides open when the user hovers over a persistent thin edge trigger strip, using only CSS parent :hover to expand the drawer.
**HTML:**
```html
Hover Drawer
Slide-out sidebar triggered purely by hovering the thin edge rail — no checkbox, no JS. Uses CSS :hover on a parent wrapper.
← Hover the teal edge strip to open the menu
```
**CSS:**
```css
.sm-14, .sm-14 *, .sm-14 *::before, .sm-14 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-14 ::selection { background: #0f766e; color: #fff; }
.sm-14 {
--bg: #0a1628;
--surface: #0f1f35;
--trigger-bg: #071020;
--accent: #14b8a6;
--accent2: #2dd4bf;
--text: #e2e8f0;
--muted: #475569;
--border: rgba(20,184,166,0.15);
--font: 'Mulish', system-ui, sans-serif;
--w: 240px;
--trigger-w: 32px;
--dur: 0.4s;
--ease: cubic-bezier(0.4, 0, 0.2, 1);
font-family: var(--font);
background: var(--bg);
color: var(--text);
display: flex;
min-height: 100vh;
border-radius: 12px;
overflow: hidden;
position: relative;
}
/* Hot-zone trigger */
.sm-14__trigger {
width: var(--trigger-w);
min-height: 100vh;
background: var(--trigger-bg);
border-right: 1px solid rgba(20,184,166,0.35);
flex-shrink: 0;
position: relative;
z-index: 10;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: inset -1px 0 0 rgba(20,184,166,0.15), 1px 0 12px rgba(20,184,166,0.08);
}
/* Hover indicator arrow */
.sm-14__trigger::before {
content: '›';
color: var(--accent2);
font-size: 22px;
font-weight: 800;
line-height: 1;
padding-left: 2px;
text-shadow: 0 0 8px rgba(20,184,166,0.4);
transition: color 0.2s, transform 0.2s, text-shadow 0.2s;
}
/* When trigger is hovered, expand the drawer */
.sm-14__trigger:hover::before { color: var(--accent); transform: scale(1.3); }
/* Hover zone + nav — use :has or a sibling approach */
/* Use a wrapper around trigger+nav for :hover on parent */
.sm-14__drawer-wrap {
position: absolute;
top: 0; left: 0;
height: 100%;
width: var(--trigger-w);
z-index: 20;
transition: width var(--dur) var(--ease);
}
.sm-14__drawer-wrap:hover {
width: calc(var(--trigger-w) + var(--w));
}
.sm-14__drawer-wrap:hover .sm-14__trigger::before {
content: '‹';
transform: scale(1.15);
color: var(--accent2);
}
.sm-14__drawer-wrap:hover .sm-14__nav {
transform: translateX(0);
box-shadow: 8px 0 40px rgba(0,0,0,0.5);
}
.sm-14__trigger-inner {
width: var(--trigger-w);
height: 100%;
}
.sm-14__nav {
position: absolute;
top: 0;
left: var(--trigger-w);
width: var(--w);
height: 100%;
background: var(--surface);
border-right: 1px solid var(--border);
transform: translateX(calc(-1 * var(--w)));
transition: transform var(--dur) var(--ease);
display: flex;
flex-direction: column;
padding: 24px 0;
}
.sm-14__nav::before {
content: '';
position: absolute;
top: 0; right: 0;
width: 1px; height: 100%;
background: linear-gradient(180deg, transparent, var(--accent), transparent);
opacity: 0.4;
}
.sm-14__brand {
padding: 0 18px 18px;
border-bottom: 1px solid var(--border);
margin-bottom: 16px;
display: flex; align-items: center; gap: 10px;
}
.sm-14__logo {
width: 32px; height: 32px;
background: linear-gradient(135deg, var(--accent), var(--accent2));
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-weight: 800; color: #000; font-size: 14px;
}
.sm-14__brand-name { font-size: 15px; font-weight: 800; }
.sm-14__links { flex: 1; padding: 0 10px; }
.sm-14__link {
display: flex; align-items: center; gap: 11px;
padding: 11px 14px;
border-radius: 9px;
color: var(--muted);
font-size: 13px; font-weight: 700;
cursor: pointer; text-decoration: none;
transition: all 0.2s;
margin-bottom: 3px;
white-space: nowrap;
}
.sm-14__link:hover { color: var(--text); background: rgba(20,184,166,0.1); }
.sm-14__link--active { color: var(--accent2); background: rgba(20,184,166,0.12); }
.sm-14__link-icon { font-size: 15px; flex-shrink: 0; }
.sm-14__badge {
margin-left: auto;
background: rgba(20,184,166,0.2);
color: var(--accent2);
font-size: 10px;
font-weight: 800;
padding: 2px 7px;
border-radius: 99px;
}
.sm-14__user {
padding: 14px 18px 0;
border-top: 1px solid var(--border);
display: flex; align-items: center; gap: 10px;
}
.sm-14__avatar {
width: 30px; height: 30px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent), #6366f1);
display: flex; align-items: center; justify-content: center;
font-size: 11px; font-weight: 700; color: #fff;
}
.sm-14__uname { font-size: 12px; font-weight: 800; }
.sm-14__urole { font-size: 10px; color: var(--muted); }
/* Main */
.sm-14__main { flex: 1; padding: 24px 22px 22px 50px; }
.sm-14__heading { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.sm-14__sub { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 22px; }
/* Tooltip hint */
.sm-14__hint {
display: flex; align-items: center; gap: 10px;
background: rgba(20,184,166,0.08);
border: 1px solid rgba(20,184,166,0.2);
border-radius: 9px;
padding: 12px 14px;
font-size: 13px;
color: var(--accent2);
font-weight: 600;
margin-bottom: 20px;
}
.sm-14__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sm-14__card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 9px;
padding: 14px;
}
.sm-14__card-val { font-size: 20px; font-weight: 800; color: var(--accent2); }
.sm-14__card-lbl { font-size: 11px; color: var(--muted); margin-top: 3px; }
@media (prefers-reduced-motion: reduce) {
.sm-14__nav, .sm-14__trigger::before { transition: none; }
}
```
### 15. Collapsible Sidebar Menu with CSS Transitions
**Type:** Pure CSS
**Description:** A sidebar that fluidly animates between full expanded width and icon-only collapsed state using transition:width, with text labels and badges fading out in sync.
**HTML:**
```html
```
**CSS:**
```css
.sm-15, .sm-15 *, .sm-15 *::before, .sm-15 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-15 ::selection { background: #e11d48; color: #fff; }
.sm-15 {
--bg: #09090b;
--surface: #141418;
--nav-bg: #0f0f12;
--accent: #e11d48;
--accent2: #fb7185;
--text: #f1f5f9;
--muted: #52525b;
--border: rgba(225,29,72,0.12);
--font: 'Sora', system-ui, sans-serif;
--full-w: 240px;
--collapsed-w: 64px;
--dur: 0.35s;
--ease: cubic-bezier(0.4, 0, 0.2, 1);
font-family: var(--font);
background: var(--bg);
color: var(--text);
display: flex;
min-height: 100vh;
border-radius: 12px;
overflow: hidden;
}
/* Toggle */
.sm-15__toggle { display: none; }
/* Sidebar */
.sm-15__nav {
width: var(--full-w);
background: var(--nav-bg);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
flex-shrink: 0;
overflow: hidden;
transition: width var(--dur) var(--ease);
position: relative;
}
.sm-15__toggle:checked ~ .sm-15__layout .sm-15__nav {
width: var(--collapsed-w);
}
/* Shell wrapper to allow :checked targeting */
.sm-15__layout {
display: flex;
flex: 1;
min-width: 0;
}
/* Brand */
.sm-15__brand {
display: flex; align-items: center;
padding: 20px 10px 18px 10px;
border-bottom: 1px solid var(--border);
margin-bottom: 12px;
overflow: hidden;
white-space: nowrap;
gap: 0;
min-width: 0;
}
.sm-15__logo {
width: 36px; height: 36px;
background: linear-gradient(135deg, var(--accent), var(--accent2));
border-radius: 9px;
display: flex; align-items: center; justify-content: center;
font-weight: 800; font-size: 16px; color: #fff;
flex-shrink: 0;
}
.sm-15__brand-name {
font-size: 15px; font-weight: 800;
margin-left: 10px;
overflow: hidden;
opacity: 1;
transition: opacity var(--dur) var(--ease), max-width var(--dur) var(--ease);
max-width: 160px;
}
.sm-15__toggle:checked ~ .sm-15__layout .sm-15__brand-name {
opacity: 0;
max-width: 0;
}
/* Collapse toggle button */
.sm-15__collapse-btn {
align-self: flex-end;
margin: 8px 12px;
width: 28px; height: 28px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 50%;
display: flex; align-items: center; justify-content: center;
cursor: pointer;
font-size: 12px;
color: var(--muted);
flex-shrink: 0;
transition: transform var(--dur) var(--ease), align-self var(--dur) var(--ease), margin var(--dur) var(--ease), background 0.2s, color 0.2s;
}
.sm-15__toggle:checked ~ .sm-15__layout .sm-15__collapse-btn {
align-self: center;
margin: 8px 0;
transform: rotate(180deg);
}
.sm-15__collapse-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
/* Links */
.sm-15__links { flex: 1; padding: 0 6px; }
.sm-15__link {
display: flex; align-items: center;
padding: 11px 7px;
border-radius: 9px;
color: var(--muted);
font-size: 13px; font-weight: 600;
cursor: pointer; text-decoration: none;
transition: all 0.2s;
margin-bottom: 4px;
white-space: nowrap;
overflow: hidden;
gap: 0;
}
.sm-15__link:hover { color: var(--text); background: rgba(225,29,72,0.08); }
.sm-15__link--active { color: var(--accent2); background: rgba(225,29,72,0.1); }
.sm-15__link-icon {
width: 36px; height: 36px;
display: flex; align-items: center; justify-content: center;
font-size: 17px;
flex-shrink: 0;
border-radius: 8px;
transition: background 0.2s;
}
.sm-15__link:hover .sm-15__link-icon { background: rgba(225,29,72,0.15); }
.sm-15__link--active .sm-15__link-icon { background: rgba(225,29,72,0.18); }
.sm-15__link-text {
margin-left: 6px;
opacity: 1;
transition: opacity var(--dur) var(--ease), max-width var(--dur) var(--ease);
max-width: 160px;
overflow: hidden;
}
.sm-15__toggle:checked ~ .sm-15__layout .sm-15__link-text {
opacity: 0;
max-width: 0;
margin-left: 0;
}
.sm-15__badge {
margin-left: auto;
background: rgba(225,29,72,0.2);
color: var(--accent2);
font-size: 10px;
font-weight: 700;
padding: 2px 7px;
border-radius: 99px;
transition: opacity var(--dur);
}
.sm-15__toggle:checked ~ .sm-15__layout .sm-15__badge { opacity: 0; }
/* Footer user */
.sm-15__user {
padding: 14px 8px 18px;
border-top: 1px solid var(--border);
display: flex; align-items: center; overflow: hidden;
transition: justify-content var(--dur) var(--ease);
}
.sm-15__toggle:checked ~ .sm-15__layout .sm-15__user { justify-content: center; padding: 14px 0 18px; }
.sm-15__user-avatar {
width: 36px; height: 36px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent), #8b5cf6);
display: flex; align-items: center; justify-content: center;
font-size: 12px; font-weight: 700; color: #fff;
flex-shrink: 0;
}
.sm-15__user-info {
margin-left: 10px;
opacity: 1;
transition: opacity var(--dur), max-width var(--dur) var(--ease);
max-width: 160px; white-space: nowrap; overflow: hidden;
}
.sm-15__toggle:checked ~ .sm-15__layout .sm-15__user-info { opacity: 0; max-width: 0; margin-left: 0; }
.sm-15__user-name { font-size: 12px; font-weight: 700; }
.sm-15__user-role { font-size: 10px; color: var(--muted); }
/* Main */
.sm-15__main { flex: 1; padding: 24px; min-width: 0; }
.sm-15__heading { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.sm-15__sub { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 22px; }
.sm-15__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sm-15__card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 9px;
padding: 14px;
}
.sm-15__card-val { font-size: 22px; font-weight: 800; color: var(--accent2); }
.sm-15__card-lbl { font-size: 11px; color: var(--muted); margin-top: 3px; }
@media (prefers-reduced-motion: reduce) {
.sm-15__nav, .sm-15__brand-name, .sm-15__link-text,
.sm-15__badge, .sm-15__user-info, .sm-15__collapse-btn { transition: none; }
}
```
### 16. CSS-Only Accordion Side Navigation
**Type:** Pure CSS
**Description:** A documentation-style sidebar where multiple independent accordion sections can be expanded or collapsed simultaneously using hidden checkboxes and max-height transitions.
**HTML:**
```html
⬡ Overview
⬙ Changelog
Documentation
CSS-only accordion sidebar: each section uses a hidden checkbox and max-height transition. Clicking a header expands/collapses its items independently.
📦
Installation Guide
Set up your environment in under 5 minutes
⚙️
Configuration Reference
All available options with examples
🚀
Quick Start Tutorial
Build your first integration in 10 steps
```
**CSS:**
```css
.sm-16, .sm-16 *, .sm-16 *::before, .sm-16 *::after {
box-sizing: border-box; margin: 0; padding: 0;
}
.sm-16 ::selection { background: #2563eb; color: #fff; }
.sm-16 {
--bg: #f0f4ff;
--surface: #fff;
--nav-bg: #fff;
--accent: #2563eb;
--accent2: #60a5fa;
--text: #0f172a;
--muted: #94a3b8;
--muted2: #64748b;
--border: #e2e8f0;
--border-active: rgba(37,99,235,0.15);
--font: 'Plus Jakarta Sans', system-ui, sans-serif;
font-family: var(--font);
background: var(--bg);
color: var(--text);
display: flex;
min-height: 100vh;
border-radius: 12px;
overflow: hidden;
}
/* Accordion hidden radio/checkboxes */
.sm-16__acc-toggle { display: none; }
/* Sidebar */
.sm-16__nav {
width: 240px;
background: var(--nav-bg);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
flex-shrink: 0;
overflow-y: auto;
}
.sm-16__nav::-webkit-scrollbar { width: 3px; }
.sm-16__nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.sm-16__brand {
padding: 18px 16px;
border-bottom: 1px solid var(--border);
display: flex; align-items: center; gap: 10px;
flex-shrink: 0;
}
.sm-16__logo {
width: 32px; height: 32px;
background: var(--accent);
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-weight: 800; color: #fff; font-size: 14px;
}
.sm-16__brand-name { font-size: 14px; font-weight: 800; }
.sm-16__brand-version {
font-size: 10px;
color: var(--muted);
margin-left: 4px;
font-weight: 500;
}
/* Search bar */
.sm-16__search {
padding: 10px 14px;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.sm-16__search-input {
width: 100%;
padding: 7px 12px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 7px;
font-size: 12px;
font-family: var(--font);
color: var(--text);
outline: none;
}
.sm-16__search-input:focus { border-color: var(--accent2); }
/* Accordion section */
.sm-16__section { border-bottom: 1px solid var(--border); }
/* Section header — label acts as click target */
.sm-16__section-header {
display: flex; align-items: center; justify-content: space-between;
padding: 12px 16px;
cursor: pointer;
user-select: none;
transition: background 0.15s;
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--muted2);
}
.sm-16__section-header:hover { background: rgba(37,99,235,0.04); }
.sm-16__section-header-icon { font-size: 14px; }
/* Chevron */
.sm-16__chevron {
font-size: 12px;
color: var(--muted);
transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
display: inline-block;
}
.sm-16__acc-toggle:checked + .sm-16__section-header .sm-16__chevron { transform: rotate(90deg); }
.sm-16__acc-toggle:checked + .sm-16__section-header { color: var(--accent); }
/* Collapsible sub-items */
.sm-16__items {
max-height: 0;
overflow: hidden;
transition: max-height 0.38s cubic-bezier(0.4,0,0.2,1);
}
.sm-16__acc-toggle:checked + .sm-16__section-header + .sm-16__items {
max-height: 400px;
}
/* Individual link items */
.sm-16__item {
display: flex; align-items: center; gap: 10px;
padding: 9px 16px 9px 36px;
color: var(--muted2);
font-size: 13px; font-weight: 600;
cursor: pointer; text-decoration: none;
transition: all 0.15s;
position: relative;
}
.sm-16__item::before {
content: '';
position: absolute;
left: 20px; top: 50%; transform: translateY(-50%);
width: 4px; height: 4px;
border-radius: 50%;
background: var(--muted);
transition: background 0.15s, transform 0.15s;
}
.sm-16__item:hover {
color: var(--accent);
background: rgba(37,99,235,0.05);
}
.sm-16__item:hover::before { background: var(--accent); transform: translateY(-50%) scale(1.4); }
.sm-16__item--active {
color: var(--accent);
background: rgba(37,99,235,0.07);
}
.sm-16__item--active::before { background: var(--accent); }
.sm-16__item-badge {
margin-left: auto;
background: rgba(37,99,235,0.12);
color: var(--accent);
font-size: 10px;
font-weight: 700;
padding: 1px 6px;
border-radius: 99px;
}
/* Flat link */
.sm-16__flat {
display: flex; align-items: center; gap: 10px;
padding: 11px 16px;
color: var(--muted2);
font-size: 13px; font-weight: 600;
cursor: pointer; text-decoration: none;
transition: all 0.15s;
border-bottom: 1px solid var(--border);
}
.sm-16__flat:hover { color: var(--accent); background: rgba(37,99,235,0.04); }
.sm-16__flat-icon { font-size: 14px; }
/* Main */
.sm-16__main { flex: 1; padding: 24px; }
.sm-16__heading { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.sm-16__sub { font-size: 13px; color: var(--muted2); line-height: 1.7; margin-bottom: 22px; }
.sm-16__docs { display: flex; flex-direction: column; gap: 10px; }
.sm-16__doc-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 14px 16px;
display: flex; align-items: center; gap: 12px;
cursor: pointer;
transition: border-color 0.2s, box-shadow 0.2s;
}
.sm-16__doc-card:hover {
border-color: var(--accent2);
box-shadow: 0 2px 12px rgba(37,99,235,0.08);
}
.sm-16__doc-icon {
width: 34px; height: 34px;
border-radius: 8px;
background: rgba(37,99,235,0.08);
display: flex; align-items: center; justify-content: center;
font-size: 16px; flex-shrink: 0;
}
.sm-16__doc-title { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.sm-16__doc-sub { font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
.sm-16__items, .sm-16__chevron { transition: none; }
}
```
---
## 23 CSS Sidebar Layouts
URL: https://codefronts.com/layouts/css-sidebar-layouts/
Description: 23 hand-coded CSS sidebar layouts — fixed, collapsible, off-canvas, dual, mini icon rail, two-pane mail, three-pane workspace and more. Accessible, copy-paste ready.
Demo count: 23
### 01. Fixed Sidebar
**Type:** Pure CSS
**Description:** Apple-Pro premium — brushed-aluminium sidebar on a near-black slate, system-blue accents and SF-style typography. The classic admin shell with a luxe finish. Sidebar is sticky via `position: sticky`; main content scrolls.
**HTML:**
```html
Active users
24,812
↑ 12.4%
Revenue · MTD
$148.2k
↑ 7.1%
Uptime · 30d
99.97%
— stable
```
**CSS:**
```css
.sb-fix {
display: grid; grid-template-columns: 248px 1fr;
min-height: 480px;
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
background: #1c1c1e; color: #f5f5f7;
border-radius: 14px; overflow: hidden;
letter-spacing: -0.01em;
}
.sb-fix-side {
position: sticky; top: 0; align-self: start;
height: 100%; min-height: 480px;
padding: 18px 14px;
background: linear-gradient(180deg, #2c2c2e 0%, #232325 100%);
border-right: 1px solid rgba(255,255,255,0.08);
box-shadow: inset -1px 0 0 rgba(255,255,255,0.04);
display: flex; flex-direction: column; gap: 12px;
}
.sb-fix-brand { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px; }
.sb-fix-mark {
width: 30px; height: 30px; border-radius: 8px;
background: linear-gradient(135deg, #0a84ff 0%, #5ac8fa 100%);
position: relative; flex-shrink: 0;
box-shadow: 0 2px 8px rgba(10,132,255,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}
.sb-fix-mark::after {
content: ''; position: absolute; inset: 6px;
border: 2px solid rgba(255,255,255,0.85); border-radius: 4px;
border-bottom-color: transparent; border-right-color: transparent;
transform: rotate(-45deg);
}
.sb-fix-brand strong { display: block; font-size: 14px; font-weight: 600; color: #f5f5f7; }
.sb-fix-brand em { display: block; font-size: 11px; font-style: normal; color: #98989f; margin-top: -1px; }
.sb-fix-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 4px 0 2px; }
.sb-fix-section { font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #98989f; padding: 0 6px; margin-top: 6px; }
.sb-fix-side ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.sb-fix-side a {
display: flex; align-items: center; gap: 10px;
padding: 7px 10px; border-radius: 6px;
font-size: 13px; font-weight: 500; color: #d6d6d8; text-decoration: none;
transition: background 0.15s, color 0.15s;
}
.sb-fix-side a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sb-fix-side a[aria-current="page"] {
background: rgba(10,132,255,0.18);
color: #fff;
box-shadow: inset 0 0 0 1px rgba(10,132,255,0.4);
}
.sb-fix-i { font-size: 11px; width: 14px; text-align: center; flex-shrink: 0; color: #5ac8fa; }
.sb-fix-side a[aria-current="page"] .sb-fix-i { color: #0a84ff; }
.sb-fix-badge { margin-left: auto; font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 9px; background: rgba(255,69,58,0.85); color: #fff; }
.sb-fix-main { padding: 26px 28px; overflow-y: auto; background: #1c1c1e; }
.sb-fix-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.sb-fix-crumb { font-size: 11px; color: #98989f; letter-spacing: 0.02em; }
.sb-fix-main h2 { margin: 4px 0 0; font-size: 26px; font-weight: 700; color: #f5f5f7; letter-spacing: -0.02em; }
.sb-fix-actions { display: flex; gap: 8px; }
.sb-fix-btn { padding: 6px 13px; border-radius: 7px; font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; transition: background 0.15s, transform 0.1s; background: rgba(255,255,255,0.08); color: #f5f5f7; border: 1px solid rgba(255,255,255,0.1); }
.sb-fix-btn:hover { background: rgba(255,255,255,0.14); }
.sb-fix-btn:active { transform: translateY(0.5px); }
.sb-fix-btn-pri { background: linear-gradient(180deg, #0a84ff 0%, #0866cc 100%); color: #fff; border-color: transparent; box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 2px 6px rgba(10,132,255,0.4); }
.sb-fix-btn-pri:hover { background: linear-gradient(180deg, #1c8eff 0%, #0a73e0 100%); }
.sb-fix-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.sb-fix-card { padding: 14px 14px 12px; background: #2c2c2e; border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset; }
.sb-fix-card-label { font-size: 11px; color: #98989f; font-weight: 500; }
.sb-fix-card strong { font-size: 22px; font-weight: 700; color: #f5f5f7; letter-spacing: -0.02em; }
.sb-fix-card-delta { font-size: 10.5px; color: #30d158; font-weight: 600; }
.sb-fix-card-flat { color: #98989f; }
.sb-fix-chart { padding: 14px 14px 8px; background: #2c2c2e; border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; }
.sb-fix-chart header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sb-fix-chart strong { font-size: 12.5px; font-weight: 600; color: #f5f5f7; }
.sb-fix-chart header span { font-size: 10.5px; color: #98989f; }
.sb-fix-chart svg { width: 100%; height: 70px; display: block; }
@media (max-width: 720px) {
.sb-fix { grid-template-columns: 1fr; }
.sb-fix-side { position: static; min-height: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sb-fix-cards { grid-template-columns: 1fr; }
.sb-fix-head { flex-direction: column; align-items: flex-start; }
}
```
### 02. Collapsible Sidebar
**Type:** Pure CSS
**Description:** Sunset palette — coral fading into magenta and ember orange, with a soft cream content area. Click the toggle to collapse from 240px to 64px. Pure CSS via :has(:checked) on the grid template; labels fade, icons stay glowing.
**HTML:**
```html
▸ Workspace
Slow burn, bright ideas.
Toggle the burger to collapse the sidebar. No JavaScript — :has(:checked) on the
grid template animates the columns; labels fade and the burger morphs into a chevron.
184 Ideas this week
4.2k Followers
```
**CSS:**
```css
.sb-col {
display: grid; grid-template-columns: 240px 1fr;
min-height: 480px;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background: #fff5ee; color: #2a0e2c;
border-radius: 16px; overflow: hidden;
transition: grid-template-columns 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}
.sb-col:has(.sb-col-cb:checked) { grid-template-columns: 64px 1fr; }
.sb-col-cb { position: absolute; width: 1px; height: 1px; opacity: 0; clip: rect(0 0 0 0); }
.sb-col:has(.sb-col-cb:focus-visible) .sb-col-toggle { outline: 2px solid #fff; outline-offset: 2px; }
.sb-col-side {
background:
radial-gradient(120% 60% at 0% 0%, rgba(255,255,255,0.18), transparent 60%),
linear-gradient(160deg, #ff7a4d 0%, #ec1d8c 55%, #6a0a8c 100%);
color: #fff;
padding: 16px 12px; display: flex; flex-direction: column; gap: 14px;
overflow: hidden;
box-shadow: inset -1px 0 0 rgba(255,255,255,0.18);
position: relative;
}
.sb-col-side::before {
content: ''; position: absolute; inset: 0;
background: radial-gradient(80% 60% at 50% 110%, rgba(255,213,128,0.55), transparent 60%);
pointer-events: none;
}
.sb-col-toggle {
position: relative;
display: flex; align-items: center; gap: 10px;
padding: 9px 11px; border-radius: 10px;
background: rgba(255,255,255,0.18);
border: 1px solid rgba(255,255,255,0.3);
color: #fff; cursor: pointer; user-select: none;
backdrop-filter: blur(8px);
transition: background 0.15s;
}
.sb-col-toggle:hover { background: rgba(255,255,255,0.28); }
.sb-col-burger { display: inline-flex; flex-direction: column; gap: 3px; width: 14px; flex-shrink: 0; }
.sb-col-burger i { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.22s, opacity 0.22s; }
.sb-col:has(.sb-col-cb:checked) .sb-col-burger i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.sb-col:has(.sb-col-cb:checked) .sb-col-burger i:nth-child(2) { opacity: 0; }
.sb-col:has(.sb-col-cb:checked) .sb-col-burger i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.sb-col-tlabel { font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; transition: opacity 0.18s; }
.sb-col:has(.sb-col-cb:checked) .sb-col-tlabel { opacity: 0; pointer-events: none; }
.sb-col-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px; text-decoration: none; }
.sb-col-mark { width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; background: linear-gradient(135deg, #ffd580 0%, #ff7a4d 50%, #ec1d8c 100%); box-shadow: 0 0 0 2px rgba(255,255,255,0.3), 0 4px 14px rgba(236,29,140,0.45); }
.sb-col-name { color: #fff; font-size: 14px; font-weight: 800; letter-spacing: -0.01em; line-height: 1; transition: opacity 0.18s; white-space: nowrap; }
.sb-col-name small { display: block; font-size: 9.5px; color: #ffd580; font-weight: 700; letter-spacing: 0.16em; margin-top: 3px; text-transform: uppercase; }
.sb-col:has(.sb-col-cb:checked) .sb-col-name { opacity: 0; pointer-events: none; }
.sb-col-side ul { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sb-col-side a {
display: flex; align-items: center; gap: 12px;
padding: 9px 11px; border-radius: 9px;
font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,0.86); text-decoration: none;
border: 1px solid transparent;
transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.sb-col-side a:hover { background: rgba(255,255,255,0.16); color: #fff; border-color: rgba(255,255,255,0.22); }
.sb-col-side a[aria-current="page"] {
background: rgba(255,255,255,0.95); color: #6a0a8c;
box-shadow: 0 6px 18px rgba(106,10,140,0.3);
}
.sb-col-ico { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }
.sb-col-side a[aria-current="page"] .sb-col-ico { color: #ec1d8c; }
.sb-col-lbl { white-space: nowrap; overflow: hidden; transition: opacity 0.18s; }
.sb-col:has(.sb-col-cb:checked) .sb-col-lbl { opacity: 0; pointer-events: none; }
.sb-col-main {
padding: 32px 36px; overflow: hidden;
display: flex; flex-direction: column; gap: 16px;
background:
radial-gradient(60% 80% at 100% 0%, #ffe4d6 0%, transparent 60%),
radial-gradient(50% 60% at 0% 100%, #fff1d6 0%, transparent 60%),
#fff5ee;
}
.sb-col-eye { font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; color: #ec1d8c; text-transform: uppercase; }
.sb-col-main h2 {
margin: 0; font-size: clamp(32px, 5vw, 56px); font-weight: 800; line-height: 0.96;
background: linear-gradient(135deg, #ff7a4d 0%, #ec1d8c 60%, #6a0a8c 100%);
-webkit-background-clip: text; background-clip: text; color: transparent;
letter-spacing: -0.03em;
}
.sb-col-main p { margin: 0; font-size: 13.5px; color: #5a3a52; line-height: 1.6; max-width: 460px; }
.sb-col-main code { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #6a0a8c; background: rgba(236,29,140,0.12); padding: 1px 6px; border-radius: 4px; }
.sb-col-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: 12px; margin-top: 6px; }
.sb-col-c { padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid rgba(236,29,140,0.18); box-shadow: 0 6px 18px rgba(236,29,140,0.08); display: flex; flex-direction: column; gap: 4px; }
.sb-col-c strong { font-size: 24px; font-weight: 800; color: #2a0e2c; letter-spacing: -0.02em; line-height: 1; }
.sb-col-c span { font-size: 11px; color: #8c5a78; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) {
.sb-col, .sb-col-tlabel, .sb-col-lbl, .sb-col-burger i, .sb-col-name { transition: none; }
}
@media (max-width: 720px) {
.sb-col, .sb-col:has(.sb-col-cb:checked) { grid-template-columns: 64px 1fr; }
.sb-col-cards { grid-template-columns: 1fr; }
}
```
### 03. Off-canvas Drawer
**Type:** Pure CSS
**Description:** Cyberpunk 2099 — pitch black with electric cyan and hot pink, glitching scanlines, monospace HUD type. Tap the burger to slide the drawer in; the backdrop blurs and dims the page. :has(:checked) drives the transform; clicking the backdrop closes.
**HTML:**
```html
```
**CSS:**
```css
.sb-off {
position: relative; min-height: 480px;
font-family: 'Helvetica Neue', system-ui, sans-serif;
background: #050008; color: #d6f7ff;
border-radius: 14px; overflow: hidden;
display: flex; flex-direction: column;
isolation: isolate;
}
.sb-off::before {
content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
background:
radial-gradient(50% 40% at 80% 20%, rgba(0,229,255,0.18), transparent 70%),
radial-gradient(50% 50% at 20% 90%, rgba(255,0,140,0.18), transparent 70%);
}
.sb-off::after {
content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
background: repeating-linear-gradient(0deg, rgba(0,229,255,0.05) 0 1px, transparent 1px 4px);
mix-blend-mode: overlay;
}
.sb-off-cb { position: absolute; width: 1px; height: 1px; opacity: 0; clip: rect(0 0 0 0); }
.sb-off:has(.sb-off-cb:focus-visible) .sb-off-burger { outline: 2px solid #00e5ff; outline-offset: 2px; }
.sb-off-bar {
position: relative; z-index: 2;
display: flex; align-items: center; gap: 12px;
padding: 14px 16px;
background: rgba(0,0,0,0.6);
border-bottom: 1px solid rgba(0,229,255,0.4);
box-shadow: 0 0 24px rgba(0,229,255,0.15);
}
.sb-off-burger {
width: 36px; height: 36px;
display: inline-flex; align-items: center; justify-content: center;
background: transparent; color: #00e5ff;
border: 1px solid rgba(0,229,255,0.5);
border-radius: 4px;
cursor: pointer;
box-shadow: inset 0 0 12px rgba(0,229,255,0.2), 0 0 12px rgba(0,229,255,0.25);
transition: background 0.15s, box-shadow 0.15s;
}
.sb-off-burger:hover { background: rgba(0,229,255,0.1); box-shadow: inset 0 0 18px rgba(0,229,255,0.3), 0 0 18px rgba(0,229,255,0.45); }
.sb-off-burger-i { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; }
.sb-off-burger-i i { display: block; height: 2px; background: #00e5ff; box-shadow: 0 0 6px #00e5ff; }
.sb-off-title { font-family: 'Courier New', monospace; font-weight: 800; font-size: 14px; letter-spacing: 0.16em; color: #fff; }
.sb-off-title small { font-size: 9.5px; color: #ff0090; letter-spacing: 0.2em; margin-left: 4px; text-shadow: 0 0 8px rgba(255,0,144,0.7); }
.sb-off-status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-family: 'Courier New', monospace; font-size: 10.5px; letter-spacing: 0.16em; color: #00ff9c; padding: 4px 10px; border: 1px solid rgba(0,255,156,0.4); border-radius: 12px; }
.sb-off-blink { width: 6px; height: 6px; border-radius: 50%; background: #00ff9c; box-shadow: 0 0 8px #00ff9c; animation: sb-off-blink 1.4s ease-in-out infinite; }
@keyframes sb-off-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .sb-off-blink { animation: none; } }
.sb-off-main { position: relative; z-index: 2; flex: 1; padding: 30px 32px; display: flex; flex-direction: column; gap: 18px; }
.sb-off-eye { font-family: 'Courier New', monospace; font-size: 11.5px; letter-spacing: 0.2em; color: #00e5ff; text-shadow: 0 0 8px rgba(0,229,255,0.6); }
.sb-off-main h2 {
margin: 0; font-size: clamp(34px, 5vw, 60px); font-weight: 900; line-height: 0.92;
color: #fff; letter-spacing: -0.03em;
text-shadow: -2px 0 0 rgba(255,0,144,0.7), 2px 0 0 rgba(0,229,255,0.7), 0 0 30px rgba(255,255,255,0.4);
}
.sb-off-main p { margin: 0; font-size: 13.5px; color: rgba(214,247,255,0.85); line-height: 1.6; max-width: 460px; }
.sb-off-main code { font-family: 'Courier New', monospace; font-size: 12px; color: #ff0090; background: rgba(255,0,144,0.1); padding: 1px 6px; border-radius: 3px; border: 1px solid rgba(255,0,144,0.4); }
.sb-off-stat { display: flex; gap: 14px; margin-top: auto; font-family: 'Courier New', monospace; }
.sb-off-stat span { padding: 8px 14px; border: 1px solid rgba(0,229,255,0.4); border-radius: 4px; background: rgba(0,229,255,0.06); display: flex; flex-direction: column; gap: 2px; min-width: 70px; }
.sb-off-stat em { font-style: normal; font-size: 9.5px; color: #00e5ff; letter-spacing: 0.18em; }
.sb-off-stat b { font-size: 16px; font-weight: 800; color: #fff; letter-spacing: 0.04em; }
.sb-off-backdrop {
position: absolute; inset: 0; cursor: pointer;
background: rgba(5,0,8,0.7);
backdrop-filter: blur(8px) saturate(0.6);
-webkit-backdrop-filter: blur(8px) saturate(0.6);
opacity: 0; pointer-events: none; transition: opacity 0.24s ease;
z-index: 3;
}
.sb-off:has(.sb-off-cb:checked) .sb-off-backdrop { opacity: 1; pointer-events: auto; }
.sb-off-drawer {
position: absolute; left: 0; top: 0; bottom: 0; width: 280px;
background: linear-gradient(180deg, rgba(8,0,16,0.95) 0%, rgba(20,0,32,0.95) 100%);
border-right: 2px solid #00e5ff;
box-shadow: 4px 0 32px rgba(0,229,255,0.4), inset -1px 0 0 rgba(255,0,144,0.5);
transform: translateX(-100%); transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
z-index: 4;
padding: 18px 14px; display: flex; flex-direction: column; gap: 12px;
}
.sb-off:has(.sb-off-cb:checked) .sb-off-drawer { transform: translateX(0); }
.sb-off-drawer header { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; border-bottom: 1px dashed rgba(0,229,255,0.4); font-family: 'Courier New', monospace; }
.sb-off-drawer header strong { font-size: 12px; color: #00e5ff; font-weight: 800; letter-spacing: 0.16em; text-shadow: 0 0 8px rgba(0,229,255,0.6); }
.sb-off-close { font-family: 'Courier New', monospace; font-size: 12px; font-weight: 800; color: #ff0090; cursor: pointer; padding: 2px 8px; user-select: none; letter-spacing: 0.1em; transition: text-shadow 0.15s; }
.sb-off-close:hover { text-shadow: 0 0 8px #ff0090; }
.sb-off-drawer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sb-off-drawer a {
display: flex; align-items: center; gap: 12px;
padding: 10px 12px; border-radius: 4px;
font-family: 'Courier New', monospace; font-size: 13.5px; font-weight: 700;
letter-spacing: 0.06em;
color: #d6f7ff; text-decoration: none;
border-left: 3px solid transparent;
transition: background 0.16s, color 0.16s, border-color 0.16s, text-shadow 0.16s;
}
.sb-off-drawer a:hover { background: rgba(0,229,255,0.08); border-left-color: #00e5ff; color: #fff; text-shadow: 0 0 8px rgba(0,229,255,0.7); }
.sb-off-drawer a[aria-current="page"] { background: rgba(255,0,144,0.12); border-left-color: #ff0090; color: #fff; text-shadow: 0 0 10px rgba(255,0,144,0.7); }
.sb-off-drawer a em { font-style: normal; font-size: 11px; color: #ff0090; font-weight: 800; opacity: 0.7; }
.sb-off-drawer a[aria-current="page"] em { color: #ffd700; opacity: 1; text-shadow: 0 0 8px #ffd700; }
.sb-off-drawer footer { margin-top: auto; padding-top: 12px; border-top: 1px dashed rgba(0,229,255,0.3); font-family: 'Courier New', monospace; font-size: 10.5px; color: rgba(0,229,255,0.7); letter-spacing: 0.16em; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
.sb-off-drawer, .sb-off-backdrop { transition: none; }
}
```
### 04. Right-aligned Sidebar
**Type:** Pure CSS
**Description:** Bauhaus poster — cream canvas, cobalt-blue right rail, primary-red and lemon shapes composing into a designer's inspector pane. Sidebar on the right via 1fr 260px. Real <dl> with <dt>/<dd> for the property pairs.
**HTML:**
```html
No. 47 · 1923
Form followsfunction.
The sidebar sits on the right — design-tool convention (Figma, Sketch). Layout is just
1fr 260px; native <dl> exposes property pairs to assistive
tech.
Properties
Width
320 px
Height
180 px
Fill
#1840d2
Stroke
2 px solid
Radius
0 px
Opacity
100 %
Apply →
```
**CSS:**
```css
.sb-rt {
display: grid; grid-template-columns: 1fr 260px;
min-height: 480px;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background: #f4ecdb;
color: #1a1a1a;
border-radius: 0;
overflow: hidden;
border: 4px solid #1a1a1a;
}
.sb-rt-main { position: relative; padding: 36px 40px; display: flex; flex-direction: column; gap: 18px; }
.sb-rt-main::before {
content: ''; position: absolute; top: 24px; right: 24px;
width: 14px; height: 14px; border-radius: 50%; background: #c43a2c;
}
.sb-rt-eye { font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 800; letter-spacing: 0.16em; color: #c43a2c; text-transform: uppercase; }
.sb-rt-main h2 {
margin: 0; font-size: clamp(34px, 5vw, 60px); font-weight: 900; line-height: 0.92;
color: #1a1a1a; letter-spacing: -0.03em;
}
.sb-rt-main h2 em { font-style: italic; color: #1840d2; font-weight: 800; }
.sb-rt-main p { margin: 0; font-size: 13.5px; color: #3d3d3d; line-height: 1.65; max-width: 460px; font-weight: 500; }
.sb-rt-main code { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: #1840d2; background: rgba(24,64,210,0.1); padding: 1px 6px; border-radius: 0; font-weight: 700; }
.sb-rt-canvas {
position: relative;
flex: 1; min-height: 200px;
border: 3px solid #1a1a1a;
background: #fdf5e2;
margin-top: 4px;
overflow: hidden;
}
.sb-rt-circ {
position: absolute; top: 22%; left: 12%;
width: 90px; height: 90px; border-radius: 50%;
background: #c43a2c;
border: 3px solid #1a1a1a;
}
.sb-rt-sq {
position: absolute; bottom: 14%; left: 32%;
width: 80px; height: 80px;
background: #1840d2;
border: 3px solid #1a1a1a;
}
.sb-rt-tri {
position: absolute; top: 18%; right: 14%;
width: 0; height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 86px solid #ffd400;
filter: drop-shadow(0 0 0 #1a1a1a);
}
.sb-rt-tri::after {
content: ''; position: absolute; left: -50px; top: 0;
width: 0; height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 86px solid #1a1a1a;
z-index: -1;
transform: scale(1.06);
transform-origin: bottom;
}
.sb-rt-side {
position: relative;
background: #1840d2; color: #f4ecdb;
border-left: 4px solid #1a1a1a;
padding: 24px 22px;
display: flex; flex-direction: column; gap: 16px;
}
.sb-rt-rule { display: block; height: 4px; width: 60%; background: #ffd400; margin-bottom: 4px; }
.sb-rt-side h3 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -0.02em; color: #fff; }
.sb-rt-side dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 12.5px; padding-top: 8px; border-top: 2px solid rgba(244,236,219,0.4); }
.sb-rt-side dt { color: #ffd400; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 10.5px; align-self: center; }
.sb-rt-side dd { margin: 0; color: #f4ecdb; display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.sb-rt-sw { width: 14px; height: 14px; background: #1840d2; border: 2px solid #f4ecdb; flex-shrink: 0; }
.sb-rt-cta {
margin-top: auto;
padding: 12px 16px;
background: #ffd400; color: #1a1a1a;
border: 3px solid #1a1a1a;
font: inherit; font-size: 13px; font-weight: 900; letter-spacing: 0.04em;
cursor: pointer;
box-shadow: 4px 4px 0 #1a1a1a;
transition: transform 0.1s, box-shadow 0.1s;
}
.sb-rt-cta:hover { background: #ffe44a; }
.sb-rt-cta:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #1a1a1a; }
@media (max-width: 720px) {
.sb-rt { grid-template-columns: 1fr; }
.sb-rt-side { border-left: 0; border-top: 4px solid #1a1a1a; }
}
```
### 05. Two-pane Mail
**Type:** Pure CSS
**Description:** Editorial newspaper — off-white paper, ink-black serif headlines, spot-red active state. Three-column shell — folder sidebar, message list, reading pane. CSS grid with three columns, each scrolling independently. The mail client a print designer would lay out.
**HTML:**
```html
The Inbox
Vol. XII · No. 47
Anya Petrova
Re: Q3 launch deck
Looks great — one tweak on slide 14.
9:14
Daichi Sato
Friday demo recap
Here's the recording + the action items we…
11:42
Lena Müller
Invoice #2143
Attached, due in 30 days.
13:08
Carlos Reyes
Coffee Thursday?
I'll be near the office around 11.
14:30
H ey team — here's the recording from today plus the four
action items we landed on. I'll send a separate Loom for the dashboard rewrite tomorrow.
A short follow-up on Anya's slide-14 tweak: I think we can land that before the demo on
Tuesday.
```
**CSS:**
```css
.sb-mail {
display: grid; grid-template-columns: 200px 260px 1fr;
min-height: 480px;
font-family: 'Georgia', 'Times New Roman', serif;
background: #f4f0e6; color: #1a1a1a;
border-radius: 4px; overflow: hidden;
border: 1px solid #1a1a1a;
}
.sb-mail-folders {
padding: 18px 14px;
background: #efe9da;
border-right: 1px solid #1a1a1a;
display: flex; flex-direction: column; gap: 14px;
}
.sb-mail-folders header { padding-bottom: 12px; border-bottom: 2px solid #1a1a1a; }
.sb-mail-folders strong { display: block; font-family: 'Playfair Display', 'Georgia', serif; font-size: 19px; font-weight: 900; letter-spacing: -0.01em; color: #1a1a1a; line-height: 1; }
.sb-mail-folders small { display: block; font-family: 'Inter', sans-serif; font-size: 9.5px; font-weight: 600; letter-spacing: 0.18em; color: #c43a2c; text-transform: uppercase; margin-top: 4px; }
.sb-mail-folders ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sb-mail-folders a {
display: flex; align-items: center; justify-content: space-between;
padding: 8px 4px; border-bottom: 1px dotted #c0b6a0;
font-family: 'Georgia', serif;
font-size: 13.5px; color: #1a1a1a; text-decoration: none;
transition: color 0.12s, padding-left 0.12s;
}
.sb-mail-folders a:hover { padding-left: 8px; color: #c43a2c; }
.sb-mail-folders a[aria-current="page"] { color: #c43a2c; font-weight: 700; padding-left: 8px; border-bottom-color: #c43a2c; }
.sb-mail-folders a span { font-family: 'Inter', sans-serif; font-size: 10.5px; padding: 1px 7px; border-radius: 0; background: #c43a2c; color: #fff; font-weight: 700; letter-spacing: 0.04em; }
.sb-mail-folders a span.sb-mail-muted { background: transparent; color: #6a6055; border: 1px solid #6a6055; }
.sb-mail-folders footer { margin-top: auto; padding-top: 10px; border-top: 1px solid #1a1a1a; font-family: 'Inter', sans-serif; font-size: 10.5px; color: #6a6055; letter-spacing: 0.06em; text-align: center; font-style: italic; }
.sb-mail-bullet { color: #c43a2c; }
.sb-mail-list { background: #fdf9ec; border-right: 1px solid #1a1a1a; display: flex; flex-direction: column; overflow-y: auto; }
.sb-mail-list-head { padding: 14px 16px 10px; border-bottom: 1px solid #c0b6a0; display: flex; align-items: baseline; justify-content: space-between; }
.sb-mail-list-head h3 { margin: 0; font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: #6a6055; }
.sb-mail-list-head span { font-family: 'Inter', sans-serif; font-size: 10px; color: #c43a2c; font-weight: 700; }
.sb-mail-item { position: relative; padding: 14px 18px 14px 16px; border-bottom: 1px solid #e0d8c4; cursor: pointer; transition: background 0.12s; }
.sb-mail-item:hover { background: rgba(196,58,44,0.04); }
.sb-mail-item.active { background: #fff; padding-left: 22px; }
.sb-mail-item.active::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; background: #c43a2c; }
.sb-mail-item strong { display: block; font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: #1a1a1a; text-transform: uppercase; }
.sb-mail-item em { display: block; font-family: 'Playfair Display', 'Georgia', serif; font-size: 15px; font-style: italic; color: #1a1a1a; margin-top: 2px; line-height: 1.2; }
.sb-mail-item span { display: block; font-family: 'Georgia', serif; font-size: 12.5px; color: #4a4035; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }
.sb-mail-item time { position: absolute; top: 14px; right: 18px; font-family: 'Inter', sans-serif; font-size: 10.5px; color: #6a6055; font-weight: 600; }
.sb-mail-read { padding: 28px 32px; overflow-y: auto; background: #fdf9ec; }
.sb-mail-read header { padding-bottom: 14px; border-bottom: 2px solid #1a1a1a; margin-bottom: 18px; }
.sb-mail-rule { display: inline-block; width: 32px; height: 3px; background: #c43a2c; margin-bottom: 10px; }
.sb-mail-cat { display: block; font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 800; letter-spacing: 0.22em; color: #c43a2c; margin-bottom: 6px; }
.sb-mail-read h2 { margin: 0 0 8px; font-family: 'Playfair Display', 'Georgia', serif; font-size: clamp(28px, 4vw, 44px); font-weight: 900; color: #1a1a1a; line-height: 0.96; letter-spacing: -0.02em; }
.sb-mail-read header p { margin: 0; font-family: 'Inter', sans-serif; font-size: 11.5px; color: #6a6055; letter-spacing: 0.04em; }
.sb-mail-read header p strong { color: #1a1a1a; font-weight: 700; }
.sb-mail-body { margin: 0 0 12px; font-size: 14.5px; color: #2a241c; line-height: 1.7; max-width: 540px; }
.sb-mail-lead { font-size: 16px; }
.sb-mail-drop { float: left; font-family: 'Playfair Display', 'Georgia', serif; font-size: 56px; font-weight: 900; line-height: 0.85; padding: 4px 8px 0 0; color: #c43a2c; }
@media (max-width: 720px) {
.sb-mail { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
.sb-mail-folders, .sb-mail-list { border-right: 0; border-bottom: 1px solid #1a1a1a; }
}
```
### 06. Dual Sidebar
**Type:** Pure CSS
**Description:** Scandinavian docs — warm beige paper, forest-green section nav, clay-red "active" pill, soft greys for the TOC. Three-column shell (left section nav, centre article, right rail of in-page anchors). Both sidebars sticky; centre flows. Like reading a Hay catalogue.
**HTML:**
```html
Getting started
Concepts
Recipes
v3.4 · Feb 2026
Quick start.
Install the package and ship your first page in under five minutes. The CLI scaffolds a new
project; the dev server starts on port 4321.
Installation
Run npm create birch@latest. The interactive CLI asks for your project name and
template choice.
Run the dev server
Start the dev server with npm run dev. Hot-reload is enabled by default — edits
to any file refresh the browser instantly.
Build for production with npm run build; the output is a static
dist/ ready for any host.
On this page
Edit on GitHub →
```
**CSS:**
```css
.sb-dual {
display: grid; grid-template-columns: 220px 1fr 200px;
min-height: 480px;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background: #f4ede0;
color: #1f3327;
border-radius: 6px; overflow: hidden;
}
.sb-dual-nav, .sb-dual-toc {
position: sticky; top: 0; align-self: start;
min-height: 480px; padding: 22px 18px;
background: #ece2cf;
border-right: 1px solid #c8b896;
display: flex; flex-direction: column; gap: 14px;
}
.sb-dual-nav header { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 2px solid #c8b896; margin-bottom: 4px; }
.sb-dual-mark { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: #2f5d40; box-shadow: inset 0 0 0 3px #ece2cf, 0 0 0 1px #2f5d40; }
.sb-dual-name { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; color: #1f3327; line-height: 1; }
.sb-dual-name small { display: block; font-size: 9.5px; color: #8a6f4a; font-weight: 700; letter-spacing: 0.18em; margin-top: 4px; text-transform: uppercase; }
.sb-dual-toc { border-right: 0; border-left: 1px solid #c8b896; background: #f4ede0; }
.sb-dual-nav h3, .sb-dual-toc h3 {
margin: 12px 0 6px; font-size: 10.5px; font-weight: 800;
letter-spacing: 0.18em; text-transform: uppercase; color: #8a6f4a;
}
.sb-dual-nav h3:first-of-type, .sb-dual-toc h3:first-of-type { margin-top: 0; }
.sb-dual-nav ul, .sb-dual-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.sb-dual-nav a, .sb-dual-toc a {
display: block;
padding: 7px 10px;
font-size: 13px; color: #4a5d52; text-decoration: none;
border-left: 2px solid transparent;
transition: color 0.14s, border-color 0.14s, background 0.14s;
}
.sb-dual-nav a:hover, .sb-dual-toc a:hover { color: #1f3327; border-left-color: #c8b896; background: rgba(0,0,0,0.03); }
.sb-dual-nav a[aria-current="page"] {
color: #fff; font-weight: 700;
background: #c45a3e;
border-radius: 4px;
border-left-color: transparent;
padding-left: 10px;
}
.sb-dual-toc a[aria-current="true"] { color: #2f5d40; font-weight: 700; border-left-color: #2f5d40; }
.sb-dual-edit { margin: auto 0 0; padding-top: 12px; border-top: 1px solid #c8b896; font-size: 11px; color: #8a6f4a; font-style: italic; }
.sb-dual-main { padding: 32px 36px; max-width: 100%; overflow-x: hidden; background: #faf5ea; }
.sb-dual-eye { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; color: #c45a3e; text-transform: uppercase; }
.sb-dual-main h2 { margin: 6px 0 10px; font-size: clamp(32px, 4.5vw, 52px); font-weight: 900; color: #1f3327; letter-spacing: -0.03em; line-height: 1; }
.sb-dual-main h2 { margin: 22px 0 8px; font-size: 18px; font-weight: 800; color: #2f5d40; letter-spacing: -0.01em; }
.sb-dual-lead { font-size: 16px; line-height: 1.6; color: #2a3d31; max-width: 540px; margin-bottom: 4px; }
.sb-dual-main p { margin: 0 0 10px; font-size: 13.5px; color: #2a3d31; line-height: 1.7; max-width: 560px; }
.sb-dual-main code { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: #c45a3e; background: rgba(196,90,62,0.08); padding: 1px 6px; border-radius: 3px; font-weight: 600; }
@media (max-width: 720px) {
.sb-dual { grid-template-columns: 1fr; }
.sb-dual-nav, .sb-dual-toc { position: static; min-height: auto; border: 0; border-bottom: 1px solid #c8b896; }
}
```
### 07. Mini Icon Rail
**Type:** Pure CSS
**Description:** Tokyo neon arcade — deep midnight rail with electric-yellow + magenta glows that pulse on hover. Hover or focus a link to expand the rail from 64px to 240px and reveal the labels. Pure CSS via width transition; aria-label carries meaning when collapsed.
**HTML:**
```html
▸ NOW PLAYING · LEVEL 47
Hover the rail →
Hover or focus to expand the rail. Each icon glows in its own neon colour — magenta, yellow,
cyan, lime — like a Shibuya arcade marquee at midnight.
#tokyo #midnight #arcade #neon
```
**CSS:**
```css
.sb-mini {
position: relative;
display: grid; grid-template-columns: 64px 1fr;
min-height: 480px;
font-family: 'Helvetica Neue', system-ui, -apple-system, sans-serif;
background: #0a0014; color: #f7f4ff;
border-radius: 14px; overflow: hidden;
isolation: isolate;
}
.sb-mini-grid {
position: absolute; inset: 0;
background:
linear-gradient(rgba(255,0,228,0.12) 1px, transparent 1px) 0 0 / 100% 28px,
linear-gradient(90deg, rgba(0,229,255,0.1) 1px, transparent 1px) 0 0 / 28px 100%,
radial-gradient(60% 40% at 80% 20%, rgba(255,0,228,0.22), transparent 70%),
radial-gradient(60% 40% at 20% 80%, rgba(0,229,255,0.22), transparent 70%),
#0a0014;
z-index: 0;
}
.sb-mini-rail {
position: relative; z-index: 2;
background: linear-gradient(180deg, rgba(20,5,40,0.92) 0%, rgba(8,0,20,0.96) 100%);
border-right: 1px solid rgba(255,0,228,0.4);
box-shadow: 1px 0 24px rgba(255,0,228,0.25), inset -1px 0 0 rgba(255,0,228,0.5);
padding: 14px 0; display: flex; flex-direction: column; gap: 12px;
width: 64px; overflow: hidden;
transition: width 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.sb-mini-rail:hover, .sb-mini-rail:focus-within { width: 240px; }
.sb-mini-brand {
display: flex; align-items: center; gap: 12px;
padding: 0 12px; height: 40px;
text-decoration: none; flex-shrink: 0;
white-space: nowrap;
}
.sb-mini-mark {
width: 40px; height: 40px; flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
border-radius: 8px;
background: linear-gradient(135deg, #ff00e4 0%, #ffd400 100%);
color: #0a0014; font-family: 'Courier New', monospace; font-size: 18px; font-weight: 900;
box-shadow: 0 0 0 1px rgba(255,212,0,0.5), 0 0 20px rgba(255,0,228,0.6);
}
.sb-mini-brand-name { font-family: 'Courier New', monospace; font-size: 16px; font-weight: 800; letter-spacing: 0.08em; color: #ffd400; text-shadow: 0 0 8px rgba(255,212,0,0.6); }
.sb-mini-brand-name small { display: block; font-size: 9px; letter-spacing: 0.4em; color: #ff00e4; margin-top: -2px; font-weight: 600; }
.sb-mini-rail ul { list-style: none; margin: 0; padding: 4px 8px; display: flex; flex-direction: column; gap: 4px; }
.sb-mini-rail a {
position: relative;
display: flex; align-items: center; gap: 14px;
padding: 10px 12px; border-radius: 8px;
font-family: 'Courier New', monospace; font-size: 13px; font-weight: 700;
letter-spacing: 0.08em; color: #d4c5e8; text-decoration: none;
white-space: nowrap; overflow: hidden;
border: 1px solid transparent;
transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.sb-mini-rail a:hover, .sb-mini-rail a:focus-visible {
background: rgba(255,0,228,0.1);
border-color: rgba(255,0,228,0.45);
color: #fff;
box-shadow: 0 0 16px rgba(255,0,228,0.35), inset 0 0 16px rgba(255,0,228,0.1);
}
.sb-mini-rail a[aria-current="page"] {
background: linear-gradient(90deg, rgba(255,212,0,0.18), rgba(255,0,228,0.18));
border-color: #ffd400;
color: #fff;
box-shadow: 0 0 24px rgba(255,212,0,0.45), inset 0 0 12px rgba(255,212,0,0.15);
}
.sb-mini-rail a[aria-current="page"]::after {
content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px;
background: #ffd400; border-radius: 0 3px 3px 0;
box-shadow: 0 0 12px #ffd400, 0 0 24px rgba(255,212,0,0.6);
}
.sb-mini-ico { width: 20px; flex-shrink: 0; text-align: center; font-size: 14px; }
.sb-mini-rail li:nth-child(1) .sb-mini-ico { color: #ffd400; text-shadow: 0 0 8px #ffd400; }
.sb-mini-rail li:nth-child(2) .sb-mini-ico { color: #00e5ff; text-shadow: 0 0 8px #00e5ff; }
.sb-mini-rail li:nth-child(3) .sb-mini-ico { color: #ff00e4; text-shadow: 0 0 8px #ff00e4; }
.sb-mini-rail li:nth-child(4) .sb-mini-ico { color: #c2ff00; text-shadow: 0 0 8px #c2ff00; }
.sb-mini-rail li:nth-child(5) .sb-mini-ico { color: #ff8a00; text-shadow: 0 0 8px #ff8a00; }
.sb-mini-rail li:nth-child(6) .sb-mini-ico { color: #00ffa3; text-shadow: 0 0 8px #00ffa3; }
.sb-mini-lbl { opacity: 0; transition: opacity 0.22s ease; }
.sb-mini-rail:hover .sb-mini-lbl, .sb-mini-rail:focus-within .sb-mini-lbl { opacity: 1; }
.sb-mini-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid rgba(255,0,228,0.25); white-space: nowrap; overflow: hidden; }
.sb-mini-pulse { width: 8px; height: 8px; border-radius: 50%; background: #c2ff00; flex-shrink: 0; box-shadow: 0 0 10px #c2ff00, 0 0 20px rgba(194,255,0,0.5); animation: sb-mini-pulse 1.4s ease-in-out infinite; }
@keyframes sb-mini-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }
.sb-mini-foot-lbl { font-family: 'Courier New', monospace; font-size: 11px; color: #c2ff00; letter-spacing: 0.06em; opacity: 0; transition: opacity 0.22s ease; }
.sb-mini-rail:hover .sb-mini-foot-lbl, .sb-mini-rail:focus-within .sb-mini-foot-lbl { opacity: 1; }
.sb-mini-main { position: relative; z-index: 1; padding: 30px 32px; display: flex; flex-direction: column; gap: 14px; }
.sb-mini-eye { font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: 0.18em; color: #c2ff00; text-shadow: 0 0 8px rgba(194,255,0,0.5); }
.sb-mini-main h2 {
margin: 0; font-size: clamp(28px, 5vw, 56px); font-weight: 900; line-height: 0.95;
background: linear-gradient(135deg, #ffd400 0%, #ff00e4 50%, #00e5ff 100%);
-webkit-background-clip: text; background-clip: text;
color: transparent;
letter-spacing: -0.03em;
filter: drop-shadow(0 0 20px rgba(255,0,228,0.4));
}
.sb-mini-main p { margin: 0; font-size: 13px; color: #d4c5e8; line-height: 1.6; max-width: 440px; }
.sb-mini-main code { font-family: 'Courier New', monospace; font-size: 12px; color: #ffd400; background: rgba(255,212,0,0.1); padding: 1px 5px; border-radius: 3px; border: 1px solid rgba(255,212,0,0.25); }
.sb-mini-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.sb-mini-tags span { font-family: 'Courier New', monospace; font-size: 10.5px; padding: 4px 10px; border-radius: 11px; border: 1px solid rgba(0,229,255,0.4); color: #00e5ff; background: rgba(0,229,255,0.06); letter-spacing: 0.06em; }
@media (prefers-reduced-motion: reduce) {
.sb-mini-rail, .sb-mini-lbl, .sb-mini-foot-lbl, .sb-mini-pulse { transition: none; animation: none; }
}
```
### 08. Sticky Filter Sidebar
**Type:** Pure CSS
**Description:** Luxury e-commerce — cream paper, brass-gold accents, chocolate copy. The kind of filter rail you'd find at Aesop or Hermès. Native <details> for collapsible groups gives keyboard support and aria-expanded for free; accent-color tints the checkboxes.
**HTML:**
```html
```
**CSS:**
```css
.sb-stk {
display: grid; grid-template-columns: 240px 1fr;
min-height: 480px;
font-family: 'Cormorant Garamond', 'Georgia', serif;
background: #f6efe1;
color: #3c2818;
border-radius: 0;
overflow: hidden;
accent-color: #b8924a;
border: 1px solid #b8924a;
}
.sb-stk-side {
position: sticky; top: 0; align-self: start;
min-height: 480px; padding: 22px 18px;
background: #ede2cb;
border-right: 1px solid #b8924a;
font-size: 13px;
}
.sb-stk-side header { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid #b8924a; margin-bottom: 12px; }
.sb-stk-tag { font-family: 'Inter', sans-serif; font-size: 9.5px; font-weight: 800; letter-spacing: 0.22em; color: #b8924a; text-transform: uppercase; align-self: end; }
.sb-stk-side h3 { grid-column: 1 / -1; margin: 0; font-size: 26px; font-weight: 500; font-style: italic; color: #3c2818; letter-spacing: -0.01em; line-height: 1; }
.sb-stk-clear { font-family: 'Inter', sans-serif; font-size: 10.5px; font-style: italic; color: #b8924a; cursor: pointer; align-self: end; text-decoration: underline; text-underline-offset: 3px; }
.sb-stk-side details { padding: 12px 0; border-bottom: 1px solid #d4c39c; }
.sb-stk-side details:last-of-type { border-bottom: 0; }
.sb-stk-side summary { cursor: pointer; padding: 4px 0; font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #3c2818; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.sb-stk-side summary::-webkit-details-marker { display: none; }
.sb-stk-side summary em { font-family: 'Cormorant Garamond', serif; font-size: 12px; font-style: italic; font-weight: 500; color: #b8924a; letter-spacing: 0; text-transform: none; }
.sb-stk-side summary::after { content: '+'; font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 400; color: #b8924a; margin-left: 8px; transition: transform 0.2s; }
.sb-stk-side details[open] summary::after { content: '−'; }
.sb-stk-side ul { list-style: none; margin: 10px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sb-stk-side label { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; color: #5a4030; cursor: pointer; font-family: 'Cormorant Garamond', serif; font-size: 14.5px; font-weight: 500; }
.sb-stk-side label b { font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 600; color: #b8924a; letter-spacing: 0.04em; }
.sb-stk-side input[type="checkbox"] { appearance: none; width: 14px; height: 14px; border: 1px solid #b8924a; background: transparent; cursor: pointer; flex-shrink: 0; transition: background 0.14s; position: relative; }
.sb-stk-side input[type="checkbox"]:checked { background: #b8924a; }
.sb-stk-side input[type="checkbox"]:checked::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #f6efe1; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sb-stk-side input[type="checkbox"]:focus-visible { outline: 2px solid #b8924a; outline-offset: 2px; }
.sb-stk-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; }
.sb-stk-chips label { position: relative; cursor: pointer; display: inline-flex; }
.sb-stk-chips input { position: absolute; width: 1px; height: 1px; opacity: 0; clip: rect(0 0 0 0); }
.sb-stk-chips input:focus-visible + span { outline: 2px solid #b8924a; outline-offset: 2px; }
.sb-stk-chips span {
display: inline-block; padding: 6px 12px;
font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
letter-spacing: 0.06em;
background: transparent; color: #3c2818;
border: 1px solid #b8924a;
transition: background 0.14s, color 0.14s;
}
.sb-stk-chips input:checked + span { background: #3c2818; color: #f6efe1; border-color: #3c2818; }
.sb-stk-main { padding: 32px 36px; background: #faf3e3; }
.sb-stk-mhead { padding-bottom: 16px; border-bottom: 1px solid #d4c39c; margin-bottom: 22px; }
.sb-stk-eye { font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 800; letter-spacing: 0.22em; color: #b8924a; text-transform: uppercase; }
.sb-stk-main h2 { margin: 4px 0 6px; font-size: clamp(36px, 5vw, 56px); font-weight: 500; color: #3c2818; letter-spacing: -0.02em; line-height: 1; font-style: italic; }
.sb-stk-main p { margin: 0; font-family: 'Inter', sans-serif; font-size: 11.5px; color: #6a4d35; letter-spacing: 0.04em; }
.sb-stk-main p strong { color: #3c2818; font-weight: 700; }
.sb-stk-main p em { color: #b8924a; font-style: italic; font-weight: 600; }
.sb-stk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sb-stk-tile { position: relative; aspect-ratio: 3/4; background: linear-gradient(160deg, #ede2cb 0%, #d8c8a8 100%); border: 1px solid #d4c39c; }
.sb-stk-tile::after { content: ''; position: absolute; inset: 8px; border: 1px dashed rgba(184,146,74,0.4); }
.sb-stk-num { position: absolute; bottom: 14px; right: 14px; font-family: 'Inter', sans-serif; font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; color: #b8924a; }
@media (max-width: 720px) {
.sb-stk { grid-template-columns: 1fr; }
.sb-stk-side { position: static; min-height: auto; border-right: 0; border-bottom: 1px solid #b8924a; }
.sb-stk-grid { grid-template-columns: repeat(2, 1fr); }
}
```
### 09. Floating Sidebar
**Type:** Pure CSS
**Description:** Art gallery white-cube — pure ivory canvas, hairline rules, oversized serif numerals. The sidebar floats as a museum placard with margin on all four sides; an oversized chocolate-on-ivory accent number frames the active item. The sidebar as printed material.
**HTML:**
```html
— Currently exhibiting
Light, & the Quiet Room.
The sidebar floats inside the canvas with margin on all four sides — light visual weight, lots
of negative space, generous serif type. The effect is gallery placard, not control panel.
Untitled (Cream / Black)
Iva Ström, 2024 · oil on linen
```
**CSS:**
```css
.sb-flt {
display: grid; grid-template-columns: auto 1fr;
min-height: 480px;
font-family: 'Cormorant Garamond', 'Georgia', serif;
background: #fbf9f4; color: #1a1a1a;
border-radius: 0; overflow: hidden;
border: 1px solid #1a1a1a;
}
.sb-flt-side {
margin: 22px 0 22px 22px; padding: 22px 18px; width: 220px;
background: #fff;
border: 1px solid #1a1a1a;
display: flex; flex-direction: column; gap: 18px;
align-self: start; position: sticky; top: 22px;
}
.sb-flt-brand { display: flex; align-items: center; gap: 12px; padding: 0 0 14px; border-bottom: 1px solid #1a1a1a; }
.sb-flt-mark { width: 14px; height: 14px; background: #1a1a1a; flex-shrink: 0; transform: rotate(45deg); }
.sb-flt-brand strong { display: block; font-size: 22px; font-weight: 500; font-style: italic; color: #1a1a1a; line-height: 1; letter-spacing: -0.01em; }
.sb-flt-brand em { display: block; font-family: 'Inter', sans-serif; font-size: 9.5px; font-style: normal; font-weight: 700; letter-spacing: 0.22em; color: #6a4d35; margin-top: 4px; text-transform: uppercase; }
.sb-flt-side ol { list-style: none; margin: 0; padding: 0; counter-reset: flt; display: flex; flex-direction: column; gap: 0; }
.sb-flt-side li { counter-increment: flt; }
.sb-flt-side a {
display: grid; grid-template-columns: 32px 1fr;
align-items: baseline; gap: 12px;
padding: 11px 0;
font-size: 16px; color: #1a1a1a; text-decoration: none;
border-bottom: 1px dotted #d4cabc;
transition: padding-left 0.16s, color 0.16s;
}
.sb-flt-side a::before {
content: counter(flt, decimal-leading-zero);
font-family: 'Inter', sans-serif;
font-size: 9.5px;
font-weight: 700;
letter-spacing: 0.16em;
color: #b8924a;
align-self: center;
}
.sb-flt-side a:hover { padding-left: 4px; color: #6a4d35; }
.sb-flt-side a[aria-current="page"] { font-style: italic; padding-left: 4px; }
.sb-flt-side a[aria-current="page"]::before { color: #1a1a1a; }
.sb-flt-side a[aria-current="page"]::after {
content: '·'; font-family: serif; font-size: 22px; line-height: 0; margin-left: 6px; color: #c45a3e;
}
.sb-flt-side footer { margin-top: auto; padding-top: 12px; border-top: 1px solid #1a1a1a; font-family: 'Inter', sans-serif; font-size: 10.5px; letter-spacing: 0.12em; color: #6a4d35; text-align: center; text-transform: uppercase; }
.sb-flt-main { padding: 32px 36px; display: flex; flex-direction: column; gap: 20px; }
.sb-flt-eye { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.2em; color: #c45a3e; text-transform: uppercase; }
.sb-flt-main h2 { margin: 0; font-size: clamp(36px, 5vw, 64px); font-weight: 500; color: #1a1a1a; letter-spacing: -0.03em; line-height: 0.95; }
.sb-flt-main h2 em { font-style: italic; font-weight: 500; color: #6a4d35; }
.sb-flt-main p { margin: 0; font-family: 'Cormorant Garamond', 'Georgia', serif; font-size: 17px; color: #3c2818; line-height: 1.55; max-width: 540px; }
.sb-flt-figure { margin: 12px 0 0; display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: center; }
.sb-flt-frame { aspect-ratio: 1; background: #f4ede0; border: 1px solid #1a1a1a; position: relative; box-shadow: 8px 8px 0 #1a1a1a; }
.sb-flt-circ { position: absolute; left: 28%; top: 22%; width: 56px; height: 56px; border-radius: 50%; background: #1a1a1a; }
.sb-flt-figure figcaption strong { display: block; font-style: italic; font-size: 18px; font-weight: 500; color: #1a1a1a; }
.sb-flt-figure figcaption span { display: block; font-family: 'Inter', sans-serif; font-size: 11px; color: #6a4d35; letter-spacing: 0.04em; margin-top: 4px; }
@media (max-width: 720px) {
.sb-flt { grid-template-columns: 1fr; }
.sb-flt-side { width: auto; margin: 18px 18px 0; position: static; }
.sb-flt-figure { grid-template-columns: 1fr; }
}
```
### 10. Footer-pinned Sidebar
**Type:** Pure CSS
**Description:** Gaming console — onyx black with carbon-fibre texture, plasma-green accents, monospace HUD type. Nav at the top, a player-profile block pinned to the bottom of the sidebar. Pure CSS via flex column + margin-top: auto on the footer.
**HTML:**
```html
▸ NOW LOADING · ARENA_47
Ready Player One.
The user block at the bottom is pinned with margin-top: auto — it stays put no
matter how many nav items appear above. Plasma green for "online" because nothing else has the
right intensity.
```
**CSS:**
```css
.sb-ftr {
display: grid; grid-template-columns: 240px 1fr;
min-height: 480px;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background: #0a0a0c;
color: #d8e6dc;
border-radius: 4px; overflow: hidden;
border: 1px solid #00ff88;
box-shadow: 0 0 32px rgba(0,255,136,0.15);
}
.sb-ftr-side {
background:
repeating-linear-gradient(45deg, transparent 0 8px, rgba(255,255,255,0.015) 8px 9px),
linear-gradient(180deg, #14181a 0%, #0a0c0d 100%);
border-right: 1px solid rgba(0,255,136,0.3);
padding: 18px 14px;
display: flex; flex-direction: column; gap: 16px;
position: relative;
}
.sb-ftr-side::before {
content: ''; position: absolute; right: -1px; top: 30%; bottom: 30%; width: 2px;
background: #00ff88; box-shadow: 0 0 12px #00ff88;
}
.sb-ftr-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 14px; border-bottom: 1px solid rgba(0,255,136,0.25); }
.sb-ftr-mark { width: 28px; height: 28px; flex-shrink: 0; background: linear-gradient(135deg, #00ff88 0%, #00b870 100%); transform: rotate(45deg); box-shadow: 0 0 16px rgba(0,255,136,0.6), inset 0 0 8px rgba(0,0,0,0.4); }
.sb-ftr-brand strong { font-family: 'Courier New', monospace; font-size: 14px; font-weight: 800; letter-spacing: 0.18em; color: #fff; line-height: 1; }
.sb-ftr-brand strong small { display: block; font-size: 9.5px; color: #00ff88; font-weight: 700; letter-spacing: 0.4em; margin-top: 4px; text-shadow: 0 0 8px rgba(0,255,136,0.5); }
.sb-ftr-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.sb-ftr-side a {
position: relative;
display: flex; align-items: center; gap: 12px;
padding: 10px 12px; border-radius: 4px;
font-family: 'Courier New', monospace; font-size: 13px; font-weight: 700;
letter-spacing: 0.06em; color: #8aa094;
text-decoration: none;
border-left: 2px solid transparent;
transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.sb-ftr-side a:hover { background: rgba(0,255,136,0.08); color: #fff; border-left-color: rgba(0,255,136,0.5); }
.sb-ftr-side a[aria-current="page"] {
background: rgba(0,255,136,0.14); color: #00ff88;
border-left-color: #00ff88;
text-shadow: 0 0 8px rgba(0,255,136,0.5);
box-shadow: inset 0 0 16px rgba(0,255,136,0.08);
}
.sb-ftr-i { font-size: 11px; width: 14px; text-align: center; flex-shrink: 0; }
.sb-ftr-side a em { margin-left: auto; font-size: 9.5px; font-style: normal; padding: 1px 5px; border: 1px solid rgba(138,160,148,0.35); border-radius: 2px; color: #8aa094; }
.sb-ftr-side a[aria-current="page"] em { border-color: rgba(0,255,136,0.5); color: #00ff88; }
.sb-ftr-foot {
margin-top: auto;
display: flex; align-items: center; gap: 12px;
padding: 12px;
background: rgba(0,255,136,0.06);
border: 1px solid rgba(0,255,136,0.25);
border-radius: 4px;
}
.sb-ftr-avatar {
width: 38px; height: 38px; flex-shrink: 0;
background: linear-gradient(135deg,#00ff88,#00b870);
color: #0a0a0c;
display: flex; align-items: center; justify-content: center;
font-family: 'Courier New', monospace; font-size: 13px; font-weight: 900;
letter-spacing: 0.04em;
clip-path: polygon(15% 0, 100% 0, 100% 85%, 85% 100%, 0 100%, 0 15%);
}
.sb-ftr-user { min-width: 0; flex: 1; }
.sb-ftr-user strong { display: block; font-family: 'Courier New', monospace; font-size: 12px; font-weight: 800; color: #fff; letter-spacing: 0.06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-ftr-user span { display: flex; align-items: center; gap: 6px; font-family: 'Courier New', monospace; font-size: 10px; color: #8aa094; letter-spacing: 0.08em; margin-top: 3px; }
.sb-ftr-user span i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #00ff88; box-shadow: 0 0 8px #00ff88; animation: sb-ftr-blink 1.5s ease-in-out infinite; }
@keyframes sb-ftr-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .sb-ftr-user span i { animation: none; } }
.sb-ftr-main { padding: 32px 36px; display: flex; flex-direction: column; gap: 20px; background: linear-gradient(180deg, #0e1212 0%, #0a0a0c 100%); }
.sb-ftr-main::before { content: ''; position: absolute; }
.sb-ftr-eye { font-family: 'Courier New', monospace; font-size: 11px; font-weight: 800; letter-spacing: 0.22em; color: #00ff88; text-shadow: 0 0 8px rgba(0,255,136,0.5); }
.sb-ftr-main h2 { margin: 0; font-family: 'Inter', sans-serif; font-size: clamp(36px, 5vw, 64px); font-weight: 900; line-height: 0.92; letter-spacing: -0.03em; color: #fff; text-shadow: 0 0 30px rgba(0,255,136,0.2); }
.sb-ftr-main p { margin: 0; font-size: 13.5px; color: #b8c4be; line-height: 1.6; max-width: 460px; }
.sb-ftr-main code { font-family: 'Courier New', monospace; font-size: 12px; color: #00ff88; background: rgba(0,255,136,0.1); padding: 1px 6px; border-radius: 2px; border: 1px solid rgba(0,255,136,0.3); }
.sb-ftr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 460px; margin-top: auto; }
.sb-ftr-stat { padding: 14px 16px; background: rgba(0,255,136,0.06); border: 1px solid rgba(0,255,136,0.25); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.sb-ftr-stats b { display: block; font-family: 'Courier New', monospace; font-size: 24px; font-weight: 900; color: #00ff88; letter-spacing: 0.04em; line-height: 1; text-shadow: 0 0 8px rgba(0,255,136,0.4); }
.sb-ftr-stats span { display: block; font-family: 'Courier New', monospace; font-size: 10px; color: #8aa094; letter-spacing: 0.18em; margin-top: 6px; text-transform: uppercase; }
@media (max-width: 720px) {
.sb-ftr { grid-template-columns: 1fr; }
.sb-ftr-side { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sb-ftr-foot { margin-top: 8px; }
}
```
### 11. Push-content Sidebar
**Type:** Pure CSS
**Description:** Mid-century modern — mustard sidebar, walnut content area, teal active pill. Eames-era graphic palette. Toggling the burger pushes the content right instead of overlaying it. Pure CSS via :has(:checked) on the grid template columns.
**HTML:**
```html
```
**CSS:**
```css
.sb-psh {
display: grid; grid-template-columns: 0 1fr;
min-height: 480px;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background: #f5e6c8;
color: #2a1a10;
border-radius: 0; overflow: hidden;
transition: grid-template-columns 0.32s cubic-bezier(0.32, 0.72, 0, 1);
border: 2px solid #2a1a10;
}
.sb-psh:has(.sb-psh-cb:checked) { grid-template-columns: 240px 1fr; }
.sb-psh-cb { position: absolute; width: 1px; height: 1px; opacity: 0; clip: rect(0 0 0 0); }
.sb-psh:has(.sb-psh-cb:focus-visible) .sb-psh-burger { outline: 2px solid #2a1a10; outline-offset: 2px; }
.sb-psh-side {
background: #e8b04a;
border-right: 2px solid #2a1a10;
padding: 22px 18px; overflow: hidden; min-width: 0;
display: flex; flex-direction: column; gap: 16px;
}
.sb-psh-side header { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 2px solid #2a1a10; white-space: nowrap; }
.sb-psh-mark { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: #1c5e6e; box-shadow: 0 0 0 3px #e8b04a, 0 0 0 5px #2a1a10; }
.sb-psh-side header strong { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; color: #2a1a10; }
.sb-psh-side h3 { margin: 0 0 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: #6b3d1c; white-space: nowrap; }
.sb-psh-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sb-psh-side a { display: block; padding: 9px 12px; font-size: 14px; font-weight: 600; color: #2a1a10; text-decoration: none; white-space: nowrap; border-radius: 18px; transition: background 0.14s, color 0.14s; }
.sb-psh-side a:hover { background: rgba(42,26,16,0.1); }
.sb-psh-side a[aria-current="page"] { background: #1c5e6e; color: #f5e6c8; }
.sb-psh-quote { margin: auto 0 0; padding: 12px; background: rgba(28,94,110,0.12); border-left: 3px solid #1c5e6e; font-size: 12px; line-height: 1.5; color: #2a1a10; }
.sb-psh-quote em { font-style: italic; color: #1c5e6e; }
.sb-psh-quote span { display: block; font-size: 10.5px; color: #6b3d1c; font-weight: 700; letter-spacing: 0.04em; margin-top: 6px; font-style: normal; }
.sb-psh-main { display: flex; flex-direction: column; background: #4a3122; color: #f5e6c8; }
.sb-psh-bar {
display: flex; align-items: center; gap: 14px;
padding: 14px 22px;
background: #3a2418;
border-bottom: 2px solid #2a1a10;
}
.sb-psh-burger {
width: 38px; height: 36px;
display: inline-flex; align-items: center; justify-content: center;
background: #e8b04a; color: #2a1a10;
border: 2px solid #2a1a10;
border-radius: 4px;
cursor: pointer;
box-shadow: 3px 3px 0 #2a1a10;
transition: transform 0.12s, box-shadow 0.12s;
}
.sb-psh-burger:hover { background: #f0c266; }
.sb-psh-burger:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #2a1a10; }
.sb-psh-burger span { display: inline-flex; flex-direction: column; gap: 3px; }
.sb-psh-burger i { display: block; width: 16px; height: 2px; background: #2a1a10; transition: transform 0.22s, opacity 0.22s; }
.sb-psh:has(.sb-psh-cb:checked) .sb-psh-burger i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.sb-psh:has(.sb-psh-cb:checked) .sb-psh-burger i:nth-child(2) { opacity: 0; }
.sb-psh:has(.sb-psh-cb:checked) .sb-psh-burger i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.sb-psh-bar strong { font-size: 16px; font-weight: 700; color: #f5e6c8; letter-spacing: -0.01em; }
.sb-psh-pill { margin-left: auto; padding: 5px 12px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: #2a1a10; background: #e8b04a; border-radius: 12px; text-transform: uppercase; }
.sb-psh-body { padding: 32px 36px; display: flex; flex-direction: column; gap: 18px; }
.sb-psh-eye { font-size: 11px; font-weight: 800; letter-spacing: 0.2em; color: #e8b04a; text-transform: uppercase; }
.sb-psh-main h2 { margin: 0; font-size: clamp(36px, 5.5vw, 64px); font-weight: 900; line-height: 0.92; color: #f5e6c8; letter-spacing: -0.03em; }
.sb-psh-main p { margin: 0; font-size: 13.5px; color: rgba(245,230,200,0.85); line-height: 1.65; max-width: 460px; }
.sb-psh-main code { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #e8b04a; background: rgba(232,176,74,0.14); padding: 1px 6px; border-radius: 3px; border: 1px solid rgba(232,176,74,0.4); }
.sb-psh-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 14px; margin-top: 6px; }
.sb-psh-card { padding: 16px 16px 14px; background: #5a4a3a; border-left: 4px solid #1c5e6e; display: flex; flex-direction: column; gap: 4px; }
.sb-psh-card-num { font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em; color: #e8b04a; }
.sb-psh-card strong { font-size: 16px; font-weight: 700; color: #f5e6c8; letter-spacing: -0.01em; }
.sb-psh-card em { font-size: 11.5px; font-style: italic; color: rgba(245,230,200,0.7); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { .sb-psh, .sb-psh-burger i { transition: none; } }
```
### 12. Overlay with Backdrop
**Type:** Pure CSS
**Description:** Aurora glassmorphism — deep indigo night sky with drifting aurora-pink and cyan ribbons, frosted glass drawer with chromatic edge. Drawer slides in over the page; the backdrop blurs behind it. Pure CSS via backdrop-filter + :has(:checked).
**HTML:**
```html
```
**CSS:**
```css
.sb-ovl {
position: relative; min-height: 480px;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background: radial-gradient(ellipse at top, #1a1947 0%, #060321 60%, #02010d 100%);
color: #e8e6ff;
border-radius: 14px; overflow: hidden;
display: flex; flex-direction: column;
isolation: isolate;
}
.sb-ovl-aurora-1, .sb-ovl-aurora-2 { position: absolute; pointer-events: none; z-index: 0; mix-blend-mode: screen; filter: blur(48px); }
.sb-ovl-aurora-1 {
top: -10%; left: -10%; width: 80%; height: 70%;
background: radial-gradient(ellipse at 50% 50%, rgba(255,82,170,0.55), transparent 60%);
animation: sb-ovl-drift1 14s ease-in-out infinite alternate;
}
.sb-ovl-aurora-2 {
bottom: -20%; right: -10%; width: 80%; height: 80%;
background: radial-gradient(ellipse at 50% 50%, rgba(0,229,255,0.45), transparent 60%);
animation: sb-ovl-drift2 18s ease-in-out infinite alternate;
}
.sb-ovl-stars {
position: absolute; inset: 0; pointer-events: none; z-index: 1;
background-image:
radial-gradient(1px 1px at 14% 22%, #fff, transparent),
radial-gradient(1px 1px at 38% 14%, rgba(255,255,255,0.7), transparent),
radial-gradient(1px 1px at 52% 30%, rgba(255,255,255,0.5), transparent),
radial-gradient(1px 1px at 73% 18%, #fff, transparent),
radial-gradient(1px 1px at 88% 42%, rgba(255,255,255,0.7), transparent),
radial-gradient(1px 1px at 22% 50%, rgba(255,255,255,0.5), transparent),
radial-gradient(1px 1px at 64% 60%, #fff, transparent),
radial-gradient(1px 1px at 12% 76%, rgba(255,255,255,0.5), transparent);
}
@keyframes sb-ovl-drift1 {
from { transform: translate(0, 0); }
to { transform: translate(8%, 4%); }
}
@keyframes sb-ovl-drift2 {
from { transform: translate(0, 0); }
to { transform: translate(-6%, -3%); }
}
@media (prefers-reduced-motion: reduce) { .sb-ovl-aurora-1, .sb-ovl-aurora-2 { animation: none; } }
.sb-ovl-cb { position: absolute; width: 1px; height: 1px; opacity: 0; clip: rect(0 0 0 0); }
.sb-ovl:has(.sb-ovl-cb:focus-visible) .sb-ovl-burger { outline: 2px solid #ff52aa; outline-offset: 2px; }
.sb-ovl-bar {
position: relative; z-index: 2;
display: flex; align-items: center; gap: 14px;
padding: 14px 18px;
background: rgba(8,4,32,0.45);
backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
border-bottom: 1px solid rgba(255,255,255,0.12);
}
.sb-ovl-burger {
width: 36px; height: 36px; border-radius: 8px;
display: inline-flex; align-items: center; justify-content: center;
background: rgba(255,255,255,0.1);
border: 1px solid rgba(255,255,255,0.2);
color: #fff; cursor: pointer;
backdrop-filter: blur(8px);
transition: background 0.14s;
}
.sb-ovl-burger:hover { background: rgba(255,255,255,0.16); }
.sb-ovl-burger span { display: inline-flex; flex-direction: column; gap: 3px; }
.sb-ovl-burger i { display: block; width: 16px; height: 2px; background: linear-gradient(90deg, #ff52aa, #00e5ff); border-radius: 2px; }
.sb-ovl-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.sb-ovl-mark { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #ff52aa 0%, #00e5ff 100%); box-shadow: 0 0 16px rgba(255,82,170,0.6); }
.sb-ovl-time { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #b8b6ff; letter-spacing: 0.06em; }
.sb-ovl-main { position: relative; z-index: 2; flex: 1; padding: 32px 36px; display: flex; flex-direction: column; gap: 16px; }
.sb-ovl-eye { font-size: 12px; color: #00e5ff; letter-spacing: 0.04em; font-style: italic; text-shadow: 0 0 12px rgba(0,229,255,0.5); }
.sb-ovl-main h2 {
margin: 0; font-size: clamp(34px, 5vw, 60px); font-weight: 800; line-height: 0.95;
color: #fff; letter-spacing: -0.03em;
text-shadow: 0 0 30px rgba(255,82,170,0.3);
}
.sb-ovl-main h2 em { font-style: italic; background: linear-gradient(135deg, #ff52aa, #00e5ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sb-ovl-main p { margin: 0; font-size: 13.5px; color: rgba(232,230,255,0.85); line-height: 1.6; max-width: 460px; }
.sb-ovl-main code { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #ff52aa; background: rgba(255,82,170,0.12); padding: 1px 6px; border-radius: 3px; border: 1px solid rgba(255,82,170,0.3); }
.sb-ovl-backdrop {
position: absolute; inset: 0;
background: rgba(2,1,13,0.4);
backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
cursor: pointer;
opacity: 0; pointer-events: none; transition: opacity 0.26s ease;
z-index: 3;
}
.sb-ovl:has(.sb-ovl-cb:checked) .sb-ovl-backdrop { opacity: 1; pointer-events: auto; }
.sb-ovl-drawer {
position: absolute; left: 0; top: 0; bottom: 0; width: 280px;
background: rgba(20,16,46,0.55);
backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5);
border-right: 1px solid rgba(255,255,255,0.18);
box-shadow:
8px 0 32px rgba(0,0,0,0.4),
inset -1px 0 0 rgba(255,82,170,0.5),
inset 1px 1px 0 rgba(255,255,255,0.18);
transform: translateX(-100%); transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
z-index: 4;
padding: 18px 16px; display: flex; flex-direction: column; gap: 14px;
}
.sb-ovl:has(.sb-ovl-cb:checked) .sb-ovl-drawer { transform: translateX(0); }
.sb-ovl-drawer header { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 12px; border-bottom: 1px solid rgba(255,255,255,0.15); }
.sb-ovl-drawer header strong { font-size: 14px; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.sb-ovl-close { font-size: 22px; line-height: 1; color: rgba(255,255,255,0.7); cursor: pointer; padding: 0 8px; user-select: none; transition: color 0.14s; }
.sb-ovl-close:hover { color: #ff52aa; }
.sb-ovl-drawer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sb-ovl-drawer a { display: block; padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.85); text-decoration: none; border: 1px solid transparent; transition: background 0.14s, color 0.14s, border-color 0.14s; }
.sb-ovl-drawer a:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.18); }
.sb-ovl-drawer a[aria-current="page"] { background: linear-gradient(90deg, rgba(255,82,170,0.22), rgba(0,229,255,0.22)); color: #fff; border-color: rgba(255,255,255,0.3); box-shadow: 0 0 16px rgba(255,82,170,0.3); }
.sb-ovl-foot { margin-top: auto; padding: 10px 6px 0; border-top: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.7); letter-spacing: 0.06em; }
.sb-ovl-dot { width: 8px; height: 8px; border-radius: 50%; background: #00ff9c; box-shadow: 0 0 12px #00ff9c; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
.sb-ovl-drawer, .sb-ovl-backdrop { transition: none; }
}
```
### 13. Persistent Collapsible
**Type:** Light JS
**Description:** Pure white canvas, ink-black type, one single red dot for the active item. Swiss-poster minimalism. Click the toggle to collapse; state persists across page reloads via localStorage. An inline IIFE applies the stored state before paint to avoid a flash.
**HTML:**
```html
— Persistent state · localStorage
Less, but better.
Click the toggle — the sidebar collapses to icons only. The state is written to
localStorage, so a refresh keeps your choice. An inline IIFE applies the stored
state before the page paints, preventing any flash.
```
**CSS:**
```css
.sb-prs {
display: grid; grid-template-columns: 240px 1fr;
min-height: 480px;
font-family: 'Helvetica Neue', 'Inter', system-ui, sans-serif;
background: #fafafa; color: #0a0a0a;
border-radius: 0; overflow: hidden;
transition: grid-template-columns 0.32s cubic-bezier(0.32, 0.72, 0, 1);
border: 1px solid #0a0a0a;
}
.sb-prs[data-collapsed="true"] { grid-template-columns: 64px 1fr; }
.sb-prs-side {
background: #fff;
border-right: 1px solid #0a0a0a;
padding: 18px 14px;
display: flex; flex-direction: column; gap: 18px;
overflow: hidden;
}
.sb-prs-toggle {
display: flex; align-items: center; gap: 12px;
padding: 10px 12px; border: 1px solid #0a0a0a; border-radius: 0;
background: #fafafa; color: #0a0a0a;
font: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
cursor: pointer; transition: background 0.14s;
}
.sb-prs-toggle:hover { background: #0a0a0a; color: #fff; }
.sb-prs-toggle:hover .sb-prs-burger i { background: #fff; }
.sb-prs-burger { display: inline-flex; flex-direction: column; gap: 4px; }
.sb-prs-burger i { display: block; width: 14px; height: 1.5px; background: #0a0a0a; transition: transform 0.22s; }
.sb-prs[data-collapsed="true"] .sb-prs-burger i:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.sb-prs[data-collapsed="true"] .sb-prs-burger i:nth-child(2) { transform: translateY(-2.5px) rotate(-45deg); }
.sb-prs-tlabel { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; transition: opacity 0.18s; }
.sb-prs[data-collapsed="true"] .sb-prs-tlabel { opacity: 0; pointer-events: none; }
.sb-prs-brand { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-bottom: 1px solid #0a0a0a; padding-bottom: 18px; white-space: nowrap; }
.sb-prs-mark { width: 12px; height: 12px; border-radius: 50%; background: #e63946; flex-shrink: 0; }
.sb-prs-name { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: #0a0a0a; line-height: 1; transition: opacity 0.18s; }
.sb-prs[data-collapsed="true"] .sb-prs-name { opacity: 0; pointer-events: none; }
.sb-prs-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sb-prs-side a {
position: relative;
display: grid; grid-template-columns: 30px 1fr;
align-items: center; gap: 14px;
padding: 12px 6px;
font-size: 14px; font-weight: 600; color: #0a0a0a; text-decoration: none;
border-bottom: 1px solid rgba(10,10,10,0.12);
transition: padding-left 0.16s, color 0.16s;
}
.sb-prs-side a em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: rgba(10,10,10,0.5); letter-spacing: 0.06em; font-weight: 600; }
.sb-prs-side a:hover { padding-left: 12px; color: #e63946; }
.sb-prs-side a:hover em { color: #e63946; }
.sb-prs-side a[aria-current="page"] { padding-left: 12px; }
.sb-prs-side a[aria-current="page"]::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; border-radius: 50%; background: #e63946; box-shadow: 0 0 0 0 rgba(230,57,70,0.5); animation: sb-prs-dot 2s ease-in-out infinite; }
@keyframes sb-prs-dot { 0%, 100% { box-shadow: 0 0 0 0 rgba(230,57,70,0.5); } 50% { box-shadow: 0 0 0 6px rgba(230,57,70,0); } }
@media (prefers-reduced-motion: reduce) { .sb-prs-side a[aria-current="page"]::before { animation: none; } }
.sb-prs-lbl { white-space: nowrap; transition: opacity 0.18s; }
.sb-prs[data-collapsed="true"] .sb-prs-lbl { opacity: 0; pointer-events: none; }
.sb-prs-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #0a0a0a; }
.sb-prs-foot-lbl { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: rgba(10,10,10,0.5); letter-spacing: 0.16em; transition: opacity 0.18s; }
.sb-prs[data-collapsed="true"] .sb-prs-foot-lbl { opacity: 0; }
.sb-prs-main { padding: 36px 40px; overflow: hidden; display: flex; flex-direction: column; gap: 18px; background: #fafafa; }
.sb-prs-eye { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: #e63946; letter-spacing: 0.04em; }
.sb-prs-main h2 { margin: 0; font-size: clamp(36px, 5.5vw, 64px); font-weight: 800; line-height: 0.92; color: #0a0a0a; letter-spacing: -0.04em; }
.sb-prs-main p { margin: 0; font-size: 14.5px; color: #3a3a3a; line-height: 1.65; max-width: 480px; font-weight: 500; }
.sb-prs-main code { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: #0a0a0a; background: rgba(10,10,10,0.06); padding: 2px 6px; border-radius: 0; font-weight: 600; border-bottom: 1px solid #e63946; }
@media (prefers-reduced-motion: reduce) { .sb-prs, .sb-prs-tlabel, .sb-prs-lbl, .sb-prs-name, .sb-prs-foot-lbl, .sb-prs-burger i { transition: none; } }
```
**JS:**
```js
/* Persistent collapsible sidebar — restores state on load + toggles on click. */
(function () {
var KEY = 'sb-prs-collapsed';
var wrap = document.querySelector('.sb-prs');
if (!wrap) return;
var stored = localStorage.getItem(KEY) === 'true';
wrap.dataset.collapsed = stored ? 'true' : 'false';
var btn = wrap.querySelector('.sb-prs-toggle');
if (!btn) return;
btn.setAttribute('aria-expanded', String(!stored));
btn.addEventListener('click', function () {
var nowCollapsed = wrap.dataset.collapsed !== 'true';
wrap.dataset.collapsed = nowCollapsed ? 'true' : 'false';
btn.setAttribute('aria-expanded', String(!nowCollapsed));
btn.setAttribute('aria-label', nowCollapsed ? 'Expand sidebar' : 'Collapse sidebar');
localStorage.setItem(KEY, String(nowCollapsed));
});
})();
```
### 14. Search-top Sidebar
**Type:** Pure CSS
**Description:** Frosted macOS Big-Sur — translucent grey sidebar with vibrancy blur over a pastel sunrise wallpaper, system-blue active state. A sticky <form role="search"> at the top stays visible as the nav scrolls. Native <input type="search"> for the clear button.
**HTML:**
```html
Inbox
Updated just now · 12 unread
The search bar at the top stays sticky as the nav scrolls. Real
<input type="search"> gives a native clear button. Vibrancy blur is pure
CSS via backdrop-filter.
Anya Petrova
Re: Q3 launch deck
Daichi Sato
Friday demo recap
```
**CSS:**
```css
.sb-srh {
position: relative;
display: grid; grid-template-columns: 250px 1fr;
min-height: 480px;
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
color: #1a1a1f;
border-radius: 14px; overflow: hidden;
isolation: isolate;
letter-spacing: -0.01em;
}
.sb-srh-wall {
position: absolute; inset: 0; z-index: 0;
background:
radial-gradient(60% 50% at 30% 20%, #ffd1a8 0%, transparent 60%),
radial-gradient(60% 60% at 80% 70%, #ffb6d4 0%, transparent 60%),
linear-gradient(180deg, #fff5e8 0%, #ffe8f0 50%, #d8e9ff 100%);
}
.sb-srh-side {
position: relative; z-index: 1;
background: rgba(245,245,250,0.72);
backdrop-filter: blur(40px) saturate(1.6); -webkit-backdrop-filter: blur(40px) saturate(1.6);
border-right: 1px solid rgba(0,0,0,0.08);
display: flex; flex-direction: column;
max-height: 480px; overflow-y: auto;
}
.sb-srh-traffic { display: flex; gap: 7px; padding: 12px 14px 0; }
.sb-srh-traffic i { display: block; width: 11px; height: 11px; border-radius: 50%; }
.sb-srh-traffic i:nth-child(1) { background: #ff5f57; }
.sb-srh-traffic i:nth-child(2) { background: #febc2e; }
.sb-srh-traffic i:nth-child(3) { background: #28c840; }
.sb-srh-form {
position: sticky; top: 0; z-index: 2;
display: flex; align-items: center; gap: 6px;
padding: 10px 12px;
background: rgba(245,245,250,0.85);
backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
border-bottom: 1px solid rgba(0,0,0,0.08);
}
.sb-srh-icon { color: #6e6e73; font-size: 13px; }
.sb-srh-form input {
flex: 1; min-width: 0;
padding: 6px 10px;
background: rgba(255,255,255,0.7);
border: 1px solid rgba(0,0,0,0.08);
border-radius: 7px;
color: #1a1a1f; font-size: 13px;
font-family: inherit;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.sb-srh-form input:focus { outline: 3px solid rgba(0,122,255,0.4); outline-offset: -1px; border-color: rgba(0,122,255,0.6); }
.sb-srh-form kbd {
font-family: -apple-system, sans-serif; font-size: 10.5px; font-weight: 600;
padding: 2px 6px;
background: rgba(255,255,255,0.7);
color: #6e6e73;
border: 1px solid rgba(0,0,0,0.1);
border-radius: 4px;
}
.sb-srh-side nav { padding: 14px 10px 18px; }
.sb-srh-side h3 { margin: 14px 8px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; color: #6e6e73; }
.sb-srh-side h3:first-of-type { margin-top: 4px; }
.sb-srh-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.sb-srh-side a {
display: flex; align-items: center; gap: 10px;
padding: 6px 10px; border-radius: 6px;
font-size: 13px; font-weight: 500; color: #1a1a1f;
text-decoration: none;
transition: background 0.14s, color 0.14s;
}
.sb-srh-side a:hover { background: rgba(0,0,0,0.05); }
.sb-srh-side a[aria-current="page"] { background: #007aff; color: #fff; font-weight: 600; }
.sb-srh-side a[aria-current="page"] em { color: rgba(255,255,255,0.85); }
.sb-srh-i { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; border-radius: 4px; flex-shrink: 0; font-size: 7.5px; color: transparent; line-height: 0; }
.sb-srh-side a em { margin-left: auto; font-style: normal; font-size: 11px; color: #6e6e73; font-weight: 600; }
.sb-srh-main { position: relative; z-index: 1; padding: 32px 36px; background: rgba(255,255,255,0.5); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex; flex-direction: column; gap: 16px; }
.sb-srh-mhead { display: flex; align-items: baseline; justify-content: space-between; }
.sb-srh-main h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); font-weight: 700; color: #1a1a1f; letter-spacing: -0.03em; }
.sb-srh-meta { font-size: 12px; color: #6e6e73; }
.sb-srh-main p { margin: 0; font-size: 13.5px; color: #3a3a3f; line-height: 1.6; max-width: 480px; }
.sb-srh-main code { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: #007aff; background: rgba(0,122,255,0.1); padding: 1px 6px; border-radius: 4px; }
.sb-srh-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.sb-srh-card {
display: grid; grid-template-columns: 10px 1fr auto;
align-items: center; gap: 12px;
padding: 12px 16px;
background: rgba(255,255,255,0.85);
border: 1px solid rgba(0,0,0,0.06);
border-radius: 10px;
box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 4px 16px rgba(0,0,0,0.04);
transition: transform 0.14s, box-shadow 0.14s;
}
.sb-srh-card:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 8px 24px rgba(0,0,0,0.08); }
.sb-srh-card-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.sb-srh-card strong { font-size: 13.5px; font-weight: 700; color: #1a1a1f; }
.sb-srh-card em { font-style: normal; font-size: 12.5px; color: #6e6e73; grid-column: 2; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 720px) {
.sb-srh { grid-template-columns: 1fr; }
.sb-srh-side { max-height: none; border-right: 0; border-bottom: 1px solid rgba(0,0,0,0.08); }
}
```
### 15. Section-grouped Nav
**Type:** Pure CSS
**Description:** Memphis design — pastel-pink sidebar with mint and lemon accents, black squiggle backgrounds, hard-shadow chunky pills. Each section is its own <nav aria-label> so screen readers jump cleanly. The 80s/90s graphic style reborn for an admin shell.
**HTML:**
```html
★ HELLO, FRIEND
Welcome back!
Each section is a separate <nav> — screen readers skip cleanly between
Workspace / Account / Help. The squiggle background is pure CSS (radial-gradient
+ repeating).
284 Active
47 Pending
12 Closed
```
**CSS:**
```css
.sb-grp {
display: grid; grid-template-columns: 240px 1fr;
min-height: 480px;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background:
radial-gradient(circle at 80% 20%, #ffe4ec 0%, transparent 40%),
radial-gradient(circle at 20% 80%, #d4f6e8 0%, transparent 40%),
#fff7e8;
color: #1a1a1a;
border-radius: 16px; overflow: hidden;
border: 3px solid #1a1a1a;
}
.sb-grp-side {
background:
repeating-linear-gradient(45deg, transparent 0 20px, rgba(26,26,26,0.04) 20px 21px),
#ffd4e5;
border-right: 3px solid #1a1a1a;
padding: 18px 14px;
display: flex; flex-direction: column; gap: 16px;
overflow-y: auto; max-height: 480px;
}
.sb-grp-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; text-decoration: none; border-bottom: 2px dashed #1a1a1a; }
.sb-grp-dot { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: #ffd400; border: 2px solid #1a1a1a; box-shadow: 3px 3px 0 #1a1a1a; }
.sb-grp-name { font-family: 'Helvetica Neue', system-ui, sans-serif; font-size: 16px; font-weight: 900; color: #1a1a1a; letter-spacing: -0.02em; line-height: 1; }
.sb-grp-name small { display: block; font-size: 9.5px; font-weight: 600; color: #c54b8c; text-transform: uppercase; letter-spacing: 0.16em; margin-top: 2px; }
.sb-grp-side h3 { margin: 0 0 6px 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #c54b8c; }
.sb-grp-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.sb-grp-side a {
display: block;
padding: 8px 12px;
border-radius: 22px;
font-size: 13px; font-weight: 700;
color: #1a1a1a;
background: #fff;
border: 2px solid #1a1a1a;
text-decoration: none;
transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.sb-grp-side a:hover { background: #fff7e8; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #1a1a1a; }
.sb-grp-side a[aria-current="page"] { background: #6dd5b3; color: #1a1a1a; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #1a1a1a; }
.sb-grp-main {
position: relative;
padding: 30px 32px;
display: flex; flex-direction: column; gap: 18px;
}
.sb-grp-main::before {
content: ''; position: absolute; top: 24px; right: 28px;
width: 56px; height: 56px;
background: #ffd400; border: 3px solid #1a1a1a;
transform: rotate(15deg);
box-shadow: 4px 4px 0 #1a1a1a;
z-index: 0;
}
.sb-grp-main::after {
content: ''; position: absolute; bottom: 80px; right: 60px;
width: 30px; height: 30px;
border-radius: 50%;
background: #c54b8c; border: 3px solid #1a1a1a;
box-shadow: 3px 3px 0 #1a1a1a;
z-index: 0;
}
.sb-grp-eye { position: relative; z-index: 1; font-family: 'Helvetica Neue', sans-serif; font-size: 11.5px; font-weight: 800; letter-spacing: 0.2em; color: #c54b8c; }
.sb-grp-main h2 { position: relative; z-index: 1; margin: 0; font-size: clamp(34px, 5vw, 60px); font-weight: 900; line-height: 0.92; color: #1a1a1a; letter-spacing: -0.03em; }
.sb-grp-main h2::after { content: ''; display: inline-block; width: 18px; height: 18px; margin-left: 6px; background: #c54b8c; border: 2px solid #1a1a1a; border-radius: 50%; vertical-align: middle; box-shadow: 2px 2px 0 #1a1a1a; }
.sb-grp-main p { position: relative; z-index: 1; margin: 0; font-size: 13.5px; color: #4a4a4a; line-height: 1.6; max-width: 460px; }
.sb-grp-main code { font-family: 'Courier New', monospace; font-size: 12px; font-weight: 700; color: #1a1a1a; background: #ffd400; padding: 1px 6px; border-radius: 3px; border: 1.5px solid #1a1a1a; }
.sb-grp-cards { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; max-width: 480px; }
.sb-grp-c { padding: 14px 14px; border: 2.5px solid #1a1a1a; border-radius: 14px; box-shadow: 4px 4px 0 #1a1a1a; display: flex; flex-direction: column; gap: 2px; }
.sb-grp-c strong { font-size: 22px; font-weight: 900; color: #1a1a1a; line-height: 1; letter-spacing: -0.02em; }
.sb-grp-c span { font-size: 11px; font-weight: 700; color: #1a1a1a; text-transform: uppercase; letter-spacing: 0.08em; }
.sb-grp-c-mint { background: #6dd5b3; }
.sb-grp-c-lemon { background: #ffd400; }
.sb-grp-c-coral { background: #ff8b7a; }
@media (max-width: 720px) {
.sb-grp { grid-template-columns: 1fr; }
.sb-grp-side { border-right: 0; border-bottom: 3px solid #1a1a1a; max-height: none; }
.sb-grp-cards { grid-template-columns: 1fr; }
}
```
### 16. Target-active Highlight
**Type:** Light JS
**Description:** Retro magazine TOC — cream paper, sepia rules, bordeaux-red active marker. The contents page of a 1970s journal. Active-link state via URL hash + :target pseudo-class; sibling selectors highlight the corresponding nav link. A 4-line script uses history.pushState so the URL hash updates without scrolling the host page.
**HTML:**
```html
— Page 04
Overview.
Click a link to the left — the :target pseudo-class highlights it
automatically. Sibling selectors do the work; history.pushState keeps the host
page from jumping.
— Page 12
Features.
The CSS pattern is :has(#section:target) a[href="#section"]. No JavaScript
needed for the highlighting itself.
— Page 28
Pricing.
Hash-based routing works in any browser. No router library, no framework dependency, no
virtual DOM.
— Page 36
Changelog.
Each section is a real <section> with an id — semantic, bookmarkable, and
shareable.
```
**CSS:**
```css
.sb-act {
display: grid; grid-template-columns: 240px 1fr;
min-height: 480px;
font-family: 'Georgia', 'Times New Roman', serif;
background: #f4ecdb;
color: #2a1a10;
border-radius: 0; overflow: hidden;
border: 1px solid #2a1a10;
}
.sb-act-side {
background: #ede0c4;
border-right: 1px solid #2a1a10;
padding: 22px 18px;
display: flex; flex-direction: column; gap: 14px;
}
.sb-act-side header { padding-bottom: 14px; border-bottom: 2px solid #2a1a10; }
.sb-act-issue { font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 700; letter-spacing: 0.22em; color: #8a4a2c; text-transform: uppercase; }
.sb-act-side h3 { margin: 4px 0 0; font-size: 30px; font-weight: 500; font-style: italic; color: #2a1a10; letter-spacing: -0.02em; line-height: 1; }
.sb-act-side ol { list-style: none; margin: 0; padding: 0; counter-reset: act; display: flex; flex-direction: column; gap: 0; }
.sb-act-side li { counter-increment: act; }
.sb-act-side a {
position: relative;
display: grid; grid-template-columns: 26px 1fr auto;
align-items: baseline; gap: 12px;
padding: 10px 4px;
font-size: 16px; color: #2a1a10; text-decoration: none;
border-bottom: 1px dotted #b89668;
transition: padding-left 0.16s, color 0.16s;
}
.sb-act-side a::before {
content: counter(act, decimal-leading-zero);
font-family: 'Inter', sans-serif;
font-size: 10px;
font-weight: 700;
letter-spacing: 0.16em;
color: #8a4a2c;
align-self: center;
}
.sb-act-side a span { font-style: italic; }
.sb-act-side a em { font-family: 'Inter', sans-serif; font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; color: #8a4a2c; }
.sb-act-side a:hover { padding-left: 4px; color: #8a1f2c; }
.sb-act-side footer { margin-top: auto; padding-top: 14px; border-top: 1px solid #2a1a10; font-family: 'Inter', sans-serif; font-size: 10.5px; letter-spacing: 0.18em; color: #8a4a2c; text-align: center; text-transform: uppercase; }
.sb-act-main { padding: 28px 32px; overflow-y: auto; max-height: 480px; background: #fbf5e6; }
.sb-act-sec { padding: 18px 0; border-bottom: 1px solid #d8c598; }
.sb-act-sec:last-child { border-bottom: 0; }
.sb-act-page { font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 700; letter-spacing: 0.2em; color: #8a1f2c; text-transform: uppercase; }
.sb-act-sec h2 { margin: 4px 0 8px; font-family: 'Playfair Display', 'Georgia', serif; font-size: clamp(28px, 4vw, 44px); font-weight: 900; color: #2a1a10; line-height: 0.96; letter-spacing: -0.02em; }
.sb-act-sec p { margin: 0; font-size: 14.5px; color: #3c2818; line-height: 1.7; max-width: 540px; }
.sb-act-sec code { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: #8a1f2c; background: rgba(138,31,44,0.08); padding: 1px 5px; border-radius: 0; font-weight: 600; }
/* Default first-link active when no :target yet */
.sb-act-side a[href="#sb-act-overview"] { padding-left: 4px; color: #8a1f2c; font-weight: 700; }
.sb-act-side a[href="#sb-act-overview"]::after { content: '·'; font-family: serif; font-size: 22px; line-height: 0; color: #8a1f2c; margin-left: 4px; }
/* Override default when any section is targeted */
.sb-act:has(:target) .sb-act-side a[href="#sb-act-overview"] { padding-left: 0; color: #2a1a10; font-weight: 400; }
.sb-act:has(:target) .sb-act-side a[href="#sb-act-overview"]::after { content: ''; }
/* Highlight the link matching the targeted section */
.sb-act:has(#sb-act-overview:target) .sb-act-side a[href="#sb-act-overview"],
.sb-act:has(#sb-act-features:target) .sb-act-side a[href="#sb-act-features"],
.sb-act:has(#sb-act-pricing:target) .sb-act-side a[href="#sb-act-pricing"],
.sb-act:has(#sb-act-changelog:target) .sb-act-side a[href="#sb-act-changelog"] { padding-left: 4px; color: #8a1f2c; font-weight: 700; }
.sb-act:has(#sb-act-overview:target) .sb-act-side a[href="#sb-act-overview"]::after,
.sb-act:has(#sb-act-features:target) .sb-act-side a[href="#sb-act-features"]::after,
.sb-act:has(#sb-act-pricing:target) .sb-act-side a[href="#sb-act-pricing"]::after,
.sb-act:has(#sb-act-changelog:target) .sb-act-side a[href="#sb-act-changelog"]::after { content: '·'; font-family: serif; font-size: 22px; line-height: 0; color: #8a1f2c; margin-left: 4px; }
```
**JS:**
```js
/* :target stays the engine — JS only updates the hash without scrolling. */
document.querySelectorAll('.sb-act-side a').forEach(function (a) {
a.addEventListener('click', function (e) {
e.preventDefault();
var hash = a.getAttribute('href');
if (hash && hash.charAt(0) === '#') history.pushState(null, '', hash);
});
});
```
### 17. Nested Expandable Nav
**Type:** Pure CSS
**Description:** Notebook paper — off-white sheet with hand-drawn ruled lines, graphite pencil marks, dog-eared corner. Two-level nav built with native <details>/<summary>: free keyboard support, free aria-expanded, free Enter/Space toggling. The browser does the work.
**HTML:**
```html
Field Notes
07 / Mar / 26
Authentication
Resources
Errors
— On Authentication
Native HTML does the work.
Each top-level section is a real <details>/<summary> —
the browser handles keyboard navigation, aria-expanded state, and Enter/Space
toggling. No script, no library, no boilerplate.
"
Build with the platform. The platform has been thinking about your problem for thirty years.
— margin note, 2026
```
**CSS:**
```css
.sb-nst {
position: relative;
display: grid; grid-template-columns: 260px 1fr;
min-height: 480px;
font-family: 'Caveat', 'Comic Sans MS', cursive;
background: #fbf6e8;
color: #2a2418;
border-radius: 6px; overflow: hidden;
border: 1px solid #2a2418;
background-image:
repeating-linear-gradient(transparent 0 27px, rgba(74,138,196,0.18) 27px 28px),
radial-gradient(circle at 100% 100%, transparent 18px, #fbf6e8 18px);
background-position: 0 14px, 0 0;
}
.sb-nst-side {
position: relative;
background:
repeating-linear-gradient(transparent 0 27px, rgba(74,138,196,0.18) 27px 28px),
rgba(248,242,224,0.6);
background-position: 0 14px, 0 0;
border-right: 1px dashed rgba(42,36,24,0.35);
padding: 18px 16px;
overflow-y: auto; max-height: 480px;
}
.sb-nst-side::after { content: ''; position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; background: linear-gradient(225deg, #fbf6e8 50%, rgba(42,36,24,0.12) 50%); }
.sb-nst-side header { display: flex; align-items: baseline; gap: 8px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1.5px dashed #2a2418; position: relative; }
.sb-nst-tab { width: 18px; height: 18px; flex-shrink: 0; background: #d4533a; border: 1.5px solid #2a2418; transform: rotate(-12deg); }
.sb-nst-side h3 { margin: 0; font-family: 'Caveat', cursive; font-size: 28px; font-weight: 700; color: #2a2418; line-height: 1; flex: 1; }
.sb-nst-date { font-family: 'Caveat', cursive; font-size: 14px; color: #6a5a3c; transform: rotate(-3deg); }
.sb-nst-side details { padding: 4px 0; }
.sb-nst-side summary {
cursor: pointer; padding: 6px 4px;
font-family: 'Caveat', cursive;
font-size: 22px; font-weight: 700; color: #2a2418;
list-style: none; display: flex; align-items: center; justify-content: space-between;
transition: color 0.14s;
}
.sb-nst-side summary::-webkit-details-marker { display: none; }
.sb-nst-side summary:hover { color: #d4533a; }
.sb-nst-side summary::after {
content: '+';
font-family: 'Caveat', cursive; font-size: 28px; line-height: 0.6; font-weight: 400;
color: #d4533a;
transition: transform 0.22s;
}
.sb-nst-side details[open] summary::after { content: '−'; }
.sb-nst-side ul { list-style: none; margin: 4px 0 12px 22px; padding: 0; display: flex; flex-direction: column; gap: 0; border-left: 1.5px dashed #d4533a; }
.sb-nst-side li { padding-left: 12px; position: relative; }
.sb-nst-side li::before { content: '·'; position: absolute; left: -4px; top: 50%; transform: translateY(-60%); color: #d4533a; font-size: 24px; line-height: 0; }
.sb-nst-side a {
display: block;
padding: 4px 6px;
font-family: 'Caveat', cursive;
font-size: 18px; color: #2a2418; text-decoration: none;
transition: color 0.14s, padding-left 0.14s;
}
.sb-nst-side a:hover { color: #d4533a; padding-left: 10px; }
.sb-nst-side a[aria-current="page"] {
color: #d4533a;
font-weight: 700;
background-image: linear-gradient(transparent 60%, rgba(255,232,99,0.7) 60%);
}
.sb-nst-side footer { margin-top: 16px; padding-top: 10px; border-top: 1.5px dashed rgba(42,36,24,0.4); text-align: center; font-family: 'Caveat', cursive; font-size: 18px; color: #6a5a3c; transform: rotate(-1deg); }
.sb-nst-main {
position: relative;
padding: 32px 40px 32px 70px;
background-image:
repeating-linear-gradient(transparent 0 27px, rgba(74,138,196,0.22) 27px 28px),
rgba(255,250,232,0.6);
background-position: 0 14px, 0 0;
}
.sb-nst-main::before {
content: ''; position: absolute; left: 50px; top: 0; bottom: 0; width: 1.5px; background: #d44a4a; opacity: 0.55;
}
.sb-nst-eye { font-family: 'Caveat', cursive; font-size: 16px; color: #d4533a; transform: rotate(-1deg); display: inline-block; margin-bottom: 6px; }
.sb-nst-main h2 { margin: 0 0 14px; font-family: 'Caveat', cursive; font-size: clamp(38px, 5.5vw, 64px); font-weight: 700; color: #2a2418; line-height: 1; transform: rotate(-0.5deg); }
.sb-nst-main p { margin: 0 0 18px; font-family: 'Caveat', cursive; font-size: 19px; color: #2a2418; line-height: 1.55; max-width: 460px; }
.sb-nst-main code { font-family: 'Courier New', monospace; font-size: 14px; color: #d4533a; background: transparent; padding: 1px 5px; border: 1.5px dashed rgba(212,83,58,0.45); border-radius: 0; }
.sb-nst-main blockquote {
position: relative;
margin: 0; padding: 12px 18px 12px 32px;
font-family: 'Caveat', cursive; font-size: 20px; color: #4a4030;
line-height: 1.5; max-width: 480px;
border-left: 3px solid #d4533a;
font-style: italic;
}
.sb-nst-quote-mark { position: absolute; left: 6px; top: -6px; font-family: 'Caveat', cursive; font-size: 64px; line-height: 1; color: #d4533a; opacity: 0.4; font-style: normal; }
.sb-nst-main blockquote cite { display: block; margin-top: 6px; font-size: 16px; color: #6a5a3c; font-style: normal; }
@media (max-width: 720px) {
.sb-nst { grid-template-columns: 1fr; }
.sb-nst-side { max-height: none; border-right: 0; border-bottom: 1px dashed rgba(42,36,24,0.4); }
.sb-nst-main { padding-left: 40px; }
}
```
### 18. Tabbed Sidebar
**Type:** Pure CSS
**Description:** Dracula tribute — the editor theme reborn as a sidebar. Deep purple base with peach, cyan, lime, and pink accents; monospace IDE type. Three tabs swap the content (Files, Search, Git) via radio inputs + :has() + sibling selectors. Zero JavaScript.
**HTML:**
```html
// Three tabs, zero JavaScript.
const app = () => {
return <Sidebar theme="dracula" />
}
Click the tabs at the top of the sidebar to swap between Files, Search, and Git. Pattern:
radio inputs + :has(#tab-1:checked) + sibling selectors. Theme is the Dracula
palette translated into a real layout.
```
**CSS:**
```css
.sb-tab {
display: grid; grid-template-columns: 280px 1fr;
min-height: 480px;
font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
background: #282a36; color: #f8f8f2;
border-radius: 8px; overflow: hidden;
font-feature-settings: 'liga' 1, 'calt' 1;
}
.sb-tab-side { background: #21222c; border-right: 1px solid #44475a; display: flex; flex-direction: column; }
.sb-tab-titlebar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #191a21; border-bottom: 1px solid #44475a; }
.sb-tab-titlebar span { display: flex; gap: 6px; }
.sb-tab-titlebar i { width: 11px; height: 11px; border-radius: 50%; }
.sb-tab-titlebar i:nth-child(1) { background: #ff5555; }
.sb-tab-titlebar i:nth-child(2) { background: #f1fa8c; }
.sb-tab-titlebar i:nth-child(3) { background: #50fa7b; }
.sb-tab-titlebar strong { font-size: 11px; font-weight: 500; color: #6272a4; letter-spacing: 0.04em; }
.sb-tab-tabs {
display: flex; padding: 0;
background: #21222c; border-bottom: 1px solid #44475a;
}
.sb-tab-tabs input { position: absolute; width: 1px; height: 1px; opacity: 0; clip: rect(0 0 0 0); }
.sb-tab-tabs input:focus-visible + label { outline: 2px solid #ff79c6; outline-offset: -2px; }
.sb-tab-tabs label {
flex: 1; padding: 10px 6px;
display: inline-flex; align-items: center; justify-content: center; gap: 6px;
font-size: 11px; font-weight: 600; color: #6272a4;
cursor: pointer;
border-bottom: 2px solid transparent;
transition: color 0.14s, border-color 0.14s, background 0.14s;
}
.sb-tab-tabs label span { color: #ff79c6; font-size: 12px; }
.sb-tab-tabs label em { margin-left: 4px; font-size: 9.5px; font-style: normal; padding: 1px 5px; border-radius: 8px; background: #ff5555; color: #f8f8f2; font-weight: 700; }
.sb-tab-tabs label:hover { color: #f8f8f2; background: rgba(98,114,164,0.1); }
.sb-tab-tabs input:checked + label { color: #f8f8f2; border-bottom-color: #50fa7b; background: #282a36; }
.sb-tab-pane { display: none; padding: 14px 14px; flex: 1; overflow-y: auto; }
.sb-tab-side:has(#sb-tab-1:checked) [data-pane="1"] { display: block; }
.sb-tab-side:has(#sb-tab-2:checked) [data-pane="2"] { display: block; }
.sb-tab-side:has(#sb-tab-3:checked) [data-pane="3"] { display: block; }
.sb-tab-pane h3 { margin: 0 0 10px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #6272a4; }
.sb-tab-pane ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sb-tab-pane li { padding: 4px 6px; font-size: 12px; color: #f8f8f2; display: flex; align-items: center; gap: 8px; transition: background 0.12s; cursor: pointer; }
.sb-tab-pane li:hover { background: #44475a; }
.sb-tab-pane li::before { content: ''; flex-shrink: 0; }
.sb-tab-pane li.folder::before { content: '▸ '; color: #ff79c6; font-size: 10px; }
.sb-tab-pane li.file { padding-left: 22px; color: #bd93f9; }
.sb-tab-pane li.file::before { content: '▢ '; color: #6272a4; font-size: 10px; }
.sb-tab-pane li.file.ts { color: #8be9fd; }
.sb-tab-pane li.file.css { color: #ff79c6; }
.sb-tab-pane li.file.json { color: #f1fa8c; }
.sb-tab-pane li em { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.sb-tab-pane li em.git-m { color: #ffb86c; background: rgba(255,184,108,0.15); }
.sb-tab-pane li em.git-a { color: #50fa7b; background: rgba(80,250,123,0.15); }
.sb-tab-search-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: #282a36; border: 1px solid #44475a; border-radius: 4px; }
.sb-tab-search-row span { color: #6272a4; font-size: 13px; }
.sb-tab-search-row input { flex: 1; min-width: 0; background: transparent; border: 0; color: #f8f8f2; font-family: inherit; font-size: 12px; }
.sb-tab-search-row input:focus { outline: none; }
.sb-tab-pane p { margin: 10px 0 0; font-size: 11px; color: #6272a4; line-height: 1.6; }
.sb-tab-pane kbd { font-family: inherit; padding: 1px 5px; background: #44475a; color: #f8f8f2; border-radius: 3px; font-size: 10px; font-weight: 600; }
.sb-tab-status { margin-top: auto; display: flex; justify-content: space-between; padding: 6px 12px; background: #ff79c6; color: #282a36; font-size: 10.5px; font-weight: 700; }
.sb-tab-status span { display: inline-flex; align-items: center; gap: 6px; }
.sb-tab-status i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.sb-tab-main { padding: 28px 32px; background: #282a36; display: flex; flex-direction: column; gap: 16px; }
.sb-tab-bar { display: flex; gap: 8px; }
.sb-tab-pill { padding: 4px 10px; font-size: 11px; font-weight: 600; background: #44475a; color: #f8f8f2; border-radius: 4px; }
.sb-tab-pill.ghost { background: transparent; border: 1px solid #44475a; color: #6272a4; }
.sb-tab-code {
margin: 0; padding: 18px 22px;
background: #21222c;
border: 1px solid #44475a;
border-radius: 6px;
font-size: 13px; line-height: 1.7;
color: #f8f8f2;
white-space: pre-wrap;
}
.sb-tab-code .c { color: #6272a4; font-style: italic; }
.sb-tab-code .k { color: #ff79c6; }
.sb-tab-code .v { color: #50fa7b; }
.sb-tab-code .o { color: #ff79c6; }
.sb-tab-code .t { color: #8be9fd; }
.sb-tab-code .s { color: #f1fa8c; }
.sb-tab-main p { margin: 0; font-family: 'Inter', system-ui, sans-serif; font-size: 13.5px; color: #bd93f9; line-height: 1.65; max-width: 460px; }
.sb-tab-main code { color: #50fa7b; background: #21222c; padding: 1px 6px; border-radius: 3px; font-size: 12.5px; border: 1px solid #44475a; }
```
### 19. Onboarding Progress
**Type:** Pure CSS
**Description:** Duolingo-style joyful gamification — forest-green nav with canary-yellow CTAs, hard chunky shadows, oversized rounded buttons. Native <progress> announces completion to screen readers; a real <ol> tracks steps. Designed to feel like progress is fun.
**HTML:**
```html
🌿
Sproutv2
3 of 5 complete
3 of 5 quests done
Pick your goal
Take placement
Add friends
Connect calendar
Earn first badge
Continue →
👋 GOOD MORNING
Let's keep that streak!
Quests fade as you complete them and the streak counter pulses gently when you hit a
milestone. Native <progress> + a real <ol> — assistive
tech reads everything correctly.
2,481 XP earned
47 Lessons
12 Badges
```
**CSS:**
```css
.sb-prg {
display: grid; grid-template-columns: 260px 1fr;
min-height: 480px;
font-family: 'Nunito', 'Inter', system-ui, -apple-system, sans-serif;
background: #fff9e6; color: #3c4043;
border-radius: 16px; overflow: hidden;
border: 4px solid #1a3d2c;
}
.sb-prg-side {
background: linear-gradient(180deg, #2f7a4f 0%, #1f5837 100%);
padding: 18px 14px;
display: flex; flex-direction: column; gap: 14px;
position: relative;
border-right: 4px solid #1a3d2c;
box-shadow: 4px 0 0 #1a3d2c;
}
.sb-prg-side::before {
content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
background: repeating-linear-gradient(90deg, #ffd400 0 12px, #1a3d2c 12px 14px, #ffd400 14px 26px, transparent 26px 30px);
}
.sb-prg-brand { display: flex; align-items: center; gap: 10px; padding: 14px 6px 14px; text-decoration: none; }
.sb-prg-mark { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: #ffd400; border: 3px solid #1a3d2c; font-size: 18px; box-shadow: 0 4px 0 #1a3d2c; }
.sb-prg-name { color: #fff; font-size: 17px; font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.sb-prg-name small { display: block; font-size: 10px; color: #ffd400; font-weight: 800; letter-spacing: 0.16em; margin-top: 3px; }
.sb-prg-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sb-prg-nav a {
display: flex; align-items: center; gap: 11px;
padding: 10px 13px;
border-radius: 13px;
font-size: 14px; font-weight: 800; color: #d4f0e0;
text-decoration: none;
background: rgba(0,0,0,0.16);
border: 2px solid transparent;
transition: transform 0.14s, background 0.14s, border-color 0.14s, box-shadow 0.14s;
}
.sb-prg-nav a:hover { background: rgba(0,0,0,0.28); color: #fff; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #1a3d2c; }
.sb-prg-nav a[aria-current="page"] { background: #ffd400; color: #1a3d2c; border-color: #1a3d2c; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #1a3d2c; }
.sb-prg-i { font-size: 16px; }
.sb-prg-card { margin-top: auto; padding: 14px; background: #fff; border: 3px solid #1a3d2c; border-radius: 16px; box-shadow: 5px 5px 0 #1a3d2c; }
.sb-prg-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sb-prg-card h3 { margin: 0; font-size: 13px; font-weight: 900; color: #1a3d2c; letter-spacing: -0.01em; }
.sb-prg-streak { font-size: 13px; font-weight: 900; color: #ff6b35; padding: 3px 8px; border-radius: 10px; background: #fff1e6; border: 2px solid #ff6b35; }
.sb-prg-card progress {
width: 100%; height: 12px; appearance: none;
background: #f0f0f0; border: 2px solid #1a3d2c; border-radius: 10px; overflow: hidden;
}
.sb-prg-card progress::-webkit-progress-bar { background: #f0f0f0; }
.sb-prg-card progress::-webkit-progress-value { background: linear-gradient(180deg,#5cd47a,#2f7a4f); border-radius: 8px 0 0 8px; }
.sb-prg-card progress::-moz-progress-bar { background: linear-gradient(180deg,#5cd47a,#2f7a4f); border-radius: 8px 0 0 8px; }
.sb-prg-card p { margin: 8px 0 12px; font-size: 12px; color: #3c4043; font-weight: 700; }
.sb-prg-card p strong { color: #2f7a4f; font-weight: 900; }
.sb-prg-card ol { list-style: none; margin: 0 0 14px; padding: 0; counter-reset: prg; display: flex; flex-direction: column; gap: 6px; }
.sb-prg-card li { counter-increment: prg; font-size: 12px; font-weight: 700; color: #3c4043; padding-left: 26px; position: relative; line-height: 1.5; }
.sb-prg-card li::before {
content: counter(prg);
position: absolute; left: 0; top: 0;
width: 18px; height: 18px; border-radius: 50%;
background: #fff; color: #3c4043;
display: flex; align-items: center; justify-content: center;
font-size: 10px; font-weight: 900;
border: 2px solid #3c4043;
}
.sb-prg-card li.done { color: #2f7a4f; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(47,122,79,0.4); }
.sb-prg-card li.done::before { content: '✓'; background: #2f7a4f; color: #fff; border-color: #1a3d2c; font-size: 11px; }
.sb-prg-go {
display: block; width: 100%;
padding: 11px 14px;
background: #ffd400; color: #1a3d2c;
border: 3px solid #1a3d2c; border-radius: 12px;
font-family: inherit; font-size: 13px; font-weight: 900;
letter-spacing: 0.02em;
cursor: pointer;
box-shadow: 0 4px 0 #1a3d2c;
transition: transform 0.1s, box-shadow 0.1s;
}
.sb-prg-go:hover { background: #ffe44a; }
.sb-prg-go:active { transform: translateY(2px); box-shadow: 0 2px 0 #1a3d2c; }
.sb-prg-main { padding: 32px 36px; display: flex; flex-direction: column; gap: 16px; background: #fff9e6; }
.sb-prg-eye { font-size: 12px; font-weight: 900; letter-spacing: 0.16em; color: #ff6b35; }
.sb-prg-main h2 { margin: 0; font-size: clamp(34px, 5vw, 60px); font-weight: 900; line-height: 0.95; color: #1a3d2c; letter-spacing: -0.03em; }
.sb-prg-main p { margin: 0; font-size: 14px; color: #3c4043; line-height: 1.6; max-width: 440px; font-weight: 600; }
.sb-prg-main code { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: #1a3d2c; background: #ffd400; padding: 1px 6px; border-radius: 4px; border: 2px solid #1a3d2c; font-weight: 700; }
.sb-prg-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; max-width: 440px; }
.sb-prg-stat { background: #fff; border: 3px solid #1a3d2c; border-radius: 14px; padding: 12px 14px; box-shadow: 4px 4px 0 #1a3d2c; }
.sb-prg-stats strong { display: block; font-size: 22px; font-weight: 900; color: #1a3d2c; line-height: 1; letter-spacing: -0.02em; }
.sb-prg-stats span { display: block; font-size: 11px; font-weight: 800; color: #2f7a4f; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }
@media (max-width: 720px) {
.sb-prg { grid-template-columns: 1fr; }
.sb-prg-side { border-right: 0; border-bottom: 4px solid #1a3d2c; box-shadow: 0 4px 0 #1a3d2c; }
.sb-prg-stats { grid-template-columns: 1fr; }
}
```
### 20. Resizable Sidebar
**Type:** Pure CSS
**Description:** Brutalist mono — pure white, ink black, zero radius, oversized monospace. The "raw HTML element with no styling" energy. Drag the right edge of the sidebar to resize. Pure CSS via resize: horizontal on a wrapper; the browser provides the drag handle.
**HTML:**
```html
// directory
src/
components/
Button.tsx
Card.tsx
Modal.tsx
pages/
index.tsx
about.tsx
package.json
tsconfig.json
→→→ DRAG_RIGHT_EDGE →→→
STATUS: 200_OK
17:42:08 GMT
RESIZE_ME.
PURE CSS · resize: horizontal · NO JS · NO LIBRARY · NO FRAMEWORK · ONE LINE OF
CSS · BROWSER HANDLES THE DRAG · LAYOUT ADJUSTS NATURALLY · WORKS EVERYWHERE · 1996 ENERGY
2026 BROWSERS.
[01]
[02]
[03]
[04]
[05]
[06]
```
**CSS:**
```css
.sb-rsz {
display: flex;
min-height: 480px;
font-family: 'Courier New', 'Courier', monospace;
background: #fff;
color: #000;
border-radius: 0; overflow: hidden;
border: 3px solid #000;
}
.sb-rsz-side {
flex-shrink: 0;
width: 240px; min-width: 180px; max-width: 380px;
background: #fff;
border-right: 3px solid #000;
padding: 16px 14px;
overflow: auto;
resize: horizontal;
}
.sb-rsz-side header { padding-bottom: 12px; border-bottom: 2px solid #000; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.sb-rsz-bar { font-size: 13px; font-weight: 700; color: #000; letter-spacing: 0.04em; }
.sb-rsz-side header strong { font-size: 16px; font-weight: 700; letter-spacing: 0.08em; color: #000; }
.sb-rsz-side h3 { margin: 0 0 10px; font-size: 12px; font-weight: 700; color: #000; }
.sb-rsz-tree { list-style: none; margin: 0 0 16px; padding: 0; font-size: 13px; color: #000; display: flex; flex-direction: column; gap: 3px; }
.sb-rsz-tree li { padding: 3px 0; cursor: pointer; transition: background 0.1s; }
.sb-rsz-tree li:hover { background: #000; color: #fff; }
.sb-rsz-tree li.folder::before { content: '> '; }
.sb-rsz-tree li:not(.folder)::before { content: '· '; }
.sb-rsz-tree li.indent { padding-left: 18px; }
.sb-rsz-tree li.indent2 { padding-left: 36px; }
.sb-rsz-tree li.active { background: #000; color: #fff; }
.sb-rsz-tree li.active::before { content: '* '; color: #ff0000; }
.sb-rsz-hint { margin: 0; padding: 8px 6px; font-size: 11px; font-weight: 700; color: #fff; background: #000; letter-spacing: 0.04em; text-align: center; animation: sb-rsz-flash 1.4s steps(1) infinite; }
@keyframes sb-rsz-flash {
0%, 49% { background: #000; color: #fff; }
50%, 100% { background: #ff0000; color: #000; }
}
@media (prefers-reduced-motion: reduce) { .sb-rsz-hint { animation: none; } }
.sb-rsz-main { flex: 1; padding: 24px 28px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.sb-rsz-bar2 { display: flex; justify-content: space-between; padding: 6px 12px; background: #000; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }
.sb-rsz-main h2 { margin: 0; font-size: clamp(40px, 6vw, 76px); font-weight: 700; line-height: 0.92; color: #000; letter-spacing: -0.02em; }
.sb-rsz-main p { margin: 0; font-size: 13.5px; color: #000; line-height: 1.7; max-width: 540px; font-weight: 700; }
.sb-rsz-main code { font-family: inherit; font-size: 13px; color: #fff; background: #000; padding: 1px 6px; border-radius: 0; font-weight: 700; }
.sb-rsz-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; max-width: 480px; border: 2px solid #000; }
.sb-rsz-cell { padding: 12px; font-size: 12px; font-weight: 700; text-align: center; border-right: 2px solid #000; border-bottom: 2px solid #000; }
.sb-rsz-cell:nth-child(6n) { border-right: 0; }
.sb-rsz-cell:nth-last-child(-n+6) { border-bottom: 0; }
.sb-rsz-cell.solid { background: #000; color: #fff; }
.sb-rsz-cell.solid::after { content: ' ✦'; }
```
### 21. Three-pane Workspace
**Type:** Pure CSS
**Description:** Linear-style minimal mono — slate canvas, hairline rules, single electric-blue accent. Three-pane workspace shell (workspace nav, page list, editor); each pane scrolls independently. Heavy on semantics — real <aside> + <nav> + <article>.
**HTML:**
```html
Sprint 47 retro
Yesterday · 14:21
Hiring loop · Q3
2 days ago
Vendor shortlist
Last week
Team offsite ideas
Apr 24
OKR review · H1
Apr 18
Three independent panes, each with its own scroll. The workspace nav (left), the page list
(middle), and the editor (right) — the shell behind Notion, Linear, Apple Notes.
What went well
Shipped the dashboard refactor on time.
Onboarding flow completion up 18%.
Zero P0 incidents during launch week.
To improve
QA cycle compressed at the end — pull it earlier.
Marketing copy review needs a clearer owner.
```
**CSS:**
```css
.sb-3pn {
display: grid; grid-template-columns: 220px 260px 1fr;
min-height: 480px;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background: #181a1f; color: #d6d8de;
border-radius: 8px; overflow: hidden;
letter-spacing: -0.01em;
}
.sb-3pn-ws { background: #14161a; border-right: 1px solid rgba(255,255,255,0.05); padding: 16px 12px; display: flex; flex-direction: column; gap: 14px; }
.sb-3pn-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); text-decoration: none; }
.sb-3pn-mark { width: 22px; height: 22px; flex-shrink: 0; border-radius: 5px; background: linear-gradient(135deg, #4d7cff 0%, #1850e0 100%); box-shadow: 0 4px 14px rgba(77,124,255,0.35); position: relative; }
.sb-3pn-mark::after { content: ''; position: absolute; inset: 5px; border: 1.5px solid #fff; border-radius: 1px; }
.sb-3pn-name { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.sb-3pn-shead { font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; color: #6a6e76; padding: 0 8px; margin-top: 4px; }
.sb-3pn-ws ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.sb-3pn-ws a {
display: flex; align-items: center; gap: 10px;
padding: 6px 10px; border-radius: 6px;
font-size: 13px; font-weight: 500; color: #b6b9c1; text-decoration: none;
transition: background 0.12s, color 0.12s;
}
.sb-3pn-ws a:hover { background: rgba(255,255,255,0.04); color: #fff; }
.sb-3pn-ws a[aria-current="page"] { background: rgba(77,124,255,0.16); color: #fff; box-shadow: inset 2px 0 0 #4d7cff; padding-left: 8px; }
.sb-3pn-i { width: 14px; text-align: center; flex-shrink: 0; font-size: 11px; color: #6a6e76; }
.sb-3pn-ws a[aria-current="page"] .sb-3pn-i { color: #4d7cff; }
.sb-3pn-ws a em { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 600; color: #6a6e76; padding: 1px 6px; border-radius: 8px; background: rgba(255,255,255,0.06); }
.sb-3pn-ws a[aria-current="page"] em { background: rgba(77,124,255,0.2); color: #4d7cff; }
.sb-3pn-avatar { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 700; color: #fff; }
.sb-3pn-list { background: #1a1c21; border-right: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; overflow: hidden; }
.sb-3pn-list header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.sb-3pn-list h2 { margin: 0; font-size: 13px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.sb-3pn-list button { width: 24px; height: 24px; border-radius: 5px; border: 0; background: rgba(255,255,255,0.05); color: #fff; font-size: 14px; cursor: pointer; transition: background 0.14s; }
.sb-3pn-list button:hover { background: #4d7cff; }
.sb-3pn-list ul { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 0; flex: 1; overflow-y: auto; }
.sb-3pn-list li { padding: 12px 12px; border-radius: 6px; cursor: pointer; transition: background 0.12s; border-bottom: 1px solid rgba(255,255,255,0.03); }
.sb-3pn-list li:hover { background: rgba(255,255,255,0.04); }
.sb-3pn-list li.active { background: rgba(77,124,255,0.1); border-bottom-color: transparent; box-shadow: inset 2px 0 0 #4d7cff; }
.sb-3pn-list strong { display: block; font-size: 13px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.sb-3pn-list span { display: block; font-size: 11px; color: #6a6e76; margin-top: 4px; }
.sb-3pn-edit { padding: 32px 36px; overflow-y: auto; background: #181a1f; }
.sb-3pn-edit header { padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 18px; }
.sb-3pn-eye { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #4d7cff; letter-spacing: 0.04em; }
.sb-3pn-edit h2 { margin: 4px 0 4px; font-size: clamp(28px, 4vw, 40px); font-weight: 700; color: #fff; letter-spacing: -0.03em; line-height: 1.05; }
.sb-3pn-edit header p { margin: 0; font-size: 12px; color: #6a6e76; }
.sb-3pn-body { margin: 0 0 18px; font-size: 14.5px; color: #d6d8de; line-height: 1.65; max-width: 540px; }
.sb-3pn-edit h2 { margin: 18px 0 8px; font-size: 16px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.sb-3pn-edit ul { margin: 0 0 16px; padding-left: 22px; font-size: 13.5px; color: #b6b9c1; line-height: 1.75; }
@media (max-width: 720px) {
.sb-3pn { grid-template-columns: 1fr; }
.sb-3pn-ws, .sb-3pn-list { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
}
```
### 22. Adaptive Container-query
**Type:** Pure CSS
**Description:** Sunset terminal — pitch black with green-screen phosphor type, amber prompt accents, a soft horizon glow at the bottom. The 1980s computer terminal aesthetic. Sidebar reflows into a horizontal top nav when its container drops below 600px — CSS container queries, not viewport media queries.
**HTML:**
```html
/* container-queries.md */
Adaptive by container.
Resize the card width — when this container drops below 600px, the sidebar
collapses into a top nav. The viewport size is irrelevant; the layout
reacts to its own parent. Drop this shell into any narrow column and it adapts on its own.
@container (max-width: 600px) {
.sb-cnt { grid-template-columns: 1fr; }
.sb-cnt-side { flex-direction: row; }
}
```
**CSS:**
```css
.sb-cnt-wrap {
font-family: 'JetBrains Mono', 'Courier New', monospace;
color: #5ce064;
container-type: inline-size;
}
.sb-cnt {
position: relative;
display: grid; grid-template-columns: 220px 1fr;
min-height: 480px;
background: #060a07;
border-radius: 6px; overflow: hidden;
isolation: isolate;
border: 1px solid rgba(92,224,100,0.3);
}
.sb-cnt-glow {
position: absolute; left: 0; right: 0; bottom: 0; height: 60%;
pointer-events: none; z-index: 0;
background:
radial-gradient(80% 60% at 50% 100%, rgba(255,140,40,0.32), transparent 70%),
radial-gradient(40% 30% at 50% 100%, rgba(255,210,80,0.4), transparent 70%);
}
.sb-cnt-scan {
position: absolute; inset: 0; pointer-events: none; z-index: 2;
background: repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0 1px, transparent 1px 4px);
mix-blend-mode: overlay;
}
.sb-cnt-side {
position: relative; z-index: 1;
background: rgba(8,14,10,0.85);
border-right: 1px solid rgba(92,224,100,0.3);
padding: 18px 14px;
display: flex; flex-direction: column; gap: 14px;
}
.sb-cnt-brand { display: flex; align-items: baseline; gap: 8px; padding: 4px 4px 14px; border-bottom: 1px dashed rgba(92,224,100,0.3); text-decoration: none; }
.sb-cnt-prompt { color: #ffaa44; font-size: 16px; font-weight: 800; text-shadow: 0 0 10px rgba(255,170,68,0.5); }
.sb-cnt-name { font-size: 16px; font-weight: 700; color: #5ce064; letter-spacing: 0.04em; text-shadow: 0 0 8px rgba(92,224,100,0.4); line-height: 1; }
.sb-cnt-name small { font-size: 12px; color: #ffaa44; font-weight: 700; }
.sb-cnt-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.sb-cnt-side a {
display: flex; align-items: center; gap: 12px;
padding: 7px 10px;
font-size: 13px; color: #5ce064; text-decoration: none;
border-left: 2px solid transparent;
transition: background 0.14s, color 0.14s, border-color 0.14s, text-shadow 0.14s;
}
.sb-cnt-side a em { font-style: normal; font-size: 11px; font-weight: 700; color: rgba(92,224,100,0.5); width: 18px; }
.sb-cnt-side a:hover { background: rgba(92,224,100,0.08); color: #fff; border-left-color: #5ce064; text-shadow: 0 0 8px rgba(92,224,100,0.6); }
.sb-cnt-side a[aria-current="page"] { background: rgba(255,170,68,0.12); color: #ffaa44; border-left-color: #ffaa44; text-shadow: 0 0 10px rgba(255,170,68,0.6); }
.sb-cnt-side a[aria-current="page"] em { color: #ffaa44; }
.sb-cnt-side footer { margin-top: auto; padding-top: 10px; border-top: 1px dashed rgba(92,224,100,0.3); font-size: 11px; color: #5ce064; letter-spacing: 0.06em; opacity: 0.8; }
.sb-cnt-cursor { color: #ffaa44; animation: sb-cnt-blink 1s steps(1) infinite; }
@keyframes sb-cnt-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sb-cnt-cursor { animation: none; } }
.sb-cnt-main { position: relative; z-index: 1; padding: 30px 32px; display: flex; flex-direction: column; gap: 16px; }
.sb-cnt-eye { font-size: 11.5px; color: rgba(92,224,100,0.6); letter-spacing: 0.04em; font-style: italic; }
.sb-cnt-main h2 {
margin: 0; font-family: 'JetBrains Mono', 'Courier New', monospace;
font-size: clamp(32px, 5vw, 56px); font-weight: 800; line-height: 0.95;
color: #5ce064; letter-spacing: -0.02em;
text-shadow: 0 0 20px rgba(92,224,100,0.4);
}
.sb-cnt-main p { margin: 0; font-family: 'Inter', system-ui, sans-serif; font-size: 13.5px; color: rgba(214,235,218,0.9); line-height: 1.65; max-width: 480px; }
.sb-cnt-main em { color: #ffaa44; font-style: normal; font-weight: 600; text-shadow: 0 0 8px rgba(255,170,68,0.4); }
.sb-cnt-main strong { color: #5ce064; font-weight: 700; }
.sb-cnt-code { margin: 0; padding: 16px 18px; background: rgba(8,14,10,0.85); border: 1px solid rgba(92,224,100,0.3); border-radius: 4px; font-size: 12px; line-height: 1.7; color: #5ce064; white-space: pre-wrap; box-shadow: inset 0 0 24px rgba(92,224,100,0.05); }
@container (max-width: 600px) {
.sb-cnt { grid-template-columns: 1fr; }
.sb-cnt-side { flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; border-right: 0; border-bottom: 1px dashed rgba(92,224,100,0.3); overflow-x: auto; }
.sb-cnt-side ul { flex-direction: row; gap: 4px; flex-shrink: 0; }
.sb-cnt-side a { padding: 6px 10px; font-size: 12px; }
.sb-cnt-side footer, .sb-cnt-brand { display: none; }
}
```
### 23. Glass Floating Sidebar
**Type:** Pure CSS
**Description:** Vaporwave dream — chromatic magenta-to-cyan gradient with a sun on the horizon, scanlines, and a translucent glass sidebar floating above it. backdrop-filter: blur() handles the frost; CSS keyframes drift the sun. Pure CSS, no images.
**HTML:**
```html
◇ A E S T H E T I C ◇
Glass over sunset.
The sidebar floats above a setting-sun horizon and a perspective grid that fades into haze.
Backdrop-blur frosts the glass; pure CSS keyframes drift the sun.
vaporwave aesthetic 1995 chrome
```
**CSS:**
```css
.sb-glx {
position: relative;
display: grid; grid-template-columns: 260px 1fr;
min-height: 480px;
font-family: 'Helvetica Neue', system-ui, -apple-system, sans-serif;
color: #fff;
border-radius: 14px; overflow: hidden;
isolation: isolate;
background: #1a0033;
}
.sb-glx-sky {
position: absolute; inset: 0;
background: linear-gradient(180deg, #2d0066 0%, #6a0a8c 30%, #ec1d8c 65%, #ff5e9c 80%, #ffa56a 100%);
z-index: 0;
}
.sb-glx-sun {
position: absolute;
bottom: 32%; left: 50%;
width: 220px; height: 220px;
margin-left: -110px;
border-radius: 50%;
background: linear-gradient(180deg, #ffd700 0%, #ff5e9c 60%, #ec1d8c 100%);
box-shadow: 0 0 80px rgba(255,215,0,0.6), 0 0 160px rgba(236,29,140,0.5);
z-index: 1;
animation: sb-glx-rise 12s ease-in-out infinite alternate;
}
.sb-glx-sun::before, .sb-glx-sun::after {
content: ''; position: absolute; left: 0; right: 0; height: 5px;
background: #1a0033;
}
.sb-glx-sun::before { bottom: 30%; box-shadow: 0 14px 0 #1a0033, 0 30px 0 #1a0033, 0 50px 0 #1a0033, 0 75px 0 #1a0033; }
.sb-glx-sun::after { display: none; }
.sb-glx-grid {
position: absolute; bottom: 0; left: 0; right: 0; height: 38%;
background:
linear-gradient(transparent 0%, rgba(0,229,255,0.4) 100%),
repeating-linear-gradient(90deg, transparent 0 calc((100% / 24) - 1px), rgba(0,229,255,0.5) calc((100% / 24) - 1px) calc(100% / 24));
background-size: 100% 100%, 100% 100%;
transform: perspective(300px) rotateX(60deg);
transform-origin: bottom;
z-index: 1;
mask-image: linear-gradient(transparent 0%, #000 30%);
-webkit-mask-image: linear-gradient(transparent 0%, #000 30%);
}
.sb-glx-grid::before {
content: ''; position: absolute; inset: 0;
background: repeating-linear-gradient(0deg, transparent 0 18px, rgba(0,229,255,0.45) 18px 19px);
}
.sb-glx-scan {
position: absolute; inset: 0; z-index: 2; pointer-events: none;
background: repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0 1px, transparent 1px 4px);
mix-blend-mode: overlay;
}
@keyframes sb-glx-rise {
from { transform: translateY(20px); }
to { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) { .sb-glx-sun { animation: none; } }
.sb-glx-side {
position: relative; z-index: 3;
margin: 18px 0 18px 18px; padding: 18px 14px; width: 224px;
background: rgba(255,255,255,0.1);
backdrop-filter: blur(20px) saturate(1.4);
-webkit-backdrop-filter: blur(20px) saturate(1.4);
border: 1px solid rgba(255,255,255,0.25);
border-radius: 16px;
box-shadow:
0 16px 48px rgba(0,0,0,0.4),
inset 0 1px 0 rgba(255,255,255,0.4),
inset 0 0 0 1px rgba(255,255,255,0.06);
display: flex; flex-direction: column; gap: 16px;
}
.sb-glx-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; border-bottom: 1px solid rgba(255,255,255,0.15); text-decoration: none; }
.sb-glx-mark { width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; background: linear-gradient(135deg, #00e5ff 0%, #ec1d8c 50%, #ffd700 100%); box-shadow: 0 0 18px rgba(236,29,140,0.6), inset 0 1px 0 rgba(255,255,255,0.5); }
.sb-glx-name { color: #fff; font-size: 16px; font-weight: 800; letter-spacing: 0.18em; line-height: 1; text-shadow: 0 0 8px rgba(255,94,156,0.8); }
.sb-glx-name small { display: block; font-family: 'Courier New', monospace; font-size: 9.5px; color: #00e5ff; font-weight: 700; letter-spacing: 0.4em; margin-top: 4px; text-shadow: 0 0 6px rgba(0,229,255,0.7); }
.sb-glx-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sb-glx-side a {
display: block; padding: 9px 12px; border-radius: 8px;
font-family: 'Courier New', monospace;
font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
color: rgba(255,255,255,0.85); text-decoration: none;
border: 1px solid transparent;
transition: background 0.18s, color 0.18s, border-color 0.18s, text-shadow 0.18s;
}
.sb-glx-side a:hover {
background: rgba(255,255,255,0.12);
color: #fff;
border-color: rgba(255,255,255,0.25);
text-shadow: 0 0 8px rgba(0,229,255,0.6);
}
.sb-glx-side a[aria-current="page"] {
background: linear-gradient(90deg, rgba(0,229,255,0.25), rgba(236,29,140,0.25));
color: #fff;
border-color: rgba(255,255,255,0.4);
text-shadow: 0 0 10px rgba(0,229,255,0.7);
box-shadow: inset 0 0 16px rgba(0,229,255,0.15);
}
.sb-glx-side footer { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px 6px 0; border-top: 1px solid rgba(255,255,255,0.15); }
.sb-glx-dot { width: 8px; height: 8px; border-radius: 50%; background: #00ff9c; box-shadow: 0 0 12px #00ff9c, 0 0 24px rgba(0,255,156,0.5); animation: sb-glx-blink 1.6s ease-in-out infinite; }
@keyframes sb-glx-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .sb-glx-dot { animation: none; } }
.sb-glx-side small { font-family: 'Courier New', monospace; font-size: 10.5px; color: rgba(255,255,255,0.85); letter-spacing: 0.06em; }
.sb-glx-main { position: relative; z-index: 3; padding: 32px 36px; display: flex; flex-direction: column; gap: 16px; }
.sb-glx-eye { font-family: 'Courier New', monospace; font-size: 11.5px; letter-spacing: 0.4em; color: #00e5ff; text-shadow: 0 0 10px rgba(0,229,255,0.7); }
.sb-glx-main h2 {
margin: 0; font-size: clamp(34px, 5vw, 64px); font-weight: 900; line-height: 0.92;
color: #fff; letter-spacing: -0.03em;
text-shadow:
-2px 0 0 rgba(236,29,140,0.7),
2px 0 0 rgba(0,229,255,0.7),
0 0 30px rgba(255,255,255,0.4);
}
.sb-glx-main p { margin: 0; font-size: 13.5px; color: rgba(255,255,255,0.92); line-height: 1.6; max-width: 460px; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.sb-glx-main code { font-family: 'Courier New', monospace; font-size: 12px; color: #00e5ff; background: rgba(0,0,0,0.3); padding: 1px 6px; border-radius: 3px; border: 1px solid rgba(0,229,255,0.4); }
.sb-glx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.sb-glx-tags span { font-family: 'Courier New', monospace; font-size: 10.5px; padding: 5px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.4); color: #fff; background: rgba(255,255,255,0.1); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); letter-spacing: 0.16em; text-transform: uppercase; }
@media (max-width: 720px) {
.sb-glx { grid-template-columns: 1fr; }
.sb-glx-side { width: auto; margin: 14px 14px 0; }
}
```
---
## 10 CSS Sidebar Navigation
URL: https://codefronts.com/navigation/css-sidebar-navigation/
Description: Hand-coded CSS sidebar navigation patterns — collapsible rails, drawer menus with text and icons, nested vertical navigation, sidebar dropdowns, sticky full-height layouts, glassmorphic blur, mobile slide-out overlays, and bottom-pinned profile sidebars. Pure CSS, no framework, copy-paste ready.
Demo count: 10
### 01. Pure CSS Collapsible Sidebar Navigation Snippet
**Type:** Pure CSS
**Description:** Developer-documentation aesthetic in a dark GitHub-style palette with JetBrains Mono accents. The whole rail collapses to an icon-only strip via the pure-CSS checkbox hack — a CSS side menu that hides and shows on click with zero JavaScript, the canonical drawer menu with text and icons that toggle together. Smooth width transition, active-item glow bar, grouped sections, and a footer user card. Best for documentation sites, developer dashboards, API consoles, admin panels where the user toggles between focused work and full navigation.
**HTML:**
```html
```
**CSS:**
```css
/* ─── 01 Pure CSS Collapsible Sidebar — dev docs dark ──────── */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Sora:wght@400;600;700&display=swap');
.sn-clp {
--sn-clp-bg: #0d1117;
--sn-clp-panel: #161b22;
--sn-clp-panel-2: #1c2230;
--sn-clp-line: #262d3a;
--sn-clp-txt: #c9d1d9;
--sn-clp-muted: #6e7681;
--sn-clp-accent: #39d353;
--sn-clp-accent-2: #2dd4bf;
position: relative;
width: 100%;
height: 600px;
font-family: 'Sora', sans-serif;
background:
radial-gradient(900px 500px at 110% -10%, rgba(57,211,83,.08), transparent 60%),
var(--sn-clp-bg);
color: var(--sn-clp-txt);
display: flex;
overflow: hidden;
box-sizing: border-box;
}
.sn-clp *, .sn-clp *::before, .sn-clp *::after { box-sizing: border-box; margin: 0; padding: 0; }
.sn-clp .toggle { display: none; }
.sn-clp .sidebar {
width: 260px;
background: var(--sn-clp-panel);
border-right: 1px solid var(--sn-clp-line);
height: 100%;
display: flex;
flex-direction: column;
transition: width .32s cubic-bezier(.4,0,.2,1);
overflow: hidden;
flex-shrink: 0;
}
.sn-clp .brand {
display: flex; align-items: center; gap: .7rem;
padding: 1.4rem 1.2rem;
border-bottom: 1px solid var(--sn-clp-line);
white-space: nowrap;
}
.sn-clp .logo {
min-width: 34px; height: 34px; border-radius: 9px;
background: linear-gradient(135deg, var(--sn-clp-accent), var(--sn-clp-accent-2));
display: grid; place-items: center;
font-family: 'JetBrains Mono', monospace; font-weight: 700; color: #04130a;
}
.sn-clp .brand b { font-size: 1.05rem; letter-spacing: -.02em; }
.sn-clp .brand span { font-family: 'JetBrains Mono', monospace; font-size: .68rem; color: var(--sn-clp-muted); display: block; }
.sn-clp .burger {
margin-left: auto; cursor: pointer; width: 30px; height: 30px;
border-radius: 7px; display: grid; place-items: center; color: var(--sn-clp-muted);
transition: .2s; flex-shrink: 0;
}
.sn-clp .burger:hover { background: var(--sn-clp-panel-2); color: var(--sn-clp-accent); }
.sn-clp .burger svg { width: 18px; height: 18px; }
.sn-clp .nav { padding: 1rem .8rem; flex: 1; overflow-y: auto; }
.sn-clp .group-label {
font-family: 'JetBrains Mono', monospace; font-size: .65rem;
text-transform: uppercase; letter-spacing: .15em; color: var(--sn-clp-muted);
padding: .6rem .8rem .4rem; white-space: nowrap;
}
.sn-clp .item {
display: flex; align-items: center; gap: .85rem;
padding: .62rem .8rem; border-radius: 9px; color: var(--sn-clp-txt);
text-decoration: none; font-size: .9rem; white-space: nowrap;
position: relative; transition: background .18s, color .18s;
}
.sn-clp .item svg { width: 19px; height: 19px; flex-shrink: 0; stroke-width: 1.7; }
.sn-clp .item span { transition: opacity .2s; }
.sn-clp .item:hover { background: var(--sn-clp-panel-2); color: #fff; }
.sn-clp .item.active { background: linear-gradient(90deg, rgba(57,211,83,.14), transparent); color: var(--sn-clp-accent); }
.sn-clp .item.active::before {
content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px;
border-radius: 3px; background: var(--sn-clp-accent);
}
.sn-clp .badge {
margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: .62rem;
background: var(--sn-clp-panel-2); padding: .1rem .4rem; border-radius: 6px; color: var(--sn-clp-muted);
font-style: normal;
}
.sn-clp .foot { padding: 1rem; border-top: 1px solid var(--sn-clp-line); }
.sn-clp .user { display: flex; align-items: center; gap: .7rem; white-space: nowrap; }
.sn-clp .avatar { min-width: 34px; height: 34px; border-radius: 50%;
background: linear-gradient(135deg, #2dd4bf, #39d353); flex-shrink: 0; }
.sn-clp .user b { font-size: .85rem; }
.sn-clp .user small { display: block; color: var(--sn-clp-muted); font-family: 'JetBrains Mono', monospace; font-size: .66rem; }
/* collapsed state */
.sn-clp .toggle:checked ~ .sidebar { width: 74px; }
.sn-clp .toggle:checked ~ .sidebar .item span,
.sn-clp .toggle:checked ~ .sidebar .badge,
.sn-clp .toggle:checked ~ .sidebar .group-label,
.sn-clp .toggle:checked ~ .sidebar .user > div:not(.avatar) { opacity: 0; pointer-events: none; }
.sn-clp .toggle:checked ~ .sidebar .group-label { height: 8px; padding: 0; }
.sn-clp .toggle:checked ~ .sidebar .brand {
flex-direction: column; gap: .7rem; padding: 1.1rem 0;
}
.sn-clp .toggle:checked ~ .sidebar .brand-text {
width: 0; height: 0; overflow: hidden; opacity: 0; pointer-events: none;
}
.sn-clp .toggle:checked ~ .sidebar .burger { margin-left: 0; }
.sn-clp .content { flex: 1; padding: 3rem; overflow-y: auto; min-width: 0; }
.sn-clp .content h1 { font-size: 2rem; letter-spacing: -.03em; margin-bottom: .6rem; }
.sn-clp .content p { color: var(--sn-clp-muted); max-width: 560px; line-height: 1.7; }
.sn-clp .code {
margin-top: 2rem; background: var(--sn-clp-panel); border: 1px solid var(--sn-clp-line);
border-radius: 14px; padding: 1.4rem 1.6rem; font-family: 'JetBrains Mono', monospace;
font-size: .82rem; color: var(--sn-clp-accent-2); max-width: 560px;
}
.sn-clp .code .c { color: var(--sn-clp-muted); }
@media (prefers-reduced-motion: reduce) {
.sn-clp .sidebar, .sn-clp .item span { transition: none; }
}
```
### 02. Responsive Sidebar Toggle with HTML and CSS
**Type:** Pure CSS
**Description:** Warm editorial / print magazine theme (Fraunces + Newsreader, paper texture, drop caps). On desktop it sits as a permanent reading index; below the responsive breakpoint it becomes a responsive offcanvas drawer summoned by a hamburger button and dismissed via a dimmed overlay — all CSS, no scripts. Best for editorial sites, literary magazines, long-form blogs, documentation that prizes a considered print aesthetic.
**HTML:**
```html
Featured Essay
On a responsive layout, the sidebar slides away on small screens and reappears with a tap of the menu — no JavaScript involved.
This demonstration uses the classic checkbox toggle to drive a fully responsive off-canvas navigation. On wide screens the menu sits permanently to the left as a reading index. Resize the window below the breakpoint and the rail tucks itself off-canvas, summoned by the hamburger button and dismissed by tapping the dimmed overlay.
Everything is hand-set in CSS: the transitions, the overlay, the breakpoint behaviour. The result is a warm, print-inspired interface that feels considered rather than templated.
```
**CSS:**
```css
/* ─── 02 Responsive Sidebar Toggle — editorial magazine ──────── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,900&family=Newsreader:ital@0;1&display=swap');
.sn-rsp {
--sn-rsp-paper: #f4ece0;
--sn-rsp-ink: #2b211a;
--sn-rsp-rust: #bb4430;
--sn-rsp-olive: #7d8471;
--sn-rsp-line: #d9cbb6;
--sn-rsp-panel: #fbf6ee;
position: relative;
width: 100%;
height: 600px;
font-family: 'Newsreader', serif;
background: var(--sn-rsp-paper);
background-image: repeating-linear-gradient(0deg, rgba(43,33,26,.012) 0 2px, transparent 2px 4px);
color: var(--sn-rsp-ink);
display: flex;
overflow: hidden;
box-sizing: border-box;
}
.sn-rsp *, .sn-rsp *::before, .sn-rsp *::after { box-sizing: border-box; margin: 0; padding: 0; }
.sn-rsp .toggle { display: none; }
.sn-rsp .overlay { display: none; }
.sn-rsp .sidebar {
width: 288px;
background: var(--sn-rsp-panel);
border-right: 2px solid var(--sn-rsp-ink);
height: 100%;
display: flex; flex-direction: column;
transition: transform .4s cubic-bezier(.22,1,.36,1);
z-index: 30;
flex-shrink: 0;
}
.sn-rsp .head { padding: 2rem 1.8rem 1.4rem; border-bottom: 1px solid var(--sn-rsp-line); }
.sn-rsp .kicker { font-family: 'Fraunces'; font-weight: 600; font-size: .7rem; letter-spacing: .32em;
text-transform: uppercase; color: var(--sn-rsp-rust); }
.sn-rsp .head h2 { font-family: 'Fraunces'; font-weight: 900; font-size: 1.9rem; line-height: 1; margin-top: .4rem; font-style: italic; }
.sn-rsp .nav { padding: 1.4rem 1rem; flex: 1; overflow-y: auto; }
.sn-rsp .item {
display: flex; align-items: baseline; gap: .9rem;
padding: .7rem 1rem; text-decoration: none; color: var(--sn-rsp-ink);
font-size: 1.12rem; border-radius: 2px; position: relative; transition: .2s;
}
.sn-rsp .item .num { font-family: 'Fraunces'; font-weight: 600; font-size: .78rem; color: var(--sn-rsp-olive); min-width: 22px; }
.sn-rsp .item:hover { background: var(--sn-rsp-paper); padding-left: 1.35rem; }
.sn-rsp .item.active { color: var(--sn-rsp-rust); font-style: italic; font-weight: 600; }
.sn-rsp .item.active .num { color: var(--sn-rsp-rust); }
.sn-rsp .rule { height: 1px; background: var(--sn-rsp-line); margin: 1rem 1rem; }
.sn-rsp .foot { padding: 1.4rem 1.8rem; border-top: 2px solid var(--sn-rsp-ink); font-family: 'Fraunces'; font-size: .78rem; color: var(--sn-rsp-olive); }
.sn-rsp .content { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-y: auto; }
.sn-rsp .topbar {
display: flex; align-items: center; gap: 1rem;
padding: 1.2rem 2rem; border-bottom: 1px solid var(--sn-rsp-line);
position: sticky; top: 0; background: var(--sn-rsp-paper); z-index: 10;
}
.sn-rsp .menu-btn {
cursor: pointer; border: 1.5px solid var(--sn-rsp-ink); border-radius: 3px;
padding: .45rem .55rem; display: none; background: none;
}
.sn-rsp .menu-btn svg { width: 20px; height: 20px; display: block; stroke: var(--sn-rsp-ink); }
.sn-rsp .topbar h1 { font-family: 'Fraunces'; font-weight: 900; font-size: 1.3rem; }
.sn-rsp .article { padding: 3rem; max-width: 680px; }
.sn-rsp .article .lead { font-family: 'Fraunces'; font-style: italic; font-weight: 400;
font-size: 1.7rem; line-height: 1.4; margin-bottom: 1.6rem; }
.sn-rsp .article p { font-size: 1.12rem; line-height: 1.85; margin-bottom: 1.2rem; color: #3a2e25; }
.sn-rsp .article p:first-of-type::first-letter { float: left; font-family: 'Fraunces'; font-weight: 900;
font-size: 3.4rem; line-height: .8; padding: .1rem .5rem .1rem 0; color: var(--sn-rsp-rust); }
@media (max-width: 860px) {
.sn-rsp .sidebar { position: absolute; transform: translateX(-100%); box-shadow: 6px 0 40px rgba(0,0,0,.15); }
.sn-rsp .toggle:checked ~ .sidebar { transform: translateX(0); }
.sn-rsp .toggle:checked ~ .overlay { display: block; position: absolute; inset: 0; background: rgba(43,33,26,.4); z-index: 20; }
.sn-rsp .menu-btn { display: block; }
}
@media (prefers-reduced-motion: reduce) {
.sn-rsp .sidebar { transition: none; }
}
```
### 03. Light & Flexible CSS Vertical Rail Menu (Collapsible)
**Type:** Pure CSS
**Description:** Neon music-player vibe on near-black with lime / cyan / pink accents and an animated equalizer. A springy icon rail that expands to reveal labels, with hover tooltips when collapsed and a glowing active indicator. Bouncy cubic-bezier motion. Best for music apps, creative tool dashboards, vibrant SaaS landing pages, and any product that wants its sidebar to feel kinetic.
**HTML:**
```html
```
**CSS:**
```css
/* ─── 03 Vertical Rail Menu — neon music player ───────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&family=Syne:wght@600;800&display=swap');
.sn-rai {
--sn-rai-bg: #08070d;
--sn-rai-rail: #0f0d18;
--sn-rai-rail-2: #17142a;
--sn-rai-txt: #e8e6f0;
--sn-rai-muted: #7b7790;
--sn-rai-neon: #c4f82a;
--sn-rai-pink: #ff4d8c;
--sn-rai-cyan: #39e0ff;
position: relative;
width: 100%;
height: 600px;
font-family: 'Outfit', sans-serif;
background:
radial-gradient(700px 700px at 100% 100%, rgba(255,77,140,.12), transparent 60%),
radial-gradient(700px 700px at 0% 0%, rgba(57,224,255,.1), transparent 55%),
var(--sn-rai-bg);
color: var(--sn-rai-txt);
display: flex;
overflow: hidden;
box-sizing: border-box;
}
.sn-rai *, .sn-rai *::before, .sn-rai *::after { box-sizing: border-box; margin: 0; padding: 0; }
.sn-rai .toggle { display: none; }
.sn-rai .rail {
width: 84px;
background: linear-gradient(180deg, var(--sn-rai-rail), var(--sn-rai-rail-2));
border-right: 1px solid rgba(255,255,255,.06);
height: 100%;
display: flex; flex-direction: column; align-items: center;
padding: 1.3rem 0; gap: .5rem;
transition: width .35s cubic-bezier(.34,1.56,.64,1);
overflow: hidden;
flex-shrink: 0;
}
.sn-rai .mark {
width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
background: linear-gradient(135deg, var(--sn-rai-neon), var(--sn-rai-cyan));
display: grid; place-items: center; color: #08070d;
font-family: 'Syne'; font-weight: 800; font-size: 1.3rem; margin-bottom: 1rem;
box-shadow: 0 0 24px rgba(196,248,42,.4);
}
.sn-rai .pill {
width: 90%; display: flex; align-items: center; gap: 1rem;
padding: .75rem; border-radius: 14px; text-decoration: none; color: var(--sn-rai-muted);
position: relative; transition: .25s; white-space: nowrap;
}
.sn-rai .pill svg { width: 24px; height: 24px; min-width: 24px; stroke-width: 1.8; }
.sn-rai .pill .lbl { font-size: .95rem; font-weight: 500; opacity: 0; transition: opacity .25s; }
.sn-rai .pill:hover { color: var(--sn-rai-txt); background: rgba(255,255,255,.04); }
.sn-rai .pill.active { color: var(--sn-rai-neon); background: rgba(196,248,42,.1); }
.sn-rai .pill.active::after {
content: ""; position: absolute; right: -.65rem; top: 50%; transform: translateY(-50%);
width: 4px; height: 60%; border-radius: 4px; background: var(--sn-rai-neon);
box-shadow: 0 0 12px var(--sn-rai-neon);
}
.sn-rai .tip {
position: absolute; left: 72px; top: 50%; transform: translateY(-50%) scale(.8);
background: #fff; color: #08070d; font-size: .78rem; font-weight: 600;
padding: .35rem .7rem; border-radius: 8px; opacity: 0; pointer-events: none;
transition: .2s; white-space: nowrap; z-index: 5;
}
.sn-rai .pill:hover .tip { opacity: 1; transform: translateY(-50%) scale(1); }
.sn-rai .spacer { flex: 1; }
.sn-rai .ctrl {
margin-top: .8rem; width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
background: rgba(255,255,255,.05); border: none; cursor: pointer; color: var(--sn-rai-muted);
display: grid; place-items: center; transition: .25s;
}
.sn-rai .ctrl:hover { color: var(--sn-rai-neon); background: rgba(196,248,42,.1); }
.sn-rai .ctrl svg { width: 22px; height: 22px; transition: transform .35s; }
/* expanded */
.sn-rai .toggle:checked ~ .rail { width: 248px; align-items: stretch; padding-left: 1rem; padding-right: 1rem; }
.sn-rai .toggle:checked ~ .rail .pill .lbl { opacity: 1; }
.sn-rai .toggle:checked ~ .rail .pill:hover .tip { display: none; }
.sn-rai .toggle:checked ~ .rail .ctrl svg { transform: rotate(180deg); }
.sn-rai .toggle:checked ~ .rail .mark { margin-left: .4rem; }
.sn-rai .stage { flex: 1; padding: 3rem; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; overflow: hidden; }
.sn-rai .nowplaying { display: flex; align-items: center; gap: 1.4rem; }
.sn-rai .cover { width: 120px; height: 120px; border-radius: 20px; flex-shrink: 0;
background: conic-gradient(from 45deg, var(--sn-rai-pink), var(--sn-rai-cyan), var(--sn-rai-neon), var(--sn-rai-pink));
box-shadow: 0 18px 50px rgba(255,77,140,.25); }
.sn-rai .stage h1 { font-family: 'Syne'; font-weight: 800; font-size: 2.4rem; letter-spacing: -.02em; }
.sn-rai .stage p { color: var(--sn-rai-muted); margin-top: .3rem; }
.sn-rai .bars { display: flex; gap: 4px; margin-top: 1.4rem; align-items: flex-end; height: 38px; }
.sn-rai .bars i { width: 5px; background: var(--sn-rai-neon); border-radius: 3px; animation: sn-rai-b 1s ease-in-out infinite; }
.sn-rai .bars i:nth-child(2) { animation-delay: .2s; background: var(--sn-rai-cyan); }
.sn-rai .bars i:nth-child(3) { animation-delay: .4s; background: var(--sn-rai-pink); }
.sn-rai .bars i:nth-child(4) { animation-delay: .1s; }
.sn-rai .bars i:nth-child(5) { animation-delay: .5s; background: var(--sn-rai-cyan); }
@keyframes sn-rai-b { 0%, 100% { height: 10px; } 50% { height: 38px; } }
@media (prefers-reduced-motion: reduce) {
.sn-rai .rail, .sn-rai .pill, .sn-rai .tip { transition: none; }
.sn-rai .bars i { animation: none; height: 24px; }
}
```
### 04. Responsive Dashboard Sidebar Navigation with Submenus
**Type:** Pure CSS
**Description:** A sidebar dropdown menu in HTML and CSS for a modern SaaS analytics dashboard, dark blue / violet. Collapsible submenu groups (Analytics, Audience, Settings) driven by checkboxes with rotating chevrons, an upgrade-to-pro card, and a responsive off-canvas drawer on mobile. KPI cards in the main panel. Best for analytics dashboards, SaaS admin panels, CRMs, BI tools — any product whose nav must expose 3-4 levels of grouped functionality without sprawling.
**HTML:**
```html
```
**CSS:**
```css
/* ─── 04 Dashboard Sidebar with Submenus — SaaS dark ──────── */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');
.sn-dsh {
--sn-dsh-bg: #0a0e14;
--sn-dsh-panel: #10151f;
--sn-dsh-panel-2: #161d2b;
--sn-dsh-line: #1e2737;
--sn-dsh-txt: #dfe6f0;
--sn-dsh-muted: #6b7689;
--sn-dsh-brand: #5b8cff;
--sn-dsh-brand-2: #8b5cf6;
--sn-dsh-good: #34d399;
position: relative;
width: 100%;
height: 600px;
font-family: 'Manrope', sans-serif;
background: var(--sn-dsh-bg);
color: var(--sn-dsh-txt);
display: flex;
overflow: hidden;
box-sizing: border-box;
}
.sn-dsh *, .sn-dsh *::before, .sn-dsh *::after { box-sizing: border-box; margin: 0; padding: 0; }
.sn-dsh .toggle { display: none; }
.sn-dsh .overlay { display: none; }
.sn-dsh .sidebar {
width: 268px; background: var(--sn-dsh-panel); border-right: 1px solid var(--sn-dsh-line);
height: 100%; display: flex; flex-direction: column; z-index: 30; flex-shrink: 0;
}
.sn-dsh .brand { display: flex; align-items: center; gap: .7rem; padding: 1.5rem 1.4rem; }
.sn-dsh .logo { width: 36px; height: 36px; border-radius: 10px;
background: linear-gradient(135deg, var(--sn-dsh-brand), var(--sn-dsh-brand-2));
display: grid; place-items: center; font-weight: 800; color: #fff; }
.sn-dsh .brand b { font-size: 1.15rem; letter-spacing: -.02em; }
.sn-dsh .brand small { display: block; color: var(--sn-dsh-muted); font-size: .7rem; font-weight: 600; }
.sn-dsh .nav { padding: .5rem .8rem 1rem; flex: 1; overflow-y: auto; }
.sn-dsh .cap { font-size: .66rem; text-transform: uppercase; letter-spacing: .13em;
color: var(--sn-dsh-muted); font-weight: 700; padding: 1rem .9rem .4rem; }
.sn-dsh .item {
display: flex; align-items: center; gap: .8rem; padding: .65rem .9rem;
border-radius: 10px; color: var(--sn-dsh-txt); text-decoration: none; font-size: .9rem;
font-weight: 500; cursor: pointer; transition: .18s;
}
.sn-dsh .item svg { width: 19px; height: 19px; stroke-width: 1.8; flex-shrink: 0; color: var(--sn-dsh-muted); }
.sn-dsh .item:hover { background: var(--sn-dsh-panel-2); }
.sn-dsh .item:hover svg { color: var(--sn-dsh-txt); }
.sn-dsh .item.active { background: linear-gradient(90deg, rgba(91,140,255,.16), rgba(139,92,246,.1)); color: #fff; }
.sn-dsh .item.active svg { color: var(--sn-dsh-brand); }
.sn-dsh .chev { margin-left: auto; width: 15px !important; height: 15px !important; transition: transform .25s; }
.sn-dsh .sub-toggle { display: none; }
.sn-dsh .submenu { max-height: 0; overflow: hidden; transition: max-height .3s ease;
margin-left: 1.5rem; border-left: 1.5px solid var(--sn-dsh-line); padding-left: .4rem; }
.sn-dsh .submenu a { display: block; padding: .5rem .8rem; color: var(--sn-dsh-muted); text-decoration: none;
font-size: .85rem; border-radius: 8px; transition: .18s; }
.sn-dsh .submenu a:hover { color: var(--sn-dsh-txt); background: var(--sn-dsh-panel-2); }
.sn-dsh .submenu a.dot::before { content: ""; display: inline-block; width: 5px; height: 5px;
border-radius: 50%; background: var(--sn-dsh-muted); margin-right: .6rem; vertical-align: middle; }
.sn-dsh .sub-toggle:checked + .item .chev { transform: rotate(90deg); }
.sn-dsh .sub-toggle:checked + .item { background: var(--sn-dsh-panel-2); }
.sn-dsh .sub-toggle:checked + .item + .submenu { max-height: 240px; }
.sn-dsh .pro { margin: 1rem .8rem; padding: 1.2rem; border-radius: 14px;
background: linear-gradient(135deg, rgba(91,140,255,.16), rgba(139,92,246,.16));
border: 1px solid rgba(91,140,255,.25); }
.sn-dsh .pro b { font-size: .92rem; }
.sn-dsh .pro p { color: var(--sn-dsh-muted); font-size: .76rem; margin: .3rem 0 .8rem; }
.sn-dsh .pro button { width: 100%; padding: .55rem; border: none; border-radius: 9px; cursor: pointer;
background: linear-gradient(135deg, var(--sn-dsh-brand), var(--sn-dsh-brand-2)); color: #fff; font-weight: 700; font-size: .82rem; font-family: inherit; }
.sn-dsh .mainpane { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-y: auto; }
.sn-dsh .top { display: flex; align-items: center; gap: 1rem; padding: 1.3rem 2rem; border-bottom: 1px solid var(--sn-dsh-line); }
.sn-dsh .mbtn { display: none; background: none; border: 1px solid var(--sn-dsh-line); border-radius: 8px; padding: .4rem; cursor: pointer; color: var(--sn-dsh-txt); }
.sn-dsh .mbtn svg { width: 20px; height: 20px; stroke: currentColor; display: block; }
.sn-dsh .top h1 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.sn-dsh .body { padding: 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; }
.sn-dsh .card { background: var(--sn-dsh-panel); border: 1px solid var(--sn-dsh-line); border-radius: 16px; padding: 1.4rem; }
.sn-dsh .card .k { color: var(--sn-dsh-muted); font-size: .8rem; font-weight: 600; }
.sn-dsh .card .v { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; margin: .4rem 0; }
.sn-dsh .card .d { color: var(--sn-dsh-good); font-size: .8rem; font-weight: 700; }
@media (max-width: 880px) {
.sn-dsh .sidebar { position: absolute; transform: translateX(-100%); transition: transform .35s; box-shadow: 8px 0 40px rgba(0,0,0,.5); }
.sn-dsh .toggle:checked ~ .sidebar { transform: translateX(0); }
.sn-dsh .toggle:checked ~ .overlay { display: block; position: absolute; inset: 0; background: rgba(0,0,0,.55); z-index: 20; }
.sn-dsh .mbtn { display: grid; place-items: center; }
}
@media (prefers-reduced-motion: reduce) {
.sn-dsh .submenu, .sn-dsh .chev, .sn-dsh .sidebar { transition: none; }
}
```
### 05. Multi-Level Vertical Sidebar Menu Template in HTML/CSS
**Type:** Pure CSS
**Description:** Light, glassy enterprise CRM with a rounded floating panel and soft shadows (Plus Jakarta Sans). Demonstrates true nested vertical navigation in CSS — submenus that contain their own nested sub-submenus (two tiers deep) — plus search, badges, and a mobile drawer. Best for enterprise SaaS, CRMs, project management tools, design systems whose navigation has genuine three-tier information architecture.
**HTML:**
```html
```
**CSS:**
```css
/* ─── 05 Multi-Level Sidebar Template — light CRM ──────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
.sn-mul {
--sn-mul-bg: #eef1f7;
--sn-mul-panel: #ffffff;
--sn-mul-line: #e6e9f2;
--sn-mul-txt: #1c2438;
--sn-mul-muted: #8089a0;
--sn-mul-ink: #0b1020;
--sn-mul-accent: #3b5bdb;
--sn-mul-accent-soft: #eaeeff;
--sn-mul-teal: #0ca678;
position: relative;
width: 100%;
height: 600px;
font-family: 'Plus Jakarta Sans', sans-serif;
background:
radial-gradient(600px 400px at 100% 0%, rgba(59,91,219,.06), transparent),
var(--sn-mul-bg);
color: var(--sn-mul-txt);
display: flex;
overflow: hidden;
box-sizing: border-box;
}
.sn-mul *, .sn-mul *::before, .sn-mul *::after { box-sizing: border-box; margin: 0; padding: 0; }
.sn-mul .toggle { display: none; }
.sn-mul .overlay { display: none; }
.sn-mul .sidebar {
width: 280px; margin: 14px; border-radius: 22px;
background: var(--sn-mul-panel); border: 1px solid var(--sn-mul-line);
height: calc(100% - 28px); display: flex; flex-direction: column;
box-shadow: 0 18px 50px -28px rgba(28,36,56,.4); z-index: 30; flex-shrink: 0;
}
.sn-mul .brand { display: flex; align-items: center; gap: .75rem; padding: 1.4rem 1.4rem 1rem; }
.sn-mul .logo { width: 38px; height: 38px; border-radius: 12px; background: var(--sn-mul-ink);
display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.1rem; }
.sn-mul .brand b { font-size: 1.12rem; letter-spacing: -.02em; }
.sn-mul .brand small { display: block; color: var(--sn-mul-muted); font-size: .72rem; font-weight: 600; }
.sn-mul .search { margin: 0 1.1rem 0.6rem; display: flex; align-items: center; gap: .5rem;
background: var(--sn-mul-bg); border-radius: 11px; padding: .55rem .8rem; }
.sn-mul .search svg { width: 16px; height: 16px; stroke: var(--sn-mul-muted); flex-shrink: 0; }
.sn-mul .search input { border: none; background: none; outline: none; font: inherit; font-size: .85rem; color: var(--sn-mul-txt); width: 100%; }
.sn-mul .nav { padding: .6rem 1rem 1rem; flex: 1; overflow-y: auto; }
.sn-mul .cap { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em;
color: var(--sn-mul-muted); font-weight: 700; padding: .9rem .7rem .35rem; }
.sn-mul .item { display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem;
border-radius: 11px; color: var(--sn-mul-txt); text-decoration: none; font-size: .9rem;
font-weight: 600; cursor: pointer; transition: .16s; }
.sn-mul .item svg { width: 19px; height: 19px; stroke-width: 1.9; color: var(--sn-mul-muted); flex-shrink: 0; }
.sn-mul .item:hover { background: var(--sn-mul-bg); }
.sn-mul .item.active { background: var(--sn-mul-accent-soft); color: var(--sn-mul-accent); }
.sn-mul .item.active svg { color: var(--sn-mul-accent); }
.sn-mul .chev { margin-left: auto; width: 15px !important; height: 15px !important; transition: transform .25s; }
.sn-mul .tag { margin-left: auto; font-size: .66rem; font-weight: 700; background: var(--sn-mul-teal);
color: #fff; padding: .12rem .42rem; border-radius: 20px; }
.sn-mul .t { display: none; }
.sn-mul .sub { max-height: 0; overflow: hidden; transition: max-height .32s ease; }
.sn-mul .sub-l1 { margin: .15rem 0 .15rem 1.6rem; border-left: 1.5px solid var(--sn-mul-line); padding-left: .5rem; }
.sn-mul .sub-l1 .item { font-weight: 500; font-size: .86rem; color: var(--sn-mul-muted); }
.sn-mul .sub-l1 .item:hover { color: var(--sn-mul-txt); }
.sn-mul .sub-l2 { margin-left: 1.4rem; border-left: 1.5px solid var(--sn-mul-line); padding-left: .5rem; }
.sn-mul .sub-l2 a { display: block; padding: .42rem .7rem; font-size: .82rem; color: var(--sn-mul-muted);
text-decoration: none; border-radius: 8px; font-weight: 500; }
.sn-mul .sub-l2 a:hover { color: var(--sn-mul-accent); background: var(--sn-mul-bg); }
.sn-mul .t:checked + .item .chev { transform: rotate(90deg); }
.sn-mul #sn-mul-m1:checked ~ .sub-l1 { max-height: 360px; }
.sn-mul #sn-mul-m2:checked ~ .sub-l2 { max-height: 200px; }
.sn-mul #sn-mul-m3:checked ~ .sub-l1 { max-height: 300px; }
.sn-mul .foot { padding: .9rem 1.1rem; border-top: 1px solid var(--sn-mul-line); display: flex; align-items: center; gap: .7rem; }
.sn-mul .av { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #3b5bdb, #0ca678); }
.sn-mul .foot b { font-size: .85rem; }
.sn-mul .foot small { display: block; color: var(--sn-mul-muted); font-size: .72rem; }
.sn-mul .mainpane { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-y: auto; }
.sn-mul .top { display: flex; align-items: center; gap: 1rem; padding: 1.6rem 2rem 0; }
.sn-mul .mbtn { display: none; background: var(--sn-mul-panel); border: 1px solid var(--sn-mul-line); border-radius: 10px; padding: .45rem; cursor: pointer; }
.sn-mul .mbtn svg { width: 20px; height: 20px; stroke: var(--sn-mul-txt); }
.sn-mul .top h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.sn-mul .top p { color: var(--sn-mul-muted); font-size: .85rem; }
.sn-mul .grid { padding: 1.6rem 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; }
.sn-mul .c { background: var(--sn-mul-panel); border: 1px solid var(--sn-mul-line); border-radius: 18px; padding: 1.5rem;
box-shadow: 0 12px 36px -28px rgba(28,36,56,.5); }
.sn-mul .c .k { color: var(--sn-mul-muted); font-size: .8rem; font-weight: 600; }
.sn-mul .c .v { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; margin-top: .3rem; }
@media (max-width: 900px) {
.sn-mul .sidebar { position: absolute; left: 0; top: 0; margin: 0; border-radius: 0 22px 22px 0; height: 100%;
transform: translateX(-105%); transition: transform .35s; }
.sn-mul .toggle:checked ~ .sidebar { transform: translateX(0); }
.sn-mul .toggle:checked ~ .overlay { display: block; position: absolute; inset: 0; background: rgba(11,16,32,.35); z-index: 20; }
.sn-mul .mbtn { display: grid; place-items: center; }
}
@media (prefers-reduced-motion: reduce) {
.sn-mul .sub, .sn-mul .chev, .sn-mul .sidebar { transition: none; }
}
```
### 06. Pure CSS Accordion Sidebar for Admin Dashboards
**Type:** Pure CSS
**Description:** Bold neo-brutalist e-commerce admin — hard black borders, offset shadows, lime / orange accents, Archivo + Space Mono. A true accordion where opening one section auto-closes the others using the radio-button technique, with item counts and a status footer. Fully responsive with an off-canvas drawer on mobile. Best for e-commerce admin panels, inventory dashboards, internal tools that want a confident, opinionated visual identity instead of a generic SaaS look.
**HTML:**
```html
```
**CSS:**
```css
/* ─── 06 Accordion Sidebar — neo-brutalist admin ──────────── */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;900&family=Space+Mono:wght@400;700&display=swap');
.sn-acc {
--sn-acc-bg: #f5f3eb;
--sn-acc-ink: #141414;
--sn-acc-panel: #ffffff;
--sn-acc-accent: #ff5126;
--sn-acc-lime: #d6ff3f;
position: relative;
width: 100%;
height: 600px;
font-family: 'Archivo', sans-serif;
background: var(--sn-acc-bg);
background-image: radial-gradient(var(--sn-acc-ink) .6px, transparent .6px);
background-size: 22px 22px;
color: var(--sn-acc-ink);
display: flex;
overflow: hidden;
box-sizing: border-box;
}
.sn-acc *, .sn-acc *::before, .sn-acc *::after { box-sizing: border-box; margin: 0; padding: 0; }
.sn-acc .toggle { display: none; }
.sn-acc .overlay { display: none; }
.sn-acc .sidebar {
width: 282px; background: var(--sn-acc-panel);
border-right: 3px solid var(--sn-acc-ink);
height: 100%; display: flex; flex-direction: column; z-index: 30; flex-shrink: 0;
}
.sn-acc .brand { padding: 1.5rem 1.3rem; border-bottom: 3px solid var(--sn-acc-ink);
display: flex; align-items: center; gap: .7rem; }
.sn-acc .logo { width: 42px; height: 42px; border: 3px solid var(--sn-acc-ink); background: var(--sn-acc-lime);
display: grid; place-items: center; font-weight: 900; font-size: 1.3rem;
box-shadow: 4px 4px 0 var(--sn-acc-ink); }
.sn-acc .brand b { font-weight: 900; font-size: 1.3rem; text-transform: uppercase; letter-spacing: -.04em; line-height: 1; }
.sn-acc .brand small { font-family: 'Space Mono'; font-size: .66rem; display: block; margin-top: .2rem; }
.sn-acc .nav { flex: 1; overflow-y: auto; padding: .6rem; }
.sn-acc .acc { border-bottom: 2px solid var(--sn-acc-ink); }
.sn-acc .acc:last-child { border-bottom: none; }
.sn-acc .radio { display: none; }
.sn-acc .acc-head {
display: flex; align-items: center; gap: .8rem; padding: 1rem .9rem; cursor: pointer;
font-weight: 700; font-size: .95rem; text-transform: uppercase; letter-spacing: -.01em;
transition: .15s; user-select: none;
}
.sn-acc .acc-head svg.ic { width: 20px; height: 20px; stroke-width: 2.2; flex-shrink: 0; }
.sn-acc .acc-head .plus { margin-left: auto; font-family: 'Space Mono'; font-weight: 700; font-size: 1.2rem; transition: transform .25s; }
.sn-acc .acc-head:hover { background: var(--sn-acc-lime); }
.sn-acc .acc-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; background: var(--sn-acc-bg); }
.sn-acc .acc-body a { display: flex; align-items: center; gap: .6rem; padding: .65rem .9rem .65rem 2.7rem;
text-decoration: none; color: var(--sn-acc-ink); font-size: .86rem; font-weight: 500;
border-top: 1.5px dashed rgba(20,20,20,.25); transition: .15s; }
.sn-acc .acc-body a:hover { background: var(--sn-acc-accent); color: #fff; padding-left: 3rem; }
.sn-acc .acc-body a .c { margin-left: auto; font-family: 'Space Mono'; font-size: .72rem;
background: var(--sn-acc-ink); color: #fff; padding: .05rem .4rem; }
.sn-acc .radio:checked + .acc-head { background: var(--sn-acc-accent); color: #fff; }
.sn-acc .radio:checked + .acc-head .plus { transform: rotate(45deg); }
.sn-acc .radio:checked + .acc-head + .acc-body { max-height: 300px; }
.sn-acc .foot { padding: 1rem 1.3rem; border-top: 3px solid var(--sn-acc-ink); font-family: 'Space Mono';
font-size: .7rem; display: flex; justify-content: space-between; align-items: center; }
.sn-acc .dot { width: 9px; height: 9px; border-radius: 50%; background: #1db954; display: inline-block; margin-right: .4rem; }
.sn-acc .mainpane { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-y: auto; }
.sn-acc .top { padding: 1.4rem 2rem; border-bottom: 3px solid var(--sn-acc-ink); display: flex; align-items: center; gap: 1rem; background: var(--sn-acc-panel); }
.sn-acc .mbtn { display: none; border: 3px solid var(--sn-acc-ink); background: var(--sn-acc-lime); padding: .4rem .5rem; cursor: pointer; box-shadow: 3px 3px 0 var(--sn-acc-ink); }
.sn-acc .mbtn svg { width: 20px; height: 20px; stroke: var(--sn-acc-ink); display: block; }
.sn-acc .top h1 { font-weight: 900; font-size: 1.6rem; text-transform: uppercase; letter-spacing: -.04em; }
.sn-acc .body { padding: 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.3rem; }
.sn-acc .card { background: var(--sn-acc-panel); border: 3px solid var(--sn-acc-ink); padding: 1.4rem; box-shadow: 6px 6px 0 var(--sn-acc-ink); }
.sn-acc .card .k { font-family: 'Space Mono'; font-size: .72rem; text-transform: uppercase; }
.sn-acc .card .v { font-weight: 900; font-size: 2.2rem; letter-spacing: -.04em; margin-top: .3rem; }
.sn-acc .card.alt { background: var(--sn-acc-lime); }
.sn-acc .card.dark { background: var(--sn-acc-ink); color: var(--sn-acc-bg); }
@media (max-width: 880px) {
.sn-acc .sidebar { position: absolute; transform: translateX(-105%); transition: transform .35s; }
.sn-acc .toggle:checked ~ .sidebar { transform: translateX(0); }
.sn-acc .toggle:checked ~ .overlay { display: block; position: absolute; inset: 0; background: rgba(20,20,20,.4); z-index: 20; }
.sn-acc .mbtn { display: block; }
}
@media (prefers-reduced-motion: reduce) {
.sn-acc .acc-body, .sn-acc .acc-head .plus, .sn-acc .sidebar { transition: none; }
}
```
### 07. Fixed Full-Height CSS Sidebar Navigation Layout
**Type:** Pure CSS
**Description:** A sticky vertical menu layout where the CSS sidebar stays pinned and the main content scrolls independently — a Strata-style documentation-site rail. The rail is position: fixed full-height with a search box, nested doc tree, version badge, and social icons, plus a sticky breadcrumb topbar on the article. Clean indigo-on-white docs aesthetic with Bricolage Grotesque headings. Collapses to an icon strip on mobile. Best for documentation sites, API references, technical handbooks, knowledge bases.
**HTML:**
```html
Docs / Core Concepts / Data Fetching
Core Concepts
Data Fetching
This layout uses a fixed full-height sidebar — the documentation tree stays pinned to the viewport while the article scrolls independently, the hallmark of a docs-style navigation.
Basic Usage
Fetch data on the server and stream it to the client. The sidebar remains accessible no matter how far down the page you read.
// fetch on the server const data = await strata.get('/api/posts'); return <List items={data} />;
```
**CSS:**
```css
/* ─── 07 Fixed Full-Height Sidebar — docs style ───────────── */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,800&family=Inter+Tight:wght@400;500;600&display=swap');
.sn-fix {
--sn-fix-bg: #fbfbfd;
--sn-fix-rail: #ffffff;
--sn-fix-ink: #15171c;
--sn-fix-muted: #6b7280;
--sn-fix-line: #ebedf2;
--sn-fix-accent: #4338ca;
--sn-fix-accent-soft: #eef0ff;
--sn-fix-code: #0b0d12;
position: relative;
width: 100%;
height: 600px;
font-family: 'Inter Tight', sans-serif;
background: var(--sn-fix-bg);
color: var(--sn-fix-ink);
overflow: hidden;
box-sizing: border-box;
}
.sn-fix *, .sn-fix *::before, .sn-fix *::after { box-sizing: border-box; margin: 0; padding: 0; }
.sn-fix .sidebar {
position: absolute; top: 0; left: 0; bottom: 0; width: 280px;
background: var(--sn-fix-rail); border-right: 1px solid var(--sn-fix-line);
display: flex; flex-direction: column; z-index: 20;
}
.sn-fix .brand { display: flex; align-items: center; gap: .7rem; padding: 1.4rem 1.5rem; border-bottom: 1px solid var(--sn-fix-line); }
.sn-fix .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--sn-fix-ink);
display: grid; place-items: center; color: #fff; font-weight: 800; font-family: 'Bricolage Grotesque'; flex-shrink: 0; }
.sn-fix .brand b { font-family: 'Bricolage Grotesque'; font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em; }
.sn-fix .brand small { display: block; color: var(--sn-fix-muted); font-size: .7rem; }
.sn-fix .ver { margin-left: auto; font-size: .66rem; font-weight: 600; color: var(--sn-fix-accent);
background: var(--sn-fix-accent-soft); padding: .2rem .5rem; border-radius: 20px; }
.sn-fix .search { margin: 1rem 1.2rem .4rem; display: flex; align-items: center; gap: .55rem;
border: 1px solid var(--sn-fix-line); border-radius: 10px; padding: .55rem .75rem; color: var(--sn-fix-muted); }
.sn-fix .search svg { width: 16px; height: 16px; flex-shrink: 0; }
.sn-fix .search span { font-size: .82rem; flex: 1; }
.sn-fix .search kbd { font-size: .68rem; border: 1px solid var(--sn-fix-line); border-radius: 5px; padding: .05rem .35rem; background: var(--sn-fix-bg); font-family: inherit; }
.sn-fix .nav { flex: 1; overflow-y: auto; padding: .7rem 1rem 1.5rem; }
.sn-fix .cap { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em;
color: var(--sn-fix-muted); font-weight: 700; padding: 1rem .7rem .3rem; }
.sn-fix .item { display: block; padding: .46rem .8rem; color: var(--sn-fix-muted); text-decoration: none;
font-size: .88rem; border-radius: 8px; font-weight: 500; transition: .15s; border-left: 2px solid transparent; }
.sn-fix .item:hover { color: var(--sn-fix-ink); background: var(--sn-fix-bg); }
.sn-fix .item.active { color: var(--sn-fix-accent); background: var(--sn-fix-accent-soft); font-weight: 600; }
.sn-fix .sub { margin-left: .55rem; border-left: 1px solid var(--sn-fix-line); padding-left: .4rem; }
.sn-fix .sub .item { font-size: .84rem; }
.sn-fix .sub .item.active { border-left: 2px solid var(--sn-fix-accent); border-radius: 0 8px 8px 0; background: transparent; }
.sn-fix .foot { padding: 1rem 1.3rem; border-top: 1px solid var(--sn-fix-line); display: flex; gap: .8rem; color: var(--sn-fix-muted); }
.sn-fix .foot a { color: var(--sn-fix-muted); display: grid; place-items: center; }
.sn-fix .foot svg { width: 18px; height: 18px; }
.sn-fix .contentpane { margin-left: 280px; height: 100%; overflow-y: auto; }
.sn-fix .topbar { position: sticky; top: 0; background: rgba(251,251,253,.85); backdrop-filter: blur(10px);
border-bottom: 1px solid var(--sn-fix-line); padding: .9rem 3rem; font-size: .82rem; color: var(--sn-fix-muted); z-index: 10; }
.sn-fix .topbar b { color: var(--sn-fix-ink); }
.sn-fix .doc { padding: 2.4rem 3rem; max-width: 760px; }
.sn-fix .doc .eyebrow { font-size: .78rem; font-weight: 700; color: var(--sn-fix-accent); text-transform: uppercase; letter-spacing: .08em; }
.sn-fix .doc h1 { font-family: 'Bricolage Grotesque'; font-weight: 800; font-size: 2.6rem; letter-spacing: -.04em; margin: .4rem 0 1rem; }
.sn-fix .doc p { color: #3c4150; line-height: 1.8; margin-bottom: 1.2rem; font-size: 1.02rem; }
.sn-fix .doc h2 { font-family: 'Bricolage Grotesque'; font-weight: 700; font-size: 1.4rem; margin: 2rem 0 .8rem; }
.sn-fix .codeblock { background: var(--sn-fix-code); color: #a5b4fc; border-radius: 12px; padding: 1.2rem 1.4rem;
font-family: ui-monospace, Menlo, monospace; font-size: .85rem; line-height: 1.7; overflow-x: auto; }
.sn-fix .codeblock .c { color: #5b6270; }
@media (max-width: 820px) {
.sn-fix .sidebar { width: 72px; }
.sn-fix .brand b, .sn-fix .brand small, .sn-fix .ver, .sn-fix .search span,
.sn-fix .search kbd, .sn-fix .cap, .sn-fix .sub,
.sn-fix .nav .item:not(.icon) { display: none; }
.sn-fix .brand, .sn-fix .search { justify-content: center; }
.sn-fix .contentpane { margin-left: 72px; }
.sn-fix .topbar, .sn-fix .doc { padding-left: 1.4rem; padding-right: 1.4rem; }
}
```
### 08. Modern Glassmorphism Floating Sidebar Design in CSS
**Type:** Pure CSS
**Description:** A smart-home control dashboard with a glassmorphic side nav and a true backdrop-blur effect. The rail floats with rounded corners over an animated ambient gradient, using backdrop-filter blur + saturation, inset highlights, and frosted hover tooltips. Matching glass stat cards (temperature, lights, energy). Vibrant, depth-driven, fully transparent layering — one of the cool modern CSS sidebar designs that proves how much identity a single rail can carry. Best for smart-home apps, modern dashboards, premium SaaS landing pages — anywhere the sidebar IS the brand visual.
**HTML:**
```html
Good evening, Ada
A frosted glass rail floats above an ambient gradient — pure CSS backdrop-filter.
Living Room 21.5°
Heating · auto
Energy Today 8.2 kWh
−12% vs avg
```
**CSS:**
```css
/* ─── 08 Glassmorphism Floating Sidebar — smart home ──────── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&display=swap');
.sn-gls {
--sn-gls-txt: #f4f6ff;
--sn-gls-muted: rgba(244,246,255,.6);
--sn-gls-glass: rgba(255,255,255,.1);
--sn-gls-glass-brd: rgba(255,255,255,.22);
--sn-gls-active: rgba(255,255,255,.9);
position: relative;
width: 100%;
height: 600px;
font-family: 'Sora', sans-serif;
color: var(--sn-gls-txt);
background:
radial-gradient(700px 700px at 8% 12%, #7c5cff 0%, transparent 55%),
radial-gradient(900px 700px at 95% 20%, #ff5ca8 0%, transparent 50%),
radial-gradient(800px 800px at 70% 100%, #2bd9c9 0%, transparent 55%),
#14102b;
overflow: hidden;
box-sizing: border-box;
}
.sn-gls *, .sn-gls *::before, .sn-gls *::after { box-sizing: border-box; margin: 0; padding: 0; }
.sn-gls::before {
content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%;
background: radial-gradient(circle, #ffb347, transparent 65%);
top: 30%; left: 40%;
filter: blur(40px); opacity: .4;
animation: sn-gls-float 14s ease-in-out infinite;
pointer-events: none;
}
@keyframes sn-gls-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(60px, -50px); } }
.sn-gls .layout { display: flex; height: 100%; padding: 22px; position: relative; z-index: 1; }
.sn-gls .sidebar {
width: 96px;
background: var(--sn-gls-glass);
backdrop-filter: blur(22px) saturate(160%);
-webkit-backdrop-filter: blur(22px) saturate(160%);
border: 1px solid var(--sn-gls-glass-brd);
border-radius: 28px;
box-shadow: 0 18px 50px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.3);
display: flex; flex-direction: column; align-items: center;
padding: 1.4rem 0; gap: .6rem;
flex-shrink: 0;
}
.sn-gls .logo { width: 48px; height: 48px; border-radius: 16px;
background: linear-gradient(135deg, #fff, rgba(255,255,255,.6));
display: grid; place-items: center; color: #14102b; font-weight: 800; font-size: 1.4rem;
margin-bottom: 1rem; box-shadow: 0 8px 24px rgba(0,0,0,.2); flex-shrink: 0; }
.sn-gls .nav-icon {
width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
color: var(--sn-gls-txt); text-decoration: none; position: relative; transition: .25s;
flex-shrink: 0;
}
.sn-gls .nav-icon svg { width: 23px; height: 23px; stroke-width: 1.8; }
.sn-gls .nav-icon:hover { background: rgba(255,255,255,.14); }
.sn-gls .nav-icon.active { background: var(--sn-gls-active); color: #14102b; box-shadow: 0 8px 22px rgba(0,0,0,.22); }
.sn-gls .nav-icon .tip { position: absolute; left: 64px; top: 50%; transform: translateY(-50%) scale(.85);
background: rgba(20,16,43,.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font-size: .76rem;
padding: .35rem .7rem; border-radius: 9px; white-space: nowrap; opacity: 0; pointer-events: none; transition: .2s;
border: 1px solid var(--sn-gls-glass-brd); z-index: 5; }
.sn-gls .nav-icon:hover .tip { opacity: 1; transform: translateY(-50%) scale(1); }
.sn-gls .spacer { flex: 1; }
.sn-gls .avatar { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--sn-gls-glass-brd);
background: linear-gradient(135deg, #ff5ca8, #7c5cff); flex-shrink: 0; }
.sn-gls .contentpane { flex: 1; padding: 1.4rem 2rem; min-width: 0; overflow-y: auto; }
.sn-gls .hello h1 { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; }
.sn-gls .hello p { color: var(--sn-gls-muted); margin-top: .3rem; }
.sn-gls .cards { margin-top: 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.1rem; max-width: 720px; }
.sn-gls .gcard {
background: var(--sn-gls-glass); backdrop-filter: blur(20px) saturate(150%);
-webkit-backdrop-filter: blur(20px) saturate(150%);
border: 1px solid var(--sn-gls-glass-brd); border-radius: 22px; padding: 1.4rem;
box-shadow: 0 12px 36px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.25);
}
.sn-gls .gcard .ic { width: 42px; height: 42px; border-radius: 13px; background: rgba(255,255,255,.16);
display: grid; place-items: center; margin-bottom: 1rem; }
.sn-gls .gcard .ic svg { width: 21px; height: 21px; stroke: #fff; }
.sn-gls .gcard b { font-size: 1.05rem; font-weight: 600; }
.sn-gls .gcard .v { font-size: 1.9rem; font-weight: 800; margin-top: .5rem; letter-spacing: -.02em; }
.sn-gls .gcard small { color: var(--sn-gls-muted); font-size: .8rem; }
.sn-gls .toggleui { margin-top: .9rem; width: 46px; height: 26px; border-radius: 20px; background: rgba(255,255,255,.9); position: relative; }
.sn-gls .toggleui::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
background: #14102b; top: 3px; right: 3px; }
@media (prefers-reduced-motion: reduce) {
.sn-gls::before { animation: none; }
.sn-gls .nav-icon, .sn-gls .nav-icon .tip { transition: none; }
}
```
### 09. Responsive Off-Canvas Mobile Sidebar Navigation Overlay
**Type:** Pure CSS
**Description:** A mobile slide-out sidebar with a CSS overlay for a food-delivery app (Fork&Go), mobile-first. The drawer opens from the left over a dimmed backdrop via the checkbox hack, with a gradient profile header, close button, badges, and a promo card. On desktop (≥920px) the drawer docks permanently and the app bar / overlay disappear — a responsive offcanvas drawer that scales naturally from phone to laptop. Warm orange-and-cream palette. Best for mobile-first apps, e-commerce, food delivery, anywhere the design starts at phone width and adapts up.
**HTML:**
```html
☰ Tap the menu to slide out the navigation
Ramen House ★ 4.8 · 20–30 min$$
Green Bowl ★ 4.6 · 15–25 min$
```
**CSS:**
```css
/* ─── 09 Off-Canvas Mobile Sidebar — food delivery ────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');
.sn-off {
--sn-off-bg: #fff8f0;
--sn-off-ink: #241a12;
--sn-off-muted: #9b8a78;
--sn-off-line: #f0e4d4;
--sn-off-orange: #ff6b35;
--sn-off-orange-d: #e9531c;
--sn-off-cream: #fff;
position: relative;
width: 100%;
height: 600px;
font-family: 'DM Sans', sans-serif;
background: var(--sn-off-bg);
color: var(--sn-off-ink);
overflow: hidden;
box-sizing: border-box;
}
.sn-off *, .sn-off *::before, .sn-off *::after { box-sizing: border-box; margin: 0; padding: 0; }
.sn-off .toggle { display: none; }
.sn-off .appbar {
position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 1rem;
padding: 1rem 1.2rem; background: var(--sn-off-cream); border-bottom: 1px solid var(--sn-off-line);
}
.sn-off .menu-btn { cursor: pointer; width: 42px; height: 42px; border-radius: 13px; background: var(--sn-off-bg);
display: grid; place-items: center; flex-shrink: 0; }
.sn-off .menu-btn svg { width: 22px; height: 22px; stroke: var(--sn-off-ink); }
.sn-off .appbar .title { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.sn-off .appbar .title span { color: var(--sn-off-orange); }
.sn-off .cart { margin-left: auto; width: 42px; height: 42px; border-radius: 13px; background: var(--sn-off-orange);
display: grid; place-items: center; position: relative; flex-shrink: 0; }
.sn-off .cart svg { width: 21px; height: 21px; stroke: #fff; }
.sn-off .cart b { position: absolute; top: -5px; right: -5px; background: var(--sn-off-ink); color: #fff;
font-size: .66rem; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.sn-off .drawer {
position: absolute; top: 0; left: 0; bottom: 0; width: 300px; max-width: 84%;
background: var(--sn-off-cream); z-index: 40;
transform: translateX(-100%); transition: transform .38s cubic-bezier(.4,0,.2,1);
display: flex; flex-direction: column; box-shadow: 14px 0 50px rgba(0,0,0,.18);
}
.sn-off .toggle:checked ~ .drawer { transform: translateX(0); }
.sn-off .overlay { position: absolute; inset: 0; background: rgba(36,26,18,.5); z-index: 30;
opacity: 0; visibility: hidden; transition: .38s; }
.sn-off .toggle:checked ~ .overlay { opacity: 1; visibility: visible; }
.sn-off .d-head { padding: 1.6rem 1.5rem; background: linear-gradient(135deg, var(--sn-off-orange), var(--sn-off-orange-d)); color: #fff; position: relative; }
.sn-off .d-head .ava { width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.25);
display: grid; place-items: center; font-size: 1.6rem; margin-bottom: .8rem; }
.sn-off .d-head b { font-size: 1.2rem; font-weight: 700; }
.sn-off .d-head small { display: block; opacity: .85; font-size: .82rem; margin-top: .1rem; }
.sn-off .close { position: absolute; top: 1.3rem; right: 1.3rem; cursor: pointer; color: #fff;
width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.2); display: grid; place-items: center; }
.sn-off .close svg { width: 18px; height: 18px; }
.sn-off .d-nav { flex: 1; overflow-y: auto; padding: 1rem .9rem; }
.sn-off .item { display: flex; align-items: center; gap: 1rem; padding: .85rem 1rem; border-radius: 14px;
color: var(--sn-off-ink); text-decoration: none; font-weight: 600; font-size: .96rem; transition: .16s; }
.sn-off .item svg { width: 22px; height: 22px; stroke: var(--sn-off-muted); stroke-width: 1.9; flex-shrink: 0; }
.sn-off .item:hover { background: var(--sn-off-bg); }
.sn-off .item.active { background: #fff1e8; color: var(--sn-off-orange-d); }
.sn-off .item.active svg { stroke: var(--sn-off-orange-d); }
.sn-off .item .badge { margin-left: auto; background: var(--sn-off-orange); color: #fff; font-size: .7rem;
font-weight: 700; padding: .12rem .5rem; border-radius: 20px; }
.sn-off .d-foot { padding: 1.2rem 1.5rem; border-top: 1px solid var(--sn-off-line); }
.sn-off .promo { background: var(--sn-off-ink); color: #fff; border-radius: 16px; padding: 1.1rem 1.2rem; }
.sn-off .promo b { font-size: .95rem; }
.sn-off .promo p { font-size: .78rem; opacity: .7; margin-top: .2rem; }
.sn-off .mainpane { height: 100%; overflow-y: auto; display: flex; flex-direction: column; }
.sn-off .contentpane { padding: 1.3rem 1.2rem; max-width: 560px; margin: 0 auto; }
.sn-off .hint { background: #fff1e8; border: 1px dashed var(--sn-off-orange); border-radius: 14px;
padding: .9rem 1.1rem; color: var(--sn-off-orange-d); font-size: .88rem; font-weight: 600; margin-bottom: 1.3rem; text-align: center; }
.sn-off .food { background: var(--sn-off-cream); border: 1px solid var(--sn-off-line); border-radius: 20px; overflow: hidden; margin-bottom: 1.2rem; }
.sn-off .food .img { height: 130px; background: linear-gradient(135deg, #ffd5a8, #ff6b35); }
.sn-off .food .img.green { background: linear-gradient(135deg, #c8e6a0, #5ac26a); }
.sn-off .food .body { padding: 1.1rem 1.3rem; }
.sn-off .food .body b { font-size: 1.1rem; }
.sn-off .food .body .row { display: flex; align-items: center; gap: .6rem; margin-top: .4rem; color: var(--sn-off-muted); font-size: .85rem; }
.sn-off .food .body .price { margin-left: auto; color: var(--sn-off-ink); font-weight: 800; font-size: 1.1rem; }
.sn-off .star { color: var(--sn-off-orange); }
@media (min-width: 920px) {
.sn-off .drawer { position: static; transform: none; box-shadow: none; border-right: 1px solid var(--sn-off-line); flex-shrink: 0; }
.sn-off .overlay, .sn-off .menu-btn, .sn-off .close { display: none; }
.sn-off { display: flex; flex-direction: row; }
.sn-off .mainpane { flex: 1; }
.sn-off .appbar { display: none; }
.sn-off .contentpane { margin: 0; padding: 2.5rem; max-width: 680px; }
.sn-off .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.sn-off .drawer, .sn-off .overlay { transition: none; }
}
```
### 10. App-Style Vertical Sidebar Menu with Bottom-Pinned Profile
**Type:** Pure CSS
**Description:** How to push a menu item to the bottom of a CSS sidebar — a sidebar layout with the profile section at the bottom, demonstrated by a Pulse project-management workspace. The workspace switcher sits at the top, a scrollable nav fills the middle with counts and status dots, and the profile is pinned to the bottom using margin-top: auto, with quick-action icons, online indicator, and a kebab menu. Dark Linear-style UI with Geist + Geist Mono and yellow / violet accents. Collapses to icons on mobile. Best for productivity tools, PM apps, internal dashboards, team workspaces where identity and quick actions need permanent placement.
**HTML:**
```html
Sprint Board
+ New task
To Do
Audit onboarding flowDue Fri · Sam
Draft Q3 roadmapNo date
In Progress
Sidebar redesignDue today · You
Done
Set up CI pipelineYesterday
```
**CSS:**
```css
/* ─── 10 App Sidebar with Bottom-Pinned Profile — PM workspace ── */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
.sn-pin {
--sn-pin-bg: #0c0c0f;
--sn-pin-rail: #131318;
--sn-pin-rail-2: #1c1c24;
--sn-pin-line: #26262f;
--sn-pin-txt: #ededf2;
--sn-pin-muted: #85858f;
--sn-pin-accent: #f5d90a;
--sn-pin-accent-2: #a78bfa;
--sn-pin-green: #4ade80;
position: relative;
width: 100%;
height: 600px;
font-family: 'Geist', 'Inter', sans-serif;
background: var(--sn-pin-bg);
color: var(--sn-pin-txt);
display: flex;
overflow: hidden;
box-sizing: border-box;
}
.sn-pin *, .sn-pin *::before, .sn-pin *::after { box-sizing: border-box; margin: 0; padding: 0; }
.sn-pin .sidebar {
width: 256px; background: var(--sn-pin-rail); border-right: 1px solid var(--sn-pin-line);
height: 100%; display: flex; flex-direction: column; flex-shrink: 0;
}
.sn-pin .ws { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.1rem; margin: .6rem;
border-radius: 12px; background: var(--sn-pin-rail-2); cursor: pointer; transition: .18s; }
.sn-pin .ws:hover { background: #23232c; }
.sn-pin .ws .ic { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
background: linear-gradient(135deg, var(--sn-pin-accent), var(--sn-pin-accent-2));
display: grid; place-items: center; color: #0c0c0f; font-weight: 700; }
.sn-pin .ws b { font-size: .92rem; font-weight: 600; }
.sn-pin .ws small { display: block; color: var(--sn-pin-muted); font-size: .72rem; }
.sn-pin .ws .ch { margin-left: auto; color: var(--sn-pin-muted); }
.sn-pin .ws .ch svg { width: 16px; height: 16px; }
.sn-pin .nav { flex: 1; overflow-y: auto; padding: .5rem .7rem; }
.sn-pin .cap { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--sn-pin-muted);
font-weight: 600; padding: .9rem .8rem .35rem; font-family: 'Geist Mono', monospace; }
.sn-pin .item { display: flex; align-items: center; gap: .8rem; padding: .6rem .8rem; border-radius: 10px;
color: var(--sn-pin-txt); text-decoration: none; font-size: .9rem; font-weight: 500; transition: .16s; }
.sn-pin .item svg { width: 19px; height: 19px; stroke-width: 1.8; color: var(--sn-pin-muted); flex-shrink: 0; }
.sn-pin .item:hover { background: var(--sn-pin-rail-2); }
.sn-pin .item:hover svg { color: var(--sn-pin-txt); }
.sn-pin .item.active { background: var(--sn-pin-rail-2); color: #fff; }
.sn-pin .item.active svg { color: var(--sn-pin-accent); }
.sn-pin .item .count { margin-left: auto; font-size: .72rem; color: var(--sn-pin-muted); font-family: 'Geist Mono', monospace; }
.sn-pin .item .dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--sn-pin-green); }
.sn-pin .profile-wrap { margin-top: auto; border-top: 1px solid var(--sn-pin-line); padding: .7rem; }
.sn-pin .quick { display: flex; gap: .4rem; margin-bottom: .5rem; }
.sn-pin .quick a { flex: 1; display: grid; place-items: center; padding: .55rem; border-radius: 9px;
color: var(--sn-pin-muted); transition: .16s; }
.sn-pin .quick a:hover { background: var(--sn-pin-rail-2); color: var(--sn-pin-txt); }
.sn-pin .quick svg { width: 18px; height: 18px; stroke-width: 1.8; }
.sn-pin .profile { display: flex; align-items: center; gap: .7rem; padding: .6rem; border-radius: 12px;
cursor: pointer; transition: .18s; }
.sn-pin .profile:hover { background: var(--sn-pin-rail-2); }
.sn-pin .avatar { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
background: linear-gradient(135deg, #4ade80, #a78bfa); position: relative; }
.sn-pin .avatar::after { content: ""; position: absolute; bottom: -2px; right: -2px; width: 11px; height: 11px;
border-radius: 50%; background: var(--sn-pin-green); border: 2.5px solid var(--sn-pin-rail); }
.sn-pin .profile b { font-size: .88rem; font-weight: 600; }
.sn-pin .profile small { display: block; color: var(--sn-pin-muted); font-size: .72rem; }
.sn-pin .profile .more { margin-left: auto; color: var(--sn-pin-muted); }
.sn-pin .profile .more svg { width: 16px; height: 16px; }
.sn-pin .mainpane { flex: 1; padding: 2.5rem 3rem; min-width: 0; overflow-y: auto; }
.sn-pin .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.8rem; }
.sn-pin .head h1 { font-size: 1.7rem; font-weight: 700; letter-spacing: -.03em; }
.sn-pin .head .new { background: var(--sn-pin-accent); color: #0c0c0f; border: none; border-radius: 10px;
padding: .6rem 1.1rem; font-weight: 600; font-size: .85rem; cursor: pointer; font-family: inherit; }
.sn-pin .board { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.sn-pin .col { background: var(--sn-pin-rail); border: 1px solid var(--sn-pin-line); border-radius: 16px; padding: 1rem; }
.sn-pin .col .ct { font-size: .8rem; color: var(--sn-pin-muted); font-weight: 600; margin-bottom: .8rem;
display: flex; align-items: center; gap: .5rem; font-family: 'Geist Mono', monospace; }
.sn-pin .col .ct i { width: 8px; height: 8px; border-radius: 50%; }
.sn-pin .col .ct i.grey { background: #85858f; }
.sn-pin .col .ct i.yellow { background: #f5d90a; }
.sn-pin .col .ct i.green { background: #4ade80; }
.sn-pin .task { background: var(--sn-pin-rail-2); border-radius: 11px; padding: .85rem; margin-bottom: .6rem; font-size: .85rem; }
.sn-pin .task small { display: block; color: var(--sn-pin-muted); font-size: .74rem; margin-top: .4rem; }
@media (max-width: 780px) {
.sn-pin .sidebar { width: 74px; }
.sn-pin .ws b, .sn-pin .ws small, .sn-pin .ws .ch, .sn-pin .cap,
.sn-pin .item span, .sn-pin .item .count, .sn-pin .item .dot,
.sn-pin .profile b, .sn-pin .profile small, .sn-pin .profile .more { display: none; }
.sn-pin .ws { justify-content: center; padding: .7rem; }
.sn-pin .item { justify-content: center; padding: .65rem; }
.sn-pin .profile { justify-content: center; }
.sn-pin .quick { flex-direction: column; }
.sn-pin .mainpane { padding: 1.5rem; }
}
```
---
## 12 CSS Skeleton Loaders
URL: https://codefronts.com/components/css-skeleton-loaders/
Description: 12 hand-coded CSS skeleton loaders — classic shimmer, pulse, avatar card, image card, article page, table rows, stat tiles, comment thread and more.
Demo count: 12
### 01. Classic Shimmer
**Type:** Pure CSS
**Description:** A diagonal gradient slides left-to-right across each placeholder bar — the most-recognised skeleton style, used by LinkedIn, Facebook, and Slack.
**HTML:**
```html
```
**CSS:**
```css
.sk-classic {
width: 220px;
display: flex;
flex-direction: column;
gap: 10px;
}
.sk-bar {
height: 12px;
border-radius: 6px;
background: linear-gradient(90deg, #1f1f28 0%, #2a2a36 50%, #1f1f28 100%);
background-size: 200% 100%;
animation: skClassic 1.4s linear infinite;
}
@keyframes skClassic {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
@media (prefers-reduced-motion: reduce) {
.sk-classic,
.sk-classic * {
animation: none !important;
}
}
```
### 02. Pulse Block
**Type:** Pure CSS
**Description:** A simple opacity pulse — minimal, GPU-friendly, and the default style used by the Tailwind animate-pulse utility class.
**HTML:**
```html
```
**CSS:**
```css
.sk-pulse {
width: 220px;
display: flex;
flex-direction: column;
gap: 10px;
}
.sk-pulse-bar {
height: 12px;
border-radius: 6px;
background: #2a2a36;
animation: skPulse 1.5s ease-in-out infinite;
}
@keyframes skPulse {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.45;
}
}
@media (prefers-reduced-motion: reduce) {
.sk-pulse,
.sk-pulse * {
animation: none !important;
}
}
```
### 03. Avatar Card
**Type:** Pure CSS
**Description:** A circular avatar plus two text lines — the canonical user-profile placeholder. Combines a round shimmer with two narrower bars.
**HTML:**
```html
```
**CSS:**
```css
.sk-avatar {
display: flex;
align-items: center;
gap: 14px;
width: 220px;
}
.sk-avatar-circle {
width: 44px;
height: 44px;
border-radius: 50%;
background: linear-gradient(90deg, #1f1f28 0%, #2a2a36 50%, #1f1f28 100%);
background-size: 200% 100%;
animation: skShimmer 1.5s linear infinite;
flex-shrink: 0;
}
.sk-avatar-lines {
display: flex;
flex-direction: column;
gap: 8px;
}
.sk-avatar-bar {
height: 11px;
border-radius: 5px;
background: linear-gradient(90deg, #1f1f28 0%, #2a2a36 50%, #1f1f28 100%);
background-size: 200% 100%;
animation: skShimmer 1.5s linear infinite;
}
@keyframes skShimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
@media (prefers-reduced-motion: reduce) {
.sk-avatar,
.sk-avatar * {
animation: none !important;
}
}
```
### 04. Image Card
**Type:** Pure CSS
**Description:** A 16:9 image placeholder topped with a title and two body lines — the "feed item" template every social and blog UI ships with.
**HTML:**
```html
```
**CSS:**
```css
.sk-card {
width: 220px;
display: flex;
flex-direction: column;
gap: 10px;
padding: 12px;
border-radius: 10px;
background: #15151b;
}
.sk-card-img,
.sk-card-title,
.sk-card-line {
background: linear-gradient(90deg, #1f1f28 0%, #2a2a36 50%, #1f1f28 100%);
background-size: 200% 100%;
animation: skShimmer 1.6s linear infinite;
border-radius: 6px;
}
.sk-card-img {
aspect-ratio: 16 / 9;
margin-bottom: 4px;
}
.sk-card-title {
height: 14px;
width: 70%;
}
.sk-card-line {
height: 9px;
}
@keyframes skShimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
@media (prefers-reduced-motion: reduce) {
.sk-card,
.sk-card * {
animation: none !important;
}
}
```
### 05. Wave Sweep
**Type:** Pure CSS
**Description:** A bright highlight strip travels across the placeholder using a CSS mask — adds a glassy "light passing over" feel without changing the base colour.
**HTML:**
```html
```
**CSS:**
```css
.sk-wave {
width: 220px;
display: flex;
flex-direction: column;
gap: 10px;
}
.sk-wave-bar {
height: 12px;
border-radius: 6px;
background: #2a2a36;
position: relative;
overflow: hidden;
}
.sk-wave-bar::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(
90deg,
transparent 0%,
rgba(255, 255, 255, 0.15) 50%,
transparent 100%
);
transform: translateX(-100%);
animation: skWave 1.6s linear infinite;
}
@keyframes skWave {
100% {
transform: translateX(100%);
}
}
@media (prefers-reduced-motion: reduce) {
.sk-wave,
.sk-wave * {
animation: none !important;
}
}
```
### 06. Comment Thread
**Type:** Pure CSS
**Description:** Three stacked rows, each a small avatar + two text lines — perfect for chat windows, comment lists, and message inbox loading states.
**HTML:**
```html
```
**CSS:**
```css
.sk-thread {
width: 220px;
display: flex;
flex-direction: column;
gap: 14px;
}
.sk-thread-row {
display: flex;
gap: 10px;
align-items: flex-start;
}
.sk-thread-dot {
width: 26px;
height: 26px;
border-radius: 50%;
background: linear-gradient(90deg, #1f1f28 0%, #2a2a36 50%, #1f1f28 100%);
background-size: 200% 100%;
animation: skShimmer 1.4s linear infinite;
flex-shrink: 0;
}
.sk-thread-lines {
display: flex;
flex-direction: column;
gap: 5px;
flex: 1;
}
.sk-thread-bar {
height: 11px;
border-radius: 5px;
background: linear-gradient(90deg, #1f1f28 0%, #2a2a36 50%, #1f1f28 100%);
background-size: 200% 100%;
animation: skShimmer 1.4s linear infinite;
}
@keyframes skShimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
@media (prefers-reduced-motion: reduce) {
.sk-thread,
.sk-thread * {
animation: none !important;
}
}
```
### 07. Article Page
**Type:** Pure CSS
**Description:** A page-level skeleton: hero image, headline, byline, and four paragraph lines. The full reading-page placeholder for blog and news templates.
**HTML:**
```html
```
**CSS:**
```css
.sk-article {
width: 220px;
display: flex;
flex-direction: column;
gap: 7px;
}
.sk-article-hero,
.sk-article-h1,
.sk-article-by,
.sk-article-line {
background: linear-gradient(90deg, #1f1f28 0%, #2a2a36 50%, #1f1f28 100%);
background-size: 200% 100%;
animation: skShimmer 1.6s linear infinite;
border-radius: 5px;
}
.sk-article-hero {
height: 60px;
border-radius: 8px;
margin-bottom: 6px;
}
.sk-article-h1 {
height: 14px;
width: 80%;
margin-bottom: 2px;
}
.sk-article-by {
height: 9px;
width: 45%;
margin-bottom: 6px;
}
.sk-article-line {
height: 8px;
}
@keyframes skShimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
@media (prefers-reduced-motion: reduce) {
.sk-article,
.sk-article * {
animation: none !important;
}
}
```
### 08. Table Rows
**Type:** Pure CSS
**Description:** Three table rows of three cells each, with a header row above. Each cell shimmers — the canonical placeholder for data tables and dashboards.
**HTML:**
```html
```
**CSS:**
```css
.sk-table {
width: 220px;
display: flex;
flex-direction: column;
gap: 6px;
}
.sk-table-row {
display: grid;
gap: 6px;
grid-template-columns: 1.5fr 1fr 1fr;
}
.sk-table-cell {
height: 12px;
border-radius: 4px;
background: linear-gradient(90deg, #1f1f28 0%, #2a2a36 50%, #1f1f28 100%);
background-size: 200% 100%;
animation: skShimmer 1.5s linear infinite;
}
.sk-table-head .sk-table-cell {
background: linear-gradient(90deg, #2a2a36 0%, #353543 50%, #2a2a36 100%);
background-size: 200% 100%;
height: 14px;
}
@keyframes skShimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
@media (prefers-reduced-motion: reduce) {
.sk-table,
.sk-table * {
animation: none !important;
}
}
```
### 09. Stat Tiles
**Type:** Pure CSS
**Description:** Three KPI tiles in a row, each with a small label and a big number placeholder — the dashboard / analytics loading state.
**HTML:**
```html
```
**CSS:**
```css
.sk-stats {
width: 220px;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 6px;
}
.sk-stat {
background: #15151b;
padding: 10px 8px;
border-radius: 8px;
display: flex;
flex-direction: column;
gap: 6px;
}
.sk-stat-label,
.sk-stat-num {
background: linear-gradient(90deg, #1f1f28 0%, #2a2a36 50%, #1f1f28 100%);
background-size: 200% 100%;
animation: skShimmer 1.5s linear infinite;
border-radius: 4px;
}
.sk-stat-label {
height: 8px;
width: 70%;
}
.sk-stat-num {
height: 16px;
width: 60%;
}
@keyframes skShimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
@media (prefers-reduced-motion: reduce) {
.sk-stats,
.sk-stats * {
animation: none !important;
}
}
```
### 10. Gradient Glow
**Type:** Pure CSS
**Description:** A soft brand-coloured gradient sweeps through each bar — a more decorative shimmer that fits hero sections and marketing pages.
**HTML:**
```html
```
**CSS:**
```css
.sk-glow {
width: 220px;
display: flex;
flex-direction: column;
gap: 10px;
}
.sk-glow-bar {
height: 14px;
border-radius: 7px;
background: linear-gradient(
90deg,
#1a1a22 0%,
rgba(124, 108, 255, 0.35) 30%,
rgba(255, 108, 138, 0.35) 60%,
#1a1a22 100%
);
background-size: 200% 100%;
animation: skGlow 1.8s linear infinite;
}
@keyframes skGlow {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
@media (prefers-reduced-motion: reduce) {
.sk-glow,
.sk-glow * {
animation: none !important;
}
}
```
### 11. List with Thumbnails
**Type:** Pure CSS
**Description:** A search-result / file-browser layout: square thumbnail beside two text lines, repeated three times. Mirrors media library and admin list views.
**HTML:**
```html
```
**CSS:**
```css
.sk-list {
width: 220px;
display: flex;
flex-direction: column;
gap: 12px;
}
.sk-list-row {
display: flex;
gap: 10px;
align-items: center;
}
.sk-list-thumb {
width: 40px;
height: 40px;
border-radius: 7px;
background: linear-gradient(90deg, #1f1f28 0%, #2a2a36 50%, #1f1f28 100%);
background-size: 200% 100%;
animation: skShimmer 1.5s linear infinite;
flex-shrink: 0;
}
.sk-list-text {
display: flex;
flex-direction: column;
gap: 6px;
flex: 1;
}
.sk-list-bar {
height: 11px;
border-radius: 5px;
background: linear-gradient(90deg, #1f1f28 0%, #2a2a36 50%, #1f1f28 100%);
background-size: 200% 100%;
animation: skShimmer 1.5s linear infinite;
}
@keyframes skShimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
@media (prefers-reduced-motion: reduce) {
.sk-list,
.sk-list * {
animation: none !important;
}
}
```
### 12. Chip Cluster
**Type:** Pure CSS
**Description:** Pill-shaped chips of varying widths shimmer in a flex-wrap layout — the right placeholder for tag filters, category lists, and search facets.
**HTML:**
```html
```
**CSS:**
```css
.sk-chips {
width: 220px;
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.sk-chip {
height: 22px;
border-radius: 11px;
background: linear-gradient(90deg, #1f1f28 0%, #2a2a36 50%, #1f1f28 100%);
background-size: 200% 100%;
animation: skShimmer 1.5s linear infinite;
}
@keyframes skShimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
@media (prefers-reduced-motion: reduce) {
.sk-chips,
.sk-chips * {
animation: none !important;
}
}
```
---
## 25 CSS Spinners
URL: https://codefronts.com/motion/css-spinner-designs/
Description: 25 hand-coded CSS spinners covering every production loading-spinner pattern developers reach for in 2026 — neon arc with glowing leading-edge dot, dual counter-rotate ring spinner, dot chase orbit (Material Design indeterminate pattern), gradient conic sweep, heartbeat pulse, audio equalizer wave bars, stacked ring helix, morphing square-to-circle, comet trail with fading tail, DNA double helix, folding cube 3D grid (SpinKit's signature pattern), ripple pulse ring (concentric circles), clock tick sweep, infinity loop stroke, bouncing elastic dots, spiral galaxy, glassmorphism loader (backdrop-filter pattern), cyberpunk segmented ring (gamer/Web3 aesthetic), breathing circle, particle scatter burst, retro TV static noise loader, liquid blob morphing, progress arc fill (determinate variant), matrix rain column (cyberpunk vertical), and aurora orb. All 100% pure CSS — zero JavaScript, zero libraries (no react-spinners, no react-loading-skeleton, no SpinKit copy, no loading.io snippet). Every spinner uses CSS @keyframes animating transform + opacity only (GPU-accelerated, INP-safe — no layout thrash). Every demo includes proper role="status" + aria-live="polite" markup so screen readers announce loading state correctly, respects prefers-reduced-motion, uses scoped .sp-NN__* class names so multiple spinners coexist on the same page without style bleed, MIT-licensed. Drop into React, Vue, Astro, Svelte, Rails ERB, plain HTML, WordPress — zero framework dependencies.
Demo count: 25
### 01. Neon Arc CSS Spinner
**Type:** Pure CSS
**Description:** A single glowing cyan arc rotates on a deep-dark background, with a luminous leading-edge dot that amplifies the neon effect via CSS drop-shadow filters.
**HTML:**
```html
```
**CSS:**
```css
.sp-01,.sp-01 *,.sp-01 *::before,.sp-01 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-01{
--bg:#0a0a0f;
--arc:#00f5ff;
--glow:rgba(0,245,255,0.4);
--track:rgba(0,245,255,0.12);
--size:72px;
--thickness:4px;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
font-family:system-ui,sans-serif;
}
.sp-01__ring{
position:relative;
width:var(--size);
height:var(--size);
}
.sp-01__track{
position:absolute;
inset:0;
border-radius:50%;
border:var(--thickness) solid var(--track);
}
/* The arc and dot-arm share one rotating parent so they move together */
.sp-01__spinner{
position:absolute;
inset:0;
animation:sp-01-spin 1s cubic-bezier(0.6,0.2,0.4,0.8) infinite;
}
.sp-01__arc{
position:absolute;
inset:0;
border-radius:50%;
border:var(--thickness) solid transparent;
border-top-color:var(--arc);
border-right-color:var(--arc);
filter:drop-shadow(0 0 8px var(--glow)) drop-shadow(0 0 16px var(--glow));
}
/* Leading-edge dot — a glowing tip at the LEADING END of the arc.
The arc is built from border-top + border-right, so visually it
spans ~135° (top-left corner) through 12 → 3 → ~225° (bottom-right
corner). The END of border-right is at the bottom-right corner of
the box (4:30 clock position), which is the LEADING tip during
clockwise rotation.
To position the dot at 4:30 on a 72×72 spinner: rotate 135° around
the center via transform: rotate(135deg) translateY(-r), where r =
(size/2 - thickness/2). Using a CSS custom property for r keeps
this responsive to --size + --thickness changes.
The dot is anchored at the spinner center (top:50%, left:50%) then
rotated outward by 135° (= 4:30 clock direction = the leading-end
of the arc), with translateY(-r) moving it to the arc's stroke
midline radius. Sized 1.75× the arc thickness for a visible glowing
tip without a chunky-bump look. */
.sp-01__dot{
position:absolute;
top:50%;
left:50%;
width:calc(var(--thickness) * 1.75);
height:calc(var(--thickness) * 1.75);
transform:translate(-50%, -50%) rotate(135deg) translateY(calc(var(--size) / -2 + var(--thickness) / 2));
background:var(--arc);
border-radius:50%;
box-shadow:0 0 8px var(--arc),0 0 16px var(--glow);
}
@keyframes sp-01-spin{
0%{transform:rotate(0deg)}
100%{transform:rotate(360deg)}
}
@media (prefers-reduced-motion: reduce){
.sp-01__spinner{animation:none}
}
```
### 02. Dual Counter-Rotate Ring Spinner
**Type:** Pure CSS
**Description:** Two concentric rings spin in opposite directions — outer purple and inner pink — with a pulsing radial core, creating a hypnotic, gyroscopic loading indicator.
**HTML:**
```html
```
**CSS:**
```css
.sp-02,.sp-02 *,.sp-02 *::before,.sp-02 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-02{
--bg:#0d0017;
--outer:#b44fff;
--inner:#ff4fa3;
--outer-track:rgba(180,79,255,0.15);
--inner-track:rgba(255,79,163,0.15);
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-02__wrap{
position:relative;
width:80px;
height:80px;
}
.sp-02__outer-track{
position:absolute;
inset:0;
border-radius:50%;
border:4px solid var(--outer-track);
}
.sp-02__outer{
position:absolute;
inset:0;
border-radius:50%;
border:4px solid transparent;
border-top-color:var(--outer);
border-bottom-color:var(--outer);
animation:sp-02-cw 1.2s linear infinite;
filter:drop-shadow(0 0 6px var(--outer));
}
.sp-02__inner-track{
position:absolute;
inset:14px;
border-radius:50%;
border:3px solid var(--inner-track);
}
.sp-02__inner{
position:absolute;
inset:14px;
border-radius:50%;
border:3px solid transparent;
border-left-color:var(--inner);
border-right-color:var(--inner);
animation:sp-02-ccw 0.9s linear infinite;
filter:drop-shadow(0 0 6px var(--inner));
}
.sp-02__core{
position:absolute;
inset:32px;
border-radius:50%;
background:radial-gradient(circle,rgba(180,79,255,0.6),transparent);
animation:sp-02-pulse 1.2s ease-in-out infinite;
}
@keyframes sp-02-cw{
to{transform:rotate(360deg)}
}
@keyframes sp-02-ccw{
to{transform:rotate(-360deg)}
}
@keyframes sp-02-pulse{
0%,100%{opacity:0.4;transform:scale(0.8)}
50%{opacity:1;transform:scale(1.2)}
}
@media (prefers-reduced-motion: reduce){
.sp-02__outer,.sp-02__inner,.sp-02__core{animation:none}
}
```
### 03. Dot Chase Orbit Spinner
**Type:** Pure CSS
**Description:** Four multi-coloured dots orbit a shared centre, each fading in and out with staggered delays to create a chasing, comet-like orbital trail effect.
**HTML:**
```html
```
**CSS:**
```css
.sp-03,.sp-03 *,.sp-03 *::before,.sp-03 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-03{
--bg:#0b1120;
--d1:#f9a825;
--d2:#ff6b35;
--d3:#e91e8c;
--d4:#7c4dff;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-03__orbit{
position:relative;
width:72px;
height:72px;
animation:sp-03-spin 1.4s linear infinite;
}
.sp-03__dot{
position:absolute;
width:12px;
height:12px;
border-radius:50%;
top:50%;
left:50%;
transform-origin:0 0;
}
.sp-03__dot:nth-child(1){
background:var(--d1);
box-shadow:0 0 8px var(--d1);
transform:rotate(0deg) translateX(28px) translateY(-6px);
animation:sp-03-fade 1.4s linear infinite;
animation-delay:0s;
}
.sp-03__dot:nth-child(2){
background:var(--d2);
box-shadow:0 0 8px var(--d2);
transform:rotate(90deg) translateX(28px) translateY(-6px);
animation:sp-03-fade 1.4s linear infinite;
animation-delay:-0.35s;
}
.sp-03__dot:nth-child(3){
background:var(--d3);
box-shadow:0 0 8px var(--d3);
transform:rotate(180deg) translateX(28px) translateY(-6px);
animation:sp-03-fade 1.4s linear infinite;
animation-delay:-0.7s;
}
.sp-03__dot:nth-child(4){
background:var(--d4);
box-shadow:0 0 8px var(--d4);
transform:rotate(270deg) translateX(28px) translateY(-6px);
animation:sp-03-fade 1.4s linear infinite;
animation-delay:-1.05s;
}
.sp-03__trail{
position:absolute;
inset:8px;
border-radius:50%;
border:1px solid rgba(255,255,255,0.06);
}
@keyframes sp-03-spin{
to{transform:rotate(360deg)}
}
@keyframes sp-03-fade{
0%,100%{opacity:1;transform-origin:0 0}
50%{opacity:0.25}
}
@media (prefers-reduced-motion: reduce){
.sp-03__orbit,.sp-03__dot{animation:none}
}
```
### 04. Gradient Conic Sweep Spinner
**Type:** Pure CSS
**Description:** A conic-gradient disk sweeps through deep violet-to-cyan colours with a transparent cutout tail, creating a smooth colour-wheel spinner with a bright leading-edge tip.
**HTML:**
```html
```
**CSS:**
```css
.sp-04,.sp-04 *,.sp-04 *::before,.sp-04 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-04{
--bg:#050510;
--c1:#00e5ff;
--c2:#1976d2;
--c3:#6200ea;
--hole:#050510;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-04__wrap{
position:relative;
width:80px;
height:80px;
}
.sp-04__spinner{
position:absolute;
inset:0;
animation:sp-04-spin 1s linear infinite;
}
.sp-04__conic{
width:100%;
height:100%;
border-radius:50%;
/*
Bright cyan tip lands at 360deg (= 0deg = 12 o'clock). Arc fades
BACKWARD (counter-clockwise from the tip): purple → blue → cyan
arriving at the tip. Transparent gap from 0-60deg = clean cutoff
after the tip in the rotation direction. Tail points CCW from
head = correct comet physics for CLOCKWISE rotation (tail trails
behind the direction of motion). Same direction as Demo 09 so
they read consistently.
*/
background:conic-gradient(
transparent 0deg,
transparent 60deg,
var(--c3) 120deg,
var(--c2) 240deg,
var(--c1) 360deg
);
filter:drop-shadow(0 0 6px var(--c1));
}
.sp-04__hole{
position:absolute;
inset:10px;
border-radius:50%;
background:var(--hole);
}
/* Tip at 12-o'clock (0deg) = exact bright start of the arc. The
conic disc is 80px and the donut hole is inset:10px so the ring
spans outer-radius 40 → inner-radius 30 → midline at radius 35
(= 5px from the outer top edge). The tip dot's CENTER must land
on that midline, so we offset the 10x10 dot up by half its size
via the translateY(-50%) trick. left:50% + translateX(-50%)
centers it horizontally on the same axis. */
.sp-04__tip{
position:absolute;
top:5px;
left:50%;
width:10px;
height:10px;
transform:translate(-50%, -50%);
border-radius:50%;
background:var(--c1);
box-shadow:0 0 12px var(--c1),0 0 24px var(--c1);
}
@keyframes sp-04-spin{
to{transform:rotate(360deg)}
}
@media (prefers-reduced-motion: reduce){
.sp-04__spinner{animation:none}
}
```
### 05. Heartbeat Pulse Loader
**Type:** Pure CSS
**Description:** A vivid red core pulses with a cardiac double-beat rhythm while three concentric ripple rings expand outward and fade, mimicking a real heartbeat waveform.
**HTML:**
```html
```
**CSS:**
```css
.sp-05,.sp-05 *,.sp-05 *::before,.sp-05 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-05{
--bg:#0f0a0a;
--c:#ff1744;
--glow:rgba(255,23,68,0.5);
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-05__stack{
position:relative;
width:72px;
height:72px;
}
.sp-05__ring{
position:absolute;
border-radius:50%;
border:2px solid var(--c);
opacity:0;
animation:sp-05-ripple 1.8s ease-out infinite;
}
.sp-05__ring:nth-child(1){
inset:0;
animation-delay:0s;
}
.sp-05__ring:nth-child(2){
inset:0;
animation-delay:0.6s;
}
.sp-05__ring:nth-child(3){
inset:0;
animation-delay:1.2s;
}
.sp-05__core{
position:absolute;
inset:22px;
border-radius:50%;
background:var(--c);
box-shadow:0 0 16px var(--glow),0 0 32px var(--glow);
animation:sp-05-beat 1.8s ease-in-out infinite;
}
@keyframes sp-05-ripple{
0%{transform:scale(0.3);opacity:0.9}
100%{transform:scale(1.6);opacity:0}
}
@keyframes sp-05-beat{
0%,100%{transform:scale(1)}
15%{transform:scale(1.25)}
30%{transform:scale(0.95)}
45%{transform:scale(1.1)}
}
@media (prefers-reduced-motion: reduce){
.sp-05__ring,.sp-05__core{animation:none;opacity:1}
}
```
### 06. Wave Bar Equalizer Spinner
**Type:** Pure CSS
**Description:** Seven vertical bars oscillate like an audio level meter, scaling from a flat line to full height in a symmetric wave pattern using staggered CSS animation delays.
**HTML:**
```html
```
**CSS:**
```css
.sp-06,.sp-06 *,.sp-06 *::before,.sp-06 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-06{
--bg:#020c14;
--c1:#00e676;
--c2:#00bcd4;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-06__bars{
display:flex;
align-items:flex-end;
gap:5px;
height:56px;
}
.sp-06__bar{
width:8px;
border-radius:4px 4px 2px 2px;
background:linear-gradient(to top,var(--c1),var(--c2));
box-shadow:0 0 6px var(--c1);
animation:sp-06-eq 1s ease-in-out infinite;
}
.sp-06__bar:nth-child(1){animation-delay:0s;height:20px}
.sp-06__bar:nth-child(2){animation-delay:0.1s;height:35px}
.sp-06__bar:nth-child(3){animation-delay:0.2s;height:50px}
.sp-06__bar:nth-child(4){animation-delay:0.3s;height:35px}
.sp-06__bar:nth-child(5){animation-delay:0.4s;height:20px}
.sp-06__bar:nth-child(6){animation-delay:0.3s;height:35px}
.sp-06__bar:nth-child(7){animation-delay:0.2s;height:50px}
@keyframes sp-06-eq{
0%,100%{transform:scaleY(0.3)}
50%{transform:scaleY(1)}
}
@media (prefers-reduced-motion: reduce){
.sp-06__bar{animation:none;transform:scaleY(0.6)}
}
```
### 07. Stacked Ring Helix Spinner
**Type:** Pure CSS
**Description:** Three concentric rings in blue, indigo, and violet spin at alternating speeds and directions, with each ring using different border-side pairs to create a three-axis helix illusion.
**HTML:**
```html
```
**CSS:**
```css
.sp-07,.sp-07 *,.sp-07 *::before,.sp-07 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-07{
--bg:#080c18;
--c1:#40c4ff;
--c2:#7986cb;
--c3:#ce93d8;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-07__helix{
position:relative;
width:72px;
height:72px;
transform-style:preserve-3d;
perspective:200px;
}
.sp-07__ring{
position:absolute;
inset:0;
border-radius:50%;
border:3px solid transparent;
}
.sp-07__ring:nth-child(1){
border-top-color:var(--c1);
border-bottom-color:var(--c1);
filter:drop-shadow(0 0 5px var(--c1));
animation:sp-07-spin 1.4s linear infinite;
}
.sp-07__ring:nth-child(2){
inset:10px;
border-left-color:var(--c2);
border-right-color:var(--c2);
filter:drop-shadow(0 0 5px var(--c2));
animation:sp-07-spin 1.4s linear infinite reverse;
animation-delay:-0.23s;
}
.sp-07__ring:nth-child(3){
inset:20px;
border-top-color:var(--c3);
border-bottom-color:var(--c3);
filter:drop-shadow(0 0 5px var(--c3));
animation:sp-07-spin 1.4s linear infinite;
animation-delay:-0.46s;
}
.sp-07__core{
position:absolute;
inset:30px;
border-radius:50%;
background:radial-gradient(var(--c3),transparent);
opacity:0.5;
}
@keyframes sp-07-spin{
to{transform:rotate(360deg)}
}
@media (prefers-reduced-motion: reduce){
.sp-07__ring{animation:none}
}
```
### 08. Morph Square-to-Circle Spinner
**Type:** Pure CSS
**Description:** A hollow square morphs fluidly through four asymmetric border-radius stages into a perfect circle and back, while simultaneously rotating — a classic CSS shape-morphing technique.
**HTML:**
```html
```
**CSS:**
```css
.sp-08,.sp-08 *,.sp-08 *::before,.sp-08 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-08{
--bg:#0e0e12;
--c:#ff9100;
--glow:rgba(255,145,0,0.4);
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-08__shape{
width:60px;
height:60px;
background:transparent;
border:4px solid var(--c);
filter:drop-shadow(0 0 8px var(--glow));
animation:sp-08-morph 2s ease-in-out infinite, sp-08-spin 2s linear infinite;
}
@keyframes sp-08-morph{
0%,100%{border-radius:4px;transform:rotate(0deg) scale(1)}
25%{border-radius:50% 4px 50% 4px}
50%{border-radius:50%;transform:rotate(180deg) scale(1.15)}
75%{border-radius:4px 50% 4px 50%}
}
@keyframes sp-08-spin{
0%{transform:rotate(0deg)}
100%{transform:rotate(360deg)}
}
.sp-08__outer{
position:relative;
width:80px;
height:80px;
display:flex;
align-items:center;
justify-content:center;
}
.sp-08__track{
position:absolute;
inset:0;
border-radius:50%;
border:1px solid rgba(255,145,0,0.1);
}
@media (prefers-reduced-motion: reduce){
.sp-08__shape{animation:none;border-radius:8px}
}
```
### 09. Comet Trail CSS Spinner
**Type:** Pure CSS
**Description:** A conic-gradient comet with a long fading purple tail sweeps around a dark ring, with a bright glowing tip dot that precisely tracks the leading edge of the arc.
**HTML:**
```html
```
**CSS:**
```css
.sp-09,.sp-09 *,.sp-09 *::before,.sp-09 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-09{
--bg:#030a1a;
--c:#e040fb;
--glow:rgba(224,64,251,0.5);
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-09__wrap{
position:relative;
width:80px;
height:80px;
}
.sp-09__spinner{
position:absolute;
inset:0;
animation:sp-09-spin 1s linear infinite;
}
.sp-09__comet{
width:100%;
height:100%;
border-radius:50%;
/*
Bright tip lands at 360deg (= 0deg = 12 o'clock). Tail fades
BACKWARD (counter-clockwise from the tip) through the 180-360
range. The 0-180 range is empty so there's a clean gap before
the tip. Reversing the gradient direction (vs the simpler
"bright at 0deg, fade to 180deg" layout) makes the tail point
CCW from the head — correct comet physics for CLOCKWISE
rotation, where the tail trails behind the direction of motion.
*/
background:conic-gradient(
transparent 0deg,
transparent 180deg,
rgba(224,64,251,0.15) 240deg,
rgba(224,64,251,0.4) 300deg,
var(--c) 360deg
);
filter:drop-shadow(0 0 4px var(--glow));
}
.sp-09__hole{
position:absolute;
inset:10px;
border-radius:50%;
background:var(--bg);
}
/* Tip at 12-o'clock = 0deg = bright head of the comet. The conic
disc is 80px with donut hole inset:10px so the ring midline is
at radius 35 (= 5px from the outer top edge). The tip dot's
CENTER must land on that midline. translate(-50%, -50%) on
top:5px + left:50% places the dot center exactly on the ring
stroke at the 12 o'clock position. */
.sp-09__tip{
position:absolute;
top:5px;
left:50%;
width:8px;
height:8px;
transform:translate(-50%, -50%);
border-radius:50%;
background:var(--c);
box-shadow:0 0 10px var(--c),0 0 20px var(--c);
}
@keyframes sp-09-spin{
to{transform:rotate(360deg)}
}
@media (prefers-reduced-motion: reduce){
.sp-09__spinner{animation:none}
}
```
### 10. DNA Double Helix Spinner
**Type:** Pure CSS
**Description:** Eight nucleotide pairs animate as two interweaving dot chains — one cyan, one pink — translating horizontally in opposing directions to simulate a rotating DNA double helix.
**HTML:**
```html
```
**CSS:**
```css
.sp-10,.sp-10 *,.sp-10 *::before,.sp-10 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-10{
--bg:#040d1a;
--ca:#00bcd4;
--cb:#f06292;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-10__dna{
display:flex;
flex-direction:column;
gap:0;
align-items:center;
}
.sp-10__pair{
display:flex;
align-items:center;
gap:0;
height:9px;
}
.sp-10__dot-a,.sp-10__dot-b{
width:10px;
height:10px;
border-radius:50%;
}
.sp-10__dot-a{
background:var(--ca);
box-shadow:0 0 6px var(--ca);
}
.sp-10__dot-b{
background:var(--cb);
box-shadow:0 0 6px var(--cb);
}
.sp-10__bridge{
width:28px;
height:1px;
background:linear-gradient(to right,var(--ca),var(--cb));
/* The bridge represents the base-pair connection between the two
strands. As the strands cross (50% of the cycle, dots meeting at
center), the visible distance between them shrinks to zero —
so the bridge should ALSO shrink to invisible at that moment.
A symmetric scaleX keyframe makes the bridge "breathe" between
full-width (when strands are spread) and zero-width (when they
cross). transform-origin:center keeps the bridge centered as it
scales. */
transform-origin:center;
animation:sp-10-bridge 1.4s ease-in-out infinite;
}
.sp-10__pair:nth-child(1) .sp-10__bridge{animation-delay:calc(0 * 0.14s)}
.sp-10__pair:nth-child(2) .sp-10__bridge{animation-delay:calc(1 * 0.14s)}
.sp-10__pair:nth-child(3) .sp-10__bridge{animation-delay:calc(2 * 0.14s)}
.sp-10__pair:nth-child(4) .sp-10__bridge{animation-delay:calc(3 * 0.14s)}
.sp-10__pair:nth-child(5) .sp-10__bridge{animation-delay:calc(4 * 0.14s)}
.sp-10__pair:nth-child(6) .sp-10__bridge{animation-delay:calc(5 * 0.14s)}
.sp-10__pair:nth-child(7) .sp-10__bridge{animation-delay:calc(6 * 0.14s)}
.sp-10__pair:nth-child(8) .sp-10__bridge{animation-delay:calc(7 * 0.14s)}
@keyframes sp-10-bridge{
/* 0%/100% = strands at extremes → bridge full width visible. */
0%,100%{transform:scaleX(1);opacity:0.4}
/* 50% = strands crossing at center → bridge collapsed + invisible. */
50%{transform:scaleX(0.05);opacity:0}
}
/* Two strands run the SAME keyframe but at OPPOSITE PHASE so they
cross each other. The trick: dot-A's keyframe goes right→left→right,
dot-B's keyframe goes left→right→left. With opposite phase, when
strand A is pushed +16, strand B is pushed -16 — they meet and cross
at the center every half-cycle, producing the X-shape that reads as
a helix projection.
Why not animation-direction:reverse? Because the keyframe is symmetric
(0% and 100% are identical), so reverse plays the SAME visual sequence.
Reverse only flips things visually if 0% ≠ 100%. Two distinct keyframes
(helix-a and helix-b that start at opposite x positions) is the
reliable approach.
The per-pair animation-delay staggers the crossing motion vertically
so it propagates downward in a wave (~0.14s per row). */
.sp-10__pair:nth-child(1) .sp-10__dot-a{animation:sp-10-helix-a 1.4s ease-in-out infinite;animation-delay:calc(0 * 0.14s)}
.sp-10__pair:nth-child(2) .sp-10__dot-a{animation:sp-10-helix-a 1.4s ease-in-out infinite;animation-delay:calc(1 * 0.14s)}
.sp-10__pair:nth-child(3) .sp-10__dot-a{animation:sp-10-helix-a 1.4s ease-in-out infinite;animation-delay:calc(2 * 0.14s)}
.sp-10__pair:nth-child(4) .sp-10__dot-a{animation:sp-10-helix-a 1.4s ease-in-out infinite;animation-delay:calc(3 * 0.14s)}
.sp-10__pair:nth-child(5) .sp-10__dot-a{animation:sp-10-helix-a 1.4s ease-in-out infinite;animation-delay:calc(4 * 0.14s)}
.sp-10__pair:nth-child(6) .sp-10__dot-a{animation:sp-10-helix-a 1.4s ease-in-out infinite;animation-delay:calc(5 * 0.14s)}
.sp-10__pair:nth-child(7) .sp-10__dot-a{animation:sp-10-helix-a 1.4s ease-in-out infinite;animation-delay:calc(6 * 0.14s)}
.sp-10__pair:nth-child(8) .sp-10__dot-a{animation:sp-10-helix-a 1.4s ease-in-out infinite;animation-delay:calc(7 * 0.14s)}
.sp-10__pair:nth-child(1) .sp-10__dot-b{animation:sp-10-helix-b 1.4s ease-in-out infinite;animation-delay:calc(0 * 0.14s)}
.sp-10__pair:nth-child(2) .sp-10__dot-b{animation:sp-10-helix-b 1.4s ease-in-out infinite;animation-delay:calc(1 * 0.14s)}
.sp-10__pair:nth-child(3) .sp-10__dot-b{animation:sp-10-helix-b 1.4s ease-in-out infinite;animation-delay:calc(2 * 0.14s)}
.sp-10__pair:nth-child(4) .sp-10__dot-b{animation:sp-10-helix-b 1.4s ease-in-out infinite;animation-delay:calc(3 * 0.14s)}
.sp-10__pair:nth-child(5) .sp-10__dot-b{animation:sp-10-helix-b 1.4s ease-in-out infinite;animation-delay:calc(4 * 0.14s)}
.sp-10__pair:nth-child(6) .sp-10__dot-b{animation:sp-10-helix-b 1.4s ease-in-out infinite;animation-delay:calc(5 * 0.14s)}
.sp-10__pair:nth-child(7) .sp-10__dot-b{animation:sp-10-helix-b 1.4s ease-in-out infinite;animation-delay:calc(6 * 0.14s)}
.sp-10__pair:nth-child(8) .sp-10__dot-b{animation:sp-10-helix-b 1.4s ease-in-out infinite;animation-delay:calc(7 * 0.14s)}
/* Strand A starts pushed RIGHT then swings LEFT (front of the helix at 50%). */
@keyframes sp-10-helix-a{
0%,100%{transform:translateX(16px);opacity:0.2}
50%{transform:translateX(-16px);opacity:1}
}
/* Strand B starts pushed LEFT then swings RIGHT — opposite phase, so
strands A and B cross at the center every half-cycle (the X pattern). */
@keyframes sp-10-helix-b{
0%,100%{transform:translateX(-16px);opacity:1}
50%{transform:translateX(16px);opacity:0.2}
}
@media (prefers-reduced-motion: reduce){
.sp-10__dot-a,.sp-10__dot-b{animation:none;transform:none}
}
```
### 11. Folding Cube Grid Spinner
**Type:** Pure CSS
**Description:** A 3×3 grid of teal cubes each flip through two 90° rotation axes in sequence with staggered delays, creating a cascading wave of 3D folding tiles.
**HTML:**
```html
```
**CSS:**
```css
.sp-11,.sp-11 *,.sp-11 *::before,.sp-11 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-11{
--bg:#0a0a0a;
--c:#64ffda;
--glow:rgba(100,255,218,0.5);
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-11__grid{
display:grid;
grid-template-columns:repeat(3,22px);
grid-template-rows:repeat(3,22px);
gap:4px;
}
.sp-11__cube{
width:22px;
height:22px;
background:var(--c);
box-shadow:0 0 8px var(--glow);
border-radius:2px;
animation:sp-11-fold 1.8s ease-in-out infinite;
}
.sp-11__cube:nth-child(1){animation-delay:0s}
.sp-11__cube:nth-child(2){animation-delay:0.1s}
.sp-11__cube:nth-child(3){animation-delay:0.2s}
.sp-11__cube:nth-child(4){animation-delay:0.3s}
.sp-11__cube:nth-child(5){animation-delay:0.4s}
.sp-11__cube:nth-child(6){animation-delay:0.5s}
.sp-11__cube:nth-child(7){animation-delay:0.6s}
.sp-11__cube:nth-child(8){animation-delay:0.7s}
.sp-11__cube:nth-child(9){animation-delay:0.8s}
@keyframes sp-11-fold{
0%,100%{transform:perspective(60px) rotateX(0deg) rotateY(0deg);opacity:1}
33%{transform:perspective(60px) rotateX(-90deg) rotateY(0deg);opacity:0.4}
66%{transform:perspective(60px) rotateX(-90deg) rotateY(90deg);opacity:0.4}
}
@media (prefers-reduced-motion: reduce){
.sp-11__cube{animation:none}
}
```
### 12. Ripple Pulse Ring Spinner
**Type:** Pure CSS
**Description:** Four concentric rings expand outward from a solid azure dot in sequence, each fading from full opacity to invisible as it reaches its maximum radius — like rings in water.
**HTML:**
```html
```
**CSS:**
```css
.sp-12,.sp-12 *,.sp-12 *::before,.sp-12 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-12{
--bg:#060810;
--c:#29b6f6;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-12__ripple{
position:relative;
width:80px;
height:80px;
}
.sp-12__ring{
position:absolute;
border-radius:50%;
border:2px solid var(--c);
opacity:0;
animation:sp-12-ripple 2s ease-out infinite;
}
.sp-12__ring:nth-child(1){inset:0;animation-delay:0s}
.sp-12__ring:nth-child(2){inset:0;animation-delay:0.5s}
.sp-12__ring:nth-child(3){inset:0;animation-delay:1s}
.sp-12__ring:nth-child(4){inset:0;animation-delay:1.5s}
.sp-12__dot{
position:absolute;
inset:30px;
border-radius:50%;
background:var(--c);
box-shadow:0 0 12px var(--c),0 0 24px rgba(41,182,246,0.4);
}
@keyframes sp-12-ripple{
0%{transform:scale(0.1);opacity:1}
100%{transform:scale(1.8);opacity:0}
}
@media (prefers-reduced-motion: reduce){
.sp-12__ring{animation:none;opacity:0.3;transform:scale(1)}
}
```
### 13. Clock Tick Sweep Spinner
**Type:** Pure CSS
**Description:** A precise gold second-hand sweeps in discrete tick steps around a minimal dark clock face with 12 hour markers, using CSS steps() timing to simulate mechanical tick motion.
**HTML:**
```html
```
**CSS:**
```css
.sp-13,.sp-13 *,.sp-13 *::before,.sp-13 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-13{
--bg:#0d0d0d;
--face:#111;
--ring:#e8e0d0;
--hand:#f5c518;
--tick:rgba(232,224,208,0.4);
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-13__clock{
position:relative;
width:80px;
height:80px;
background:var(--face);
border-radius:50%;
border:2px solid var(--ring);
box-shadow:0 0 0 1px rgba(232,224,208,0.1),inset 0 0 16px rgba(0,0,0,0.5);
}
.sp-13__tick{
position:absolute;
top:50%;
left:50%;
width:2px;
height:6px;
margin-left:-1px;
background:var(--tick);
transform-origin:bottom center;
border-radius:1px;
}
.sp-13__tick:nth-child(1){transform:translateY(-100%) translateY(-27px) rotate(0deg)}
.sp-13__tick:nth-child(2){transform:translateY(-100%) translateY(-27px) rotate(30deg)}
.sp-13__tick:nth-child(3){transform:translateY(-100%) translateY(-27px) rotate(60deg)}
.sp-13__tick:nth-child(4){transform:translateY(-100%) translateY(-27px) rotate(90deg)}
.sp-13__tick:nth-child(5){transform:translateY(-100%) translateY(-27px) rotate(120deg)}
.sp-13__tick:nth-child(6){transform:translateY(-100%) translateY(-27px) rotate(150deg)}
.sp-13__tick:nth-child(7){transform:translateY(-100%) translateY(-27px) rotate(180deg)}
.sp-13__tick:nth-child(8){transform:translateY(-100%) translateY(-27px) rotate(210deg)}
.sp-13__tick:nth-child(9){transform:translateY(-100%) translateY(-27px) rotate(240deg)}
.sp-13__tick:nth-child(10){transform:translateY(-100%) translateY(-27px) rotate(270deg)}
.sp-13__tick:nth-child(11){transform:translateY(-100%) translateY(-27px) rotate(300deg)}
.sp-13__tick:nth-child(12){transform:translateY(-100%) translateY(-27px) rotate(330deg)}
.sp-13__hand{
position:absolute;
bottom:50%;
left:50%;
width:2px;
height:26px;
margin-left:-1px;
background:var(--hand);
border-radius:2px 2px 0 0;
transform-origin:bottom center;
box-shadow:0 0 4px var(--hand);
animation:sp-13-tick 1s steps(60,end) infinite;
}
.sp-13__center{
position:absolute;
top:50%;
left:50%;
width:6px;
height:6px;
border-radius:50%;
background:var(--hand);
transform:translate(-50%,-50%);
box-shadow:0 0 4px var(--hand);
}
@keyframes sp-13-tick{
to{transform:rotate(360deg)}
}
@media (prefers-reduced-motion: reduce){
.sp-13__hand{animation:none}
}
```
### 14. Infinity Loop Stroke Spinner
**Type:** Pure CSS
**Description:** An SVG infinity symbol (∞) animates its stroke drawing from start to end and back using stroke-dasharray and stroke-dashoffset, with a glowing lime-green line on a dark field.
**HTML:**
```html
```
**CSS:**
```css
.sp-14,.sp-14 *,.sp-14 *::before,.sp-14 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-14{
--bg:#04080f;
--c:#76ff03;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-14__svg{
width:120px;
height:60px;
overflow:visible;
filter:drop-shadow(0 0 6px var(--c)) drop-shadow(0 0 12px rgba(118,255,3,0.3));
}
.sp-14__path{
fill:none;
stroke:var(--c);
stroke-width:3;
stroke-linecap:round;
stroke-dasharray:300;
stroke-dashoffset:300;
animation:sp-14-draw 2s ease-in-out infinite;
}
.sp-14__track{
fill:none;
stroke:rgba(118,255,3,0.1);
stroke-width:3;
stroke-linecap:round;
}
@keyframes sp-14-draw{
0%{stroke-dashoffset:300;opacity:1}
50%{stroke-dashoffset:0;opacity:1}
100%{stroke-dashoffset:-300;opacity:0}
}
@media (prefers-reduced-motion: reduce){
.sp-14__path{animation:none;stroke-dashoffset:0}
}
```
### 15. Bouncing Elastic Dots Spinner
**Type:** Pure CSS
**Description:** Three coloured dots bounce with spring-like squash and stretch physics — compressing horizontally and elongating vertically at peak height — using a multi-step cubic-bezier keyframe.
**HTML:**
```html
```
**CSS:**
```css
.sp-15,.sp-15 *,.sp-15 *::before,.sp-15 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-15{
--bg:#0e0b1e;
--c1:#ff6e6c;
--c2:#cbacf9;
--c3:#67e8f9;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-15__row{
display:flex;
align-items:flex-end;
gap:10px;
height:70px;
}
.sp-15__dot{
width:18px;
height:18px;
border-radius:50%;
animation:sp-15-bounce 0.9s cubic-bezier(0.36,0.07,0.19,0.97) infinite;
}
.sp-15__dot:nth-child(1){
background:var(--c1);
box-shadow:0 0 10px var(--c1);
animation-delay:0s;
}
.sp-15__dot:nth-child(2){
background:var(--c2);
box-shadow:0 0 10px var(--c2);
animation-delay:0.15s;
}
.sp-15__dot:nth-child(3){
background:var(--c3);
box-shadow:0 0 10px var(--c3);
animation-delay:0.3s;
}
@keyframes sp-15-bounce{
0%,100%{transform:translateY(0) scaleX(1) scaleY(1)}
30%{transform:translateY(-40px) scaleX(0.9) scaleY(1.1)}
50%{transform:translateY(-48px) scaleX(0.85) scaleY(1.15)}
70%{transform:translateY(-40px) scaleX(0.9) scaleY(1.1)}
85%{transform:translateY(-4px) scaleX(1.1) scaleY(0.9)}
}
@media (prefers-reduced-motion: reduce){
.sp-15__dot{animation:none}
}
```
### 16. Spiral Galaxy CSS Spinner
**Type:** Pure CSS
**Description:** Three overlapping conic-gradient arms spiral outward from a bright central core, blurred and rotated 120° apart to simulate a three-armed barred spiral galaxy.
**HTML:**
```html
```
**CSS:**
```css
.sp-16,.sp-16 *,.sp-16 *::before,.sp-16 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-16{
--bg:#03010a;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-16__galaxy{
position:relative;
width:100px;
height:100px;
animation:sp-16-spin 3s linear infinite;
}
.sp-16__arm{
position:absolute;
inset:0;
border-radius:50%;
}
.sp-16__arm:nth-child(1){
background:conic-gradient(
transparent 0deg, transparent 40deg,
rgba(99,102,241,0.8) 80deg, transparent 160deg,
transparent 200deg, transparent 240deg,
rgba(99,102,241,0.4) 280deg, transparent 360deg
);
filter:blur(2px);
}
.sp-16__arm:nth-child(2){
background:conic-gradient(
transparent 0deg, transparent 120deg,
rgba(168,85,247,0.7) 160deg, transparent 240deg,
transparent 280deg, transparent 300deg,
rgba(168,85,247,0.3) 340deg, transparent 360deg
);
filter:blur(1.5px);
transform:rotate(120deg);
}
.sp-16__arm:nth-child(3){
background:conic-gradient(
transparent 0deg, transparent 240deg,
rgba(236,72,153,0.6) 280deg, transparent 360deg
);
filter:blur(1px);
transform:rotate(240deg);
}
.sp-16__core{
position:absolute;
inset:38px;
border-radius:50%;
background:radial-gradient(circle,#fff 0%,rgba(168,85,247,0.8) 40%,transparent 80%);
filter:blur(2px);
}
@keyframes sp-16-spin{
to{transform:rotate(360deg)}
}
@media (prefers-reduced-motion: reduce){
.sp-16__galaxy{animation:none}
}
```
### 17. Glassmorphism Loader Spinner
**Type:** Pure CSS
**Description:** A frosted-glass circle with backdrop-filter blur floats over animated colour blobs, with two nested arcs spinning at different speeds to create a layered glassmorphic loading indicator.
**HTML:**
```html
```
**CSS:**
```css
.sp-17,.sp-17 *,.sp-17 *::before,.sp-17 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-17{
--bg:#1a0533;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
overflow:hidden;
}
.sp-17__blobs{
position:absolute;
inset:0;
pointer-events:none;
}
.sp-17__blob{
position:absolute;
border-radius:50%;
filter:blur(60px);
opacity:0.6;
animation:sp-17-float 6s ease-in-out infinite;
}
.sp-17__blob:nth-child(1){
width:200px;height:200px;
background:#7c3aed;
top:-80px;left:-60px;
animation-delay:0s;
}
.sp-17__blob:nth-child(2){
width:180px;height:180px;
background:#ec4899;
bottom:-60px;right:-40px;
animation-delay:-2s;
}
.sp-17__blob:nth-child(3){
width:160px;height:160px;
background:#3b82f6;
top:20%;right:10%;
animation-delay:-4s;
}
.sp-17__glass{
position:relative;
width:100px;
height:100px;
border-radius:50%;
background:rgba(255,255,255,0.08);
backdrop-filter:blur(12px);
border:1px solid rgba(255,255,255,0.2);
box-shadow:0 8px 32px rgba(0,0,0,0.3),inset 0 1px 0 rgba(255,255,255,0.15);
display:flex;
align-items:center;
justify-content:center;
}
.sp-17__arc{
position:absolute;
inset:8px;
border-radius:50%;
border:3px solid transparent;
border-top-color:rgba(255,255,255,0.9);
border-right-color:rgba(255,255,255,0.4);
animation:sp-17-spin 1.1s linear infinite;
}
.sp-17__arc-inner{
position:absolute;
inset:20px;
border-radius:50%;
border:2px solid transparent;
border-bottom-color:rgba(255,255,255,0.7);
animation:sp-17-spin 0.8s linear infinite reverse;
}
@keyframes sp-17-spin{
to{transform:rotate(360deg)}
}
@keyframes sp-17-float{
0%,100%{transform:translateY(0) scale(1)}
50%{transform:translateY(-20px) scale(1.05)}
}
@media (prefers-reduced-motion: reduce){
.sp-17__arc,.sp-17__arc-inner,.sp-17__blob{animation:none}
}
```
### 18. Cyberpunk Segmented Ring Spinner
**Type:** Pure CSS
**Description:** A yellow dashed outer ring and a magenta inner arc spin in opposite directions around a rotating wireframe diamond core, channelling the segmented HUD aesthetics of cyberpunk UIs.
**HTML:**
```html
```
**CSS:**
```css
.sp-18,.sp-18 *,.sp-18 *::before,.sp-18 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-18{
--bg:#020409;
--c1:#f7ff00;
--c2:#ff0080;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-18__wrap{
position:relative;
width:88px;
height:88px;
}
.sp-18__ring-outer{
position:absolute;
inset:0;
border-radius:50%;
border:3px dashed var(--c1);
border-dash-offset:0;
opacity:0.9;
box-shadow:0 0 8px var(--c1),inset 0 0 8px rgba(247,255,0,0.1);
animation:sp-18-cw 1.6s linear infinite;
clip-path:polygon(50% 0%,100% 0%,100% 100%,50% 100%);
}
.sp-18__ring-outer-2{
position:absolute;
inset:0;
border-radius:50%;
border:3px dashed var(--c1);
opacity:0.5;
animation:sp-18-cw 1.6s linear infinite;
animation-delay:-0.8s;
clip-path:polygon(0% 0%,50% 0%,50% 100%,0% 100%);
}
.sp-18__ring-inner{
position:absolute;
inset:14px;
border-radius:50%;
border:2px solid var(--c2);
border-right-color:transparent;
border-bottom-color:transparent;
box-shadow:0 0 8px var(--c2);
animation:sp-18-ccw 0.9s linear infinite;
}
.sp-18__ring-inner-2{
position:absolute;
inset:14px;
border-radius:50%;
border:2px solid var(--c2);
border-left-color:transparent;
border-top-color:transparent;
opacity:0.4;
animation:sp-18-ccw 0.9s linear infinite;
animation-delay:-0.45s;
}
.sp-18__core{
position:absolute;
inset:32px;
background:transparent;
border:1px solid var(--c1);
transform:rotate(45deg);
animation:sp-18-cw 2s linear infinite;
box-shadow:0 0 6px var(--c1);
}
@keyframes sp-18-cw{
to{transform:rotate(360deg)}
}
@keyframes sp-18-ccw{
to{transform:rotate(-360deg)}
}
@media (prefers-reduced-motion: reduce){
.sp-18__ring-outer,.sp-18__ring-outer-2,.sp-18__ring-inner,.sp-18__ring-inner-2,.sp-18__core{animation:none}
}
```
### 19. Breathing Circle Loader
**Type:** Pure CSS
**Description:** A calm azure orb slowly inhales and exhales with a scale pulse while three expanding rings propagate outward in a continuous ripple, creating a meditative loading state.
**HTML:**
```html
```
**CSS:**
```css
.sp-19,.sp-19 *,.sp-19 *::before,.sp-19 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-19{
--bg:#03080e;
--c:#4fc3f7;
--glow:rgba(79,195,247,0.3);
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
gap:20px;
min-height:100vh;
background:var(--bg);
font-family:system-ui,sans-serif;
}
.sp-19__wrap{
position:relative;
width:90px;
height:90px;
}
.sp-19__ring{
position:absolute;
border-radius:50%;
border:2px solid var(--c);
opacity:0;
animation:sp-19-breathe-ring 4s ease-in-out infinite;
}
.sp-19__ring:nth-child(1){inset:0}
.sp-19__ring:nth-child(2){inset:0;animation-delay:1.3s}
.sp-19__ring:nth-child(3){inset:0;animation-delay:2.6s}
.sp-19__core{
position:absolute;
inset:20px;
border-radius:50%;
background:radial-gradient(circle,var(--c),rgba(79,195,247,0.3));
animation:sp-19-breathe-core 4s ease-in-out infinite;
}
.sp-19__label{
color:rgba(79,195,247,0.7);
font-size:11px;
letter-spacing:3px;
text-transform:uppercase;
animation:sp-19-text 4s ease-in-out infinite;
}
@keyframes sp-19-breathe-ring{
0%{transform:scale(0.4);opacity:0.8}
100%{transform:scale(1.8);opacity:0}
}
@keyframes sp-19-breathe-core{
0%,100%{transform:scale(0.7);box-shadow:0 0 10px var(--glow)}
50%{transform:scale(1.15);box-shadow:0 0 30px var(--glow),0 0 60px var(--glow)}
}
@keyframes sp-19-text{
0%,100%{opacity:0.3}
50%{opacity:1}
}
@media (prefers-reduced-motion: reduce){
.sp-19__ring,.sp-19__core,.sp-19__label{animation:none;opacity:1}
}
```
### 20. Particle Scatter Burst Spinner
**Type:** Pure CSS
**Description:** Eight coloured particles radiate outward from a central white core, fading and shrinking to nothing at the edge of their orbit while the whole assembly rotates slowly.
**HTML:**
```html
```
**CSS:**
```css
.sp-20,.sp-20 *,.sp-20 *::before,.sp-20 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-20{
--bg:#08050f;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-20__burst{
position:relative;
width:100px;
height:100px;
animation:sp-20-rotate 3s linear infinite;
}
.sp-20__particle{
position:absolute;
top:50%;
left:50%;
width:8px;
height:8px;
border-radius:50%;
margin:-4px 0 0 -4px;
animation:sp-20-scatter 1.5s ease-out infinite;
}
.sp-20__particle:nth-child(1){background:#ff6b6b;animation-delay:0s;transform:rotate(0deg)}
.sp-20__particle:nth-child(2){background:#ffd93d;animation-delay:0.1s;transform:rotate(45deg)}
.sp-20__particle:nth-child(3){background:#6bcb77;animation-delay:0.2s;transform:rotate(90deg)}
.sp-20__particle:nth-child(4){background:#4d96ff;animation-delay:0.3s;transform:rotate(135deg)}
.sp-20__particle:nth-child(5){background:#ff6b6b;animation-delay:0.4s;transform:rotate(180deg)}
.sp-20__particle:nth-child(6){background:#ffd93d;animation-delay:0.5s;transform:rotate(225deg)}
.sp-20__particle:nth-child(7){background:#6bcb77;animation-delay:0.6s;transform:rotate(270deg)}
.sp-20__particle:nth-child(8){background:#4d96ff;animation-delay:0.7s;transform:rotate(315deg)}
@keyframes sp-20-scatter{
0%{transform:var(--r,rotate(0deg)) translateX(0) scale(1);opacity:1}
60%{opacity:0.8}
100%{transform:var(--r,rotate(0deg)) translateX(42px) scale(0);opacity:0}
}
.sp-20__particle:nth-child(1){--r:rotate(0deg)}
.sp-20__particle:nth-child(2){--r:rotate(45deg)}
.sp-20__particle:nth-child(3){--r:rotate(90deg)}
.sp-20__particle:nth-child(4){--r:rotate(135deg)}
.sp-20__particle:nth-child(5){--r:rotate(180deg)}
.sp-20__particle:nth-child(6){--r:rotate(225deg)}
.sp-20__particle:nth-child(7){--r:rotate(270deg)}
.sp-20__particle:nth-child(8){--r:rotate(315deg)}
@keyframes sp-20-rotate{
to{transform:rotate(360deg)}
}
.sp-20__core{
position:absolute;
inset:40px;
border-radius:50%;
background:white;
box-shadow:0 0 12px white;
animation:sp-20-pulse 1.5s ease-in-out infinite;
}
@keyframes sp-20-pulse{
0%,100%{transform:scale(0.8);opacity:0.6}
50%{transform:scale(1.2);opacity:1}
}
@media (prefers-reduced-motion: reduce){
.sp-20__particle,.sp-20__burst,.sp-20__core{animation:none}
}
```
### 21. Retro TV Static Noise Loader
**Type:** Pure CSS
**Description:** A miniature CRT television screen filled with flickering monochrome pixel tiles simulates analog static noise, complete with scanline overlay and vignette darkening.
**HTML:**
```html
```
**CSS:**
```css
.sp-21,.sp-21 *,.sp-21 *::before,.sp-21 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-21{
--bg:#0a0a0a;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-21__tv{
position:relative;
width:120px;
height:90px;
background:#111;
border-radius:8px;
border:3px solid #333;
overflow:hidden;
box-shadow:0 0 20px rgba(0,0,0,0.8),inset 0 0 10px rgba(0,0,0,0.5);
}
.sp-21__static{
position:absolute;
inset:0;
display:grid;
grid-template-columns:repeat(12,1fr);
grid-template-rows:repeat(9,1fr);
gap:0;
}
.sp-21__pixel{
background:#fff;
animation:sp-21-flicker 0.08s steps(1) infinite;
}
.sp-21__pixel:nth-child(4n+1){animation-delay:0s;opacity:0.9}
.sp-21__pixel:nth-child(4n+2){animation-delay:0.02s;opacity:0.4}
.sp-21__pixel:nth-child(4n+3){animation-delay:0.04s;opacity:0.7}
.sp-21__pixel:nth-child(4n){animation-delay:0.06s;opacity:0.2}
.sp-21__pixel:nth-child(7n){animation-duration:0.12s}
.sp-21__pixel:nth-child(11n){animation-duration:0.06s}
.sp-21__pixel:nth-child(3n){background:#888}
.sp-21__scanline{
position:absolute;
inset:0;
background:repeating-linear-gradient(
to bottom,
transparent 0px,
transparent 3px,
rgba(0,0,0,0.3) 3px,
rgba(0,0,0,0.3) 4px
);
pointer-events:none;
}
.sp-21__glow{
position:absolute;
inset:0;
background:radial-gradient(ellipse,transparent 40%,rgba(0,0,0,0.5) 100%);
pointer-events:none;
}
@keyframes sp-21-flicker{
0%,100%{opacity:var(--o,0.9)}
50%{opacity:0}
}
@media (prefers-reduced-motion: reduce){
.sp-21__pixel{animation:none}
}
```
### 22. Liquid Blob CSS Spinner
**Type:** Pure CSS
**Description:** A fluid-blue gradient blob morphs organically through six distinct multi-value border-radius shapes while slowly rotating, creating an amorphous liquid motion effect.
**HTML:**
```html
```
**CSS:**
```css
.sp-22,.sp-22 *,.sp-22 *::before,.sp-22 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-22{
--bg:#020911;
--c1:#00c6fb;
--c2:#005bea;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-22__blob{
width:80px;
height:80px;
background:linear-gradient(135deg,var(--c1),var(--c2));
box-shadow:0 0 20px rgba(0,198,251,0.4),0 0 40px rgba(0,91,234,0.2);
animation:sp-22-morph 3s ease-in-out infinite, sp-22-spin 6s linear infinite;
}
@keyframes sp-22-morph{
0%,100%{border-radius:60% 40% 30% 70% / 60% 30% 70% 40%}
20%{border-radius:30% 60% 70% 40% / 50% 60% 30% 60%}
40%{border-radius:70% 30% 50% 50% / 30% 70% 60% 40%}
60%{border-radius:40% 60% 30% 70% / 70% 40% 50% 60%}
80%{border-radius:50% 50% 60% 40% / 40% 50% 70% 60%}
}
@keyframes sp-22-spin{
to{transform:rotate(360deg)}
}
@media (prefers-reduced-motion: reduce){
.sp-22__blob{animation:none;border-radius:50%}
}
```
### 23. Progress Arc Fill Spinner
**Type:** Pure CSS
**Description:** An SVG circle arc fills from empty to complete on a two-second loop, with a 100% percentage counter label centred inside — suitable as both a loading indicator and a determinate progress ring.
**HTML:**
```html
100%
```
**CSS:**
```css
.sp-23,.sp-23 *,.sp-23 *::before,.sp-23 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-23{
--bg:#050a0f;
--c:#00e5ff;
--track:rgba(0,229,255,0.12);
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-23__svg{
width:90px;
height:90px;
transform:rotate(-90deg);
filter:drop-shadow(0 0 6px var(--c));
}
.sp-23__track{
fill:none;
stroke:var(--track);
stroke-width:5;
}
.sp-23__arc{
fill:none;
stroke:var(--c);
stroke-width:5;
stroke-linecap:round;
stroke-dasharray:251;
stroke-dashoffset:251;
animation:sp-23-fill 2s ease-in-out infinite;
}
.sp-23__percent{
fill:var(--c);
font-size:14px;
font-family:system-ui,sans-serif;
font-weight:600;
text-anchor:middle;
dominant-baseline:central;
transform:rotate(90deg);
transform-origin:45px 45px;
animation:sp-23-count 2s ease-in-out infinite;
letter-spacing:-0.5px;
}
@keyframes sp-23-fill{
0%{stroke-dashoffset:251;opacity:1}
80%{stroke-dashoffset:0;opacity:1}
100%{stroke-dashoffset:0;opacity:0}
}
@keyframes sp-23-count{
0%{opacity:1}
80%{opacity:1}
100%{opacity:0}
}
@media (prefers-reduced-motion: reduce){
.sp-23__arc{animation:none;stroke-dashoffset:100}
.sp-23__percent{animation:none}
}
```
### 24. Matrix Rain Column Spinner
**Type:** Pure CSS
**Description:** Five columns of katakana characters and binary digits cascade downward with a bright white leading character fading to dark green, evoking the iconic Matrix digital rain effect.
**HTML:**
```html
```
**CSS:**
```css
.sp-24,.sp-24 *,.sp-24 *::before,.sp-24 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-24{
--bg:#000;
--c:#00ff41;
--dim:#003b10;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
font-family:'Courier New',monospace;
}
.sp-24__cols{
display:flex;
gap:6px;
align-items:flex-start;
}
.sp-24__col{
display:flex;
flex-direction:column;
gap:0;
}
.sp-24__char{
width:16px;
height:18px;
display:flex;
align-items:center;
justify-content:center;
font-size:12px;
font-weight:bold;
color:var(--dim);
animation:sp-24-fall 1.5s linear infinite;
}
.sp-24__col:nth-child(1) .sp-24__char{animation-delay:calc(var(--i,0) * -0.1s)}
.sp-24__col:nth-child(2) .sp-24__char{animation-delay:calc(var(--i,0) * -0.1s - 0.3s)}
.sp-24__col:nth-child(3) .sp-24__char{animation-delay:calc(var(--i,0) * -0.1s - 0.6s)}
.sp-24__col:nth-child(4) .sp-24__char{animation-delay:calc(var(--i,0) * -0.1s - 0.9s)}
.sp-24__col:nth-child(5) .sp-24__char{animation-delay:calc(var(--i,0) * -0.1s - 1.2s)}
/* Head char bright white-green */
.sp-24__col:nth-child(1) .sp-24__char:nth-child(1),
.sp-24__col:nth-child(2) .sp-24__char:nth-child(1),
.sp-24__col:nth-child(3) .sp-24__char:nth-child(1),
.sp-24__col:nth-child(4) .sp-24__char:nth-child(1),
.sp-24__col:nth-child(5) .sp-24__char:nth-child(1){
color:#fff;
text-shadow:0 0 8px var(--c),0 0 16px var(--c);
}
@keyframes sp-24-fall{
0%{color:#fff;text-shadow:0 0 8px var(--c)}
10%{color:var(--c);text-shadow:0 0 4px var(--c)}
60%{color:rgba(0,255,65,0.4);text-shadow:none}
100%{color:var(--dim);text-shadow:none}
}
@media (prefers-reduced-motion: reduce){
.sp-24__char{animation:none;color:var(--c)}
}
```
### 25. Aurora Gradient Orb Spinner
**Type:** Pure CSS
**Description:** A softly glowing orb pulses with shifting aurora borealis colours — layered radial gradients rotate independently with hue-shift filters — while a single orbital ring traces a luminous dot around the perimeter.
**HTML:**
```html
```
**CSS:**
```css
.sp-25,.sp-25 *,.sp-25 *::before,.sp-25 *::after{box-sizing:border-box;margin:0;padding:0}
.sp-25{
--bg:#020d12;
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
background:var(--bg);
}
.sp-25__orb{
position:relative;
width:100px;
height:100px;
}
.sp-25__layer{
position:absolute;
inset:0;
border-radius:50%;
}
.sp-25__layer:nth-child(1){
background:radial-gradient(circle at 30% 40%,#00e5ff,transparent 60%),
radial-gradient(circle at 70% 60%,#69f0ae,transparent 60%);
filter:blur(4px);
animation:sp-25-aurora1 4s ease-in-out infinite;
}
.sp-25__layer:nth-child(2){
background:radial-gradient(circle at 60% 30%,#7c4dff,transparent 55%),
radial-gradient(circle at 40% 70%,#40c4ff,transparent 55%);
filter:blur(6px);
animation:sp-25-aurora2 5s ease-in-out infinite;
animation-delay:-2s;
mix-blend-mode:screen;
}
.sp-25__layer:nth-child(3){
background:radial-gradient(circle at 50% 50%,rgba(255,255,255,0.15),transparent 50%);
animation:sp-25-pulse 3s ease-in-out infinite;
}
.sp-25__ring{
position:absolute;
inset:-4px;
border-radius:50%;
border:1.5px solid rgba(255,255,255,0.2);
animation:sp-25-spin 8s linear infinite;
}
.sp-25__ring::after{
content:'';
position:absolute;
top:2px;
left:50%;
width:6px;
height:6px;
margin-left:-3px;
border-radius:50%;
background:rgba(255,255,255,0.8);
box-shadow:0 0 6px white;
}
@keyframes sp-25-aurora1{
0%,100%{transform:rotate(0deg) scale(1);filter:blur(4px) hue-rotate(0deg)}
33%{transform:rotate(120deg) scale(1.1);filter:blur(5px) hue-rotate(60deg)}
66%{transform:rotate(240deg) scale(0.95);filter:blur(3px) hue-rotate(120deg)}
}
@keyframes sp-25-aurora2{
0%,100%{transform:rotate(0deg) scale(1.05)}
50%{transform:rotate(-180deg) scale(0.95)}
}
@keyframes sp-25-pulse{
0%,100%{opacity:0.4}
50%{opacity:0.9}
}
@keyframes sp-25-spin{
to{transform:rotate(360deg)}
}
@media (prefers-reduced-motion: reduce){
.sp-25__layer,.sp-25__ring{animation:none}
}
```
---
## 22 CSS Split Screen Layouts
URL: https://codefronts.com/layouts/css-split-screen/
Description: 22 hand-coded CSS split-screen layouts — classic 50/50, diagonal cut, hover-reveal, before/after slider, parallax scenes, 3D perspective and more. Responsive, copy-paste ready.
Demo count: 22
### 01. Editorial Restaurant
**Type:** Pure CSS
**Description:** Editorial restaurant menu — cream paper, olive-green typography, burgundy accents. Classic 50/50 split with food photography on the left (CSS-painted plate) and the menu on the right. Serif headlines, dotted-leader pricing, the printed-menu aesthetic.
**HTML:**
```html
```
**CSS:**
```css
.ss-edt {
display: grid; grid-template-columns: 1fr 1fr;
min-height: 480px;
font-family: 'Cormorant Garamond', 'Georgia', serif;
background: #f4ede0;
color: #2a3325;
border-radius: 0; overflow: hidden;
border: 1px solid #2a3325;
}
.ss-edt-visual {
position: relative;
background:
radial-gradient(60% 80% at 50% 40%, #efe4cf 0%, #d8c8a8 100%);
display: flex; align-items: center; justify-content: center;
border-right: 1px solid #2a3325;
}
.ss-edt-plate {
position: relative;
width: 240px; height: 240px;
border-radius: 50%;
background: linear-gradient(135deg, #fff 0%, #f0e8d4 100%);
box-shadow:
inset 0 0 0 14px rgba(0,0,0,0.04),
inset 0 0 0 16px rgba(122,86,40,0.18),
0 18px 40px rgba(60,40,20,0.18);
}
.ss-edt-food {
position: absolute; inset: 30%;
border-radius: 50%;
background:
radial-gradient(ellipse at 35% 30%, #6d8c3c 0%, #4a6b25 60%, transparent 75%),
radial-gradient(circle at 70% 60%, #c43a2c 0%, #8a1f1c 30%, transparent 50%),
radial-gradient(circle at 50% 75%, #e8b04a 0%, #b8924a 40%, transparent 60%);
}
.ss-edt-fork, .ss-edt-knife {
position: absolute;
width: 4px; height: 80px;
background: linear-gradient(180deg, #c0bcb0 0%, #888477 100%);
border-radius: 2px;
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.ss-edt-fork { top: 50%; left: 8%; transform: translateY(-50%) rotate(8deg); }
.ss-edt-knife { top: 50%; right: 8%; transform: translateY(-50%) rotate(-8deg); }
.ss-edt-fork::before {
content: ''; position: absolute; top: -10px; left: -6px;
width: 16px; height: 24px;
background:
repeating-linear-gradient(90deg, transparent 0 3px, #c0bcb0 3px 4px);
}
.ss-edt-knife::before {
content: ''; position: absolute; top: -10px; left: -3px;
width: 10px; height: 30px;
background: linear-gradient(180deg, #c0bcb0 0%, #888477 100%);
border-radius: 2px 4px 0 0;
transform: skewX(-8deg);
}
.ss-edt-stamp {
position: absolute; top: 24px; left: 24px;
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 800;
letter-spacing: 0.2em; text-transform: uppercase;
color: #5a3825;
border: 1.5px solid #5a3825;
padding: 6px 12px;
transform: rotate(-4deg);
background: rgba(244,237,224,0.4);
}
.ss-edt-menu {
padding: 40px 44px;
display: flex; flex-direction: column; gap: 22px;
background:
radial-gradient(60% 60% at 100% 0%, #fdf8eb 0%, transparent 60%),
#f9f1de;
}
.ss-edt-eye {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 700;
letter-spacing: 0.22em; text-transform: uppercase;
color: #6e1f1c;
}
.ss-edt-menu h2 {
margin: 6px 0 0;
font-size: clamp(34px, 4.5vw, 54px);
font-weight: 500;
line-height: 0.95;
color: #2a3325;
letter-spacing: -0.02em;
}
.ss-edt-menu h2 em {
font-style: italic;
color: #6e1f1c;
}
.ss-edt-menu header p {
margin: 4px 0 0;
font-size: 16px;
color: #5a4a35;
line-height: 1.55;
max-width: 440px;
}
.ss-edt-courses { margin: 0; padding: 18px 0; border-top: 1px solid #c8b896; border-bottom: 1px solid #c8b896; display: flex; flex-direction: column; gap: 14px; }
.ss-edt-courses div {
display: flex; align-items: baseline; gap: 8px;
font-size: 18px;
}
.ss-edt-courses dt {
color: #2a3325;
font-style: italic;
flex-shrink: 0;
}
.ss-edt-courses dt::after {
content: '';
display: inline-block;
width: 100%;
margin: 0 8px 4px;
border-bottom: 1.5px dotted #b89668;
vertical-align: bottom;
}
.ss-edt-courses dd {
margin: 0;
font-family: 'Inter', sans-serif;
font-size: 14px; font-weight: 700;
color: #6e1f1c;
}
.ss-edt-menu footer {
display: flex; align-items: center; justify-content: space-between;
gap: 14px; flex-wrap: wrap;
}
.ss-edt-menu footer span {
font-family: 'Inter', sans-serif;
font-size: 12px; font-weight: 600;
letter-spacing: 0.04em;
color: #5a4a35;
}
.ss-edt-cta {
padding: 12px 22px;
background: #2a3325;
color: #f4ede0;
border: 0;
font-family: 'Inter', sans-serif;
font-size: 13px; font-weight: 700;
letter-spacing: 0.04em;
cursor: pointer;
transition: background 0.16s, transform 0.12s;
}
.ss-edt-cta:hover { background: #6e1f1c; }
.ss-edt-cta:active { transform: translateY(1px); }
@media (max-width: 720px) {
.ss-edt { grid-template-columns: 1fr; }
.ss-edt-visual { min-height: 280px; border-right: 0; border-bottom: 1px solid #2a3325; }
}
```
### 02. Diagonal Split
**Type:** Pure CSS
**Description:** Sport magazine — pitch black with electric-orange diagonal cut and concrete-grey supporting tones. Headline punches through the diagonal seam. Pure CSS via clip-path: polygon() for the angled wedge; oversized condensed display type sells the impact.
**HTML:**
```html
47
ISSUE 47 · MAY
FASTERthan YESTERDAY.
Inside: how four runners broke their personal records by changing one thing.
01 The 6am rule
02 Negative splits
03 Track over road
Read inside →
```
**CSS:**
```css
.ss-dia {
position: relative;
min-height: 480px;
font-family: 'Inter', system-ui, sans-serif;
background: #0e0e10;
color: #fff;
border-radius: 0; overflow: hidden;
isolation: isolate;
}
.ss-dia-orange {
position: absolute; inset: 0;
background: linear-gradient(135deg, #ff5e1a 0%, #ff8a00 60%, #ffaa44 100%);
clip-path: polygon(0 0, 56% 0, 32% 100%, 0 100%);
display: flex; align-items: center; justify-content: center;
}
.ss-dia-orange::before {
content: ''; position: absolute; inset: 0;
background:
repeating-linear-gradient(60deg, transparent 0 30px, rgba(0,0,0,0.04) 30px 31px);
}
.ss-dia-num {
font-family: 'Helvetica Neue', sans-serif;
font-weight: 900;
font-size: clamp(120px, 18vw, 240px);
line-height: 0.85;
color: #0e0e10;
letter-spacing: -0.05em;
transform: translateX(-22%) translateY(-4%);
text-shadow: 0 6px 0 rgba(0,0,0,0.06);
font-style: italic;
}
.ss-dia-black {
position: absolute; right: 0; top: 0; bottom: 0;
width: 56%;
padding: 48px 44px;
display: flex; flex-direction: column; gap: 18px;
z-index: 2;
}
.ss-dia-issue {
font-family: 'Courier New', monospace;
font-size: 11px; font-weight: 700;
letter-spacing: 0.3em;
color: #ff8a00;
}
.ss-dia-black h2 {
margin: 0;
font-family: 'Helvetica Neue', sans-serif;
font-size: clamp(40px, 6.5vw, 84px);
font-weight: 900;
line-height: 0.9;
color: #fff;
letter-spacing: -0.03em;
text-transform: uppercase;
}
.ss-dia-italic {
font-style: italic;
font-weight: 300;
color: #ff8a00;
text-transform: lowercase;
font-family: 'Cormorant Garamond', serif;
}
.ss-dia-black p {
margin: 0;
font-size: 15px;
line-height: 1.55;
color: #b8b6b0;
max-width: 380px;
}
.ss-dia-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ss-dia-list li {
display: flex; align-items: baseline; gap: 14px;
font-family: 'Inter', sans-serif;
font-size: 15px;
color: #fff;
padding: 10px 0;
border-top: 1px solid rgba(255,255,255,0.1);
}
.ss-dia-list span {
font-family: 'Courier New', monospace;
font-size: 11px; font-weight: 700;
letter-spacing: 0.16em;
color: #ff8a00;
}
.ss-dia-cta {
margin-top: auto;
align-self: flex-start;
padding: 14px 26px;
background: #ff5e1a;
color: #0e0e10;
border: 0;
font-family: 'Inter', sans-serif;
font-size: 13px; font-weight: 800;
letter-spacing: 0.06em; text-transform: uppercase;
cursor: pointer;
transition: background 0.16s, transform 0.12s;
}
.ss-dia-cta:hover { background: #ff8a00; }
.ss-dia-cta:active { transform: translateY(1px); }
@media (max-width: 720px) {
.ss-dia { min-height: 580px; }
.ss-dia-orange { clip-path: polygon(0 0, 100% 0, 100% 38%, 0 50%); }
.ss-dia-num { transform: translateX(0) translateY(-10%); font-size: 120px; }
.ss-dia-black { width: 100%; top: 50%; padding-top: 36px; }
}
```
### 03. Wine Cellar
**Type:** Pure CSS
**Description:** Wine cellar boutique — deep burgundy with gold-leaf accents and cream label typography. Asymmetric 60/40 split: a single CSS-painted bottle on the left, vintage tasting notes on the right. Real <dl> for the vintage details.
**HTML:**
```html
Region
Bordeaux, France
Varietal
Cabernet Sauvignon (78%)
Aging
24 months · French oak
Tasting
Black cherry, leather, tobacco
Pairing
Dry-aged ribeye, hard cheese
```
**CSS:**
```css
.ss-wne {
display: grid; grid-template-columns: 40% 60%;
min-height: 480px;
font-family: 'Cormorant Garamond', 'Georgia', serif;
background: #1a0a0e;
color: #f5e6d3;
border-radius: 0; overflow: hidden;
}
.ss-wne-visual {
position: relative;
background:
radial-gradient(60% 70% at 50% 60%, rgba(80,20,30,0.6) 0%, #0e0608 100%);
display: flex; align-items: center; justify-content: center;
overflow: hidden;
}
.ss-wne-shelf {
position: absolute; bottom: 12%; left: 0; right: 0; height: 4px;
background: linear-gradient(180deg, #5a3825 0%, #3a2415 100%);
box-shadow: 0 -2px 0 #2a1810, 0 4px 18px rgba(0,0,0,0.6);
}
.ss-wne-bottle {
position: relative;
width: 88px; height: 280px;
border-radius: 8px 8px 24px 24px;
background:
linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 30%, transparent 50%),
linear-gradient(180deg, #2a0810 0%, #1a0a0e 100%);
box-shadow:
inset -8px 0 24px rgba(0,0,0,0.5),
inset 8px 0 12px rgba(180,80,80,0.08),
0 6px 18px rgba(0,0,0,0.5);
z-index: 2;
}
.ss-wne-neck {
position: absolute; left: 50%; top: -54px;
transform: translateX(-50%);
width: 28px; height: 60px;
background: linear-gradient(180deg, #1a0608 0%, #2a0810 100%);
border-radius: 4px 4px 0 0;
box-shadow: inset -3px 0 8px rgba(0,0,0,0.4);
}
.ss-wne-neck::after {
content: ''; position: absolute; top: -8px; left: -2px; right: -2px; height: 14px;
background: linear-gradient(180deg, #d4af37 0%, #8a6f1c 100%);
border-radius: 3px;
box-shadow: inset 0 -2px 4px rgba(0,0,0,0.3);
}
.ss-wne-label {
position: absolute; left: 6px; right: 6px; top: 50%;
transform: translateY(-50%);
background: linear-gradient(180deg, #f5e6d3 0%, #e8d4ba 100%);
padding: 14px 6px;
text-align: center;
border-top: 1px solid #d4af37;
border-bottom: 1px solid #d4af37;
box-shadow: 0 0 0 0.5px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.3);
}
.ss-wne-label em {
display: block;
font-family: 'Cormorant Garamond', serif;
font-size: 9px; font-style: italic;
color: #6e1f1c;
letter-spacing: 0.08em;
margin-bottom: 1px;
}
.ss-wne-label strong {
display: block;
font-family: 'Cormorant Garamond', serif;
font-size: 14px; font-weight: 700;
color: #1a0a0e;
letter-spacing: -0.01em;
line-height: 1;
}
.ss-wne-label span {
display: block;
font-family: 'Inter', sans-serif;
font-size: 8px; font-weight: 700;
letter-spacing: 0.18em;
color: #6e1f1c;
margin-top: 4px;
}
.ss-wne-glow {
position: absolute; bottom: 8%; left: 50%;
transform: translateX(-50%);
width: 200px; height: 30px;
background: radial-gradient(50% 100% at 50% 0%, rgba(212,175,55,0.18), transparent 70%);
border-radius: 50%;
z-index: 1;
}
.ss-wne-notes {
padding: 44px 48px;
display: flex; flex-direction: column; gap: 22px;
background:
radial-gradient(80% 80% at 100% 0%, rgba(110,30,30,0.18) 0%, transparent 70%),
#1a0a0e;
}
.ss-wne-vintage {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 800;
letter-spacing: 0.3em;
color: #d4af37;
}
.ss-wne-notes h2 {
margin: 4px 0 0;
font-size: clamp(36px, 5vw, 60px);
font-weight: 500;
line-height: 0.92;
color: #f5e6d3;
letter-spacing: -0.02em;
}
.ss-wne-notes h2 em {
font-style: italic;
color: #d4af37;
}
.ss-wne-notes header p {
margin: 4px 0 0;
font-size: 15.5px;
line-height: 1.6;
color: #c4a888;
max-width: 440px;
font-style: italic;
}
.ss-wne-detail { margin: 0; padding: 18px 0; border-top: 1px solid rgba(212,175,55,0.25); border-bottom: 1px solid rgba(212,175,55,0.25); display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; font-size: 14.5px; }
.ss-wne-detail dt {
font-family: 'Inter', sans-serif;
font-size: 10.5px; font-weight: 700;
letter-spacing: 0.16em; text-transform: uppercase;
color: #8a6f4a;
align-self: center;
}
.ss-wne-detail dd {
margin: 0;
font-family: 'Cormorant Garamond', serif;
font-style: italic;
color: #f5e6d3;
}
.ss-wne-foot {
display: flex; align-items: center; justify-content: space-between;
gap: 14px; flex-wrap: wrap;
}
.ss-wne-price {
font-family: 'Cormorant Garamond', serif;
font-size: 32px;
font-weight: 500;
color: #d4af37;
letter-spacing: -0.01em;
}
.ss-wne-price small {
font-family: 'Inter', sans-serif;
font-size: 10.5px;
font-weight: 700;
letter-spacing: 0.16em;
color: #8a6f4a;
margin-left: 4px;
}
.ss-wne-cta {
padding: 14px 26px;
background: transparent;
color: #d4af37;
border: 1.5px solid #d4af37;
font-family: 'Inter', sans-serif;
font-size: 12px; font-weight: 700;
letter-spacing: 0.16em; text-transform: uppercase;
cursor: pointer;
transition: background 0.16s, color 0.16s;
}
.ss-wne-cta:hover { background: #d4af37; color: #1a0a0e; }
@media (max-width: 720px) {
.ss-wne { grid-template-columns: 1fr; }
.ss-wne-visual { min-height: 320px; }
}
```
### 04. Hover Reveal Split
**Type:** Pure CSS
**Description:** K-pop concert poster — hot pink + electric cyan + chrome. Two halves; hover/tap each to grow it from 50% to 70%, the other shrinks. Pure CSS via flex-grow transition; massive condensed type and chromatic-aberration headlines complete the album-cover feel.
**HTML:**
```html
SIDE A
NEON HEART
Vol. 03 · Out now
01 ⟡ Midnight Drive
02 ⟡ Lights Off
03 ⟡ Pink Static
▶ PLAY
SIDE B
CYBER BLOOM
Vol. 03 · Out now
04 ⟡ Glass Hearts
05 ⟡ Hologram
06 ⟡ Echo Park
▶ PLAY
```
**CSS:**
```css
.ss-kpop {
display: flex;
min-height: 480px;
font-family: 'Helvetica Neue', sans-serif;
background: #0a0014;
border-radius: 0; overflow: hidden;
isolation: isolate;
}
.ss-kpop-side {
flex: 1 1 50%;
position: relative;
padding: 36px 32px;
display: flex; flex-direction: column; gap: 14px;
cursor: pointer;
transition: flex-grow 0.4s cubic-bezier(0.32, 0.72, 0, 1);
overflow: hidden;
isolation: isolate;
}
.ss-kpop-side:hover, .ss-kpop-side:focus-within { flex-grow: 1.6; }
.ss-kpop-pink {
background:
repeating-linear-gradient(0deg, transparent 0 4px, rgba(0,0,0,0.05) 4px 5px),
radial-gradient(60% 80% at 30% 30%, #ff52aa 0%, #c41560 100%);
color: #fff;
border-right: 2px solid #fff;
}
.ss-kpop-cyan {
background:
repeating-linear-gradient(0deg, transparent 0 4px, rgba(0,0,0,0.05) 4px 5px),
radial-gradient(60% 80% at 70% 70%, #00e5ff 0%, #0080a8 100%);
color: #0a0014;
}
.ss-kpop-pink::before, .ss-kpop-cyan::before {
content: '';
position: absolute;
width: 220px; height: 220px;
border-radius: 50%;
background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.85), rgba(255,255,255,0.2) 50%, transparent 70%);
z-index: -1;
}
.ss-kpop-pink::before { top: -60px; right: -60px; }
.ss-kpop-cyan::before { bottom: -60px; left: -60px; }
.ss-kpop-eye {
font-family: 'Courier New', monospace;
font-size: 11px; font-weight: 800;
letter-spacing: 0.32em;
}
.ss-kpop-pink .ss-kpop-eye { color: #ffd400; text-shadow: 0 0 10px rgba(255,212,0,0.4); }
.ss-kpop-cyan .ss-kpop-eye { color: #ff00aa; }
.ss-kpop-side h2 {
margin: 0;
font-size: clamp(48px, 8vw, 96px);
font-weight: 900;
line-height: 0.85;
letter-spacing: -0.04em;
display: flex; flex-direction: column;
font-style: italic;
}
.ss-kpop-side h2 span:nth-child(2) {
align-self: flex-end;
}
.ss-kpop-pink h2 {
color: #fff;
text-shadow:
-3px 0 0 #00e5ff,
3px 0 0 #ffd400;
}
.ss-kpop-cyan h2 {
color: #0a0014;
text-shadow:
-3px 0 0 #ff52aa,
3px 0 0 #ffd400;
}
.ss-kpop-side p {
margin: 0;
font-family: 'Courier New', monospace;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.2em;
}
.ss-kpop-pink p { color: #ffd400; }
.ss-kpop-cyan p { color: #0a0014; }
.ss-kpop-track {
display: flex; flex-direction: column; gap: 6px;
padding: 14px 0;
border-top: 1px solid currentColor;
border-bottom: 1px solid currentColor;
font-family: 'Courier New', monospace;
font-size: 12.5px;
font-weight: 700;
letter-spacing: 0.06em;
opacity: 0.9;
}
.ss-kpop-cta {
margin-top: auto;
align-self: flex-start;
padding: 12px 22px;
background: #fff;
color: #0a0014;
border: 0;
font-family: 'Courier New', monospace;
font-size: 14px; font-weight: 900;
letter-spacing: 0.16em;
cursor: pointer;
transition: transform 0.12s;
}
.ss-kpop-pink .ss-kpop-cta { background: #ffd400; color: #c41560; }
.ss-kpop-cyan .ss-kpop-cta { background: #ff52aa; color: #fff; }
.ss-kpop-cta:hover { transform: scale(1.05); }
@media (max-width: 720px) {
.ss-kpop { flex-direction: column; }
.ss-kpop-side { flex: 1 1 auto; }
.ss-kpop-side:hover, .ss-kpop-side:focus-within { flex-grow: 1; }
.ss-kpop-pink { border-right: 0; border-bottom: 2px solid #fff; }
}
@media (prefers-reduced-motion: reduce) {
.ss-kpop-side { transition: none; }
}
```
### 05. Coffee Triptych
**Type:** Pure CSS
**Description:** Three coffee blends side-by-side — espresso brown, cream, copper. Three vertical panels in a single row, each with its own roast story. Hover any panel to reveal the tasting notes. CSS grid with 1fr 1fr 1fr and a shared expand-on-hover behavior.
**HTML:**
```html
Bright, floral, lemon zest. Single origin Ethiopia.
Caramel, almond, ripe stone fruit. Costa Rica blend.
Dark chocolate, smoke, lingering espresso finish.
```
**CSS:**
```css
.ss-trip {
display: grid; grid-template-columns: 1fr 1fr 1fr;
min-height: 480px;
font-family: 'Inter', system-ui, sans-serif;
background: #2a1810;
border-radius: 0; overflow: hidden;
}
.ss-trip-card {
position: relative;
padding: 40px 28px;
display: flex; flex-direction: column; gap: 18px;
cursor: pointer;
transition: padding 0.32s ease;
border-right: 1px solid rgba(0,0,0,0.2);
isolation: isolate;
}
.ss-trip-card:last-child { border-right: 0; }
.ss-trip-light { background: linear-gradient(180deg, #f4ebd6 0%, #e8d4ba 100%); color: #5a3825; }
.ss-trip-medium { background: linear-gradient(180deg, #b8924a 0%, #8a6420 100%); color: #f4ebd6; }
.ss-trip-dark { background: linear-gradient(180deg, #2a1810 0%, #1a0e08 100%); color: #f4ebd6; }
.ss-trip-card header { display: flex; flex-direction: column; gap: 14px; }
.ss-trip-bean {
width: 56px; height: 56px;
border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
position: relative;
box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}
.ss-trip-bean::before {
content: '';
position: absolute; top: 12%; left: 50%; transform: translateX(-50%);
width: 4px; height: 76%;
background: rgba(0,0,0,0.4);
border-radius: 2px;
}
.ss-trip-light .ss-trip-bean { background: linear-gradient(135deg, #c89868 0%, #8a5825 100%); }
.ss-trip-medium .ss-trip-bean { background: linear-gradient(135deg, #6a3818 0%, #3a1808 100%); }
.ss-trip-dark .ss-trip-bean { background: linear-gradient(135deg, #2a0806 0%, #050000 100%); }
.ss-trip-card h2 {
margin: 0;
font-family: 'Cormorant Garamond', serif;
font-size: clamp(28px, 4vw, 44px);
font-weight: 500;
line-height: 0.95;
font-style: italic;
letter-spacing: -0.01em;
}
.ss-trip-roast {
font-size: 10.5px; font-weight: 800;
letter-spacing: 0.22em;
opacity: 0.7;
}
.ss-trip-notes {
margin: 0;
font-family: 'Cormorant Garamond', serif;
font-size: 17px;
line-height: 1.5;
opacity: 0.85;
font-style: italic;
max-width: 200px;
}
.ss-trip-card footer {
margin-top: auto;
font-family: 'Inter', sans-serif;
font-size: 13px;
font-weight: 700;
letter-spacing: 0.08em;
padding-top: 16px;
border-top: 1px dashed currentColor;
opacity: 0.85;
}
.ss-trip-card:hover {
padding: 36px 28px 36px 36px;
}
.ss-trip-card::after {
content: '→';
position: absolute; top: 28px; right: 28px;
font-size: 22px;
font-weight: 100;
opacity: 0;
transition: opacity 0.24s, transform 0.24s;
}
.ss-trip-card:hover::after { opacity: 1; transform: translateX(4px); }
@media (max-width: 720px) {
.ss-trip { grid-template-columns: 1fr; }
.ss-trip-card { border-right: 0; border-bottom: 1px solid rgba(0,0,0,0.2); }
.ss-trip-card:last-child { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
.ss-trip-card { transition: none; }
}
```
### 06. Curved Split
**Type:** Pure CSS
**Description:** Surf brand — ocean teal meets sand beige with a wave-curved seam, sunset-coral CTA. Pure CSS curve via border-radius and a generous clip-path. The two halves never share a straight line — feels organic, beach-y, hand-shaped.
**HTML:**
```html
▴ Drift Surf Co.
Hand-shaped by the tide.
Custom polyurethane boards, glassed in our Ericeira workshop. 6-week lead time, lifetime
workmanship guarantee.
14 Shapers
2,400 Boards / yr
1972 Founded
Shape your board →
```
**CSS:**
```css
.ss-srf {
display: grid; grid-template-columns: 45% 55%;
min-height: 480px;
font-family: 'Inter', system-ui, sans-serif;
background: #f5ecd9;
color: #1a3a3f;
border-radius: 0; overflow: hidden;
position: relative;
}
.ss-srf-ocean {
position: relative;
background: linear-gradient(180deg, #2c8a8e 0%, #1a3a3f 100%);
overflow: hidden;
isolation: isolate;
}
.ss-srf-ocean::after {
content: '';
position: absolute; right: -120px; top: 0; bottom: 0; width: 240px;
background: #f5ecd9;
border-radius: 50% 0 0 50% / 50% 0 0 50%;
z-index: 2;
}
.ss-srf-sun {
position: absolute; top: 14%; left: 22%;
width: 90px; height: 90px;
border-radius: 50%;
background: radial-gradient(circle at 35% 35%, #ffe899 0%, #ff8a40 60%, #c45a1c 100%);
box-shadow: 0 0 60px rgba(255,170,68,0.5);
}
.ss-srf-wave {
position: absolute; bottom: 18%; left: -10%; right: -20%;
height: 80px;
background:
radial-gradient(ellipse at 30% 100%, rgba(255,255,255,0.45), transparent 60%),
radial-gradient(ellipse at 70% 100%, rgba(255,255,255,0.35), transparent 60%);
border-radius: 50%;
filter: blur(2px);
}
.ss-srf-wave::before {
content: ''; position: absolute; left: 0; right: 0; bottom: -10px; height: 24px;
background: rgba(255,255,255,0.25);
border-radius: 50%;
filter: blur(6px);
}
.ss-srf-board {
position: absolute; left: 50%; top: 50%;
transform: translate(-50%, -50%) rotate(28deg);
width: 56px; height: 240px;
border-radius: 28px / 90px;
background: linear-gradient(180deg, #fff 0%, #ffe9c4 50%, #ff8a40 100%);
box-shadow: 0 8px 24px rgba(0,0,0,0.4);
z-index: 3;
}
.ss-srf-board::before {
content: ''; position: absolute; left: 50%; top: 12%;
transform: translateX(-50%);
width: 2px; height: 76%;
background: rgba(0,0,0,0.18);
}
.ss-srf-content {
padding: 44px 48px 44px 36px;
display: flex; flex-direction: column; gap: 22px;
position: relative;
z-index: 1;
}
.ss-srf-eye {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 800;
letter-spacing: 0.22em; text-transform: uppercase;
color: #c45a1c;
}
.ss-srf-content h2 {
margin: 4px 0 0;
font-family: 'Cormorant Garamond', serif;
font-size: clamp(36px, 5vw, 60px);
font-weight: 500;
line-height: 0.95;
color: #1a3a3f;
letter-spacing: -0.02em;
}
.ss-srf-content h2 em {
font-style: italic;
color: #c45a1c;
}
.ss-srf-content p {
margin: 0;
font-size: 15.5px;
line-height: 1.6;
color: #3a5a5f;
max-width: 460px;
}
.ss-srf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 420px; padding: 14px 0; border-top: 1px solid #c8b896; border-bottom: 1px solid #c8b896; }
.ss-srf-stat { display: flex; flex-direction: column; gap: 4px; }
.ss-srf-stats strong {
font-family: 'Cormorant Garamond', serif;
font-size: 28px; font-weight: 500;
color: #2c8a8e;
letter-spacing: -0.02em;
font-style: italic;
}
.ss-srf-stats span {
font-size: 10.5px; font-weight: 700;
letter-spacing: 0.16em;
color: #6a4a35;
text-transform: uppercase;
}
.ss-srf-cta {
align-self: flex-start;
padding: 14px 24px;
background: #c45a1c;
color: #fff;
border: 0;
border-radius: 28px;
font-family: 'Inter', sans-serif;
font-size: 13px; font-weight: 700;
letter-spacing: 0.04em;
cursor: pointer;
box-shadow: 0 6px 18px rgba(196,90,28,0.35);
transition: transform 0.12s, box-shadow 0.12s;
}
.ss-srf-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(196,90,28,0.45); }
@media (max-width: 720px) {
.ss-srf { grid-template-columns: 1fr; }
.ss-srf-ocean { min-height: 280px; }
.ss-srf-ocean::after { display: none; }
.ss-srf-stats { grid-template-columns: 1fr; }
}
```
### 07. Asymmetric 70/30
**Type:** Pure CSS
**Description:** Architecture portfolio — warm grey concrete + ivory + black accents. Asymmetric 70/30 split: a single hero project on the left, oversized index numbers on the right. Print-magazine spread vibe; thin hairlines do all the structuring.
**HTML:**
```html
PROJECT NO. 014 · 2026
Casa Hormigón
A 220 m² family house in Valle de Bravo. Cast-in-place concrete walls, exposed timber roof,
single oculus skylight above the central courtyard.
FOLIO
014 Casa Hormigón
013 Library Pavilion
012 Bridge House
011 Sea Cabin
010 Garden Atelier
```
**CSS:**
```css
.ss-arc {
display: grid; grid-template-columns: 70% 30%;
min-height: 480px;
font-family: 'Inter', system-ui, sans-serif;
background: #f0ece4;
color: #1a1a1a;
border-radius: 0; overflow: hidden;
}
.ss-arc-hero {
padding: 44px 48px;
display: grid;
grid-template-rows: auto 1fr auto;
gap: 28px;
position: relative;
}
.ss-arc-eye {
font-family: 'Courier New', monospace;
font-size: 11px; font-weight: 700;
letter-spacing: 0.24em;
color: #6a6a6a;
}
.ss-arc-hero header h2 {
margin: 6px 0 12px;
font-family: 'Cormorant Garamond', serif;
font-size: clamp(40px, 6vw, 76px);
font-weight: 500;
line-height: 0.92;
color: #1a1a1a;
letter-spacing: -0.03em;
font-style: italic;
}
.ss-arc-hero header p {
margin: 0;
font-size: 15px;
line-height: 1.65;
color: #4a4a4a;
max-width: 420px;
}
.ss-arc-photo {
position: relative;
background: linear-gradient(180deg, #d4cfc1 0%, #b8b3a4 100%);
border: 1px solid #1a1a1a;
display: flex; align-items: flex-end; justify-content: center;
overflow: hidden;
min-height: 180px;
}
.ss-arc-bldg {
width: 60%; height: 70%;
background: linear-gradient(180deg, #5a5a5a 0%, #2a2a2a 100%);
position: relative;
}
.ss-arc-bldg::before {
content: ''; position: absolute; top: 12%; left: 35%; right: 35%; height: 14%;
background: #f5d68a;
box-shadow:
0 0 0 1px #1a1a1a,
0 0 18px rgba(245,214,138,0.5);
}
.ss-arc-bldg::after {
content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
background:
repeating-linear-gradient(90deg, transparent 0 14%, rgba(255,255,255,0.08) 14% 16%);
}
.ss-arc-shadow {
position: absolute; left: 5%; right: 5%; bottom: 0; height: 16px;
background: rgba(0,0,0,0.4);
filter: blur(8px);
}
.ss-arc-meta {
display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
padding-top: 18px;
border-top: 1px solid #1a1a1a;
}
.ss-arc-meta span { display: flex; flex-direction: column; gap: 4px; }
.ss-arc-meta em {
font-family: 'Courier New', monospace;
font-size: 10px; font-weight: 700;
letter-spacing: 0.18em;
color: #6a6a6a;
font-style: normal;
}
.ss-arc-meta b {
font-family: 'Cormorant Garamond', serif;
font-size: 16px; font-weight: 500;
color: #1a1a1a;
font-style: italic;
}
.ss-arc-index {
background: #1a1a1a;
color: #f0ece4;
padding: 36px 28px;
display: flex; flex-direction: column; gap: 18px;
font-family: 'Cormorant Garamond', serif;
}
.ss-arc-folio {
font-family: 'Courier New', monospace;
font-size: 10.5px; font-weight: 700;
letter-spacing: 0.32em;
color: #6a6a6a;
}
.ss-arc-index ol {
list-style: none; margin: 0; padding: 0;
display: flex; flex-direction: column;
}
.ss-arc-index li {
padding: 14px 0;
font-size: 17px;
font-style: italic;
color: #8a8a8a;
border-bottom: 1px solid rgba(255,255,255,0.1);
display: grid;
grid-template-columns: 50px 1fr;
align-items: baseline;
cursor: pointer;
transition: color 0.16s;
}
.ss-arc-index li:hover { color: #f0ece4; }
.ss-arc-index li span {
font-family: 'Courier New', monospace;
font-size: 11px;
font-style: normal;
color: #6a6a6a;
letter-spacing: 0.16em;
}
.ss-arc-index li.active {
color: #f0ece4;
font-weight: 500;
}
.ss-arc-index li.active span { color: #f5d68a; }
.ss-arc-index footer {
margin-top: auto;
font-family: 'Courier New', monospace;
font-size: 10.5px;
letter-spacing: 0.24em;
color: #6a6a6a;
}
@media (max-width: 720px) {
.ss-arc { grid-template-columns: 1fr; }
.ss-arc-meta { grid-template-columns: 1fr 1fr; }
}
```
### 08. Stepped Diagonal
**Type:** Pure CSS
**Description:** Streetwear brand drop — mustard yellow + asphalt black + neon pink. Stepped diagonal cut between two halves, sticker-graphic typography, drop-countdown badge. The kind of split a sneaker brand uses to announce a Friday release.
**HTML:**
```html
DROP 047
FRIDAY3PM
03 Tees
02 Hoodies
01 Pair of kicks
// LIMITED RUN
200 pieces. Numbered. No restock. Sign up below to get the link 5 minutes early.
⏱ 04 : 12 : 47 : 03
```
**CSS:**
```css
.ss-str {
position: relative;
display: grid; grid-template-columns: 1fr 1fr;
min-height: 480px;
font-family: 'Helvetica Neue', sans-serif;
border-radius: 0; overflow: hidden;
isolation: isolate;
}
.ss-str-yellow {
background: #ffd400;
color: #0a0a0a;
padding: 48px 44px;
display: flex; flex-direction: column; gap: 20px;
position: relative;
clip-path: polygon(0 0, 100% 0, calc(100% - 60px) 100%, 0 100%);
z-index: 2;
}
.ss-str-yellow::before {
content: '';
position: absolute; right: 60px; top: 0; bottom: 0; width: 6px;
background: repeating-linear-gradient(180deg, #0a0a0a 0 12px, transparent 12px 24px);
}
.ss-str-stamp {
display: inline-block;
padding: 6px 14px;
background: #0a0a0a;
color: #ffd400;
font-family: 'Courier New', monospace;
font-size: 11px; font-weight: 800;
letter-spacing: 0.24em;
align-self: flex-start;
transform: rotate(-2deg);
}
.ss-str-yellow h2 {
margin: 0;
font-size: clamp(56px, 9vw, 110px);
font-weight: 900;
line-height: 0.85;
letter-spacing: -0.04em;
font-style: italic;
}
.ss-str-pink { color: #ff0090; -webkit-text-stroke: 2px #0a0a0a; }
.ss-str-info { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ss-str-info li {
display: flex; align-items: baseline; gap: 12px;
font-size: 17px; font-weight: 700;
padding: 8px 0;
border-bottom: 2px dashed #0a0a0a;
font-family: 'Courier New', monospace;
}
.ss-str-info b {
font-family: 'Helvetica Neue', sans-serif;
font-weight: 900;
font-size: 24px;
background: #ff0090;
color: #ffd400;
padding: 0 6px;
font-style: italic;
}
.ss-str-black {
background: #0a0a0a;
color: #f0ece4;
padding: 48px 44px 48px 80px;
display: flex; flex-direction: column; gap: 18px;
position: relative;
margin-left: -60px;
z-index: 1;
}
.ss-str-tag {
font-family: 'Courier New', monospace;
font-size: 11px; font-weight: 800;
letter-spacing: 0.22em;
color: #ff0090;
}
.ss-str-black p {
margin: 0;
font-size: 17px;
line-height: 1.55;
color: #f0ece4;
max-width: 360px;
font-weight: 500;
}
.ss-str-form {
display: flex; gap: 0;
margin-top: auto;
border: 2px solid #ffd400;
background: #1a1a1a;
}
.ss-str-form input {
flex: 1;
padding: 14px 16px;
background: transparent;
color: #f0ece4;
border: 0; outline: 0;
font-family: 'Courier New', monospace;
font-size: 14px;
}
.ss-str-form input::placeholder { color: #6a6a6a; }
.ss-str-form button {
padding: 0 22px;
background: #ffd400;
color: #0a0a0a;
border: 0;
font-family: 'Helvetica Neue', sans-serif;
font-size: 13px; font-weight: 900;
letter-spacing: 0.16em;
cursor: pointer;
transition: background 0.12s;
}
.ss-str-form button:hover { background: #ff0090; color: #ffd400; }
.ss-str-counter {
font-family: 'Courier New', monospace;
font-size: 13px;
font-weight: 700;
letter-spacing: 0.18em;
color: #ffd400;
padding: 10px 14px;
background: #1a1a1a;
border: 1px dashed #ff0090;
align-self: flex-start;
}
.ss-str-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 720px) {
.ss-str { grid-template-columns: 1fr; }
.ss-str-yellow { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), 0 100%); padding-bottom: 60px; }
.ss-str-black { margin-left: 0; margin-top: -30px; padding-left: 44px; padding-top: 60px; }
}
```
### 09. Jewelry Sign-in
**Type:** Pure CSS
**Description:** Jewelry boutique sign-in — champagne cream + obsidian black + rose gold. Brand on one side, sign-in form on the other. The kind of split-screen Tiffany would commission. Real <form> with proper labels and autocomplete tokens.
**HTML:**
```html
— Members only
Sign in to your account.
```
**CSS:**
```css
.ss-jew {
display: grid; grid-template-columns: 45% 55%;
min-height: 480px;
font-family: 'Cormorant Garamond', 'Georgia', serif;
background: #fbf6e8;
color: #1a1612;
border-radius: 0; overflow: hidden;
}
.ss-jew-brand {
background:
radial-gradient(60% 80% at 50% 30%, #1a1612 0%, #0a0806 100%);
color: #f5e6c8;
padding: 44px 40px;
display: flex; flex-direction: column; gap: 16px;
position: relative;
}
.ss-jew-mark {
width: 36px; height: 36px;
border-radius: 50%;
background: linear-gradient(135deg, #f3c0a4 0%, #b88a6a 100%);
box-shadow:
0 0 0 1px rgba(255,255,255,0.18),
0 0 0 6px rgba(243,192,164,0.12);
position: relative;
}
.ss-jew-mark::after {
content: ''; position: absolute; inset: 8px;
border: 1px solid #1a1612;
border-radius: 50%;
}
.ss-jew-since {
font-family: 'Inter', sans-serif;
font-size: 10.5px; font-weight: 700;
letter-spacing: 0.32em;
color: #b88a6a;
}
.ss-jew-brand h2 {
margin: 4px 0 0;
font-size: clamp(40px, 5.5vw, 64px);
font-weight: 500;
line-height: 0.92;
letter-spacing: -0.02em;
color: #f5e6c8;
}
.ss-jew-brand h2 em {
font-style: italic;
color: #f3c0a4;
}
.ss-jew-brand p {
margin: 4px 0 0;
font-size: 17px;
line-height: 1.6;
color: #c8b896;
max-width: 380px;
font-style: italic;
}
.ss-jew-divider {
display: block;
width: 60px; height: 1px;
background: #b88a6a;
margin-top: 16px;
}
.ss-jew-quote {
margin-top: auto;
font-family: 'Cormorant Garamond', serif;
font-size: 16px;
font-style: italic;
color: #b88a6a;
letter-spacing: 0.04em;
}
.ss-jew-form-wrap {
padding: 44px 48px;
display: flex; flex-direction: column; gap: 22px;
background: linear-gradient(180deg, #fff 0%, #fbf6e8 100%);
}
.ss-jew-eye {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 700;
letter-spacing: 0.2em;
color: #b88a6a;
}
.ss-jew-form-wrap h3 {
margin: 6px 0 0;
font-size: clamp(26px, 3.5vw, 38px);
font-weight: 500;
letter-spacing: -0.01em;
color: #1a1612;
line-height: 1.05;
font-style: italic;
}
.ss-jew-form { display: flex; flex-direction: column; gap: 14px; max-width: 400px; }
.ss-jew-form label { display: flex; flex-direction: column; gap: 6px; }
.ss-jew-lbl {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 700;
letter-spacing: 0.18em; text-transform: uppercase;
color: #6a4a35;
}
.ss-jew-form input[type="email"],
.ss-jew-form input[type="password"] {
padding: 12px 14px;
background: #fff;
border: 1px solid #c8b896;
border-radius: 0;
font-family: 'Cormorant Garamond', serif;
font-size: 16px;
color: #1a1612;
font-style: italic;
transition: border-color 0.14s, box-shadow 0.14s;
}
.ss-jew-form input:focus { outline: 0; border-color: #b88a6a; box-shadow: 0 0 0 3px rgba(184,138,106,0.15); }
.ss-jew-row {
display: flex; align-items: center; justify-content: space-between;
font-family: 'Inter', sans-serif; font-size: 12px;
color: #4a3a2a;
}
.ss-jew-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.ss-jew-check input { accent-color: #b88a6a; }
.ss-jew-row a { color: #b88a6a; text-decoration: none; }
.ss-jew-row a:hover { text-decoration: underline; }
.ss-jew-cta {
padding: 14px 22px;
background: #1a1612;
color: #f5e6c8;
border: 0;
font-family: 'Inter', sans-serif;
font-size: 12px; font-weight: 700;
letter-spacing: 0.22em; text-transform: uppercase;
cursor: pointer;
transition: background 0.16s;
}
.ss-jew-cta:hover { background: #b88a6a; color: #1a1612; }
.ss-jew-meta {
margin: 6px 0 0;
font-family: 'Inter', sans-serif;
font-size: 12px; color: #6a4a35;
text-align: center;
}
.ss-jew-meta a { color: #b88a6a; text-decoration: none; }
.ss-jew-meta a:hover { text-decoration: underline; }
@media (max-width: 720px) {
.ss-jew { grid-template-columns: 1fr; }
.ss-jew-brand { padding: 36px 28px; }
}
```
### 10. Before/After Slider
**Type:** Light JS
**Description:** Skincare brand before/after — clinical white + millennial pink + sage green. Drag the native <input type="range"> to wipe between two states. Pure CSS via :has() on the input value (modern browsers); falls back to a clean static split otherwise.
**HTML:**
```html
```
**CSS:**
```css
.ss-bef {
display: grid; grid-template-columns: 50% 50%;
min-height: 480px;
font-family: 'Inter', system-ui, sans-serif;
background: #fff;
color: #2a2a2a;
border-radius: 0; overflow: hidden;
}
.ss-bef-stage {
position: relative;
background: #f7f3ee;
overflow: hidden;
isolation: isolate;
--reveal: 50%;
}
.ss-bef-stage:has(#ss-bef-r) {
--reveal: calc(var(--ss-bef-pct, 50) * 1%);
}
.ss-bef-after, .ss-bef-before {
position: absolute; inset: 0;
display: flex; align-items: center; justify-content: center;
}
.ss-bef-after {
background: linear-gradient(135deg, #ffe0e6 0%, #ffd0db 100%);
}
.ss-bef-before {
background: linear-gradient(135deg, #efe2d4 0%, #d4c4ae 100%);
clip-path: inset(0 0 0 var(--reveal));
}
.ss-bef-label {
position: absolute; top: 18px;
font-family: 'Inter', sans-serif;
font-size: 10.5px; font-weight: 800;
letter-spacing: 0.3em;
padding: 5px 12px;
background: rgba(255,255,255,0.92);
color: #2a2a2a;
}
.ss-bef-after .ss-bef-label { right: 18px; color: #c41560; }
.ss-bef-before .ss-bef-label { left: 18px; color: #5a3825; }
.ss-bef-face {
width: 200px; height: 240px;
border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
position: relative;
}
.ss-bef-face-after {
background: linear-gradient(180deg, #f8d4c8 0%, #e8b4a8 100%);
box-shadow: 0 14px 40px rgba(196,21,96,0.18), inset -10px -20px 40px rgba(196,21,96,0.08);
}
.ss-bef-face-before {
background: linear-gradient(180deg, #d8a888 0%, #c08868 100%);
box-shadow: inset -10px -20px 40px rgba(0,0,0,0.18);
}
.ss-bef-face-before::before, .ss-bef-face-before::after {
content: ''; position: absolute;
background: rgba(196,90,28,0.4);
border-radius: 50%;
}
.ss-bef-face-before::before { top: 30%; left: 25%; width: 12px; height: 12px; box-shadow: 14px 6px 0 -2px rgba(196,90,28,0.3), -8px 18px 0 -3px rgba(196,90,28,0.35), 26px 22px 0 -4px rgba(196,90,28,0.3); }
.ss-bef-face-before::after { top: 50%; right: 22%; width: 10px; height: 10px; box-shadow: -8px 6px 0 -2px rgba(196,90,28,0.3), 4px 14px 0 -3px rgba(196,90,28,0.4); }
.ss-bef-handle {
position: absolute; top: 0; bottom: 0;
left: var(--reveal);
width: 2px;
background: #fff;
box-shadow: 0 0 0 1px rgba(0,0,0,0.1), 0 0 18px rgba(196,21,96,0.45);
transform: translateX(-1px);
pointer-events: none;
z-index: 5;
}
.ss-bef-handle span:nth-child(1), .ss-bef-handle span:nth-child(2) {
position: absolute; top: 50%; transform: translateY(-50%);
width: 32px; height: 32px;
background: #fff;
border-radius: 50%;
box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.ss-bef-handle span:nth-child(1) { right: 18px; }
.ss-bef-handle span:nth-child(2) { left: 18px; }
.ss-bef-handle span:nth-child(1)::before, .ss-bef-handle span:nth-child(2)::before {
content: ''; position: absolute; top: 50%; left: 50%;
transform: translate(-50%, -50%);
border: solid #c41560; border-width: 2px 2px 0 0;
width: 8px; height: 8px;
}
.ss-bef-handle span:nth-child(1)::before { transform: translate(-25%, -50%) rotate(45deg); }
.ss-bef-handle span:nth-child(2)::before { transform: translate(-75%, -50%) rotate(-135deg); }
.ss-bef-content {
padding: 44px 44px;
display: flex; flex-direction: column; gap: 18px;
}
.ss-bef-eye {
font-size: 11px; font-weight: 700;
letter-spacing: 0.18em; text-transform: uppercase;
color: #6a8a5a;
}
.ss-bef-content h2 {
margin: 4px 0 0;
font-family: 'Cormorant Garamond', serif;
font-size: clamp(34px, 4.5vw, 52px);
font-weight: 500;
line-height: 0.96;
letter-spacing: -0.02em;
color: #2a2a2a;
}
.ss-bef-content h2 em {
font-style: italic;
color: #c41560;
}
.ss-bef-content p {
margin: 0;
font-size: 15px;
line-height: 1.6;
color: #5a5a5a;
max-width: 420px;
}
.ss-bef-control {
display: flex; flex-direction: column; gap: 8px;
margin-top: 4px;
}
.ss-bef-control span {
font-size: 11px; font-weight: 700;
letter-spacing: 0.18em; text-transform: uppercase;
color: #6a8a5a;
}
.ss-bef-control input[type="range"] {
width: 100%;
accent-color: #c41560;
}
.ss-bef-stats { list-style: none; margin: 0; padding: 14px 0; border-top: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; display: flex; gap: 22px; font-size: 13px; flex-wrap: wrap; }
.ss-bef-stats li { display: flex; flex-direction: column; gap: 2px; }
.ss-bef-stats strong {
font-family: 'Cormorant Garamond', serif;
font-size: 24px; font-weight: 500;
color: #c41560;
font-style: italic;
}
.ss-bef-cta {
align-self: flex-start;
padding: 14px 24px;
background: #c41560;
color: #fff;
border: 0;
border-radius: 28px;
font-size: 13px; font-weight: 700;
letter-spacing: 0.04em;
cursor: pointer;
box-shadow: 0 6px 18px rgba(196,21,96,0.3);
transition: transform 0.12s, box-shadow 0.12s;
}
.ss-bef-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(196,21,96,0.45); }
@media (max-width: 720px) {
.ss-bef { grid-template-columns: 1fr; }
.ss-bef-stage { min-height: 320px; }
}
```
**JS:**
```js
/* Wire the range input to the CSS custom property so the slider drives
the clip-path reveal. Pure CSS would be possible via :has() but value-
reading from CSS isn't supported widely yet; this 5-line script is the
reliable cross-browser path. */
(function () {
var slider = document.getElementById('ss-bef-r');
var stage = slider && slider.closest('.ss-bef').querySelector('.ss-bef-stage');
if (!slider || !stage) return;
function sync() { stage.style.setProperty('--ss-bef-pct', slider.value); }
slider.addEventListener('input', sync);
sync();
})();
```
### 11. Two Seasons
**Type:** Pure CSS
**Description:** Two seasons of fashion — autumn (rust + ochre + olive) on one side, winter (steel + cobalt + ash) on the other. Click either label to slide the other half open. Pure CSS via radio inputs + sibling selectors; no JS.
**HTML:**
```html
```
**CSS:**
```css
.ss-szn {
position: relative;
display: grid;
grid-template-columns: 50% 50%;
min-height: 480px;
font-family: 'Cormorant Garamond', 'Georgia', serif;
border-radius: 0; overflow: hidden;
isolation: isolate;
transition: grid-template-columns 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}
.ss-szn:has(#ss-szn-a:checked) { grid-template-columns: 65% 35%; }
.ss-szn:has(#ss-szn-w:checked) { grid-template-columns: 35% 65%; }
.ss-szn input { position: absolute; width: 1px; height: 1px; opacity: 0; clip: rect(0 0 0 0); }
.ss-szn-fall, .ss-szn-winter {
padding: 44px 40px;
display: flex; flex-direction: column; gap: 18px;
overflow: hidden;
position: relative;
transition: opacity 0.4s ease;
}
.ss-szn-fall {
background:
radial-gradient(60% 80% at 30% 30%, #d97a3c 0%, transparent 60%),
linear-gradient(180deg, #6e3825 0%, #2a1810 100%);
color: #f5e6c8;
}
.ss-szn-fall::before {
content: ''; position: absolute; top: -10%; right: -10%;
width: 40%; height: 50%;
background: radial-gradient(circle, rgba(255,180,80,0.4), transparent 70%);
filter: blur(40px);
}
.ss-szn-winter {
background:
radial-gradient(60% 80% at 70% 70%, #4a6a8a 0%, transparent 60%),
linear-gradient(180deg, #1a2838 0%, #0e1620 100%);
color: #d4dce4;
}
.ss-szn-winter::before {
content: ''; position: absolute; bottom: -10%; left: -10%;
width: 40%; height: 50%;
background: radial-gradient(circle, rgba(180,200,240,0.3), transparent 70%);
filter: blur(40px);
}
.ss-szn-tag {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 800;
letter-spacing: 0.24em;
align-self: flex-start;
padding: 6px 12px;
border: 1px solid currentColor;
}
.ss-szn-fall .ss-szn-tag { color: #ffd400; }
.ss-szn-winter .ss-szn-tag { color: #8ac4ff; }
.ss-szn-fall h2, .ss-szn-winter h2 {
margin: 6px 0 0;
font-size: clamp(40px, 5.5vw, 64px);
font-weight: 500;
line-height: 0.92;
letter-spacing: -0.02em;
font-style: italic;
}
.ss-szn-fall p, .ss-szn-winter p {
margin: 0;
font-family: 'Inter', sans-serif;
font-size: 14.5px;
line-height: 1.6;
max-width: 360px;
opacity: 0.85;
}
.ss-szn-pieces { list-style: none; margin: auto 0 0; padding: 14px 0; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; display: flex; flex-direction: column; gap: 6px; }
.ss-szn-pieces li {
display: flex; align-items: baseline; gap: 14px;
font-family: 'Cormorant Garamond', serif;
font-size: 18px; font-style: italic;
}
.ss-szn-pieces b {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 800;
letter-spacing: 0.16em;
font-style: normal;
}
.ss-szn-fall .ss-szn-pieces b { color: #ffd400; }
.ss-szn-winter .ss-szn-pieces b { color: #8ac4ff; }
.ss-szn-switch {
align-self: flex-start;
padding: 10px 18px;
font-family: 'Inter', sans-serif;
font-size: 12px; font-weight: 700;
letter-spacing: 0.12em;
cursor: pointer;
border: 1px solid currentColor;
background: transparent;
transition: background 0.16s, color 0.16s;
}
.ss-szn-fall .ss-szn-switch:hover { background: #ffd400; color: #2a1810; border-color: #ffd400; }
.ss-szn-winter .ss-szn-switch:hover { background: #8ac4ff; color: #0e1620; border-color: #8ac4ff; }
.ss-szn:has(#ss-szn-w:checked) .ss-szn-fall { opacity: 0.6; }
.ss-szn:has(#ss-szn-a:checked) .ss-szn-winter { opacity: 0.6; }
@media (max-width: 720px) {
.ss-szn, .ss-szn:has(#ss-szn-a:checked), .ss-szn:has(#ss-szn-w:checked) { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .ss-szn { transition: none; } }
```
### 12. Music App Toggle
**Type:** Pure CSS
**Description:** Music app — deep purple + neon mint + black vinyl. Toggle between equal-split (album list) and focus-mode (now playing dominates). Hidden checkbox + :has(:checked) on the grid template; everything else is CSS.
**HTML:**
```html
```
**CSS:**
```css
.ss-mus {
position: relative;
display: grid;
grid-template-columns: 50% 50%;
min-height: 480px;
font-family: 'Inter', system-ui, sans-serif;
background: #0e0a1f;
color: #e6e0ff;
border-radius: 0; overflow: hidden;
transition: grid-template-columns 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
.ss-mus:has(input:checked) { grid-template-columns: 30% 70%; }
.ss-mus input { position: absolute; width: 1px; height: 1px; opacity: 0; clip: rect(0 0 0 0); }
.ss-mus-list {
background: #15102a;
padding: 30px 24px;
display: flex; flex-direction: column; gap: 16px;
border-right: 1px solid rgba(74,222,128,0.25);
overflow-y: auto;
}
.ss-mus-list header {
display: flex; align-items: center; justify-content: space-between;
padding-bottom: 14px;
border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ss-mus-list h3 {
margin: 0;
font-size: 13px; font-weight: 700;
letter-spacing: 0.12em; text-transform: uppercase;
color: #4ade80;
}
.ss-mus-toggle {
font-size: 11px; font-weight: 700;
letter-spacing: 0.12em;
padding: 5px 10px;
background: rgba(74,222,128,0.12);
color: #4ade80;
border: 1px solid rgba(74,222,128,0.4);
cursor: pointer;
transition: background 0.14s;
}
.ss-mus-toggle:hover { background: rgba(74,222,128,0.24); }
.ss-mus-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ss-mus-list li {
display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px;
padding: 10px;
border-radius: 8px;
cursor: pointer;
transition: background 0.14s;
}
.ss-mus-list li:hover { background: rgba(255,255,255,0.04); }
.ss-mus-list li.active { background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.3); padding: 9px; }
.ss-mus-cover {
width: 38px; height: 38px;
border-radius: 6px;
box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.ss-mus-list strong { display: block; font-size: 13.5px; font-weight: 700; color: #f0eaff; }
.ss-mus-list em { display: block; font-size: 11px; font-style: normal; color: #8a7fb0; margin-top: 2px; }
.ss-mus-time { font-family: 'Courier New', monospace; font-size: 11px; color: #8a7fb0; }
.ss-mus-now {
background:
radial-gradient(60% 80% at 70% 30%, rgba(124,58,237,0.4) 0%, transparent 60%),
radial-gradient(60% 80% at 30% 70%, rgba(74,222,128,0.18) 0%, transparent 60%),
#0e0a1f;
padding: 40px 44px;
display: grid;
grid-template-columns: auto 1fr;
gap: 36px;
align-items: center;
}
.ss-mus-vinyl {
position: relative;
width: 200px; height: 200px;
flex-shrink: 0;
}
.ss-mus-disc {
position: absolute; inset: 0;
border-radius: 50%;
background:
repeating-radial-gradient(circle at 50% 50%, transparent 0 4px, rgba(255,255,255,0.04) 4px 5px),
radial-gradient(circle at 50% 50%, #ec4899 0%, #ec4899 14%, #0a0a0a 14%, #0a0a0a 100%);
box-shadow:
inset 0 0 0 14px #1a1a1a,
0 14px 40px rgba(0,0,0,0.6);
animation: ss-mus-spin 8s linear infinite;
}
.ss-mus-hole {
position: absolute; top: 50%; left: 50%;
transform: translate(-50%, -50%);
width: 16px; height: 16px;
border-radius: 50%;
background: #0e0a1f;
box-shadow: 0 0 0 3px #4ade80;
}
@keyframes ss-mus-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ss-mus-disc { animation: none; } }
.ss-mus-meta { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ss-mus-eye {
font-family: 'Courier New', monospace;
font-size: 11px; font-weight: 700;
letter-spacing: 0.24em;
color: #4ade80;
text-shadow: 0 0 12px rgba(74,222,128,0.4);
}
.ss-mus-meta h2 {
margin: 0;
font-family: 'Cormorant Garamond', serif;
font-size: clamp(34px, 5vw, 56px);
font-weight: 500;
line-height: 0.94;
color: #f0eaff;
letter-spacing: -0.02em;
font-style: italic;
}
.ss-mus-sub { margin: 0; font-size: 13px; color: #a89cc8; letter-spacing: 0.04em; }
.ss-mus-bar {
height: 4px;
background: rgba(255,255,255,0.08);
border-radius: 2px;
overflow: hidden;
margin-top: 8px;
}
.ss-mus-bar span {
display: block; height: 100%;
background: linear-gradient(90deg, #4ade80 0%, #ec4899 100%);
border-radius: 2px;
box-shadow: 0 0 12px rgba(74,222,128,0.5);
}
.ss-mus-times { display: flex; justify-content: space-between; font-family: 'Courier New', monospace; font-size: 11px; color: #8a7fb0; }
.ss-mus-ctrl { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.ss-mus-ctrl button {
width: 38px; height: 38px;
border-radius: 50%;
border: 1px solid rgba(255,255,255,0.18);
background: transparent;
color: #f0eaff;
font-size: 14px;
cursor: pointer;
transition: background 0.14s, border-color 0.14s;
}
.ss-mus-ctrl button:hover { background: rgba(255,255,255,0.06); border-color: #4ade80; color: #4ade80; }
.ss-mus-play {
width: 52px !important; height: 52px !important;
background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%) !important;
color: #0e0a1f !important;
border: 0 !important;
font-size: 16px !important;
box-shadow: 0 8px 22px rgba(74,222,128,0.45) !important;
}
.ss-mus-play:hover { transform: scale(1.05); }
@media (max-width: 720px) {
.ss-mus, .ss-mus:has(input:checked) { grid-template-columns: 1fr; }
.ss-mus-now { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
```
### 13. Real-estate Compare
**Type:** Pure CSS
**Description:** Compare two properties — terracotta + olive + warm beige. Two cards side by side, each with hero number, key stats, and price. Hover any side to scale up; the other dims subtly. CSS transform + opacity transitions.
**HTML:**
```html
Beds
4
Baths
3
Sq m
240
Built
1958
Beds
3
Baths
2
Sq m
185
Built
2022
```
**CSS:**
```css
.ss-est {
display: grid; grid-template-columns: 1fr 1fr;
min-height: 480px;
font-family: 'Inter', system-ui, sans-serif;
gap: 0;
background: #efe7d4;
border-radius: 0; overflow: hidden;
}
.ss-est-card {
padding: 36px 32px;
display: flex; flex-direction: column; gap: 18px;
position: relative;
transition: transform 0.32s ease, opacity 0.32s ease;
isolation: isolate;
}
.ss-est-warm { background: linear-gradient(180deg, #d97a3c 0%, #b85a2c 100%); color: #fff8e8; border-right: 1px solid rgba(0,0,0,0.18); }
.ss-est-cool { background: linear-gradient(180deg, #6e7a3c 0%, #4a5a25 100%); color: #f4ecd0; }
.ss-est:has(.ss-est-warm:hover) .ss-est-cool,
.ss-est:has(.ss-est-cool:hover) .ss-est-warm { opacity: 0.6; }
.ss-est-card:hover { transform: scale(1.02); z-index: 2; }
.ss-est-tag {
font-family: 'Courier New', monospace;
font-size: 10.5px; font-weight: 700;
letter-spacing: 0.18em;
align-self: flex-start;
padding: 4px 10px;
background: rgba(0,0,0,0.18);
}
.ss-est-card h3 {
margin: 6px 0 0;
font-family: 'Cormorant Garamond', serif;
font-size: clamp(28px, 4vw, 40px);
font-weight: 500;
letter-spacing: -0.02em;
font-style: italic;
}
.ss-est-card header p {
margin: 4px 0 0;
font-size: 13.5px;
line-height: 1.55;
opacity: 0.85;
max-width: 280px;
}
.ss-est-photo {
position: relative;
aspect-ratio: 16 / 9;
background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 100%);
border: 1px solid rgba(255,255,255,0.18);
overflow: hidden;
}
.ss-est-house {
position: absolute; bottom: 12%; left: 50%;
transform: translateX(-50%);
width: 50%; height: 50%;
background: linear-gradient(180deg, #f5e6c8 0%, #d4c598 100%);
border-bottom: 4px solid rgba(0,0,0,0.3);
}
.ss-est-house::before {
content: ''; position: absolute; left: -8%; right: -8%; top: -22%;
height: 28%;
background: #6e1f1c;
clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.ss-est-house::after {
content: ''; position: absolute; left: 30%; bottom: 0; width: 18%; height: 50%;
background: #2a1810;
}
.ss-est-house-2 {
background: linear-gradient(180deg, #d8d0b8 0%, #a8a088 100%);
}
.ss-est-house-2::before {
background: #2a3325;
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
height: 14%;
top: -14%;
}
.ss-est-tree, .ss-est-tree2 {
position: absolute; bottom: 12%;
width: 40px; height: 60px;
background: radial-gradient(circle at 50% 30%, #4a6a25 0%, #2a3a18 100%);
border-radius: 50%;
}
.ss-est-tree { left: 8%; }
.ss-est-tree2 { right: 8%; bottom: 14%; width: 50px; height: 50px; }
.ss-est-stats {
margin: 0; padding: 14px 0;
display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
border-top: 1px solid rgba(255,255,255,0.18);
border-bottom: 1px solid rgba(255,255,255,0.18);
}
.ss-est-stats dt {
font-family: 'Courier New', monospace;
font-size: 10px; font-weight: 700;
letter-spacing: 0.16em;
opacity: 0.6;
}
.ss-est-stats dd {
margin: 2px 0 0;
font-family: 'Cormorant Garamond', serif;
font-size: 22px;
font-weight: 500;
font-style: italic;
}
.ss-est-card footer {
margin-top: auto;
display: flex; align-items: center; justify-content: space-between;
gap: 14px;
}
.ss-est-card footer strong {
font-family: 'Cormorant Garamond', serif;
font-size: 26px; font-weight: 500;
letter-spacing: -0.01em;
}
.ss-est-card footer button {
padding: 11px 18px;
background: rgba(0,0,0,0.25);
color: inherit;
border: 1px solid rgba(255,255,255,0.3);
font-size: 12px; font-weight: 700;
letter-spacing: 0.04em;
cursor: pointer;
transition: background 0.14s;
}
.ss-est-card footer button:hover { background: rgba(0,0,0,0.45); }
@media (max-width: 720px) {
.ss-est { grid-template-columns: 1fr; }
.ss-est-warm { border-right: 0; border-bottom: 1px solid rgba(0,0,0,0.18); }
.ss-est-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
.ss-est-card { transition: none; }
}
```
### 14. Detective Novel
**Type:** Pure CSS
**Description:** Detective novel cover — burnt orange + ink black + parchment cream. A diagonal mask wipes between the cover image and a synopsis on hover. Mystery noir aesthetic with serif type, thin gold rules, and a deliberately distressed paper texture.
**HTML:**
```html
A NEW DETECTIVE NOVEL
TheLast Train.
by Iris Hawthorne
PAGE I · CHAPTER ONE
"It rained the night Dr. Morrow disappeared, and the only witness was a stationmaster who
hadn't slept in three days."
A woman searches for her vanished mentor through the rain-soaked streets of a coastal town
that doesn't want her there.
★★★★★ The Times
★★★★★ Le Monde
★★★★☆ Hawthorne Review
Read first chapter →
```
**CSS:**
```css
.ss-det {
display: grid; grid-template-columns: 45% 55%;
min-height: 480px;
font-family: 'Cormorant Garamond', 'Georgia', serif;
background: #f0e6d0;
color: #1a0e08;
border-radius: 0; overflow: hidden;
border: 1px solid #1a0e08;
}
.ss-det-cover {
position: relative;
background:
radial-gradient(80% 80% at 50% 30%, #c45a1c 0%, #6e1f0c 60%, #1a0a06 100%);
padding: 36px 32px;
display: flex; flex-direction: column; gap: 14px;
overflow: hidden;
isolation: isolate;
border-right: 1px solid #1a0e08;
}
.ss-det-image { position: absolute; inset: 0; pointer-events: none; }
.ss-det-silhouette {
position: absolute; bottom: 0; left: 50%;
transform: translateX(-50%);
width: 80px; height: 240px;
background:
radial-gradient(ellipse at 50% 14%, #1a0a06 0%, #1a0a06 8%, transparent 9%),
linear-gradient(180deg, transparent 8%, #1a0a06 8%, #1a0a06 100%);
clip-path: polygon(40% 0, 60% 0, 70% 16%, 80% 38%, 80% 100%, 20% 100%, 20% 38%, 30% 16%);
}
.ss-det-light {
position: absolute; top: 0; right: 12%;
width: 220px; height: 220px;
background: radial-gradient(circle at 50% 0%, rgba(255,200,80,0.32), transparent 70%);
filter: blur(8px);
}
.ss-det-rain {
position: absolute; inset: 0;
background:
repeating-linear-gradient(78deg, transparent 0 22px, rgba(255,255,255,0.12) 22px 23px);
animation: ss-det-rain 0.6s linear infinite;
}
@keyframes ss-det-rain {
from { background-position: 0 0; }
to { background-position: 22px 22px; }
}
@media (prefers-reduced-motion: reduce) { .ss-det-rain { animation: none; } }
.ss-det-overlay { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 14px; height: 100%; }
.ss-det-genre {
font-family: 'Inter', sans-serif;
font-size: 10.5px; font-weight: 800;
letter-spacing: 0.32em;
color: #f5d68a;
align-self: flex-start;
padding: 5px 10px;
border: 1px solid #f5d68a;
background: rgba(0,0,0,0.4);
}
.ss-det-cover h2 {
margin: auto 0;
font-size: clamp(48px, 7vw, 80px);
font-weight: 500;
line-height: 0.86;
color: #f0e6d0;
letter-spacing: -0.02em;
text-shadow: 0 4px 30px rgba(0,0,0,0.7);
}
.ss-det-cover h2 em {
font-style: italic;
color: #f5d68a;
font-family: 'Cormorant Garamond', serif;
display: inline-block;
}
.ss-det-author {
font-family: 'Cormorant Garamond', serif;
font-size: 18px; font-style: italic;
color: #f0e6d0;
text-shadow: 0 1px 4px rgba(0,0,0,0.6);
margin-top: auto;
}
.ss-det-blurb {
padding: 36px 36px;
display: flex; flex-direction: column; gap: 18px;
background:
repeating-linear-gradient(0deg, transparent 0 32px, rgba(110,30,30,0.04) 32px 33px),
#f0e6d0;
}
.ss-det-folio {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 700;
letter-spacing: 0.24em;
color: #6e1f0c;
}
.ss-det-quote {
margin: 6px 0 0;
font-size: clamp(18px, 2.6vw, 24px);
line-height: 1.4;
color: #1a0e08;
font-style: italic;
border-left: 3px solid #c45a1c;
padding-left: 16px;
}
.ss-det-body {
margin: 0;
font-family: 'Inter', sans-serif;
font-size: 14.5px;
line-height: 1.7;
color: #4a3825;
max-width: 440px;
}
.ss-det-list { list-style: none; margin: auto 0 0; padding: 14px 0; border-top: 1.5px solid #c45a1c; border-bottom: 1.5px solid #c45a1c; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #1a0e08; font-family: 'Inter', sans-serif; }
.ss-det-list li { display: flex; align-items: baseline; justify-content: space-between; }
.ss-det-list em { font-style: italic; color: #6e1f0c; font-family: 'Cormorant Garamond', serif; font-size: 16px; }
.ss-det-cta {
align-self: flex-start;
padding: 14px 24px;
background: #1a0e08;
color: #f5d68a;
border: 0;
font-family: 'Inter', sans-serif;
font-size: 12px; font-weight: 700;
letter-spacing: 0.16em; text-transform: uppercase;
cursor: pointer;
transition: background 0.16s;
}
.ss-det-cta:hover { background: #6e1f0c; }
@media (max-width: 720px) {
.ss-det { grid-template-columns: 1fr; }
.ss-det-cover { border-right: 0; border-bottom: 1px solid #1a0e08; min-height: 360px; }
}
```
### 15. Mediterranean Travel
**Type:** Pure CSS
**Description:** Travel agency hero — Mediterranean blue + ochre + white limewash. Parallax-feel split with layered cliff/sea/sun shapes on one side and a destination card on the other. Pure CSS animations drift the sun and sea slowly.
**HTML:**
```html
Greece · Cyclades
Folegandrosin May.
Five days. One villa. Local meals at the kafenio. White-washed walls and a sea you'll never
quite forget. Limited to 8 guests per departure.
Departure
14 — 19 May
Group size
8 guests
Includes
Villa, breakfasts, ferry
From
€2,400 / guest
Reserve a spot
```
**CSS:**
```css
.ss-trv {
display: grid; grid-template-columns: 55% 45%;
min-height: 480px;
font-family: 'Inter', system-ui, sans-serif;
background: #f4ede0;
color: #1a3a4a;
border-radius: 0; overflow: hidden;
}
.ss-trv-scene {
position: relative;
overflow: hidden;
isolation: isolate;
}
.ss-trv-sky {
position: absolute; inset: 0;
background: linear-gradient(180deg, #c4e4f0 0%, #a4d4e8 50%, #5a8fa8 100%);
}
.ss-trv-sun {
position: absolute; top: 18%; left: 22%;
width: 90px; height: 90px;
border-radius: 50%;
background: radial-gradient(circle at 35% 35%, #fff8d8 0%, #ffd479 50%, #f5a623 100%);
box-shadow: 0 0 80px rgba(255,212,121,0.6);
animation: ss-trv-sun 22s ease-in-out infinite alternate;
}
@keyframes ss-trv-sun {
from { transform: translateY(0); }
to { transform: translateY(-12px); }
}
.ss-trv-sea {
position: absolute; left: -10%; right: -10%; bottom: 0;
height: 50%;
background:
repeating-linear-gradient(180deg, transparent 0 4px, rgba(255,255,255,0.18) 4px 5px),
linear-gradient(180deg, #2c8cc4 0%, #1a5a8c 100%);
border-top-left-radius: 50% 22%;
border-top-right-radius: 50% 22%;
animation: ss-trv-sea 18s ease-in-out infinite alternate;
}
@keyframes ss-trv-sea {
from { transform: translateX(-2%); }
to { transform: translateX(2%); }
}
@media (prefers-reduced-motion: reduce) {
.ss-trv-sun, .ss-trv-sea { animation: none; }
}
.ss-trv-cliff {
position: absolute; left: 0; right: 0; bottom: 38%;
height: 28%;
background: linear-gradient(180deg, #f0e0c8 0%, #c8a878 100%);
clip-path: polygon(0 60%, 28% 28%, 50% 50%, 78% 22%, 100% 50%, 100% 100%, 0 100%);
}
.ss-trv-house {
position: absolute; bottom: 50%;
width: 50px; height: 60px;
background: #fff;
box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
}
.ss-trv-house::before {
content: ''; position: absolute; left: -6px; right: -6px; top: -10px;
height: 14px;
background: #2c8cc4;
border-radius: 50% 50% 0 0;
}
.ss-trv-house::after {
content: ''; position: absolute; left: 30%; bottom: 0; width: 30%; height: 50%;
background: #2c8cc4;
}
.ss-trv-house { left: 38%; }
.ss-trv-house-2 { left: 56%; bottom: 56%; width: 38px; height: 48px; }
.ss-trv-card {
padding: 44px 40px;
display: flex; flex-direction: column; gap: 18px;
background:
radial-gradient(60% 60% at 100% 100%, rgba(245,166,35,0.1) 0%, transparent 70%),
#fdf8eb;
border-left: 1px solid rgba(0,0,0,0.06);
}
.ss-trv-tag {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 800;
letter-spacing: 0.22em; text-transform: uppercase;
color: #c45a1c;
}
.ss-trv-card h2 {
margin: 4px 0 0;
font-family: 'Cormorant Garamond', serif;
font-size: clamp(36px, 5vw, 56px);
font-weight: 500;
line-height: 0.96;
color: #1a3a4a;
letter-spacing: -0.02em;
}
.ss-trv-card h2 em {
font-style: italic;
color: #2c8cc4;
}
.ss-trv-card p {
margin: 0;
font-size: 15px;
line-height: 1.65;
color: #4a5a6a;
max-width: 380px;
}
.ss-trv-info { margin: 0; padding: 16px 0; border-top: 1px solid #c8b896; border-bottom: 1px solid #c8b896; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; }
.ss-trv-info dt {
font-family: 'Inter', sans-serif;
font-size: 10.5px; font-weight: 700;
letter-spacing: 0.16em; text-transform: uppercase;
color: #8a6f4a;
align-self: center;
}
.ss-trv-info dd {
margin: 0;
font-family: 'Cormorant Garamond', serif;
font-size: 17px;
font-style: italic;
color: #1a3a4a;
}
.ss-trv-cta {
align-self: flex-start;
padding: 14px 26px;
background: #2c8cc4;
color: #fff;
border: 0;
font-family: 'Inter', sans-serif;
font-size: 13px; font-weight: 700;
letter-spacing: 0.04em;
cursor: pointer;
box-shadow: 0 6px 18px rgba(44,140,196,0.35);
transition: background 0.16s;
}
.ss-trv-cta:hover { background: #1a5a8c; }
@media (max-width: 720px) {
.ss-trv { grid-template-columns: 1fr; }
.ss-trv-scene { min-height: 280px; }
}
```
### 16. Glitch Arcade
**Type:** Pure CSS
**Description:** Cyber-arcade split — deep purple base with neon-green and magenta. Continuous glitch overlay shifts the colored layers in/out across the seam. Different from Tokyo Neon (sidebars): this is dystopian-arcade not tokyo-pop, dark green vs hot magenta.
**HTML:**
```html
Free-to-play. Pay-to-survive.
01 RAVEN_Z 9128
02 v0id_X 8044
03 YOU 7621
04 n3on_Q 6890
/ ENTER /
⚠ HIGH RISK SECTOR
```
**CSS:**
```css
.ss-cyb {
position: relative;
display: grid; grid-template-columns: 1fr 1fr;
min-height: 480px;
font-family: 'Courier New', 'Helvetica Neue', sans-serif;
background: #0a0014;
color: #e8e0ff;
border-radius: 0; overflow: hidden;
isolation: isolate;
}
.ss-cyb::after {
content: ''; position: absolute; inset: 0;
background: repeating-linear-gradient(0deg, rgba(0,0,0,0.15) 0 1px, transparent 1px 4px);
mix-blend-mode: overlay;
pointer-events: none;
z-index: 5;
}
.ss-cyb-left, .ss-cyb-right {
position: relative;
padding: 36px 32px;
display: flex; flex-direction: column; gap: 18px;
isolation: isolate;
}
.ss-cyb-left {
background:
radial-gradient(70% 80% at 30% 30%, rgba(0,255,140,0.18) 0%, transparent 60%),
linear-gradient(160deg, #1a0040 0%, #0a0014 100%);
border-right: 2px solid #00ff8c;
box-shadow: 12px 0 30px rgba(0,255,140,0.15);
}
.ss-cyb-right {
background:
radial-gradient(70% 80% at 70% 70%, rgba(255,0,170,0.18) 0%, transparent 60%),
linear-gradient(200deg, #2a0044 0%, #0a0014 100%);
}
.ss-cyb-glitch {
position: absolute; inset: 0;
pointer-events: none;
background:
repeating-linear-gradient(0deg, transparent 0 8px, rgba(0,255,140,0.06) 8px 9px);
animation: ss-cyb-jitter 2.4s steps(8) infinite;
z-index: -1;
}
.ss-cyb-glitch-r {
background:
repeating-linear-gradient(0deg, transparent 0 8px, rgba(255,0,170,0.07) 8px 9px);
animation-duration: 1.8s;
animation-direction: reverse;
}
@keyframes ss-cyb-jitter {
0%, 100% { transform: translate(0); }
20% { transform: translate(-2px, 1px); }
40% { transform: translate(1px, -1px); }
60% { transform: translate(-1px, 2px); }
80% { transform: translate(2px, 0); }
}
@media (prefers-reduced-motion: reduce) { .ss-cyb-glitch { animation: none; } }
.ss-cyb-coin {
font-size: 11px; font-weight: 800;
letter-spacing: 0.28em;
color: #00ff8c;
text-shadow: 0 0 12px rgba(0,255,140,0.6);
}
.ss-cyb-left h2 {
margin: 4px 0 0;
font-family: 'Helvetica Neue', sans-serif;
font-size: clamp(36px, 6vw, 64px);
font-weight: 900;
line-height: 0.92;
color: #fff;
letter-spacing: -0.03em;
font-style: italic;
position: relative;
text-shadow:
-2px 0 0 #00ff8c,
2px 0 0 #ff00aa,
0 0 30px rgba(255,255,255,0.3);
}
.ss-cyb-left p {
margin: 0;
font-size: 13px; font-weight: 700;
letter-spacing: 0.16em;
color: #ff00aa;
text-transform: uppercase;
}
.ss-cyb-meter {
margin-top: auto;
padding: 14px;
background: rgba(0,255,140,0.06);
border: 1px solid rgba(0,255,140,0.4);
display: flex; flex-direction: column; gap: 6px;
}
.ss-cyb-meter span {
font-size: 10px; font-weight: 800;
letter-spacing: 0.22em;
color: #00ff8c;
}
.ss-cyb-bar {
height: 8px;
background: rgba(0,0,0,0.5);
border: 1px solid rgba(0,255,140,0.3);
}
.ss-cyb-fill {
display: block; height: 100%;
background: linear-gradient(90deg, #00ff8c 0%, #ff00aa 100%);
box-shadow: 0 0 12px #00ff8c;
}
.ss-cyb-meter em {
align-self: flex-end;
font-family: 'Helvetica Neue', sans-serif;
font-size: 22px; font-weight: 900;
font-style: italic;
color: #00ff8c;
text-shadow: 0 0 10px rgba(0,255,140,0.6);
}
.ss-cyb-leader { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ss-cyb-leader li {
display: grid; grid-template-columns: 28px 1fr auto;
align-items: center; gap: 12px;
padding: 8px 10px;
font-size: 14px;
border: 1px solid rgba(255,0,170,0.2);
background: rgba(0,0,0,0.3);
}
.ss-cyb-leader li.me { background: rgba(255,0,170,0.16); border-color: #ff00aa; box-shadow: 0 0 12px rgba(255,0,170,0.3); }
.ss-cyb-leader li span { font-size: 11px; font-weight: 800; color: #ff00aa; letter-spacing: 0.16em; }
.ss-cyb-leader li strong { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: 0.08em; }
.ss-cyb-leader li b { font-family: 'Helvetica Neue', sans-serif; font-style: italic; font-weight: 800; color: #00ff8c; text-shadow: 0 0 8px rgba(0,255,140,0.5); }
.ss-cyb-cta {
align-self: flex-start;
padding: 14px 26px;
background: #ff00aa;
color: #0a0014;
border: 0;
font-family: 'Helvetica Neue', sans-serif;
font-size: 14px; font-weight: 900;
letter-spacing: 0.18em;
cursor: pointer;
box-shadow: 0 0 24px rgba(255,0,170,0.5);
transition: background 0.14s, transform 0.12s;
font-style: italic;
}
.ss-cyb-cta:hover { background: #00ff8c; box-shadow: 0 0 24px rgba(0,255,140,0.5); }
.ss-cyb-cta:active { transform: scale(0.97); }
.ss-cyb-warn {
align-self: flex-start;
padding: 4px 10px;
font-size: 10.5px; font-weight: 800;
letter-spacing: 0.18em;
color: #ffd400;
background: rgba(255,212,0,0.1);
border: 1px dashed #ffd400;
margin-top: auto;
}
@media (max-width: 720px) {
.ss-cyb { grid-template-columns: 1fr; }
.ss-cyb-left { border-right: 0; border-bottom: 2px solid #00ff8c; box-shadow: 0 12px 30px rgba(0,255,140,0.15); }
}
```
### 17. Coffee Origin Story
**Type:** Pure CSS
**Description:** Coffee origin story — kraft brown + cream + gold leaf. Two-column editorial: hero image map on the left, a numbered story of the bean's journey on the right. Real <ol> with custom counter styling.
**HTML:**
```html
ORIGIN · COLOMBIA
From bean to brew.
— Five steps to your cup
Hand-picked at sunrise
Only the cherries that turn deep red on the tree. Picked between 5am and 9am, before the
heat sets in.
Washed & sun-dried
72 hours on raised beds. Daily turning by the same family of farmers since 1962.
Shipped in jute
Single-origin lots, no blending. From Pereira to our roastery in 18 days.
Slow-roasted weekly
Light medium, 14 minutes. We rest the beans 48 hours before grinding.
In your cup, today
Bright, clean, with notes of brown sugar and ripe peach.
```
**CSS:**
```css
.ss-cof {
display: grid; grid-template-columns: 40% 60%;
min-height: 480px;
font-family: 'Inter', system-ui, sans-serif;
background: #f5ecdc;
color: #2a1810;
border-radius: 0; overflow: hidden;
}
.ss-cof-map {
background: linear-gradient(180deg, #6e3818 0%, #3a1808 100%);
color: #f5ecdc;
padding: 40px 32px;
display: flex; flex-direction: column; gap: 18px;
position: relative;
border-right: 1px solid #2a1810;
}
.ss-cof-eye {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 800;
letter-spacing: 0.24em;
color: #d4af37;
}
.ss-cof-map h2 {
margin: 4px 0 0;
font-family: 'Cormorant Garamond', serif;
font-size: clamp(36px, 5vw, 56px);
font-weight: 500;
line-height: 0.94;
color: #f5ecdc;
letter-spacing: -0.02em;
}
.ss-cof-map h2 em {
font-style: italic;
color: #d4af37;
}
.ss-cof-map-svg {
position: relative;
flex: 1;
min-height: 200px;
background:
radial-gradient(60% 60% at 50% 50%, rgba(245,236,220,0.08) 0%, transparent 70%);
border: 1px dashed rgba(212,175,55,0.4);
margin-top: 12px;
}
.ss-cof-pin {
position: absolute;
width: 14px; height: 14px;
border-radius: 50%;
background: #d4af37;
box-shadow: 0 0 0 4px rgba(212,175,55,0.25), 0 0 18px rgba(212,175,55,0.4);
}
.ss-cof-pin { top: 22%; left: 32%; }
.ss-cof-pin-2 { top: 52%; left: 58%; width: 10px; height: 10px; }
.ss-cof-pin-3 { top: 78%; left: 24%; width: 12px; height: 12px; }
.ss-cof-route {
position: absolute; top: 22%; left: 32%;
width: 140px; height: 60%;
border: 1.5px dashed #d4af37;
border-color: transparent #d4af37 #d4af37 transparent;
border-radius: 0 50% 50% 0 / 0 28% 28% 0;
pointer-events: none;
}
.ss-cof-meta { list-style: none; margin: 0; padding: 14px 0; border-top: 1px solid rgba(212,175,55,0.3); display: flex; flex-direction: column; gap: 8px; font-family: 'Cormorant Garamond', serif; font-size: 16px; font-style: italic; color: #f5ecdc; }
.ss-cof-meta strong {
font-family: 'Inter', sans-serif;
font-size: 13px; font-weight: 700;
font-style: normal;
color: #d4af37;
letter-spacing: 0.04em;
margin-right: 8px;
}
.ss-cof-story {
padding: 40px 36px;
display: flex; flex-direction: column; gap: 18px;
background:
repeating-linear-gradient(0deg, transparent 0 32px, rgba(110,30,30,0.03) 32px 33px),
#faf3e2;
overflow-y: auto;
}
.ss-cof-folio {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 700;
letter-spacing: 0.24em;
color: #6e3818;
text-transform: uppercase;
}
.ss-cof-story ol { list-style: none; counter-reset: cof; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.ss-cof-story li {
counter-increment: cof;
padding-left: 60px;
position: relative;
padding-bottom: 18px;
border-bottom: 1px dotted #c8b896;
}
.ss-cof-story li:last-child { border-bottom: 0; }
.ss-cof-story li::before {
content: counter(cof, decimal-leading-zero);
position: absolute; left: 0; top: 0;
font-family: 'Cormorant Garamond', serif;
font-size: 38px; font-weight: 500;
font-style: italic;
color: #d4af37;
line-height: 1;
}
.ss-cof-story h3 {
margin: 0;
font-family: 'Cormorant Garamond', serif;
font-size: 22px;
font-weight: 500;
font-style: italic;
color: #2a1810;
letter-spacing: -0.01em;
}
.ss-cof-story p {
margin: 4px 0 0;
font-size: 14px;
line-height: 1.6;
color: #4a3825;
}
@media (max-width: 720px) {
.ss-cof { grid-template-columns: 1fr; }
.ss-cof-map { border-right: 0; border-bottom: 1px solid #2a1810; }
}
```
### 18. Quad Photo Split
**Type:** Pure CSS
**Description:** Photography portfolio quad split — charcoal frame with four photo accents (sage / clay / mustard / bone). Hover any tile to expand it; the others contract. CSS grid with :has() on the wrapper to drive the proportions.
**HTML:**
```html
01
Field Notes
Coastal Oregon, autumn 2025
02
Clay Walls
Marrakech rooftops at noon
03
Yellow Hour
Tuscan vineyards in late September
04
Bone & Stone
Atacama mineral landscapes
```
**CSS:**
```css
.ss-quad {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
min-height: 480px;
font-family: 'Inter', system-ui, sans-serif;
background: #1a1a1a;
gap: 2px;
border-radius: 0; overflow: hidden;
border: 2px solid #1a1a1a;
}
.ss-quad-tile {
position: relative;
background: var(--bg);
padding: 28px 28px;
display: flex; flex-direction: column; gap: 10px;
color: #fff;
cursor: pointer;
transition: transform 0.32s ease, box-shadow 0.32s ease;
isolation: isolate;
overflow: hidden;
}
.ss-quad-tile::before {
content: '';
position: absolute; inset: 0;
background: linear-gradient(135deg, transparent 60%, rgba(0,0,0,0.4) 100%);
pointer-events: none;
z-index: -1;
}
.ss-quad-tile:hover, .ss-quad-tile:focus-visible {
transform: scale(1.02);
z-index: 2;
box-shadow: 0 14px 40px rgba(0,0,0,0.5);
outline: none;
}
.ss-quad:has(.ss-quad-tile:hover) .ss-quad-tile:not(:hover),
.ss-quad:has(.ss-quad-tile:focus-visible) .ss-quad-tile:not(:focus-visible) {
filter: grayscale(0.7) brightness(0.7);
}
.ss-quad-num {
font-family: 'Courier New', monospace;
font-size: 11px; font-weight: 800;
letter-spacing: 0.28em;
color: rgba(255,255,255,0.6);
}
.ss-quad-tile h3 {
margin: auto 0 0;
font-family: 'Cormorant Garamond', serif;
font-size: clamp(24px, 3.5vw, 40px);
font-weight: 500;
line-height: 1;
letter-spacing: -0.02em;
font-style: italic;
}
.ss-quad-tile p {
margin: 0;
font-size: 13px;
letter-spacing: 0.04em;
opacity: 0.9;
}
@media (max-width: 720px) {
.ss-quad { grid-template-columns: 1fr; grid-template-rows: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
.ss-quad-tile { transition: none; }
}
```
### 19. Recipe Reveal
**Type:** Pure CSS
**Description:** Recipe book — terracotta + sage + butter yellow. Two halves: a recipe header on top, ingredients/method below. On smaller viewports the layout stacks; the right half "reveals" the method. Real <ul> + <ol> for ingredients and steps.
**HTML:**
```html
— Sunday Lunch · Serves 4
Slow-roastedtomato orzo.
One pan, four ingredients, ninety minutes. The kind of recipe that smells like home.
1h 30m Total time
Easy Skill
4 servings Yield
Add to my book
Ingredients
500g Cherry tomatoes, on the vine
250g Orzo
2 tbsp Olive oil, plus more to finish
1 tsp Sea salt
4 Garlic cloves, smashed
Method
Heat oven to 200°C. Spread tomatoes in a baking dish.
Add olive oil, salt, garlic. Roast 60 minutes until burst.
Cook orzo in salted water 8 min. Drain.
Toss orzo through tomatoes. Finish with olive oil and basil.
```
**CSS:**
```css
.ss-rec {
display: grid; grid-template-columns: 50% 50%;
min-height: 480px;
font-family: 'Cormorant Garamond', 'Georgia', serif;
background: #fff8e8;
color: #2a1810;
border-radius: 0; overflow: hidden;
border: 1px solid #2a1810;
}
.ss-rec-hero {
padding: 44px 40px;
display: flex; flex-direction: column; gap: 18px;
background:
radial-gradient(60% 60% at 30% 30%, #ffe2c8 0%, transparent 60%),
#fff1d4;
border-right: 1px dashed #c45a3c;
position: relative;
}
.ss-rec-hero::before {
content: '';
position: absolute; top: 24px; right: 24px;
width: 80px; height: 80px;
border-radius: 50%;
background: radial-gradient(circle at 30% 30%, #ffaa44 0%, #c45a3c 70%, #8a3818 100%);
box-shadow: 0 6px 18px rgba(196,90,60,0.4);
}
.ss-rec-cat {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 700;
letter-spacing: 0.18em; text-transform: uppercase;
color: #6a8a5a;
}
.ss-rec-hero h2 {
margin: 4px 0 0;
font-size: clamp(36px, 5vw, 60px);
font-weight: 500;
line-height: 0.94;
color: #2a1810;
letter-spacing: -0.02em;
}
.ss-rec-hero h2 em {
font-style: italic;
color: #c45a3c;
}
.ss-rec-hero p {
margin: 0;
font-family: 'Inter', sans-serif;
font-size: 15px;
line-height: 1.6;
color: #5a4a35;
max-width: 380px;
}
.ss-rec-pill { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid #c8a878; border-bottom: 1px solid #c8a878; flex-wrap: wrap; }
.ss-rec-pill span { display: flex; flex-direction: column; }
.ss-rec-pill b {
font-family: 'Cormorant Garamond', serif;
font-size: 18px;
font-weight: 500;
font-style: italic;
color: #2a1810;
}
.ss-rec-pill em {
font-family: 'Inter', sans-serif;
font-size: 10.5px; font-weight: 700;
letter-spacing: 0.16em; text-transform: uppercase;
font-style: normal;
color: #6a8a5a;
}
.ss-rec-cta {
align-self: flex-start;
padding: 13px 22px;
background: #6a8a5a;
color: #fff8e8;
border: 0;
font-family: 'Inter', sans-serif;
font-size: 12px; font-weight: 700;
letter-spacing: 0.16em; text-transform: uppercase;
cursor: pointer;
transition: background 0.16s;
}
.ss-rec-cta:hover { background: #4a6a3a; }
.ss-rec-method {
padding: 36px 36px;
display: flex; flex-direction: column; gap: 22px;
background:
repeating-linear-gradient(180deg, transparent 0 30px, rgba(196,90,60,0.04) 30px 31px),
#fff8e8;
overflow-y: auto;
}
.ss-rec-method h3 {
margin: 0 0 10px;
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 800;
letter-spacing: 0.24em;
color: #c45a3c;
text-transform: uppercase;
padding-bottom: 8px;
border-bottom: 1px dashed #c8a878;
}
.ss-rec-ing ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 16.5px; }
.ss-rec-ing li {
display: grid; grid-template-columns: 80px 1fr; gap: 14px;
font-style: italic;
color: #2a1810;
}
.ss-rec-ing b {
font-family: 'Inter', sans-serif;
font-style: normal;
font-size: 13px;
font-weight: 700;
color: #6a8a5a;
letter-spacing: 0.04em;
align-self: center;
}
.ss-rec-steps ol { list-style: none; counter-reset: rec; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ss-rec-steps li {
counter-increment: rec;
padding-left: 38px;
position: relative;
font-family: 'Inter', sans-serif;
font-size: 14.5px;
line-height: 1.6;
color: #4a3825;
}
.ss-rec-steps li::before {
content: counter(rec);
position: absolute; left: 0; top: -2px;
font-family: 'Cormorant Garamond', serif;
font-size: 22px;
font-weight: 500;
font-style: italic;
color: #c45a3c;
width: 28px; text-align: center;
border-bottom: 1px solid #c45a3c;
}
@media (max-width: 720px) {
.ss-rec { grid-template-columns: 1fr; }
.ss-rec-hero { border-right: 0; border-bottom: 1px dashed #c45a3c; }
}
```
### 20. Pet Adoption Z
**Type:** Pure CSS
**Description:** Pet adoption — grass green + sky blue + sun yellow. Z-pattern: image left → text right → image right → text left, but expressed as a 2×2 grid that creates an interlocking flow. Friendly, optimistic, full of CSS-painted dog and cat illustrations.
**HTML:**
```html
MEET LUNA · 2 yrs
FRIDAY ADOPTIONS
A good home is one nap away.
22 cats and 14 dogs are waiting at Bramble Lane this weekend. Walk-ins welcome, no appointment
needed.
How it works
Visit our shelter Sat / Sun, 10am — 4pm
Spend an hour with a friend
Take them home the same day
Plan your visit →
MEET KOJI · 3 yrs
```
**CSS:**
```css
.ss-pet {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
min-height: 480px;
font-family: 'Inter', system-ui, sans-serif;
background: #fef7d4;
border-radius: 0; overflow: hidden;
gap: 0;
}
.ss-pet-img {
position: relative;
display: flex; align-items: center; justify-content: center;
overflow: hidden;
}
.ss-pet-cat {
background:
radial-gradient(80% 80% at 30% 70%, #94c4ec 0%, #2a8cc4 100%);
}
.ss-pet-dog {
background:
radial-gradient(80% 80% at 70% 30%, #84d488 0%, #2c8c34 100%);
}
.ss-pet-creature {
position: relative;
width: 130px; height: 130px;
border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
background: #fff;
box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.ss-pet-cat .ss-pet-creature::before, .ss-pet-cat .ss-pet-creature::after {
content: ''; position: absolute; top: -22px; width: 0; height: 0;
border-left: 22px solid transparent;
border-right: 22px solid transparent;
border-bottom: 36px solid #fff;
}
.ss-pet-cat .ss-pet-creature::before { left: 4px; transform: rotate(-12deg); }
.ss-pet-cat .ss-pet-creature::after { right: 4px; transform: rotate(12deg); }
.ss-pet-dog .ss-pet-creature {
background: linear-gradient(180deg, #d4a878 0%, #a87838 100%);
}
.ss-pet-dog .ss-pet-creature::before, .ss-pet-dog .ss-pet-creature::after {
content: ''; position: absolute; top: 22px;
width: 38px; height: 56px;
background: linear-gradient(180deg, #b8884c 0%, #6e4818 100%);
border-radius: 50%;
}
.ss-pet-dog .ss-pet-creature::before { left: -22px; transform: rotate(-22deg); }
.ss-pet-dog .ss-pet-creature::after { right: -22px; transform: rotate(22deg); }
.ss-pet-eye, .ss-pet-eye2 {
position: absolute; top: 36%;
width: 14px; height: 14px;
border-radius: 50%;
background: #2a2a2a;
}
.ss-pet-eye { left: 28%; }
.ss-pet-eye2 { right: 28%; }
.ss-pet-nose {
position: absolute; top: 52%; left: 50%;
transform: translateX(-50%);
width: 14px; height: 12px;
border-radius: 50%;
background: #c45a3c;
}
.ss-pet-cat .ss-pet-nose { background: #ec5a82; width: 12px; height: 8px; }
.ss-pet-tongue {
position: absolute; top: 64%; left: 50%;
transform: translateX(-50%);
width: 22px; height: 14px;
border-radius: 0 0 12px 12px;
background: #ec5a82;
}
.ss-pet-tag {
position: absolute; bottom: 18px;
font-family: 'Inter', sans-serif;
font-size: 10.5px; font-weight: 800;
letter-spacing: 0.18em;
padding: 5px 11px;
background: #fff;
color: #2a2a2a;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.ss-pet-text {
padding: 36px 36px;
display: flex; flex-direction: column; gap: 16px;
background: #fef7d4;
position: relative;
}
.ss-pet-text-2 { background: #fff8e8; }
.ss-pet-eye-tag {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 800;
letter-spacing: 0.22em; text-transform: uppercase;
color: #c45a3c;
align-self: flex-start;
}
.ss-pet-text h2 {
margin: 4px 0 0;
font-family: 'Cormorant Garamond', serif;
font-size: clamp(34px, 5vw, 50px);
font-weight: 500;
line-height: 0.94;
color: #2a3325;
letter-spacing: -0.02em;
}
.ss-pet-text h2 em {
font-style: italic;
color: #2c8c34;
}
.ss-pet-text p {
margin: 0;
font-size: 15px;
line-height: 1.6;
color: #4a4030;
max-width: 360px;
}
.ss-pet-text h3 {
margin: 0;
font-family: 'Cormorant Garamond', serif;
font-size: 22px;
font-weight: 500;
font-style: italic;
color: #2a3325;
letter-spacing: -0.01em;
}
.ss-pet-text ol { list-style: none; counter-reset: pet; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ss-pet-text li {
counter-increment: pet;
padding-left: 36px;
position: relative;
font-size: 14.5px;
line-height: 1.6;
color: #4a4030;
}
.ss-pet-text li::before {
content: counter(pet);
position: absolute; left: 0; top: 50%;
transform: translateY(-50%);
width: 24px; height: 24px;
border-radius: 50%;
background: #ffe89a;
color: #c45a3c;
font-family: 'Inter', sans-serif;
font-size: 12px; font-weight: 800;
display: flex; align-items: center; justify-content: center;
box-shadow: 0 0 0 2px #c45a3c;
}
.ss-pet-cta {
align-self: flex-start;
margin-top: auto;
padding: 13px 22px;
background: #2c8c34;
color: #fef7d4;
border: 0;
border-radius: 28px;
font-size: 13px; font-weight: 700;
letter-spacing: 0.04em;
cursor: pointer;
box-shadow: 0 6px 18px rgba(44,140,52,0.35);
transition: transform 0.12s, background 0.16s;
}
.ss-pet-cta:hover { background: #1a6a22; transform: translateY(-1px); }
@media (max-width: 720px) {
.ss-pet { grid-template-columns: 1fr; grid-template-rows: repeat(4, auto); }
.ss-pet-img { min-height: 240px; }
}
```
### 21. Magazine Crossover
**Type:** Pure CSS
**Description:** Editorial magazine spread — newspaper black on cream with a single spot color (cobalt blue). Oversized italic headline crosses the seam between two halves; pull-quote on the right intrudes into the left photo zone. The kind of layout you see on a New York Times Magazine longread.
**HTML:**
```html
Photo · Iris Hawthorne for The Quarterly
SECTION 04 / ESSAY
The quiet art of doing one thing at a time.
By Iris Hawthorne · Spring 2026
A fter a decade of optimizing every minute, the loneliest
realization wasn't that I had no time. It was that I'd forgotten how to spend it. Three years
ago I made a small commitment, and it changed everything I thought I knew about productivity.
"The thing about doing one thing at a time is that the thing finally gets your attention."
What I learned was simpler than I expected — and harder to keep.
```
**CSS:**
```css
.ss-mag {
display: grid; grid-template-columns: 42% 58%;
min-height: 480px;
font-family: 'Cormorant Garamond', 'Georgia', serif;
background: #f4ede0;
color: #1a1a1a;
border-radius: 0; overflow: hidden;
border: 1px solid #1a1a1a;
}
.ss-mag-photo {
position: relative;
background: linear-gradient(180deg, #2a2a2a 0%, #0a0a0a 100%);
padding: 36px 32px;
display: flex; flex-direction: column; gap: 14px;
border-right: 1px solid #1a1a1a;
}
.ss-mag-image {
position: relative;
flex: 1;
background: linear-gradient(180deg, #4a4a4a 0%, #1a1a1a 100%);
overflow: hidden;
isolation: isolate;
}
.ss-mag-figure {
position: absolute; bottom: 0; left: 50%;
transform: translateX(-50%);
width: 200px; height: 80%;
background:
radial-gradient(ellipse at 50% 12%, #c8a878 0%, #c8a878 8%, transparent 9%),
linear-gradient(180deg, transparent 8%, #1a3658 8%, #1a3658 100%);
clip-path: polygon(40% 0, 60% 0, 70% 16%, 80% 38%, 80% 100%, 20% 100%, 20% 38%, 30% 16%);
}
.ss-mag-light {
position: absolute; top: -10%; right: -20%;
width: 60%; height: 80%;
background: radial-gradient(circle at 50% 0%, rgba(255,200,80,0.35), transparent 70%);
filter: blur(8px);
}
.ss-mag-caption {
font-family: 'Cormorant Garamond', serif;
font-size: 12px; font-style: italic;
color: #c8a878;
}
.ss-mag-text {
padding: 36px 40px;
display: flex; flex-direction: column; gap: 18px;
background:
repeating-linear-gradient(0deg, transparent 0 32px, rgba(0,0,0,0.018) 32px 33px),
#f9f3e6;
position: relative;
}
.ss-mag-section {
font-family: 'Inter', sans-serif;
font-size: 11px; font-weight: 800;
letter-spacing: 0.32em; text-transform: uppercase;
color: #1a3658;
}
.ss-mag-head {
margin: 4px 0 0;
font-size: clamp(36px, 5.5vw, 60px);
font-weight: 500;
line-height: 0.92;
letter-spacing: -0.02em;
color: #1a1a1a;
}
.ss-mag-head em {
font-style: italic;
color: #1a3658;
}
.ss-mag-byline {
font-family: 'Inter', sans-serif;
font-size: 12px; color: #4a4a4a;
}
.ss-mag-byline b { color: #1a3658; font-weight: 700; }
.ss-mag-lede {
margin: 0;
font-family: 'Cormorant Garamond', serif;
font-size: 18px;
line-height: 1.55;
color: #1a1a1a;
column-count: 2;
column-gap: 24px;
column-rule: 1px solid #c8a878;
}
.ss-mag-drop {
font-family: 'Cormorant Garamond', serif;
font-size: 64px;
font-weight: 500;
font-style: italic;
line-height: 0.85;
float: left;
padding: 4px 8px 0 0;
color: #1a3658;
}
.ss-mag-pull {
margin: 0;
font-size: clamp(18px, 2.4vw, 24px);
line-height: 1.4;
color: #1a3658;
font-style: italic;
border-left: 4px solid #1a3658;
padding: 0 0 0 18px;
font-weight: 500;
}
.ss-mag-out {
margin: 0;
font-family: 'Cormorant Garamond', serif;
font-size: 16px;
line-height: 1.6;
color: #2a2a2a;
}
.ss-mag-meta {
list-style: none; margin: 0; padding: 14px 0; border-top: 1px solid #c8a878; border-bottom: 1px solid #c8a878;
display: flex; gap: 22px;
font-family: 'Inter', sans-serif;
font-size: 12px;
color: #4a4a4a;
}
.ss-mag-meta b {
font-family: 'Cormorant Garamond', serif;
font-style: italic;
font-size: 18px;
font-weight: 500;
color: #1a1a1a;
margin-right: 4px;
}
@media (max-width: 720px) {
.ss-mag { grid-template-columns: 1fr; }
.ss-mag-photo { border-right: 0; border-bottom: 1px solid #1a1a1a; min-height: 280px; }
/* .ss-mag-head no longer needs a mobile reset (no desktop overflow). */
.ss-mag-lede { column-count: 1; }
}
```
### 22. 3D Perspective Keynote
**Type:** Pure CSS
**Description:** Tech keynote — deep navy + holographic gradient + chrome. Two halves tilted in 3D space via perspective + rotateY; left panel angles toward viewer, right panel angles away. The "Apple event slide" feel — premium, sleek, almost cinematic.
**HTML:**
```html
v3 · MAY 2026
Aurora.
The smallest, fastest, quietest dev environment we've ever shipped. Built for the way you
actually code.
◉ 0.3s cold start
◉ Type-safe everywhere
◉ One-click deploy
Watch the keynote →
// 0.3s cold start
import { app } from 'aurora' ;
const server = app ();
server.listen (3000 );
0.3s start
4.2 MB bundle
99 ms p99
```
**CSS:**
```css
.ss-key {
position: relative;
display: grid; grid-template-columns: 45% 55%;
min-height: 480px;
font-family: 'Inter', system-ui, sans-serif;
background:
radial-gradient(60% 80% at 30% 30%, rgba(80,40,180,0.4) 0%, transparent 60%),
radial-gradient(60% 80% at 80% 80%, rgba(0,180,200,0.3) 0%, transparent 60%),
linear-gradient(180deg, #0a0a2a 0%, #050518 100%);
color: #fff;
border-radius: 0; overflow: hidden;
perspective: 1400px;
isolation: isolate;
}
.ss-key-stars {
position: absolute; inset: 0;
background-image:
radial-gradient(1.5px 1.5px at 14% 22%, #fff, transparent),
radial-gradient(1px 1px at 38% 12%, rgba(255,255,255,0.7), transparent),
radial-gradient(1px 1px at 52% 30%, rgba(255,255,255,0.5), transparent),
radial-gradient(1.5px 1.5px at 73% 18%, #fff, transparent),
radial-gradient(1px 1px at 88% 42%, rgba(255,255,255,0.7), transparent),
radial-gradient(1px 1px at 22% 50%, rgba(255,255,255,0.5), transparent),
radial-gradient(1.5px 1.5px at 64% 60%, #fff, transparent),
radial-gradient(1px 1px at 12% 76%, rgba(255,255,255,0.5), transparent),
radial-gradient(1px 1px at 84% 78%, rgba(255,255,255,0.5), transparent);
pointer-events: none;
z-index: 0;
}
.ss-key-left {
padding: 44px 36px 44px 44px;
display: flex; flex-direction: column; gap: 18px;
position: relative;
transform: rotateY(8deg) translateZ(20px);
transform-origin: right center;
z-index: 2;
}
.ss-key-tag {
font-family: 'JetBrains Mono', 'Courier New', monospace;
font-size: 11px; font-weight: 700;
letter-spacing: 0.24em;
color: #00d4ff;
align-self: flex-start;
padding: 4px 10px;
background: rgba(0,212,255,0.1);
border: 1px solid rgba(0,212,255,0.4);
border-radius: 12px;
}
.ss-key-left h2 {
margin: 4px 0 0;
font-size: clamp(60px, 9vw, 110px);
font-weight: 900;
line-height: 0.85;
letter-spacing: -0.04em;
color: #fff;
font-style: italic;
}
.ss-key-shine {
background: linear-gradient(90deg, #fff 0%, #c4b5fd 30%, #00d4ff 60%, #fff 100%);
background-size: 200% 100%;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: ss-key-sweep 4s linear infinite;
}
@keyframes ss-key-sweep {
to { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) { .ss-key-shine { animation: none; } }
.ss-key-left p {
margin: 0;
font-size: 16px;
line-height: 1.6;
color: #c8c4e0;
max-width: 380px;
}
.ss-key-feat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ss-key-feat li {
display: flex; align-items: center; gap: 12px;
font-size: 14.5px;
color: #fff;
}
.ss-key-feat span { color: #00d4ff; font-size: 13px; text-shadow: 0 0 12px rgba(0,212,255,0.6); }
.ss-key-cta {
align-self: flex-start;
padding: 14px 26px;
background: linear-gradient(135deg, #c4b5fd 0%, #00d4ff 100%);
color: #050518;
border: 0;
border-radius: 28px;
font-size: 13px; font-weight: 800;
letter-spacing: 0.04em;
cursor: pointer;
box-shadow: 0 12px 30px rgba(0,212,255,0.4);
transition: transform 0.16s, box-shadow 0.16s;
}
.ss-key-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(0,212,255,0.55); }
.ss-key-right {
position: relative;
padding: 44px 32px;
display: flex; align-items: center; justify-content: center;
perspective: 1400px;
z-index: 1;
}
.ss-key-card {
position: relative;
width: 100%; max-width: 420px;
background:
linear-gradient(160deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%),
#14143a;
border: 1px solid rgba(196,181,253,0.3);
border-radius: 14px;
box-shadow:
0 24px 60px rgba(0,0,0,0.5),
0 0 0 1px rgba(0,212,255,0.18),
inset 0 1px 0 rgba(255,255,255,0.18);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
transform: rotateY(-12deg) rotateX(4deg) translateZ(-20px);
z-index: 2;
}
.ss-key-card header {
display: flex; align-items: center; gap: 12px;
padding: 12px 16px;
border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ss-key-dots { display: inline-flex; gap: 6px; }
.ss-key-dots i {
width: 10px; height: 10px;
border-radius: 50%;
}
.ss-key-dots i:nth-child(1) { background: #ff5f57; }
.ss-key-dots i:nth-child(2) { background: #febc2e; }
.ss-key-dots i:nth-child(3) { background: #28c840; }
.ss-key-card header strong {
font-family: 'JetBrains Mono', monospace;
font-size: 11px;
color: #8a8ab8;
font-weight: 500;
}
.ss-key-card pre {
margin: 0;
padding: 18px 22px;
font-family: 'JetBrains Mono', 'Courier New', monospace;
font-size: 13.5px;
line-height: 1.7;
color: #fff;
}
.ss-key-c { color: #6a6e96; font-style: italic; }
.ss-key-k { color: #c4b5fd; font-weight: 600; }
.ss-key-s { color: #fcd34d; }
.ss-key-o { color: #ff52aa; }
.ss-key-fn { color: #00d4ff; }
.ss-key-n { color: #a3e635; }
.ss-key-card footer {
display: grid; grid-template-columns: repeat(3, 1fr);
border-top: 1px solid rgba(255,255,255,0.08);
}
.ss-key-stat {
padding: 14px 12px;
border-right: 1px solid rgba(255,255,255,0.08);
display: flex; flex-direction: column; gap: 2px;
}
.ss-key-stat:last-child { border-right: 0; }
.ss-key-stat b {
font-size: 18px; font-weight: 700;
color: #00d4ff;
letter-spacing: -0.02em;
}
.ss-key-stat em {
font-family: 'JetBrains Mono', monospace;
font-style: normal;
font-size: 10px; font-weight: 600;
letter-spacing: 0.16em; text-transform: uppercase;
color: #6a6e96;
}
.ss-key-glow {
position: absolute;
width: 60%; height: 80%;
background: radial-gradient(circle, rgba(0,212,255,0.4), transparent 70%);
filter: blur(60px);
z-index: 0;
}
@media (max-width: 720px) {
.ss-key { grid-template-columns: 1fr; perspective: none; }
.ss-key-left, .ss-key-card { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
.ss-key-left, .ss-key-card { transform: none; }
}
```
---
## 28 CSS Stacked Card Designs
URL: https://codefronts.com/components/css-stacked-cards/
Description: 28 hand-coded CSS stacked-card designs with live demos — editorial hover-reveal deck, scroll-activated sticky stack, pure-CSS testimonial slider with radio inputs, 3D isometric pricing tiers, swipeable Tinder-style flashcards, minimalist bento grid with embedded mini-stack, poker-deck fan, botanical fan spread, scattered Polaroids, staircase bricks, glassmorphic perspective tunnel, iOS notification pile, receipt roll, real scratch-off cards and more. 20 pure CSS + 8 with a small vanilla JS snippet for drag/click/scroll interactivity. prefers-reduced-motion respected, scoped class names, MIT-licensed.
Demo count: 28
### 01. CSS Stacked Cards Hover Reveal
**Type:** Pure CSS
**Description:** An editorial-style deck of portfolio cards sitting in a slightly rotated pile on a warm paper backdrop. On hover the four cards fan outward into an arc, and hovering any single card lifts it forward. Built for creative portfolios, team profiles, and service offerings where a tactile micro-interaction matters more than chrome. Pure CSS, no JavaScript.
**HTML:**
```html
Type 04
Letterforms
An editorial typography system built for screens.
View case →
Motion 03
Inmotion
Kinetic brand identity that moves with intent.
View case →
Color 02
Warmtones
Palette & art direction with a human warmth.
View case →
Index 01
Selectedworks
Hover to open the deck. Move to explore.
Begin →
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600&display=swap');
.scd-hovr, .scd-hovr *, .scd-hovr *::before, .scd-hovr *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-hovr {
position: relative;
min-height: 460px;
display: grid;
place-items: center;
background: #05060a;
font-family: 'Geist', sans-serif;
}
.scd-hovr::before {
content: '';
position: absolute; inset: -30%;
background:
radial-gradient(40% 40% at 20% 30%, rgba(99,102,241,.35), transparent 70%),
radial-gradient(45% 45% at 80% 25%, rgba(236,72,153,.3), transparent 70%),
radial-gradient(50% 50% at 50% 85%, rgba(45,212,191,.28), transparent 70%);
filter: blur(20px);
animation: scd-hovr-drift 18s ease-in-out infinite alternate;
pointer-events: none;
}
@keyframes scd-hovr-drift {
0% { transform: translate(-3%,-2%) scale(1); }
100% { transform: translate(4%,3%) scale(1.12); }
}
.scd-hovr::after {
content: '';
position: absolute; inset: 0;
background: repeating-linear-gradient(0deg, rgba(255,255,255,.022) 0 1px, transparent 1px 3px);
mix-blend-mode: overlay;
pointer-events: none;
}
.scd-hovr__stage { position: relative; width: 300px; height: 400px; perspective: 1300px; z-index: 1; }
.scd-hovr__deck { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .25s ease-out; }
.scd-hovr__card {
position: absolute; inset: 0;
border-radius: 24px;
transform-style: preserve-3d;
transition: transform .8s cubic-bezier(.16,1,.3,1), box-shadow .6s, filter .6s;
cursor: pointer;
overflow: hidden;
box-shadow: 0 30px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08) inset;
}
.scd-hovr__surface { position: absolute; inset: 0; backdrop-filter: blur(8px); }
.scd-hovr__grad {
position: absolute; inset: 0;
opacity: .9;
background-size: 200% 200%;
animation: scd-hovr-flow 8s ease infinite;
}
@keyframes scd-hovr-flow {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.scd-hovr__glow {
position: absolute; inset: 0;
background: radial-gradient(280px circle at var(--mx,50%) var(--my,40%), rgba(255,255,255,.4), transparent 60%);
mix-blend-mode: soft-light;
opacity: 0;
transition: opacity .5s;
}
.scd-hovr__card:hover .scd-hovr__glow { opacity: 1; }
.scd-hovr__sheen {
position: absolute; top: -60%; left: -30%;
width: 60%; height: 220%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
transform: rotate(18deg) translateX(-220px);
transition: transform .9s cubic-bezier(.16,1,.3,1);
}
.scd-hovr__card:hover .scd-hovr__sheen { transform: rotate(18deg) translateX(560px); }
.scd-hovr__content {
position: absolute; inset: 0;
padding: 28px;
display: flex; flex-direction: column; justify-content: space-between;
transform: translateZ(50px);
}
.scd-hovr__meta { display: flex; align-items: center; gap: 10px; }
.scd-hovr__chip {
font-size: .62rem; letter-spacing: .22em; text-transform: uppercase;
padding: 6px 12px; border-radius: 999px;
background: rgba(255,255,255,.16); backdrop-filter: blur(6px);
color: #fff; font-weight: 500;
border: 1px solid rgba(255,255,255,.22);
}
.scd-hovr__idx {
margin-left: auto;
font-family: 'Instrument Serif', serif; font-style: italic;
font-size: 1.3rem; color: rgba(255,255,255,.7);
}
.scd-hovr__title {
font-family: 'Instrument Serif', serif;
font-size: 3rem; line-height: .92;
color: #fff; letter-spacing: -.01em;
text-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.scd-hovr__title em { font-style: italic; }
.scd-hovr__desc { font-size: .8rem; color: rgba(255,255,255,.78); line-height: 1.5; max-width: 24ch; }
.scd-hovr__row { display: flex; align-items: center; justify-content: space-between; }
.scd-hovr__cta {
font-size: .78rem; color: #fff;
display: inline-flex; align-items: center; gap: 6px;
opacity: 0; transform: translateY(8px);
transition: opacity .5s .1s, transform .5s .1s;
}
.scd-hovr__card:hover .scd-hovr__cta { opacity: 1; transform: translateY(0); }
.scd-hovr__arrow {
width: 22px; height: 22px;
border-radius: 50%;
background: rgba(255,255,255,.2);
display: grid; place-items: center;
font-size: .8rem;
}
.scd-hovr__card--c1 .scd-hovr__grad { background: linear-gradient(135deg,#1e1b4b,#4338ca 40%,#6d28d9); }
.scd-hovr__card--c2 .scd-hovr__grad { background: linear-gradient(135deg,#831843,#be185d 45%,#f43f5e); }
.scd-hovr__card--c3 .scd-hovr__grad { background: linear-gradient(135deg,#064e3b,#0d9488 50%,#2dd4bf); }
.scd-hovr__card--c4 .scd-hovr__grad { background: linear-gradient(135deg,#7c2d12,#ea580c 45%,#f59e0b); }
.scd-hovr__card--c1 { transform: translateZ(0) translateY(0) rotate(-3deg); z-index: 4; }
.scd-hovr__card--c2 { transform: translateZ(-40px) translateY(10px) rotate(2deg); z-index: 3; filter: brightness(.85); }
.scd-hovr__card--c3 { transform: translateZ(-80px) translateY(20px) rotate(-2deg); z-index: 2; filter: brightness(.72); }
.scd-hovr__card--c4 { transform: translateZ(-120px) translateY(30px) rotate(3deg); z-index: 1; filter: brightness(.6); }
/* Stage-spread fan — only when no individual card is being hovered.
Without the :not(:has(...:hover)) guard, hovering any single card
fires BOTH this stage spread AND the per-card lift below. The two
transforms fight on the same .8s cubic-bezier transition, sliding
the card out from under the cursor mid-animation → cursor leaves
the card → spread snaps back → cursor re-enters → infinite flicker.
Restricting the spread to "stage hover AND nothing inside being
hovered" lets the spread fan cleanly when you first enter the
stage area, then freezes at the moment your cursor lands on a card. */
.scd-hovr__stage:hover:not(:has(.scd-hovr__card:hover)) .scd-hovr__card--c1 { transform: translate(-165px,-30px) translateZ(40px) rotate(-12deg); filter: brightness(1); }
.scd-hovr__stage:hover:not(:has(.scd-hovr__card:hover)) .scd-hovr__card--c2 { transform: translate(-55px,18px) translateZ(20px) rotate(-4deg); filter: brightness(1); }
.scd-hovr__stage:hover:not(:has(.scd-hovr__card:hover)) .scd-hovr__card--c3 { transform: translate(55px,18px) translateZ(20px) rotate(4deg); filter: brightness(1); }
.scd-hovr__stage:hover:not(:has(.scd-hovr__card:hover)) .scd-hovr__card--c4 { transform: translate(165px,-30px) translateZ(40px) rotate(12deg); filter: brightness(1); }
/* When a card IS being hovered, write each card's hovered transform
explicitly — keeping its fanned x/y position AND adding the lift
(translateZ + scale). This way the transform doesn't snap the card
back to (0,0) which is what caused the flicker. */
.scd-hovr__stage:hover .scd-hovr__card--c1:hover { transform: translate(-165px,-56px) translateZ(90px) rotate(-12deg) scale(1.06); filter: brightness(1.05); z-index: 9; }
.scd-hovr__stage:hover .scd-hovr__card--c2:hover { transform: translate(-55px,-8px) translateZ(90px) rotate(-4deg) scale(1.06); filter: brightness(1.05); z-index: 9; }
.scd-hovr__stage:hover .scd-hovr__card--c3:hover { transform: translate(55px,-8px) translateZ(90px) rotate(4deg) scale(1.06); filter: brightness(1.05); z-index: 9; }
.scd-hovr__stage:hover .scd-hovr__card--c4:hover { transform: translate(165px,-56px) translateZ(90px) rotate(12deg) scale(1.06); filter: brightness(1.05); z-index: 9; }
.scd-hovr__card:hover { box-shadow: 0 50px 90px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.18) inset, 0 0 40px rgba(255,255,255,.12); }
.scd-hovr__floor {
position: absolute; bottom: -70px; left: 50%;
width: 240px; height: 40px;
background: radial-gradient(ellipse, rgba(0,0,0,.6), transparent 70%);
transform: translateX(-50%);
filter: blur(8px);
}
@media (prefers-reduced-motion: reduce) {
.scd-hovr::before,
.scd-hovr__grad,
.scd-hovr__sheen,
.scd-hovr__deck,
.scd-hovr__card,
.scd-hovr__cta { animation: none !important; transition: none !important; }
}
```
### 02. Scroll-Activated Stacked Cards (Sticky Stack)
**Type:** CSS + JS
**Description:** A vertical "How It Works" sequence where each step pins with position: sticky and the previous card scales down and dims as the next slides over it, keeping the reader anchored as they scroll. Ideal for feature sections, agency workflows, and process pages. Scroll the demo to see each phase stack over the last.
**HTML:**
```html
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600;700&display=swap');
.scd-stick, .scd-stick *, .scd-stick *::before, .scd-stick *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Page-scroll demo — mirrors the original source body. The visitor's
own page (or the playground iframe) provides the scroll; we do NOT
create an internal overflow:auto scroller. */
.scd-stick {
position: relative;
min-height: 100vh;
background: #05060a;
font-family: 'Geist', sans-serif;
color: #fff;
scroll-behavior: smooth;
}
.scd-stick::before {
content: '';
position: fixed; inset: -30%; z-index: 0;
background:
radial-gradient(40% 40% at 25% 25%, rgba(99,102,241,.30), transparent 70%),
radial-gradient(45% 45% at 75% 30%, rgba(236,72,153,.26), transparent 70%),
radial-gradient(50% 50% at 50% 80%, rgba(45,212,191,.24), transparent 70%);
filter: blur(30px);
animation: scd-stick-drift 20s ease-in-out infinite alternate;
pointer-events: none;
}
@keyframes scd-stick-drift {
0% { transform: translate(-3%,-2%) scale(1); }
100% { transform: translate(4%,3%) scale(1.1); }
}
.scd-stick::after {
content: '';
position: fixed; inset: 0; z-index: 0;
background: repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 1px, transparent 1px 3px);
mix-blend-mode: overlay;
pointer-events: none;
}
.scd-stick__scroll-wrap {
position: relative;
z-index: 1;
width: min(460px, 92vw);
margin: 0 auto;
/* vh-based padding matches the source — generous space above + below
the deck so each card has room to pin without crowding the viewport
edges. */
padding: 55vh 0 75vh;
}
.scd-stick__rail {
position: fixed; top: 50%; right: 24px;
transform: translateY(-50%);
z-index: 5;
display: flex; flex-direction: column; gap: 14px;
}
.scd-stick__pip { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.25); transition: all .4s; display: block; }
.scd-stick__pip--on { background: #fff; height: 26px; border-radius: 6px; box-shadow: 0 0 14px rgba(255,255,255,.6); }
.scd-stick__step {
position: sticky;
top: 20vh;
height: 320px;
border-radius: 28px;
padding: 38px;
margin-bottom: 36px;
display: flex; flex-direction: column; justify-content: space-between;
overflow: hidden;
transform-origin: 50% 0;
box-shadow: 0 40px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08) inset;
backdrop-filter: blur(6px);
}
.scd-stick__grad {
position: absolute; inset: 0; z-index: -1;
opacity: .95;
background-size: 200% 200%;
animation: scd-stick-flow 9s ease infinite;
}
@keyframes scd-stick-flow {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.scd-stick__sheen {
position: absolute; top: -50%; left: -30%;
width: 50%; height: 200%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
transform: rotate(18deg);
animation: scd-stick-sweep 6s ease-in-out infinite;
}
@keyframes scd-stick-sweep {
0%, 100% { transform: rotate(18deg) translateX(-300px); }
50% { transform: rotate(18deg) translateX(700px); }
}
.scd-stick__top { display: flex; align-items: center; gap: 14px; }
.scd-stick__idx {
font-family: 'Instrument Serif', serif; font-style: italic;
font-size: 4rem; line-height: .8; opacity: .9;
text-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.scd-stick__chip {
margin-left: auto;
font-size: .62rem; letter-spacing: .22em; text-transform: uppercase;
padding: 7px 14px; border-radius: 999px;
background: rgba(255,255,255,.18);
border: 1px solid rgba(255,255,255,.25);
backdrop-filter: blur(6px);
}
.scd-stick__h2 { font-family: 'Instrument Serif', serif; font-size: 2.4rem; letter-spacing: -.01em; }
.scd-stick__p { opacity: .88; max-width: 32ch; line-height: 1.55; font-weight: 300; }
.scd-stick__bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); overflow: hidden; margin-top: 16px; }
.scd-stick__bar i { display: block; height: 100%; width: 0; background: #fff; border-radius: 4px; transition: width .5s; }
.scd-stick__step--s1 { top: 20vh; }
.scd-stick__step--s1 .scd-stick__grad { background: linear-gradient(135deg,#1e1b4b,#4338ca 45%,#7c3aed); }
.scd-stick__step--s2 { top: 22vh; }
.scd-stick__step--s2 .scd-stick__grad { background: linear-gradient(135deg,#831843,#be185d 45%,#fb7185); }
.scd-stick__step--s3 { top: 24vh; }
.scd-stick__step--s3 .scd-stick__grad { background: linear-gradient(135deg,#064e3b,#0d9488 50%,#34d399); }
.scd-stick__step--s4 { top: 26vh; }
.scd-stick__step--s4 .scd-stick__grad { background: linear-gradient(135deg,#7c2d12,#ea580c 45%,#fbbf24); }
@media (prefers-reduced-motion: reduce) {
.scd-stick::before,
.scd-stick__grad,
.scd-stick__sheen,
.scd-stick__step,
.scd-stick__bar i,
.scd-stick__pip { animation: none !important; transition: none !important; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.scd-stick');
if (!root) return;
const steps = [...root.querySelectorAll('.scd-stick__step')];
const pips = [...root.querySelectorAll('.scd-stick__pip')];
if (!steps.length) return;
function update() {
let active = 0;
steps.forEach((s, i) => {
const r = s.getBoundingClientRect();
const stickTop = window.innerHeight * (0.20 + i * 0.02);
const next = steps[i + 1];
if (next) {
const nr = next.getBoundingClientRect();
const prog = Math.min(Math.max((stickTop + 320 - nr.top) / 320, 0), 1);
s.style.transform = `scale(${1 - prog * 0.10}) translateY(${prog * -8}px)`;
s.style.filter = `brightness(${1 - prog * 0.35})`;
const fill = s.querySelector('.scd-stick__bar i');
if (fill) fill.style.width = (prog * 100) + '%';
} else {
const fill = s.querySelector('.scd-stick__bar i');
if (fill) fill.style.width = '100%';
}
if (r.top <= stickTop + 10) active = i;
});
pips.forEach((p, i) => p.classList.toggle('scd-stick__pip--on', i === active));
}
window.addEventListener('scroll', update, { passive: true });
window.addEventListener('resize', update);
update();
})();
```
### 03. Pure CSS Stacked Card Testimonial Slider
**Type:** Pure CSS
**Description:** A compact social-proof widget built entirely with hidden radio inputs and the :checked selector — zero JavaScript and no heavy slider libraries. The top review sits crisp while the next two peek behind it; clicking the dots cycles a card to the front. Perfect for landing-page testimonial sections where space is at a premium.
**HTML:**
```html
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,500;1,6..72,400&family=Geist:wght@400;500;600&display=swap');
.scd-test, .scd-test *, .scd-test *::before, .scd-test *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-test {
min-height: 460px;
display: grid;
place-items: center;
background: linear-gradient(160deg,#fef6ee,#f4e4d4);
font-family: 'Geist', sans-serif;
}
.scd-test__stage { position: relative; }
.scd-test__radio { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.scd-test__slider { position: relative; width: 330px; height: 300px; }
.scd-test__quote {
position: absolute; inset: 0;
background: #fffdfa;
border-radius: 22px;
padding: 30px;
box-shadow: 0 18px 40px rgba(120,80,50,.18);
border: 1px solid #f0e2d2;
transition: transform .6s cubic-bezier(.3,.9,.3,1), opacity .6s;
display: flex; flex-direction: column; justify-content: space-between;
transform: translateY(28px) scale(.88);
opacity: 0;
z-index: 1;
}
.scd-test__quote p {
font-family: 'Newsreader', serif;
font-style: italic;
font-size: 1.25rem;
line-height: 1.45;
color: #3a2e24;
}
.scd-test__who { display: flex; align-items: center; gap: 12px; }
.scd-test__av { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: block; }
.scd-test__who h4 { font-size: .9rem; font-weight: 600; color: #2a201a; }
.scd-test__who span { font-size: .78rem; color: #9b7d5f; }
.scd-test__radio--r1:checked ~ .scd-test__slider .scd-test__quote--q1,
.scd-test__radio--r2:checked ~ .scd-test__slider .scd-test__quote--q2,
.scd-test__radio--r3:checked ~ .scd-test__slider .scd-test__quote--q3 { transform: translateY(0) scale(1); opacity: 1; z-index: 4; }
.scd-test__radio--r1:checked ~ .scd-test__slider .scd-test__quote--q2,
.scd-test__radio--r2:checked ~ .scd-test__slider .scd-test__quote--q3,
.scd-test__radio--r3:checked ~ .scd-test__slider .scd-test__quote--q1 { transform: translateY(14px) scale(.94); opacity: .55; z-index: 3; }
.scd-test__radio--r1:checked ~ .scd-test__slider .scd-test__quote--q3,
.scd-test__radio--r2:checked ~ .scd-test__slider .scd-test__quote--q1,
.scd-test__radio--r3:checked ~ .scd-test__slider .scd-test__quote--q2 { transform: translateY(28px) scale(.88); opacity: .3; z-index: 2; }
.scd-test__dots { display: flex; gap: 10px; justify-content: center; margin-top: 30px; }
.scd-test__dots label {
width: 11px; height: 11px; border-radius: 50%;
background: #d8c3aa; cursor: pointer;
transition: background .3s, transform .3s;
}
.scd-test__dots label:hover { background: #c9a98a; }
.scd-test__radio--r1:checked ~ .scd-test__dots label[for="scd-test-t1"],
.scd-test__radio--r2:checked ~ .scd-test__dots label[for="scd-test-t2"],
.scd-test__radio--r3:checked ~ .scd-test__dots label[for="scd-test-t3"] { background: #b8553f; transform: scale(1.3); }
@media (prefers-reduced-motion: reduce) {
.scd-test__quote,
.scd-test__dots label { transition: none !important; }
}
```
### 04. 3D Overlapping Stacked Cards (Isometric View)
**Type:** Pure CSS
**Description:** Three pricing tiers floated in a true isometric plane using perspective, rotateX, and rotateZ, each lifted on its own translateZ layer. Hover eases the tilt and slides the upper tiers apart so all three prices stay readable. Suited to SaaS pricing pages, product mockups, and high-tech feature highlights.
**HTML:**
```html
SCALE Unlimited seats · SSO · SLA $79/mo
GROWTH 10 seats · analytics · API $29/mo
STARTER 1 seat · core features $9/mo
HOVER TO COMPARE PLANS
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=DM+Mono:wght@400&display=swap');
.scd-isop, .scd-isop *, .scd-isop *::before, .scd-isop *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-isop {
min-height: 460px;
display: grid;
place-items: center;
background: radial-gradient(circle at 50% 30%,#191d2e,#0a0c14);
font-family: 'DM Mono', monospace;
}
.scd-isop__stage { perspective: 1400px; width: 340px; height: 420px; position: relative; }
.scd-isop__stack {
position: relative;
width: 100%; height: 100%;
transform: rotateX(52deg) rotateZ(-34deg);
transform-style: preserve-3d;
transition: transform .7s cubic-bezier(.3,.9,.3,1);
}
.scd-isop__stage:hover .scd-isop__stack { transform: rotateX(46deg) rotateZ(-28deg); }
.scd-isop__plane {
position: absolute;
left: 50px; top: 120px;
width: 240px; height: 150px;
border-radius: 18px;
padding: 22px;
transform-style: preserve-3d;
box-shadow: 0 36px 60px rgba(0,0,0,.55);
transition: transform .65s cubic-bezier(.3,.9,.3,1);
display: flex; flex-direction: column; justify-content: space-between;
}
.scd-isop__tier { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem; letter-spacing: .04em; }
.scd-isop__feat { font-size: .72rem; opacity: .85; line-height: 1.6; }
.scd-isop__price { font-family: 'Space Grotesk', sans-serif; font-size: 2.1rem; font-weight: 700; line-height: 1; }
.scd-isop__price small { font-size: .85rem; opacity: .7; }
.scd-isop__plane--p1 { background: linear-gradient(135deg,#3a4cf0,#6d7cff); color: #fff; }
.scd-isop__plane--p2 { background: linear-gradient(135deg,#f0466b,#ff7aa0); color: #fff; }
.scd-isop__plane--p3 { background: linear-gradient(135deg,#11b894,#46f0c4); color: #03241c; }
.scd-isop__plane--p3 { transform: translateZ(12px) translate(0,0); }
.scd-isop__plane--p2 { transform: translateZ(24px) translate(0,0); }
.scd-isop__plane--p1 { transform: translateZ(36px) translate(0,0); }
.scd-isop__stage:hover .scd-isop__plane--p1 { transform: translateZ(36px) translate(-150px,-150px); }
.scd-isop__stage:hover .scd-isop__plane--p2 { transform: translateZ(24px) translate(0,0); }
.scd-isop__stage:hover .scd-isop__plane--p3 { transform: translateZ(12px) translate(150px,150px); }
.scd-isop__hint {
position: absolute;
bottom: 10px; left: 50%;
transform: translateX(-50%);
color: #5b6480;
font-size: .72rem;
letter-spacing: .18em;
transition: opacity .4s;
}
.scd-isop__stage:hover .scd-isop__hint { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
.scd-isop__stack,
.scd-isop__plane,
.scd-isop__hint { transition: none !important; }
}
```
### 05. Swipeable / Click-to-Front Stacked Cards
**Type:** CSS + JS
**Description:** A Tinder-style flashcard deck optimized for the web: drag the top card (mouse or touch) past a threshold to send it to the back, or simply click it to cycle through. The stack re-layers smoothly each time. Great for flashcard learning apps, quick-choice discovery widgets, and interactive portfolios.
**HTML:**
```html
01 / 04 DECK
KNOW ✓ AGAIN ↻
Biology Mitosis
Cell division producing two genetically identical daughter cells.
drag · or click for next
KNOW ✓ AGAIN ↻
Physics Photon
A discrete quantum, or packet, of electromagnetic energy — light.
drag · or click for next
KNOW ✓ AGAIN ↻
Thermo Entropy
A measure of disorder; the tendency of systems toward equilibrium.
drag · or click for next
KNOW ✓ AGAIN ↻
Biology Osmosis
Water moving across a semipermeable membrane toward higher solute.
drag · or click for next
swipe right = know · left = review · click to skip
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400&display=swap');
.scd-flash, .scd-flash *, .scd-flash *::before, .scd-flash *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-flash {
position: relative;
min-height: 460px;
display: grid;
place-items: center;
background: #05060a;
font-family: 'Geist', sans-serif;
}
.scd-flash::before {
content: '';
position: absolute; inset: -30%;
background:
radial-gradient(40% 40% at 22% 28%, rgba(56,189,248,.30), transparent 70%),
radial-gradient(45% 45% at 78% 25%, rgba(168,85,247,.28), transparent 70%),
radial-gradient(50% 50% at 50% 82%, rgba(244,114,182,.24), transparent 70%);
filter: blur(26px);
animation: scd-flash-drift 19s ease-in-out infinite alternate;
pointer-events: none;
}
@keyframes scd-flash-drift {
0% { transform: translate(-3%,-2%) scale(1); }
100% { transform: translate(4%,3%) scale(1.1); }
}
.scd-flash::after {
content: '';
position: absolute; inset: 0;
background: repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 1px, transparent 1px 3px);
mix-blend-mode: overlay;
pointer-events: none;
}
.scd-flash__stage { position: relative; width: 280px; height: 380px; perspective: 1300px; z-index: 1; }
.scd-flash__counter {
position: absolute; top: -46px; left: 0; right: 0;
display: flex; align-items: center; justify-content: space-between;
font-family: 'Geist Mono', monospace;
font-size: .72rem; letter-spacing: .15em;
color: rgba(255,255,255,.55);
}
.scd-flash__prog { flex: 1; height: 3px; margin: 0 12px; background: rgba(255,255,255,.15); border-radius: 3px; overflow: hidden; }
.scd-flash__prog i { display: block; height: 100%; background: #fff; border-radius: 3px; transition: width .4s; box-shadow: 0 0 10px rgba(255,255,255,.6); }
.scd-flash__deck { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.scd-flash__card {
position: absolute; inset: 0;
border-radius: 26px;
transform-style: preserve-3d;
cursor: grab;
user-select: none;
overflow: hidden;
box-shadow: 0 30px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.09) inset;
transition: transform .5s cubic-bezier(.16,1,.3,1), opacity .5s, box-shadow .5s;
}
.scd-flash__card.scd-flash__card--drag { transition: none; cursor: grabbing; }
.scd-flash__grad { position: absolute; inset: 0; background-size: 200% 200%; animation: scd-flash-flow 8s ease infinite; }
@keyframes scd-flash-flow {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.scd-flash__glow {
position: absolute; inset: 0;
background: radial-gradient(260px circle at var(--mx,50%) var(--my,40%), rgba(255,255,255,.4), transparent 60%);
mix-blend-mode: soft-light;
opacity: 0;
transition: opacity .4s;
}
.scd-flash__card:hover .scd-flash__glow { opacity: 1; }
.scd-flash__sheen {
position: absolute; top: -50%; left: -30%;
width: 55%; height: 200%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
transform: rotate(18deg) translateX(-260px);
transition: transform .9s cubic-bezier(.16,1,.3,1);
}
.scd-flash__verdict {
position: absolute; top: 24px;
padding: 8px 16px;
border-radius: 12px;
font-family: 'Geist Mono', monospace;
font-size: .85rem; font-weight: 700;
letter-spacing: .1em;
border: 2px solid;
opacity: 0;
transition: opacity .15s;
backdrop-filter: blur(4px);
}
.scd-flash__verdict--know { right: 22px; color: #86efac; border-color: #86efac; transform: rotate(10deg); }
.scd-flash__verdict--again { left: 22px; color: #fca5a5; border-color: #fca5a5; transform: rotate(-10deg); }
.scd-flash__face {
position: absolute; inset: 0;
padding: 30px;
display: flex; flex-direction: column; justify-content: space-between;
transform: translateZ(40px);
color: #fff;
}
.scd-flash__tag {
font-family: 'Geist Mono', monospace;
font-size: .62rem; letter-spacing: .22em; text-transform: uppercase;
padding: 6px 12px; border-radius: 999px;
background: rgba(255,255,255,.16);
border: 1px solid rgba(255,255,255,.24);
align-self: flex-start;
backdrop-filter: blur(6px);
}
.scd-flash__term {
font-family: 'Instrument Serif', serif;
font-size: 2.7rem; line-height: 1; letter-spacing: -.01em;
text-shadow: 0 3px 18px rgba(0,0,0,.3);
}
.scd-flash__def { font-size: .9rem; opacity: .9; line-height: 1.5; font-weight: 300; }
.scd-flash__fliphint { font-family: 'Geist Mono', monospace; font-size: .62rem; letter-spacing: .18em; opacity: .6; }
.scd-flash__card--g1 .scd-flash__grad { background: linear-gradient(135deg,#831843,#db2777 45%,#fb7185); }
.scd-flash__card--g2 .scd-flash__grad { background: linear-gradient(135deg,#0c4a6e,#0284c7 45%,#38bdf8); }
.scd-flash__card--g3 .scd-flash__grad { background: linear-gradient(135deg,#064e3b,#059669 50%,#34d399); }
.scd-flash__card--g4 .scd-flash__grad { background: linear-gradient(135deg,#581c87,#7c3aed 45%,#a78bfa); }
.scd-flash__hint {
position: absolute; bottom: -46px; left: 0; right: 0;
text-align: center;
font-family: 'Geist Mono', monospace;
color: rgba(255,255,255,.5);
font-size: .7rem;
letter-spacing: .12em;
}
.scd-flash__hint b { color: #86efac; }
.scd-flash__hint i { color: #fca5a5; font-style: normal; }
@media (prefers-reduced-motion: reduce) {
.scd-flash::before,
.scd-flash__grad,
.scd-flash__sheen,
.scd-flash__card,
.scd-flash__prog i { animation: none !important; transition: none !important; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.scd-flash');
if (!root) return;
const stage = root.querySelector('[data-scd-flash="stage"]');
const deck = root.querySelector('[data-scd-flash="deck"]');
const posEl = root.querySelector('[data-scd-flash="pos"]');
const barEl = root.querySelector('[data-scd-flash="bar"]');
if (!stage || !deck) return;
const total = deck.querySelectorAll('.scd-flash__card').length;
let done = 0;
function meter() {
const current = Math.min(done + 1, total);
if (posEl) posEl.textContent = String(current).padStart(2, '0') + ' / ' + String(total).padStart(2, '0');
if (barEl) barEl.style.width = (done / total * 100) + '%';
}
function layout(instant) {
const cards = [...deck.querySelectorAll('.scd-flash__card')];
cards.forEach((c, i) => {
const d = cards.length - 1 - i;
const tf = `translateY(${d * -14}px) translateZ(${-d * 30}px) scale(${1 - d * .05})`;
if (instant) {
const t = c.style.transition;
c.style.transition = 'none';
c.style.transform = tf;
void c.offsetWidth;
c.style.transition = t;
} else {
c.style.transform = tf;
}
c.style.zIndex = i + 1;
c.style.opacity = d > 3 ? 0 : 1;
c.style.filter = `brightness(${1 - d * .12})`;
});
}
function sendBack(card, dir) {
done++; meter();
card.style.transform = `translateX(${dir * 480}px) rotate(${dir * 22}deg)`;
card.style.opacity = '0';
setTimeout(() => {
card.style.transition = 'none';
deck.insertBefore(card, deck.firstElementChild);
card.style.opacity = '';
card.style.filter = '';
const k = card.querySelector('.scd-flash__verdict--know');
const a = card.querySelector('.scd-flash__verdict--again');
if (k) k.style.opacity = 0;
if (a) a.style.opacity = 0;
layout(true);
void card.offsetWidth;
card.style.transition = '';
if (done >= total) done = 0;
meter(); bind();
}, 420);
}
let activeTop = null;
let sx = 0, dx = 0, drag = false, moved = false;
let know = null, again = null;
function onDown(e) {
drag = true; moved = false;
sx = (e.touches ? e.touches[0].clientX : e.clientX);
if (activeTop) activeTop.classList.add('scd-flash__card--drag');
}
function onMove(e) {
if (!drag || !activeTop) return;
dx = (e.touches ? e.touches[0].clientX : e.clientX) - sx;
if (Math.abs(dx) > 5) moved = true;
activeTop.style.transform = `translateX(${dx}px) rotate(${dx * .05}deg)`;
if (know) know.style.opacity = Math.max(0, Math.min(1, dx / 90));
if (again) again.style.opacity = Math.max(0, Math.min(1, -dx / 90));
}
function onUp() {
if (!drag || !activeTop) return;
drag = false;
activeTop.classList.remove('scd-flash__card--drag');
if (!moved) { sendBack(activeTop, -1); return; }
if (Math.abs(dx) > 100) {
sendBack(activeTop, dx > 0 ? 1 : -1);
} else {
if (know) know.style.opacity = 0;
if (again) again.style.opacity = 0;
layout();
}
dx = 0;
}
function bind() {
const cards = [...deck.querySelectorAll('.scd-flash__card')];
const top = cards[cards.length - 1];
if (!top) return;
activeTop = top;
know = top.querySelector('.scd-flash__verdict--know');
again = top.querySelector('.scd-flash__verdict--again');
top.onmousedown = onDown;
top.ontouchstart = onDown;
}
root.addEventListener('mousemove', onMove);
root.addEventListener('touchmove', onMove, { passive: true });
root.addEventListener('mouseup', onUp);
root.addEventListener('touchend', onUp);
root.addEventListener('mouseleave', onUp);
stage.addEventListener('mousemove', (e) => {
stage.querySelectorAll('.scd-flash__card').forEach((c) => {
const r = c.getBoundingClientRect();
c.style.setProperty('--mx', ((e.clientX - r.left) / r.width * 100) + '%');
c.style.setProperty('--my', ((e.clientY - r.top) / r.height * 100) + '%');
});
});
meter(); layout(); bind();
})();
```
### 06. Minimalist Bento Grid Stacked Cards
**Type:** Pure CSS
**Description:** A dark, dashboard-style bento grid where one tile embeds a stacked mini-card component to conserve space — channel breakdowns sit collapsed inside a single cell and fan open on hover, while neighboring tiles show stats, a sparkline, and glow accents. Built for analytics dashboards and content-dense grids where stacking saves container real estate.
**HTML:**
```html
Channels
Organic 62%
Paid 24%
Referral 14%
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap');
.scd-bento, .scd-bento *, .scd-bento *::before, .scd-bento *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-bento {
min-height: 460px;
display: grid;
place-items: center;
background: #0e0f13;
font-family: 'Geist', sans-serif;
padding: 20px;
}
.scd-bento__stage {
display: grid;
grid-template-columns: repeat(3, 118px);
grid-template-rows: repeat(3, 118px);
gap: 12px;
}
.scd-bento__tile {
background: #191b22;
border: 1px solid #262934;
border-radius: 18px;
padding: 16px;
position: relative;
overflow: hidden;
transition: border-color .3s;
}
.scd-bento__tile:hover { border-color: #3a4050; }
.scd-bento__lbl { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #6b7280; }
.scd-bento__val { font-size: 1.6rem; font-weight: 700; color: #f3f4f6; margin-top: 4px; }
.scd-bento__val small { font-size: .8rem; color: #34d399; }
.scd-bento__tile--wide { grid-column: span 2; }
.scd-bento__tile--tall { grid-row: span 2; }
.scd-bento__tile--channels { overflow: visible; z-index: 5; }
.scd-bento__tile--channels:hover { z-index: 20; }
.scd-bento__substack {
position: absolute;
bottom: 14px; left: 16px; right: 16px;
height: 54px;
}
.scd-bento__mini {
position: absolute;
left: 0; right: 0;
height: 54px;
border-radius: 12px;
padding: 8px 12px;
font-size: .72rem;
color: #fff;
box-shadow: 0 8px 18px rgba(0,0,0,.55);
transition: transform .45s cubic-bezier(.3,.9,.3,1);
}
.scd-bento__mini .scd-bento__lbl { color: rgba(255,255,255,.85); }
.scd-bento__mini b { font-size: .95rem; display: block; margin-top: 2px; }
.scd-bento__mini--m1 { background: linear-gradient(135deg,#6366f1,#818cf8); z-index: 3; transform: translateY(0); }
.scd-bento__mini--m2 { background: linear-gradient(135deg,#ec4899,#f472b6); z-index: 2; transform: translateY(8px) scale(.95); }
.scd-bento__mini--m3 { background: linear-gradient(135deg,#14b8a6,#2dd4bf); z-index: 1; transform: translateY(16px) scale(.9); }
.scd-bento__tile--channels:hover .scd-bento__mini--m1 { transform: translateY(-120px); }
.scd-bento__tile--channels:hover .scd-bento__mini--m2 { transform: translateY(-58px) scale(1); }
.scd-bento__tile--channels:hover .scd-bento__mini--m3 { transform: translateY(4px) scale(1); }
.scd-bento__spark {
display: flex;
align-items: flex-end;
gap: 4px;
height: 34px;
margin-top: 10px;
}
.scd-bento__spark span { flex: 1; background: linear-gradient(#34d399,#059669); border-radius: 3px; }
.scd-bento__glow {
position: absolute;
width: 90px; height: 90px;
border-radius: 50%;
filter: blur(40px);
opacity: .5;
top: -20px; right: -20px;
}
@media (prefers-reduced-motion: reduce) {
.scd-bento__tile,
.scd-bento__mini { transition: none !important; }
}
```
### 07. Classic Deck
**Type:** Pure CSS
**Description:** A casino-green felt table holds a face-up poker hand. Hover and the five cards arc outward into a clean fan, with gold-foil borders and Playfair Display pips. A timeless, tactile take on the standard stacked deck.
**HTML:**
```html
A♠ ♠ A♠
K♥ ♥ K♥
Q♦ ♦ Q♦
J♣ ♣ J♣
10♠ ♠ 10♠
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;1,500&family=Cormorant+Garamond:wght@500&display=swap');
.scd-deck, .scd-deck *, .scd-deck *::before, .scd-deck *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-deck {
position: relative;
min-height: 460px;
display: grid;
place-items: center;
background: radial-gradient(circle at 50% 30%,#16432e,#0a2419 70%);
font-family: 'Cormorant Garamond', serif;
}
.scd-deck__felt {
position: absolute; inset: 0;
background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 2px, transparent 2px 6px);
pointer-events: none;
}
.scd-deck__stage { position: relative; width: 240px; height: 340px; }
.scd-deck__card {
position: absolute; inset: 0;
border-radius: 16px;
background: linear-gradient(160deg,#fffdf6,#f3ead4);
box-shadow: 0 18px 40px rgba(0,0,0,.45), inset 0 0 0 2px #c9a227, inset 0 0 0 7px #fffdf6;
display: flex; align-items: center; justify-content: center;
transition: transform .65s cubic-bezier(.2,.9,.25,1), box-shadow .5s;
cursor: pointer;
}
.scd-deck__card .scd-deck__corner {
position: absolute; top: 14px; left: 16px;
font-family: 'Playfair Display', serif; font-size: 1.5rem; color: #9b1b1b;
}
.scd-deck__card .scd-deck__corner.scd-deck__corner--br {
top: auto; left: auto; bottom: 14px; right: 16px; transform: rotate(180deg);
}
.scd-deck__pip { font-size: 4.5rem; color: #9b1b1b; font-family: 'Playfair Display', serif; }
.scd-deck__card:nth-child(1) { transform: translateY(0) rotate(0deg); z-index: 5; }
.scd-deck__card:nth-child(2) { transform: translateY(4px) translateX(3px) rotate(2deg); z-index: 4; filter: brightness(.96); }
.scd-deck__card:nth-child(3) { transform: translateY(8px) translateX(6px) rotate(4deg); z-index: 3; filter: brightness(.92); }
.scd-deck__card:nth-child(4) { transform: translateY(12px) translateX(9px) rotate(6deg); z-index: 2; filter: brightness(.88); }
.scd-deck__card:nth-child(5) { transform: translateY(16px) translateX(12px) rotate(8deg); z-index: 1; filter: brightness(.84); }
.scd-deck__stage:hover .scd-deck__card:nth-child(1) { transform: translateY(-30px) rotate(-12deg) translateX(-90px); }
.scd-deck__stage:hover .scd-deck__card:nth-child(2) { transform: translateY(-15px) rotate(-6deg) translateX(-45px); }
.scd-deck__stage:hover .scd-deck__card:nth-child(3) { transform: translateY(0) rotate(0deg); }
.scd-deck__stage:hover .scd-deck__card:nth-child(4) { transform: translateY(-15px) rotate(6deg) translateX(45px); }
.scd-deck__stage:hover .scd-deck__card:nth-child(5) { transform: translateY(-30px) rotate(12deg) translateX(90px); }
.scd-deck__card:hover { box-shadow: 0 30px 60px rgba(0,0,0,.55), inset 0 0 0 2px #c9a227, inset 0 0 0 7px #fffdf6; }
@media (prefers-reduced-motion: reduce) {
.scd-deck__card { transition: none !important; }
}
```
### 08. Fan Spread
**Type:** Pure CSS
**Description:** Botanical "leaf" cards anchored to a single pivot point. On hover they splay open like a hand of playing cards or a folding fan, alternating terracotta and forest-green tones. Great for portfolios, plant shops, or category menus.
**HTML:**
```html
Fern Pteridophyta
Sage Salvia
Ivy Hedera
Thyme Thymus
Moss Bryophyta
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Spectral:wght@400&display=swap');
.scd-fan, .scd-fan *, .scd-fan *::before, .scd-fan *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-fan {
min-height: 460px;
display: grid;
place-items: center;
background: linear-gradient(135deg,#f4ede1,#e6dcc6);
font-family: 'Spectral', serif;
}
.scd-fan__stage {
position: relative;
width: 200px; height: 280px;
transform: translateY(60px);
}
.scd-fan__leaf {
position: absolute; inset: 0;
border-radius: 14px 14px 60px 60px;
background: linear-gradient(165deg,#1f4d3a,#2d6e4f);
box-shadow: 0 16px 30px rgba(31,77,58,.35);
transform-origin: 50% 110%;
transition: transform .7s cubic-bezier(.34,1.4,.4,1);
display: flex; flex-direction: column; justify-content: flex-end;
padding: 22px;
color: #e9f3ec;
border: 1px solid rgba(255,255,255,.15);
}
.scd-fan__leaf h3 { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 600; }
.scd-fan__leaf span { font-size: .8rem; opacity: .7; letter-spacing: .18em; text-transform: uppercase; }
.scd-fan__leaf:nth-child(odd) { background: linear-gradient(165deg,#7a3b2e,#a8543f); }
.scd-fan__leaf:nth-child(1) { transform: rotate(-40deg); }
.scd-fan__leaf:nth-child(2) { transform: rotate(-20deg); }
.scd-fan__leaf:nth-child(3) { transform: rotate(0deg); }
.scd-fan__leaf:nth-child(4) { transform: rotate(20deg); }
.scd-fan__leaf:nth-child(5) { transform: rotate(40deg); }
.scd-fan__stage:hover .scd-fan__leaf:nth-child(1) { transform: rotate(-72deg); }
.scd-fan__stage:hover .scd-fan__leaf:nth-child(2) { transform: rotate(-36deg); }
.scd-fan__stage:hover .scd-fan__leaf:nth-child(3) { transform: rotate(0deg) translateY(-12px); }
.scd-fan__stage:hover .scd-fan__leaf:nth-child(4) { transform: rotate(36deg); }
.scd-fan__stage:hover .scd-fan__leaf:nth-child(5) { transform: rotate(72deg); }
@media (prefers-reduced-motion: reduce) {
.scd-fan__leaf { transition: none !important; }
}
```
### 09. Tilted Polaroids
**Type:** Pure CSS
**Description:** A scattered pile of instant photos with handwritten Caveat captions on a dotted dark surface. Hovering scatters them across the canvas, each lifting and rotating independently. Ideal for galleries, travel logs, and memory boards.
**HTML:**
```html
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600&family=Courier+Prime&display=swap');
.scd-pol, .scd-pol *, .scd-pol *::before, .scd-pol *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-pol {
min-height: 460px;
display: grid;
place-items: center;
background: #2b2622 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='%232b2622'/%3E%3Ccircle cx='6' cy='6' r='.6' fill='%23413a32'/%3E%3C/svg%3E");
font-family: 'Courier Prime', monospace;
}
.scd-pol__stage { position: relative; width: 230px; height: 270px; }
.scd-pol__polaroid {
position: absolute; inset: 0;
background: #fbf8f0;
padding: 14px 14px 56px;
border-radius: 3px;
box-shadow: 0 12px 28px rgba(0,0,0,.5);
transition: transform .55s cubic-bezier(.2,.8,.3,1.2), box-shadow .4s;
cursor: pointer;
}
.scd-pol__photo { width: 100%; height: 170px; border-radius: 2px; }
.scd-pol__cap {
font-family: 'Caveat', cursive;
font-size: 1.5rem; color: #3a342c;
text-align: center; margin-top: 10px;
}
.scd-pol__polaroid:nth-child(1) { transform: rotate(-8deg); z-index: 1; }
.scd-pol__polaroid:nth-child(2) { transform: rotate(5deg); z-index: 2; }
.scd-pol__polaroid:nth-child(3) { transform: rotate(-3deg); z-index: 3; }
.scd-pol__polaroid:nth-child(4) { transform: rotate(9deg); z-index: 4; }
.scd-pol__stage:hover .scd-pol__polaroid:nth-child(1) { transform: rotate(-22deg) translate(-110px,28px); }
.scd-pol__stage:hover .scd-pol__polaroid:nth-child(2) { transform: rotate(-7deg) translate(-38px,-10px); }
.scd-pol__stage:hover .scd-pol__polaroid:nth-child(3) { transform: rotate(8deg) translate(38px,-6px); }
.scd-pol__stage:hover .scd-pol__polaroid:nth-child(4) { transform: rotate(20deg) translate(112px,26px); }
.scd-pol__polaroid:hover { box-shadow: 0 26px 50px rgba(0,0,0,.6); z-index: 9 !important; }
.scd-pol__photo--p1 { background: linear-gradient(135deg,#f5a06b,#e2674a); }
.scd-pol__photo--p2 { background: linear-gradient(135deg,#6bb0c4,#3d7d98); }
.scd-pol__photo--p3 { background: linear-gradient(135deg,#9bbf6b,#5f9145); }
.scd-pol__photo--p4 { background: linear-gradient(135deg,#c98bbf,#8d5894); }
@media (prefers-reduced-motion: reduce) {
.scd-pol__polaroid { transition: none !important; }
}
```
### 10. Staircase Bricks
**Type:** Pure CSS
**Description:** Bold offset blocks descend like a staircase, each a saturated step in a sunset gradient. Hover snaps them into vertical alignment; individual hover lifts a single brick. Strong for process steps, pricing tiers, or feature lists.
**HTML:**
```html
Foundation01
Framework02
Structure03
Facade04
Rooftop05
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Archivo:wght@500&display=swap');
.scd-brick, .scd-brick *, .scd-brick *::before, .scd-brick *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-brick {
min-height: 460px;
display: grid;
place-items: center;
background: #0e0e12;
font-family: 'Archivo', sans-serif;
}
.scd-brick__stage {
position: relative;
width: 320px; height: 300px;
perspective: 1200px;
}
.scd-brick__brick {
position: absolute; left: 0;
width: 240px; height: 64px;
border-radius: 8px;
display: flex; align-items: center;
padding: 0 22px;
color: #0e0e12;
font-family: 'Archivo Black', sans-serif;
font-size: 1.1rem; letter-spacing: .02em;
box-shadow: 0 10px 0 rgba(0,0,0,.35);
transition: transform .5s cubic-bezier(.3,.9,.3,1), box-shadow .5s;
cursor: pointer;
}
.scd-brick__brick:nth-child(1) { top: 0; background: #f8d44c; transform: translateX(0); z-index: 5; }
.scd-brick__brick:nth-child(2) { top: 52px; background: #f59a3c; transform: translateX(24px); z-index: 4; }
.scd-brick__brick:nth-child(3) { top: 104px; background: #ee6f5e; transform: translateX(48px); z-index: 3; }
.scd-brick__brick:nth-child(4) { top: 156px; background: #d65b88; transform: translateX(72px); z-index: 2; }
.scd-brick__brick:nth-child(5) { top: 208px; background: #8d5fb0; transform: translateX(96px); z-index: 1; color: #fff; }
.scd-brick__stage:hover .scd-brick__brick { transform: translateX(0) !important; }
.scd-brick__brick:hover {
transform: translateX(0) translateY(-8px) scale(1.04) !important;
box-shadow: 0 18px 0 rgba(0,0,0,.4);
}
.scd-brick__num { margin-left: auto; opacity: .55; }
@media (prefers-reduced-motion: reduce) {
.scd-brick__brick { transition: none !important; }
}
```
### 11. Perspective Deck
**Type:** Pure CSS
**Description:** A tunnel of glassmorphic sci-fi panels receding into depth with neon edges. Hover tilts the whole stack in 3D and pushes the front card toward you. Suited to dashboards, status boards, and tech product pages.
**HTML:**
```html
SECTOR 01 Active node // online
SECTOR 02 Buffered // standby
SECTOR 04 Archived // sleep
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600&family=Rajdhani:wght@500&display=swap');
.scd-persp, .scd-persp *, .scd-persp *::before, .scd-persp *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-persp {
min-height: 460px;
display: grid;
place-items: center;
background: radial-gradient(circle at 50% 50%,#10131f,#05060a);
font-family: 'Rajdhani', sans-serif;
}
.scd-persp__stage {
perspective: 900px;
width: 300px; height: 380px;
}
.scd-persp__deck {
position: relative; width: 100%; height: 100%;
transform-style: preserve-3d;
transition: transform .8s ease;
}
.scd-persp__card {
position: absolute; inset: 0;
border-radius: 20px;
background: linear-gradient(155deg,rgba(40,52,90,.9),rgba(18,22,40,.95));
border: 1px solid rgba(120,170,255,.35);
box-shadow: 0 0 40px rgba(70,120,255,.18);
display: flex; flex-direction: column; justify-content: flex-end;
padding: 26px; color: #cfe0ff;
backdrop-filter: blur(2px);
transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .8s;
}
.scd-persp__card h3 { font-family: 'Orbitron', sans-serif; font-size: 1.3rem; letter-spacing: .08em; }
.scd-persp__card p { opacity: .6; font-size: .95rem; letter-spacing: .05em; }
.scd-persp__card:nth-child(1) { transform: translateZ(0px); }
.scd-persp__card:nth-child(2) { transform: translateZ(-80px) translateY(-26px); opacity: .85; }
.scd-persp__card:nth-child(3) { transform: translateZ(-160px) translateY(-52px); opacity: .6; }
.scd-persp__card:nth-child(4) { transform: translateZ(-240px) translateY(-78px); opacity: .4; }
.scd-persp__stage:hover .scd-persp__deck { transform: rotateX(18deg) rotateY(-12deg); }
.scd-persp__stage:hover .scd-persp__card:nth-child(1) { transform: translateZ(60px); }
@media (prefers-reduced-motion: reduce) {
.scd-persp__deck, .scd-persp__card { transition: none !important; }
}
```
### 12. Hover Spread
**Type:** Pure CSS
**Description:** Three rounded pastel product cards that fan left, center, and right on hover. Soft candy gradients with a Syne display face. Perfect for product showcases, plans, or color/variant pickers.
**HTML:**
```html
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:wght@400;500&display=swap');
.scd-hov, .scd-hov *, .scd-hov *::before, .scd-hov *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-hov {
min-height: 460px;
display: grid;
place-items: center;
background: linear-gradient(120deg,#ffe3ec,#e4e9ff);
font-family: 'DM Sans', sans-serif;
}
.scd-hov__stage { position: relative; width: 200px; height: 280px; }
.scd-hov__card {
position: absolute; inset: 0;
border-radius: 24px;
padding: 24px;
display: flex; flex-direction: column; justify-content: space-between;
box-shadow: 0 14px 34px rgba(80,60,120,.2);
transition: transform .55s cubic-bezier(.34,1.3,.4,1), box-shadow .4s;
cursor: pointer;
color: #3a2f4a;
}
.scd-hov__card h3 { font-family: 'Syne', sans-serif; font-size: 1.5rem; }
.scd-hov__price { font-family: 'Syne', sans-serif; font-size: 1.8rem; font-weight: 800; }
.scd-hov__tag { font-size: .85rem; opacity: .7; }
.scd-hov__card--c1 { background: linear-gradient(160deg,#fff0a8,#ffd56b); z-index: 3; }
.scd-hov__card--c2 { background: linear-gradient(160deg,#c2f0d8,#86d9b0); z-index: 2; }
.scd-hov__card--c3 { background: linear-gradient(160deg,#cfd6ff,#9aa8ff); z-index: 1; color: #2a2a4a; }
.scd-hov__stage:hover .scd-hov__card--c1 { transform: translateX(-130px) rotate(-8deg); }
.scd-hov__stage:hover .scd-hov__card--c3 { transform: translateX(130px) rotate(8deg); }
.scd-hov__stage:hover .scd-hov__card--c2 { transform: translateY(-16px) scale(1.05); }
.scd-hov__card:hover { box-shadow: 0 26px 50px rgba(80,60,120,.32); }
@media (prefers-reduced-motion: reduce) {
.scd-hov__card { transition: none !important; }
}
```
### 13. Cascade Lift
**Type:** Pure CSS
**Description:** A waterfall of status rows that gently spreads apart on hover, with colored status dots. Individual rows scale and slide on hover. Built for activity feeds, kanban summaries, or pipeline views.
**HTML:**
```html
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700&family=Inter+Tight:wght@400&display=swap');
.scd-casc, .scd-casc *, .scd-casc *::before, .scd-casc *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-casc {
min-height: 460px;
display: grid;
place-items: center;
background: linear-gradient(180deg,#071a2b,#0d3047);
font-family: 'Inter Tight', sans-serif;
}
.scd-casc__stage { position: relative; width: 260px; height: 320px; }
.scd-casc__card {
position: absolute; left: 0; right: 0;
height: 90px; border-radius: 18px;
padding: 18px 22px;
background: linear-gradient(135deg,rgba(255,255,255,.95),rgba(220,235,250,.9));
box-shadow: 0 14px 30px rgba(0,0,0,.4);
display: flex; align-items: center; gap: 16px;
transition: transform .5s cubic-bezier(.3,.85,.3,1), box-shadow .4s, top .5s cubic-bezier(.3,.85,.3,1);
cursor: pointer;
color: #0d3047;
}
.scd-casc__dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.scd-casc__card h3 { font-family: 'Sora', sans-serif; font-size: 1.05rem; }
.scd-casc__card p { font-size: .8rem; opacity: .6; }
.scd-casc__card:nth-child(1) { top: 0; z-index: 5; }
.scd-casc__card:nth-child(2) { top: 54px; z-index: 4; filter: brightness(.97); }
.scd-casc__card:nth-child(3) { top: 108px; z-index: 3; filter: brightness(.94); }
.scd-casc__card:nth-child(4) { top: 162px; z-index: 2; filter: brightness(.91); }
.scd-casc__card:nth-child(5) { top: 216px; z-index: 1; filter: brightness(.88); }
.scd-casc__stage:hover .scd-casc__card:nth-child(1) { top: -8px; }
.scd-casc__stage:hover .scd-casc__card:nth-child(2) { top: 64px; }
.scd-casc__stage:hover .scd-casc__card:nth-child(3) { top: 136px; }
.scd-casc__stage:hover .scd-casc__card:nth-child(4) { top: 208px; }
.scd-casc__stage:hover .scd-casc__card:nth-child(5) { top: 280px; }
.scd-casc__card:hover {
transform: scale(1.06) translateX(10px);
box-shadow: 0 22px 44px rgba(0,0,0,.5);
z-index: 9 !important;
}
@media (prefers-reduced-motion: reduce) {
.scd-casc__card { transition: none !important; }
}
```
### 14. Peel Back
**Type:** Pure CSS
**Description:** The top sticker-card curls away at the corner like peeling a label, revealing layers beneath. Vivid gradients with a folded-corner shadow. Eye-catching for reveals, "what’s inside" teasers, or onboarding.
**HTML:**
```html
Layer C Bottom of the stack
Peel me Hover to lift the top
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@700;800&family=Outfit:wght@400&display=swap');
.scd-peel, .scd-peel *, .scd-peel *::before, .scd-peel *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-peel {
min-height: 460px;
display: grid;
place-items: center;
background: #ececec;
font-family: 'Outfit', sans-serif;
}
.scd-peel__stage { position: relative; width: 260px; height: 340px; }
.scd-peel__card {
position: absolute; inset: 0;
border-radius: 22px;
box-shadow: 0 12px 26px rgba(0,0,0,.18);
transition: transform .7s cubic-bezier(.2,.8,.2,1), border-radius .7s;
transform-origin: top right;
cursor: pointer;
overflow: hidden;
}
.scd-peel__inner {
position: absolute; inset: 0;
padding: 30px;
display: flex; flex-direction: column; justify-content: flex-end;
color: #fff;
}
.scd-peel__card h3 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 2rem; line-height: 1; }
.scd-peel__card p { opacity: .85; margin-top: 6px; }
.scd-peel__card--c1 { background: linear-gradient(150deg,#ff6a3d,#f9484a); z-index: 3; }
.scd-peel__card--c2 { background: linear-gradient(150deg,#1fa2ff,#12d8fa); z-index: 2; }
.scd-peel__card--c3 { background: linear-gradient(150deg,#43e97b,#38f9d7); z-index: 1; color: #063; }
.scd-peel__stage:hover .scd-peel__card--c1 {
transform: rotate(-14deg) translate(-30px,-30px) scale(.78);
border-radius: 22px 22px 22px 90px;
box-shadow: -20px 20px 40px rgba(0,0,0,.3);
}
.scd-peel__stage:hover .scd-peel__card--c2 { transform: translateY(-10px); }
@media (prefers-reduced-motion: reduce) {
.scd-peel__card { transition: none !important; }
}
```
### 15. Accordion Spread
**Type:** Pure CSS
**Description:** Vertical color panels that expand horizontally on hover to reveal a title and subtitle. Clean, gallery-style, four-tone gradient set. Useful for category navigation, image galleries, or feature highlights.
**HTML:**
```html
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@600&family=Manrope:wght@400;600&display=swap');
.scd-accs, .scd-accs *, .scd-accs *::before, .scd-accs *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-accs {
min-height: 460px;
display: grid;
place-items: center;
background: #14101a;
font-family: 'Manrope', sans-serif;
}
.scd-accs__stage {
display: flex; gap: 10px; height: 300px;
}
.scd-accs__panel {
position: relative;
width: 64px;
border-radius: 18px;
overflow: hidden;
cursor: pointer;
transition: width .55s cubic-bezier(.3,.9,.3,1);
display: flex; align-items: flex-end;
}
.scd-accs__panel:hover { width: 240px; }
.scd-accs__label { position: absolute; bottom: 24px; left: 24px; color: #fff; }
.scd-accs__label h3 { font-family: 'Unbounded', sans-serif; font-size: 1.3rem; white-space: nowrap; }
.scd-accs__label p { opacity: 0; font-size: .85rem; transition: opacity .4s .2s; white-space: nowrap; }
.scd-accs__panel:hover .scd-accs__label p { opacity: .8; }
.scd-accs__panel--p1 { background: linear-gradient(160deg,#ff9a3c,#ff5e62); }
.scd-accs__panel--p2 { background: linear-gradient(160deg,#c471f5,#7f53ac); }
.scd-accs__panel--p3 { background: linear-gradient(160deg,#00d2ff,#3a7bd5); }
.scd-accs__panel--p4 { background: linear-gradient(160deg,#11998e,#38ef7d); }
@media (prefers-reduced-motion: reduce) {
.scd-accs__panel, .scd-accs__label p { transition: none !important; }
}
```
### 16. Shuffle Reveal
**Type:** CSS + JS
**Description:** Click the top card and it slides off, cycling to the back as the stack re-layers. Functional, animated card rotation with bold gradients. Ideal for "next item," flashcards, or browsing queues.
**HTML:**
```html
A CLICK TO SHUFFLE
B NEXT UP
C WAITING
D LAST
click the top card
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@600&family=Space+Mono&display=swap');
@import url('https://fonts.cdnfonts.com/css/clash-display');
.scd-shuf, .scd-shuf *, .scd-shuf *::before, .scd-shuf *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-shuf {
min-height: 460px;
display: grid;
place-items: center;
background: radial-gradient(circle at 30% 20%,#2a1a3e,#120a1c);
font-family: 'Space Mono', monospace;
}
.scd-shuf__stage { position: relative; width: 240px; height: 330px; }
.scd-shuf__card {
position: absolute; inset: 0;
border-radius: 20px;
display: flex; flex-direction: column; justify-content: center; align-items: center;
color: #fff;
box-shadow: 0 16px 40px rgba(0,0,0,.5);
transition: transform .55s cubic-bezier(.3,.85,.3,1), opacity .55s;
cursor: pointer;
}
.scd-shuf__big { font-size: 4rem; font-weight: 700; font-family: 'Clash Display', sans-serif; }
.scd-shuf__sub { letter-spacing: .3em; opacity: .6; font-size: .75rem; margin-top: 8px; }
.scd-shuf__card--c1 { background: linear-gradient(150deg,#f857a6,#ff5858); }
.scd-shuf__card--c2 { background: linear-gradient(150deg,#4776e6,#8e54e9); }
.scd-shuf__card--c3 { background: linear-gradient(150deg,#11998e,#38ef7d); color: #053; }
.scd-shuf__card--c4 { background: linear-gradient(150deg,#f7971e,#ffd200); color: #623; }
.scd-shuf__hint {
position: absolute; bottom: -40px; width: 100%;
text-align: center; color: #9d8ab0; font-size: .8rem;
}
@media (prefers-reduced-motion: reduce) {
.scd-shuf__card { transition: none !important; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.scd-shuf');
if (!root) return;
const stack = root.querySelector('[data-scd-shuf="stage"]');
if (!stack) return;
function layout() {
const cards = [...stack.querySelectorAll('.scd-shuf__card')];
cards.forEach((c, i) => {
c.style.transform = `translateY(${i * 10}px) scale(${1 - i * 0.04})`;
c.style.zIndex = cards.length - i;
c.style.opacity = 1 - i * 0.12;
});
}
layout();
stack.addEventListener('click', () => {
const top = stack.querySelector('.scd-shuf__card');
if (!top) return;
top.style.transform = 'translateX(-320px) rotate(-18deg)';
setTimeout(() => { stack.appendChild(top); layout(); }, 350);
});
})();
```
### 17. Tab Stack
**Type:** Pure CSS
**Description:** Manila file folders with offset colored tabs, like a physical filing cabinet. Hover fans the folders down; individual hover lifts one. Great for document archives, year-based organization, or categories.
**HTML:**
```html
2026 Active Projects Current quarter deliverables and ongoing client work in progress.
2025 Completed Archived and signed-off work from the previous fiscal year.
LEGACY Reference Older documentation kept for historical reference only.
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@600;700&family=IBM+Plex+Mono&display=swap');
.scd-tab, .scd-tab *, .scd-tab *::before, .scd-tab *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-tab {
min-height: 460px;
display: grid;
place-items: center;
background: #d9cfc0;
font-family: 'IBM Plex Mono', monospace;
}
.scd-tab__stage { position: relative; width: 300px; height: 340px; }
.scd-tab__folder {
position: absolute; left: 0; right: 0; height: 300px;
border-radius: 6px 6px 10px 10px;
background: #f4ecd8;
box-shadow: 0 -2px 0 rgba(0,0,0,.05), 0 14px 24px rgba(60,40,20,.2);
transition: transform .45s cubic-bezier(.3,.9,.3,1);
cursor: pointer;
padding: 46px 26px;
}
.scd-tab__tab {
position: absolute; top: -26px;
height: 30px; width: 110px;
border-radius: 8px 8px 0 0;
display: flex; align-items: center; justify-content: center;
font-family: 'Libre Franklin', sans-serif; font-weight: 700;
font-size: .8rem; color: #fff; letter-spacing: .05em;
}
.scd-tab__folder h3 { font-family: 'Libre Franklin', sans-serif; font-weight: 700; color: #3a2e1c; font-size: 1.2rem; margin-bottom: 8px; }
.scd-tab__folder p { font-size: .8rem; color: #6b5840; line-height: 1.5; }
.scd-tab__folder--f1 { bottom: 0; z-index: 1; } .scd-tab__folder--f1 .scd-tab__tab { left: 14px; background: #c0392b; }
.scd-tab__folder--f2 { bottom: 14px; z-index: 2; } .scd-tab__folder--f2 .scd-tab__tab { left: 100px; background: #d68910; }
.scd-tab__folder--f3 { bottom: 28px; z-index: 3; } .scd-tab__folder--f3 .scd-tab__tab { left: 186px; background: #1e8449; }
/* Stage spread — only apply when no individual folder is being hovered.
Without :has(...:hover) guard, hovering the 2025 tab fires BOTH the
stage spread (translateY: 30px down) AND the folder lift (translateY:
-14px up). The two transforms fight on a single .45s ease, sliding
the folder out from under the cursor mid-transition → cursor leaves
the folder → spread resets → cursor re-enters → infinite jitter.
Restricting the spread to "stage hover AND nothing inside being
hovered" lets the spread animate cleanly when you enter the stage,
then freezes the position the moment you land on a folder, so the
folder's own hover effect doesn't fight a still-running translation. */
.scd-tab__stage:hover:not(:has(.scd-tab__folder:hover)) .scd-tab__folder--f1 { transform: translateY(60px); }
.scd-tab__stage:hover:not(:has(.scd-tab__folder:hover)) .scd-tab__folder--f2 { transform: translateY(30px); }
/* Lift the hovered folder above its peers and brighten it. Using scale
(not translateY) is deliberate: scale grows around the folder's
center, so the tab at top stays very close to where the cursor entered
it — no cursor re-entry jitter. The z-index bump keeps the lifted
folder on top of the stack regardless of source order. */
.scd-tab__folder:hover {
transform: scale(1.04) !important;
z-index: 9 !important;
box-shadow: 0 -2px 0 rgba(0,0,0,.05), 0 24px 38px rgba(60,40,20,.32);
}
@media (prefers-reduced-motion: reduce) {
.scd-tab__folder { transition: none !important; }
}
```
### 18. Photos Pinch
**Type:** Pure CSS
**Description:** A pinched cluster of bordered photos at center that bursts outward into a scatter on hover, each rotating to its own angle. Moody dark backdrop. Perfect for image collections and creative galleries.
**HTML:**
```html
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400&display=swap');
.scd-pinch, .scd-pinch *, .scd-pinch *::before, .scd-pinch *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-pinch {
min-height: 460px;
display: grid;
place-items: center;
background: #0c0c0c;
font-family: 'Geist', sans-serif;
}
.scd-pinch__stage { position: relative; width: 280px; height: 280px; }
.scd-pinch__photo {
position: absolute; top: 50%; left: 50%;
width: 130px; height: 170px;
border-radius: 12px;
border: 5px solid #fff;
box-shadow: 0 16px 30px rgba(0,0,0,.6);
transition: transform .65s cubic-bezier(.3,1.3,.4,1);
cursor: pointer;
}
.scd-pinch__photo--ph1 { background: linear-gradient(135deg,#ee9ca7,#ffdde1); }
.scd-pinch__photo--ph2 { background: linear-gradient(135deg,#2193b0,#6dd5ed); }
.scd-pinch__photo--ph3 { background: linear-gradient(135deg,#cc2b5e,#753a88); }
.scd-pinch__photo--ph4 { background: linear-gradient(135deg,#42275a,#734b6d); }
.scd-pinch__photo--ph5 { background: linear-gradient(135deg,#f7b733,#fc4a1a); }
.scd-pinch__photo:nth-child(1) { transform: translate(-50%,-50%) rotate(-4deg); z-index: 5; }
.scd-pinch__photo:nth-child(2) { transform: translate(-50%,-50%) rotate(3deg); z-index: 4; }
.scd-pinch__photo:nth-child(3) { transform: translate(-50%,-50%) rotate(-2deg); z-index: 3; }
.scd-pinch__photo:nth-child(4) { transform: translate(-50%,-50%) rotate(5deg); z-index: 2; }
.scd-pinch__photo:nth-child(5) { transform: translate(-50%,-50%) rotate(-6deg); z-index: 1; }
.scd-pinch__stage:hover .scd-pinch__photo:nth-child(1) { transform: translate(-150%,-120%) rotate(-16deg); }
.scd-pinch__stage:hover .scd-pinch__photo:nth-child(2) { transform: translate(40%,-120%) rotate(14deg); }
.scd-pinch__stage:hover .scd-pinch__photo:nth-child(3) { transform: translate(-50%,-50%) rotate(0deg) scale(1.1); }
.scd-pinch__stage:hover .scd-pinch__photo:nth-child(4) { transform: translate(-150%,20%) rotate(-12deg); }
.scd-pinch__stage:hover .scd-pinch__photo:nth-child(5) { transform: translate(40%,20%) rotate(18deg); }
@media (prefers-reduced-motion: reduce) {
.scd-pinch__photo { transition: none !important; }
}
```
### 19. Swipe Stack
**Type:** CSS + JS
**Description:** A fully draggable Tinder-style deck: grab the top card and swipe left or right to discard it and reveal the next. Works with mouse and touch. Built for profiles, discovery feeds, or decision flows.
**HTML:**
```html
Maya Loves slow mornings & film cameras
Theo Trail runner, terrible cook
Lena Vinyl collector since '09
Drag me Swipe left or right →
drag the top card
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;800&display=swap');
.scd-swipe, .scd-swipe *, .scd-swipe *::before, .scd-swipe *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-swipe {
min-height: 460px;
display: grid;
place-items: center;
background: linear-gradient(160deg,#fdeff9,#ec38bc 120%);
font-family: 'Plus Jakarta Sans', sans-serif;
}
.scd-swipe__stage { position: relative; width: 260px; height: 360px; }
.scd-swipe__card {
position: absolute; inset: 0;
border-radius: 26px;
color: #fff;
box-shadow: 0 20px 44px rgba(120,30,90,.35);
display: flex; flex-direction: column; justify-content: flex-end;
padding: 28px;
cursor: grab; user-select: none;
transition: transform .4s cubic-bezier(.3,.9,.3,1);
}
.scd-swipe__card.is-dragging { transition: none; cursor: grabbing; }
.scd-swipe__card h3 { font-size: 1.9rem; font-weight: 800; }
.scd-swipe__card p { opacity: .9; }
.scd-swipe__card--b1 { background: linear-gradient(150deg,#fa709a,#fee140); }
.scd-swipe__card--b2 { background: linear-gradient(150deg,#a18cd1,#fbc2eb); color: #5a2a6a; }
.scd-swipe__card--b3 { background: linear-gradient(150deg,#43cea2,#185a9d); }
.scd-swipe__card--b4 { background: linear-gradient(150deg,#ff6e7f,#bfe9ff); color: #3a3a5a; }
.scd-swipe__hint {
position: absolute; bottom: -36px; width: 100%;
text-align: center; color: #fff; opacity: .8; font-size: .85rem;
}
@media (prefers-reduced-motion: reduce) {
.scd-swipe__card { transition: none !important; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.scd-swipe');
if (!root) return;
const deck = root.querySelector('[data-scd-swipe="stage"]');
if (!deck) return;
function layout() {
const cards = [...deck.querySelectorAll('.scd-swipe__card')];
cards.forEach((c, i) => {
const d = cards.length - 1 - i;
c.style.transform = `translateY(${d * -10}px) scale(${1 - d * 0.04})`;
c.style.zIndex = i;
});
}
layout();
function bind() {
const top = [...deck.querySelectorAll('.scd-swipe__card')].pop();
if (!top) return;
let sx = 0, dx = 0, drag = false;
const down = (e) => {
drag = true;
sx = (e.touches ? e.touches[0].clientX : e.clientX);
top.classList.add('is-dragging');
};
const move = (e) => {
if (!drag) return;
dx = (e.touches ? e.touches[0].clientX : e.clientX) - sx;
top.style.transform = `translateX(${dx}px) rotate(${dx * 0.06}deg)`;
};
const up = () => {
if (!drag) return;
drag = false;
top.classList.remove('is-dragging');
if (Math.abs(dx) > 110) {
top.style.transform = `translateX(${dx > 0 ? 600 : -600}px) rotate(${dx > 0 ? 40 : -40}deg)`;
top.style.opacity = 0;
setTimeout(() => { top.remove(); layout(); bind(); }, 300);
} else {
top.style.transform = '';
layout();
}
dx = 0;
};
top.addEventListener('mousedown', down);
root.addEventListener('mousemove', move);
root.addEventListener('mouseup', up);
root.addEventListener('mouseleave', up);
top.addEventListener('touchstart', down);
root.addEventListener('touchmove', move);
root.addEventListener('touchend', up);
}
bind();
})();
```
### 20. Accordion Card
**Type:** CSS + JS
**Description:** A dark, refined vertical accordion where clicking an item expands its answer and collapses the others. Warm amber accents, serif headings. Ideal for FAQs, documentation, and detail panels.
**HTML:**
```html
What is included?+
Every tier ships with the full source, lifetime updates, and priority support from our team.
Can I use it commercially?+
Yes — the license covers unlimited commercial projects with no attribution required.
Is there a refund?+
A 30-day no-questions money-back guarantee applies to all purchases.
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600&family=Newsreader:wght@400&display=swap');
.scd-acc, .scd-acc *, .scd-acc *::before, .scd-acc *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-acc {
min-height: 460px;
display: grid;
place-items: center;
background: #1a1714;
font-family: 'Newsreader', serif;
}
.scd-acc__stage { width: 320px; }
.scd-acc__item {
background: linear-gradient(135deg,#2c2722,#231e1a);
border: 1px solid #3d362f;
border-radius: 14px;
margin-bottom: 8px;
overflow: hidden;
transition: margin .4s;
cursor: pointer;
}
.scd-acc__head {
padding: 18px 22px;
display: flex; justify-content: space-between; align-items: center;
color: #f0e6d6;
font-family: 'Fraunces', serif; font-size: 1.05rem;
}
.scd-acc__plus { transition: transform .4s; color: #c89b5a; font-size: 1.3rem; }
.scd-acc__body {
max-height: 0; overflow: hidden;
transition: max-height .5s cubic-bezier(.3,.9,.3,1);
padding: 0 22px;
color: #bcae9c; line-height: 1.6; font-size: .9rem;
}
.scd-acc__item--open { margin: 14px 0; background: linear-gradient(135deg,#3a3128,#2c241c); }
.scd-acc__item--open .scd-acc__body { max-height: 120px; padding: 0 22px 20px; }
.scd-acc__item--open .scd-acc__plus { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) {
.scd-acc__item, .scd-acc__plus, .scd-acc__body { transition: none !important; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.scd-acc');
if (!root) return;
const acc = root.querySelector('[data-scd-acc="stage"]');
if (!acc) return;
acc.querySelectorAll('.scd-acc__item').forEach((it) => {
it.addEventListener('click', () => {
const wasOpen = it.classList.contains('scd-acc__item--open');
acc.querySelectorAll('.scd-acc__item').forEach((x) => x.classList.remove('scd-acc__item--open'));
if (!wasOpen) it.classList.add('scd-acc__item--open');
});
});
})();
```
### 21. Timeline Stack
**Type:** Pure CSS
**Description:** A vertical timeline with a gradient spine and milestone nodes. Hover slides each card right and pulses its node. Suited to roadmaps, company history, or changelogs.
**HTML:**
```html
2021 The Beginning First prototype shipped to ten beta users.
2023 Going Public Launched the open platform to everyone.
2025 Scale Crossed one million active accounts.
2026 What's Next Reimagining the experience from scratch.
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@700&family=Schibsted+Grotesk:wght@400;500&display=swap');
.scd-time, .scd-time *, .scd-time *::before, .scd-time *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-time {
min-height: 460px;
display: grid;
place-items: center;
background: linear-gradient(180deg,#fffaf0,#f0e8dc);
font-family: 'Schibsted Grotesk', sans-serif;
}
.scd-time__stage {
position: relative;
width: 340px;
padding-left: 40px;
}
.scd-time__stage::before {
content: '';
position: absolute;
left: 14px; top: 10px; bottom: 10px;
width: 3px;
background: linear-gradient(#ff8a5c,#a83279);
border-radius: 3px;
}
.scd-time__node { position: relative; margin-bottom: 14px; }
.scd-time__node::before {
content: '';
position: absolute;
left: -33px; top: 18px;
width: 16px; height: 16px;
border-radius: 50%;
background: #fff;
border: 3px solid #ff8a5c;
transition: transform .35s, background .35s;
}
.scd-time__card {
background: #fff;
border-radius: 14px;
padding: 16px 20px;
box-shadow: 0 8px 20px rgba(120,60,80,.12);
transition: transform .35s cubic-bezier(.3,.9,.3,1), box-shadow .35s;
cursor: pointer;
}
.scd-time__yr { font-family: 'Bricolage Grotesque', sans-serif; color: #a83279; font-size: .8rem; letter-spacing: .08em; }
.scd-time__card h3 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.1rem; color: #2a2024; margin: 2px 0 4px; }
.scd-time__card p { font-size: .85rem; color: #6a5a60; }
.scd-time__node:hover .scd-time__card { transform: translateX(12px); box-shadow: 0 14px 30px rgba(120,60,80,.2); }
.scd-time__node:hover::before { transform: scale(1.3); background: #a83279; }
@media (prefers-reduced-motion: reduce) {
.scd-time__card, .scd-time__node::before { transition: none !important; }
}
```
### 22. Isometric Tower
**Type:** Pure CSS
**Description:** Stacked isometric tiles forming a layered architecture tower. Hover slides upper layers diagonally apart to expose each level. Great for tech stacks, system diagrams, or layered concepts.
**HTML:**
```html
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@600&display=swap');
.scd-iso, .scd-iso *, .scd-iso *::before, .scd-iso *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-iso {
min-height: 460px;
display: grid;
place-items: center;
background: radial-gradient(circle at 50% 40%,#1b2735,#090a0f);
font-family: 'Chakra Petch', sans-serif;
}
.scd-iso__stage {
position: relative;
width: 300px; height: 380px;
transform-style: preserve-3d;
}
.scd-iso__layer {
position: absolute; left: 50%; top: 50%;
width: 170px; height: 170px;
margin: -85px;
transform-style: preserve-3d;
transition: transform .6s cubic-bezier(.3,.9,.3,1);
}
.scd-iso__face { position: absolute; width: 170px; height: 170px; }
.scd-iso__face--top { transform: rotateX(60deg) rotateZ(-45deg); }
.scd-iso__layer--l1 .scd-iso__face--top { background: linear-gradient(135deg,#36d1dc,#5b86e5); }
.scd-iso__layer--l2 .scd-iso__face--top { background: linear-gradient(135deg,#f7971e,#ffd200); }
.scd-iso__layer--l3 .scd-iso__face--top { background: linear-gradient(135deg,#fc466b,#3f5efb); }
.scd-iso__layer--l4 .scd-iso__face--top { background: linear-gradient(135deg,#11998e,#38ef7d); }
.scd-iso__label {
position: absolute;
color: #dfe9f5;
font-size: .85rem; letter-spacing: .1em;
transform: rotateX(60deg) rotateZ(-45deg);
top: 60px; left: 60px;
text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.scd-iso__layer--l1 { transform: translateZ(0); z-index: 4; }
.scd-iso__layer--l2 { transform: translateZ(40px); z-index: 3; }
.scd-iso__layer--l3 { transform: translateZ(80px); z-index: 2; }
.scd-iso__layer--l4 { transform: translateZ(120px); z-index: 1; }
.scd-iso__stage:hover .scd-iso__layer--l2 { transform: translateZ(40px) translate(40px,-40px); }
.scd-iso__stage:hover .scd-iso__layer--l3 { transform: translateZ(80px) translate(80px,-80px); }
.scd-iso__stage:hover .scd-iso__layer--l4 { transform: translateZ(120px) translate(120px,-120px); }
@media (prefers-reduced-motion: reduce) {
.scd-iso__layer { transition: none !important; }
}
```
### 23. 3D Flip Stack
**Type:** CSS + JS
**Description:** A stack of cards that each flip on click to reveal a vibrant reverse side, with depth-scaled layering. Built for flashcards, reveals, or front/back product info.
**HTML:**
```html
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Roboto+Mono&display=swap');
.scd-flip, .scd-flip *, .scd-flip *::before, .scd-flip *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-flip {
min-height: 460px;
display: grid;
place-items: center;
background: #0a0e17;
font-family: 'Roboto Mono', monospace;
}
.scd-flip__stage {
position: relative;
width: 230px; height: 320px;
perspective: 1100px;
}
.scd-flip__card {
position: absolute; inset: 0;
transform-style: preserve-3d;
transition: transform .7s cubic-bezier(.3,.9,.3,1);
cursor: pointer;
}
.scd-flip__side {
position: absolute; inset: 0;
border-radius: 20px;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
display: flex; flex-direction: column; justify-content: center; align-items: center;
box-shadow: 0 16px 40px rgba(0,0,0,.6);
}
.scd-flip__side--front { background: linear-gradient(150deg,#232526,#414345); color: #fff; }
.scd-flip__side--back { background: linear-gradient(150deg,#ff512f,#dd2476); color: #fff; transform: rotateY(180deg); }
.scd-flip__big { font-family: 'Anton', sans-serif; font-size: 3rem; letter-spacing: .02em; }
.scd-flip__sm { opacity: .6; font-size: .75rem; letter-spacing: .2em; }
.scd-flip__card.is-flipped { transform: rotateY(180deg); }
.scd-flip__card--c1 { transform: translateY(0) scale(1); z-index: 3; }
.scd-flip__card--c1.is-flipped { transform: translateY(0) scale(1) rotateY(180deg); }
.scd-flip__card--c2 { transform: translateY(14px) scale(.94); z-index: 2; }
.scd-flip__card--c2.is-flipped { transform: translateY(14px) scale(.94) rotateY(180deg); }
.scd-flip__card--c3 { transform: translateY(28px) scale(.88); z-index: 1; }
.scd-flip__card--c3.is-flipped { transform: translateY(28px) scale(.88) rotateY(180deg); }
@media (prefers-reduced-motion: reduce) {
.scd-flip__card { transition: none !important; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.scd-flip');
if (!root) return;
root.querySelectorAll('.scd-flip__card').forEach((f) => {
f.addEventListener('click', (e) => {
e.stopPropagation();
f.classList.toggle('is-flipped');
});
});
})();
```
### 24. Spiral Tower
**Type:** Pure CSS
**Description:** Cards arranged in a continuously rotating 3D helix around a central axis; hover pauses the spin. Hypnotic and bold. Perfect for hero showcases, featured collections, or attention-grabbing displays.
**HTML:**
```html
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Major+Mono+Display&family=Jost:wght@400;500&display=swap');
.scd-spiral, .scd-spiral *, .scd-spiral *::before, .scd-spiral *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-spiral {
min-height: 460px;
display: grid;
place-items: center;
background: radial-gradient(circle at 50% 50%,#1e0a2e,#080410);
font-family: 'Jost', sans-serif;
}
.scd-spiral__stage {
perspective: 1200px;
width: 240px; height: 400px;
}
.scd-spiral__spiral {
position: relative; width: 100%; height: 100%;
transform-style: preserve-3d;
animation: scd-spiral-spin 14s linear infinite;
}
@keyframes scd-spiral-spin { to { transform: rotateY(360deg); } }
.scd-spiral__stage:hover .scd-spiral__spiral { animation-play-state: paused; }
.scd-spiral__card {
position: absolute; left: 50%; top: 50%;
width: 120px; height: 160px;
margin: -80px -60px;
border-radius: 16px;
display: flex; align-items: center; justify-content: center;
color: #fff;
font-family: 'Major Mono Display', monospace;
font-size: 1.4rem;
box-shadow: 0 0 30px rgba(180,100,255,.25);
}
.scd-spiral__card:nth-child(1) { transform: rotateY(0deg) translateZ(150px) translateY(-120px); background: linear-gradient(150deg,#ee0979,#ff6a00); }
.scd-spiral__card:nth-child(2) { transform: rotateY(72deg) translateZ(150px) translateY(-60px); background: linear-gradient(150deg,#7f00ff,#e100ff); }
.scd-spiral__card:nth-child(3) { transform: rotateY(144deg) translateZ(150px) translateY(0px); background: linear-gradient(150deg,#00c6ff,#0072ff); }
.scd-spiral__card:nth-child(4) { transform: rotateY(216deg) translateZ(150px) translateY(60px); background: linear-gradient(150deg,#11998e,#38ef7d); }
.scd-spiral__card:nth-child(5) { transform: rotateY(288deg) translateZ(150px) translateY(120px); background: linear-gradient(150deg,#f7971e,#ffd200); color: #623; }
@media (prefers-reduced-motion: reduce) {
.scd-spiral__spiral {
animation: none !important;
transition: none !important;
}
}
```
### 25. Tilt on Hover
**Type:** CSS + JS
**Description:** A parallax card that tilts toward your cursor with a moving glare highlight, layered over a supporting card behind. Premium, interactive feel. Ideal for product hero cards and feature spotlights.
**HTML:**
```html
Beneath The supporting layer
Tilt me Move your cursor across
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Familjen+Grotesk:wght@600;700&display=swap');
.scd-tilt, .scd-tilt *, .scd-tilt *::before, .scd-tilt *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-tilt {
min-height: 460px;
display: grid;
place-items: center;
background: linear-gradient(135deg,#141e30,#243b55);
font-family: 'Familjen Grotesk', sans-serif;
}
.scd-tilt__stage {
position: relative;
width: 250px; height: 340px;
perspective: 800px;
}
.scd-tilt__card {
position: absolute; inset: 0;
border-radius: 22px;
transform-style: preserve-3d;
transition: transform .15s ease-out, box-shadow .3s;
box-shadow: 0 20px 50px rgba(0,0,0,.5);
overflow: hidden;
}
.scd-tilt__card::before {
content: '';
position: absolute; inset: 0;
background: linear-gradient(150deg,#fc466b,#3f5efb);
}
.scd-tilt__glare {
position: absolute; inset: 0;
background: radial-gradient(circle at var(--gx,50%) var(--gy,50%),rgba(255,255,255,.45),transparent 55%);
pointer-events: none;
}
.scd-tilt__content {
position: absolute; inset: 0;
padding: 28px;
display: flex; flex-direction: column; justify-content: flex-end;
color: #fff;
transform: translateZ(40px);
}
.scd-tilt__card h3 { font-size: 1.9rem; font-weight: 700; }
.scd-tilt__card p { opacity: .85; }
.scd-tilt__card--c2 { transform: translate(10px,10px) scale(.96); z-index: 1; }
.scd-tilt__card--c2::before { background: linear-gradient(150deg,#3f5efb,#11998e); }
.scd-tilt__card--c1 { z-index: 2; }
@media (prefers-reduced-motion: reduce) {
.scd-tilt__card { transition: none !important; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.scd-tilt');
if (!root) return;
const card = root.querySelector('[data-scd-tilt="stage"]');
const glare = root.querySelector('[data-scd-tilt="glare"]');
if (!card || !glare) return;
const stack = card.parentElement;
stack.addEventListener('mousemove', (e) => {
const r = card.getBoundingClientRect();
const x = (e.clientX - r.left) / r.width;
const y = (e.clientY - r.top) / r.height;
card.style.transform = `rotateY(${(x - 0.5) * 24}deg) rotateX(${(0.5 - y) * 24}deg)`;
glare.style.setProperty('--gx', x * 100 + '%');
glare.style.setProperty('--gy', y * 100 + '%');
});
stack.addEventListener('mouseleave', () => {
card.style.transform = '';
});
})();
```
### 26. Notification Pile
**Type:** Pure CSS
**Description:** An iOS-style stack of frosted-glass notifications that collapses into a tidy pile and fans open on hover. Built for notification centers, inboxes, and alert summaries.
**HTML:**
```html
💬
Messages Sam: see you at 7?
now
📅
Calendar Standup in 15 min
9:45
🔔
Reminders Pick up dry cleaning
9:30
🌤️
Weather Rain expected at 3pm
8:00
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@500;600;700&display=swap');
.scd-notif, .scd-notif *, .scd-notif *::before, .scd-notif *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-notif {
min-height: 460px;
display: grid;
place-items: center;
background: linear-gradient(160deg,#3a1c71,#d76d77,#ffaf7b);
font-family: 'Figtree', sans-serif;
}
.scd-notif__stage { position: relative; width: 300px; height: 300px; }
.scd-notif__notif {
position: absolute; left: 0; right: 0;
background: rgba(255,255,255,.78);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border-radius: 20px;
padding: 14px 16px;
display: flex; gap: 12px; align-items: center;
box-shadow: 0 8px 24px rgba(0,0,0,.18);
transition: transform .5s cubic-bezier(.3,.9,.3,1), opacity .5s, top .5s cubic-bezier(.3,.9,.3,1);
cursor: pointer;
}
.scd-notif__icon {
width: 38px; height: 38px;
border-radius: 10px;
flex-shrink: 0;
display: grid; place-items: center;
font-size: 1.2rem;
}
.scd-notif__txt h4 { font-size: .9rem; font-weight: 700; color: #1c1c1e; }
.scd-notif__txt p { font-size: .8rem; color: #3c3c43; opacity: .75; }
.scd-notif__time { margin-left: auto; font-size: .7rem; color: #3c3c43; opacity: .6; align-self: flex-start; }
.scd-notif__notif:nth-child(1) { top: 0; z-index: 5; }
.scd-notif__notif:nth-child(2) { top: 8px; transform: scale(.95); z-index: 4; }
.scd-notif__notif:nth-child(3) { top: 16px; transform: scale(.90); z-index: 3; }
.scd-notif__notif:nth-child(4) { top: 24px; transform: scale(.85); z-index: 2; }
.scd-notif__stage:hover .scd-notif__notif:nth-child(1) { top: 0; transform: scale(1); }
.scd-notif__stage:hover .scd-notif__notif:nth-child(2) { top: 74px; transform: scale(1); }
.scd-notif__stage:hover .scd-notif__notif:nth-child(3) { top: 148px; transform: scale(1); }
.scd-notif__stage:hover .scd-notif__notif:nth-child(4) { top: 222px; transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
.scd-notif__notif { transition: none !important; }
}
```
### 27. Receipt Roll
**Type:** Pure CSS
**Description:** Thermal-printer receipts with punched edges that unroll downward on hover, revealing itemized lines and totals. Monospace retro charm. Great for order summaries, invoices, or pricing breakdowns.
**HTML:**
```html
★ THANKS ★ Loyalty pts +45
NEXT VISIT 10% OFF
SUBTOTAL Tax $1.92
Tip $4.50
TOTAL $30.42
CAFE NORD Flat white $4.50
Croissant $3.75
Oat latte $5.25
Banana bread $4.00
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Courier+Prime:wght@400;700&display=swap');
.scd-receipt, .scd-receipt *, .scd-receipt *::before, .scd-receipt *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-receipt {
min-height: 460px;
display: grid;
place-items: center;
background: #2d2a26;
font-family: 'Courier Prime', monospace;
}
.scd-receipt__stage { position: relative; width: 240px; height: 380px; }
.scd-receipt__receipt {
position: absolute; left: 0; right: 0;
background: #fdfcf7;
padding: 18px 20px;
color: #222;
box-shadow: 0 8px 20px rgba(0,0,0,.4);
transition: transform .55s cubic-bezier(.3,.9,.3,1);
transform-origin: top center;
cursor: pointer;
-webkit-mask:
radial-gradient(circle 5px at 5px 50%,transparent 98%,#000) left/100% 12px repeat-y,
radial-gradient(circle 5px at calc(100% - 5px) 50%,transparent 98%,#000) right/100% 12px repeat-y;
mask:
radial-gradient(circle 5px at 5px 50%,transparent 98%,#000) left/100% 12px repeat-y,
radial-gradient(circle 5px at calc(100% - 5px) 50%,transparent 98%,#000) right/100% 12px repeat-y;
-webkit-mask-composite: source-over;
mask-composite: add;
}
.scd-receipt__receipt h3 {
font-family: 'VT323', monospace;
font-size: 1.6rem; text-align: center; letter-spacing: .05em;
}
.scd-receipt__line {
display: flex; justify-content: space-between;
font-size: .85rem; padding: 3px 0;
border-bottom: 1px dashed #bbb;
}
.scd-receipt__line--total {
font-weight: 700;
border-top: 2px solid #222;
margin-top: 6px;
padding-top: 6px;
}
.scd-receipt__receipt--r1 { top: 0; z-index: 3; }
.scd-receipt__receipt--r2 { top: 30px; z-index: 2; transform: scaleY(.5) translateY(-20px); filter: brightness(.96); }
.scd-receipt__receipt--r3 { top: 60px; z-index: 1; transform: scaleY(.25) translateY(-30px); filter: brightness(.92); }
.scd-receipt__stage:hover .scd-receipt__receipt--r2 { transform: scaleY(1) translateY(160px); }
.scd-receipt__stage:hover .scd-receipt__receipt--r3 { transform: scaleY(1) translateY(330px); }
@media (prefers-reduced-motion: reduce) {
.scd-receipt__receipt { transition: none !important; }
}
```
### 28. Scratch Cards
**Type:** CSS + JS
**Description:** A stack of lottery-style scratch cards where the top one has a real scratch-off canvas you drag to reveal the prize; the others fan aside on hover. Playful and interactive for giveaways, reveals, or gamified promos.
**HTML:**
```html
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Bungee&family=Nunito:wght@600;800&display=swap');
.scd-scratch, .scd-scratch *, .scd-scratch *::before, .scd-scratch *::after { box-sizing: border-box; margin: 0; padding: 0; }
.scd-scratch {
min-height: 460px;
display: grid;
place-items: center;
background: linear-gradient(135deg,#f12711,#f5af19);
font-family: 'Nunito', sans-serif;
}
.scd-scratch__stage { position: relative; width: 240px; height: 320px; }
.scd-scratch__scratch {
position: absolute; inset: 0;
border-radius: 20px;
box-shadow: 0 14px 30px rgba(120,40,0,.4);
transition: transform .5s cubic-bezier(.3,.9,.3,1);
overflow: hidden;
}
.scd-scratch__prize {
position: absolute; inset: 0;
background: linear-gradient(150deg,#fffbe6,#ffe9a8);
display: flex; flex-direction: column; align-items: center; justify-content: center;
color: #c0392b;
}
.scd-scratch__amt { font-family: 'Bungee', sans-serif; font-size: 3rem; }
.scd-scratch__lbl { font-weight: 800; letter-spacing: .1em; color: #e67e22; }
.scd-scratch__scratch canvas {
position: absolute; inset: 0;
width: 100%; height: 100%;
border-radius: 20px;
cursor: grab;
touch-action: none;
}
.scd-scratch__scratch--s1 { z-index: 3; }
.scd-scratch__scratch--s2 { z-index: 2; transform: translate(10px,12px) scale(.96) rotate(3deg); }
.scd-scratch__scratch--s3 { z-index: 1; transform: translate(20px,24px) scale(.92) rotate(6deg); }
.scd-scratch__stage:hover .scd-scratch__scratch--s2 { transform: translate(-110px,18px) scale(.96) rotate(-6deg); }
.scd-scratch__stage:hover .scd-scratch__scratch--s3 { transform: translate(120px,18px) scale(.96) rotate(8deg); }
@media (prefers-reduced-motion: reduce) {
.scd-scratch__scratch { transition: none !important; }
}
```
**JS:**
```js
(() => {
const root = document.querySelector('.scd-scratch');
if (!root) return;
const cv = root.querySelector('[data-scd-scratch="canvas"]');
if (!cv) return;
const ctx = cv.getContext('2d');
function init() {
cv.width = 240;
cv.height = 320;
const g = ctx.createLinearGradient(0, 0, 240, 320);
g.addColorStop(0, '#9e9e9e');
g.addColorStop(1, '#cfcfcf');
ctx.fillStyle = g;
ctx.fillRect(0, 0, 240, 320);
ctx.fillStyle = '#7a7a7a';
ctx.font = 'bold 22px Nunito';
ctx.textAlign = 'center';
ctx.fillText('SCRATCH HERE', 120, 165);
ctx.globalCompositeOperation = 'destination-out';
}
init();
let drawing = false;
function pos(e) {
const r = cv.getBoundingClientRect();
const cx = (e.touches ? e.touches[0].clientX : e.clientX) - r.left;
const cy = (e.touches ? e.touches[0].clientY : e.clientY) - r.top;
return [cx * 240 / r.width, cy * 320 / r.height];
}
function scratch(e) {
if (!drawing) return;
const [x, y] = pos(e);
ctx.beginPath();
ctx.arc(x, y, 22, 0, 7);
ctx.fill();
}
cv.addEventListener('mousedown', () => { drawing = true; });
cv.addEventListener('mouseup', () => { drawing = false; });
cv.addEventListener('mouseleave', () => { drawing = false; });
cv.addEventListener('mousemove', scratch);
cv.addEventListener('touchstart', () => { drawing = true; });
cv.addEventListener('touchend', () => { drawing = false; });
cv.addEventListener('touchmove', (e) => { e.preventDefault(); scratch(e); }, { passive: false });
})();
```
---
## 12 CSS Steppers
URL: https://codefronts.com/components/css-stepper-designs/
Description: 12 hand-coded CSS stepper UI components covering every production multi-step flow pattern in 2026 — multi-step form wizard with progress indicator, numbered step progress bar, e-commerce checkout stepper with sidebar order summary, vertical timeline stepper, animated step indicator with icons, onboarding stepper flow (Notion/Linear/Vercel style), breadcrumb-style step tracker, stepper with validation states (success/error/warning), circular SVG progress indicator, glassmorphism stepper, dark mode stepper, and stepper with animated connector lines. All use semantic HTML with proper aria-current="step" and aria-valuenow attributes for screen reader accessibility, scoped .stp-NN__* class names so multiple steppers coexist on the same page without style bleed, respect prefers-reduced-motion, and ship MIT-licensed. 11 use ~30-50 lines of vanilla JavaScript for step navigation, validation, and state persistence; 1 demo (the checkout stepper) is fully static — useful as a display-only progress indicator inside an existing wizard. Drop into any stack: React, Vue, Astro, Svelte, Rails ERB, plain HTML — zero framework dependencies.
Demo count: 12
### 01. CSS Multi-Step Form Wizard Progress Indicator
**Type:** CSS + JS
**Description:** A 4-step account-creation wizard with animated node states, gradient connector lines, scoped pulse keyframe on the active step, and a checkmark success panel — all navigated by prev/next JS.
**HTML:**
```html
✓
Account Created!
Welcome aboard. Check your email to verify your account.
Step 2 of 4
← Back
Continue →
```
**CSS:**
```css
.stp-01,.stp-01 *,.stp-01 *::before,.stp-01 *::after{box-sizing:border-box;margin:0;padding:0}
.stp-01 ::selection{background:#7c3aed;color:#fff}
.stp-01{
--bg:#0d0d1a;
--card:#16162a;
--border:#2a2a4a;
--purple:#7c3aed;
--violet:#a855f7;
--pink:#ec4899;
--white:#f0f0ff;
--muted:#6b6b9a;
--success:#10b981;
font-family:'Segoe UI',system-ui,sans-serif;
background:var(--bg);
min-height:100vh;
display:flex;align-items:center;justify-content:center;
padding:40px 20px;
}
.stp-01__card{
background:var(--card);
border:1px solid var(--border);
border-radius:24px;
padding:48px 40px;
max-width:640px;
width:100%;
box-shadow:0 32px 80px rgba(124,58,237,.15),0 0 0 1px rgba(124,58,237,.1);
}
.stp-01__header{text-align:center;margin-bottom:40px}
.stp-01__title{font-size:22px;font-weight:700;color:var(--white);letter-spacing:-.02em}
.stp-01__sub{font-size:13px;color:var(--muted);margin-top:6px}
/* stepper track */
.stp-01__steps{display:flex;align-items:center;margin-bottom:44px;position:relative}
.stp-01__step{display:flex;flex-direction:column;align-items:center;flex:1;position:relative;z-index:1}
.stp-01__node{
width:44px;height:44px;border-radius:50%;
display:flex;align-items:center;justify-content:center;
font-size:14px;font-weight:700;
border:2px solid var(--border);
background:var(--card);
color:var(--muted);
transition:all .4s cubic-bezier(.34,1.56,.64,1);
position:relative;
}
.stp-01__node-label{font-size:11px;color:var(--muted);margin-top:10px;letter-spacing:.06em;text-transform:uppercase;text-align:center;transition:color .3s}
/* connector lines */
.stp-01__step:not(:last-child)::after{
content:'';
position:absolute;
top:22px;left:calc(50% + 22px);
width:calc(100% - 44px);
height:2px;
background:var(--border);
z-index:0;
}
.stp-01__step.is-done::after{background:linear-gradient(90deg,var(--purple),var(--violet))}
/* states */
.stp-01__step.is-done .stp-01__node{
background:linear-gradient(135deg,var(--purple),var(--violet));
border-color:var(--violet);
color:#fff;
box-shadow:0 0 20px rgba(124,58,237,.5);
}
.stp-01__step.is-done .stp-01__node::after{
content:'✓';
position:absolute;
font-size:16px;
}
.stp-01__step.is-done .stp-01__node-label{color:var(--violet)}
.stp-01__step.is-active .stp-01__node{
background:transparent;
border-color:var(--purple);
border-width:2px;
color:var(--purple);
box-shadow:0 0 0 6px rgba(124,58,237,.15),0 0 24px rgba(124,58,237,.3);
animation:stp-01-pulse 2s ease-in-out infinite;
}
.stp-01__step.is-active .stp-01__node-label{color:var(--white)}
@keyframes stp-01-pulse{
0%,100%{box-shadow:0 0 0 6px rgba(124,58,237,.15),0 0 24px rgba(124,58,237,.3)}
50%{box-shadow:0 0 0 10px rgba(124,58,237,.08),0 0 32px rgba(124,58,237,.4)}
}
/* form area */
.stp-01__panel{display:none}
.stp-01__panel.is-active{display:block}
.stp-01__panel-title{font-size:18px;font-weight:600;color:var(--white);margin-bottom:20px}
.stp-01__field{margin-bottom:16px}
.stp-01__label{font-size:12px;color:var(--muted);letter-spacing:.06em;text-transform:uppercase;margin-bottom:6px;display:block}
.stp-01__input{
width:100%;padding:12px 16px;
background:rgba(255,255,255,.04);
border:1px solid var(--border);
border-radius:10px;
color:var(--white);
font-size:14px;
outline:none;
transition:border-color .2s,box-shadow .2s;
}
.stp-01__input::placeholder{color:var(--muted)}
.stp-01__input:focus{border-color:var(--purple);box-shadow:0 0 0 3px rgba(124,58,237,.2)}
.stp-01__row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
/* summary */
.stp-01__summary{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.stp-01__summary-item{
background:rgba(124,58,237,.08);
border:1px solid rgba(124,58,237,.2);
border-radius:10px;padding:14px 16px;
}
.stp-01__summary-key{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.stp-01__summary-val{font-size:14px;color:var(--white);font-weight:600;margin-top:4px}
/* navigation */
.stp-01__nav{display:flex;justify-content:space-between;align-items:center;margin-top:32px;gap:12px}
.stp-01__btn{
padding:12px 28px;border-radius:10px;
font-size:14px;font-weight:600;cursor:pointer;
border:none;transition:all .2s;
}
.stp-01__btn--back{
background:transparent;
border:1px solid var(--border);
color:var(--muted);
}
.stp-01__btn--back:hover{border-color:var(--purple);color:var(--white)}
.stp-01__btn--next{
background:linear-gradient(135deg,var(--purple),var(--violet));
color:#fff;
box-shadow:0 4px 20px rgba(124,58,237,.4);
margin-left:auto;
}
.stp-01__btn--next:hover{transform:translateY(-1px);box-shadow:0 8px 28px rgba(124,58,237,.5)}
.stp-01__btn--submit{
background:linear-gradient(135deg,var(--success),#34d399);
color:#fff;
box-shadow:0 4px 20px rgba(16,185,129,.4);
margin-left:auto;
}
/* success */
.stp-01__success{text-align:center;padding:20px 0}
.stp-01__success-icon{
width:72px;height:72px;border-radius:50%;
background:linear-gradient(135deg,var(--success),#34d399);
display:flex;align-items:center;justify-content:center;
font-size:32px;margin:0 auto 20px;
box-shadow:0 0 40px rgba(16,185,129,.4);
animation:stp-01-pop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes stp-01-pop{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}
.stp-01__success-title{font-size:22px;font-weight:700;color:var(--white);margin-bottom:8px}
.stp-01__success-msg{font-size:14px;color:var(--muted)}
/* progress fraction */
.stp-01__fraction{font-size:12px;color:var(--muted)}
.stp-01__fraction span{color:var(--violet);font-weight:700}
@media (prefers-reduced-motion:reduce){
.stp-01__step.is-active .stp-01__node{animation:none}
.stp-01__success-icon{animation:none}
}
```
**JS:**
```js
(function(){
const steps=document.querySelectorAll('.stp-01__step');
const panels=document.querySelectorAll('.stp-01__panel');
const btnNext=document.getElementById('stp-01-next');
const btnBack=document.getElementById('stp-01-back');
const curEl=document.getElementById('stp-01-cur');
const nav=document.getElementById('stp-01-nav');
let cur=2;
const total=4;
function update(){
steps.forEach((s,i)=>{
s.classList.remove('is-done','is-active');
if(i+1{
p.classList.remove('is-active');
if(parseInt(p.dataset.panel)===cur||(cur>total&&parseInt(p.dataset.panel)===5)) p.classList.add('is-active');
});
curEl.textContent=Math.min(cur,total);
btnBack.style.display=cur<=1?'none':'';
if(cur>total){
nav.style.display='none';
} else if(cur===total){
btnNext.textContent='Submit ✓';
btnNext.className='stp-01__btn stp-01__btn--submit';
} else {
btnNext.textContent='Continue →';
btnNext.className='stp-01__btn stp-01__btn--next';
}
}
btnNext.addEventListener('click',()=>{cur=Math.min(cur+1,total+1);update();});
btnBack.addEventListener('click',()=>{cur=Math.max(cur-1,1);update();});
update();
})();
```
### 02. CSS Step Progress Bar With Numbers
**Type:** CSS + JS
**Description:** Three synced numbered progress bar variants on one page — a pill track, a segmented block bar, and a dot-connector strip — all advancing together from a single prev/next controller.
**HTML:**
```html
CSS Step Progress Bar Components
Progress Bar With Numbered Markers
Segmented Block Style
✓ Account
✓ Address
03 Payment
04 Review
05 Confirm
← Prev
Next →
```
**CSS:**
```css
.stp-02,.stp-02 *,.stp-02 *::before,.stp-02 *::after{box-sizing:border-box;margin:0;padding:0}
.stp-02 ::selection{background:#f97316;color:#fff}
.stp-02{
--bg:#fff8f0;
--card:#fff;
--orange:#f97316;
--amber:#fb923c;
--dark:#1a1207;
--mid:#7a5533;
--muted:#c4a882;
--done:#10b981;
--border:#ede0d4;
font-family:'Segoe UI',system-ui,sans-serif;
background:var(--bg);
min-height:100vh;
display:flex;flex-direction:column;align-items:center;justify-content:center;
padding:40px 20px;
gap:48px;
}
.stp-02__label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:600}
/* ── Variant A: pill track ── */
.stp-02__varA{width:100%;max-width:680px}
.stp-02__varA-title{font-size:13px;font-weight:600;color:var(--mid);margin-bottom:20px;text-align:center}
.stp-02__track{
display:flex;align-items:center;
background:var(--card);
border:1px solid var(--border);
border-radius:999px;
padding:8px 8px;
box-shadow:0 4px 24px rgba(249,115,22,.08);
}
.stp-02__pip{
flex:1;display:flex;flex-direction:column;align-items:center;gap:0;
position:relative;
}
.stp-02__num{
width:36px;height:36px;border-radius:50%;
display:flex;align-items:center;justify-content:center;
font-size:13px;font-weight:700;
background:var(--border);
color:var(--muted);
transition:all .35s ease;
}
.stp-02__pip.done .stp-02__num{background:var(--done);color:#fff}
.stp-02__pip.active .stp-02__num{background:var(--orange);color:#fff;box-shadow:0 0 0 4px rgba(249,115,22,.2)}
.stp-02__connector{flex:1;height:3px;background:var(--border);transition:background .35s}
.stp-02__connector.done{background:var(--done)}
/* ── Variant B: numbered steps below bar ── */
.stp-02__varB{width:100%;max-width:680px}
.stp-02__bar-wrap{position:relative;margin-bottom:24px}
.stp-02__bar-track{height:6px;background:var(--border);border-radius:3px;overflow:hidden}
.stp-02__bar-fill{
height:100%;width:60%;
background:linear-gradient(90deg,var(--orange),var(--amber));
border-radius:3px;
transition:width .5s cubic-bezier(.4,0,.2,1);
}
.stp-02__markers{display:flex;justify-content:space-between;margin-top:12px}
.stp-02__marker{display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer}
.stp-02__marker-dot{
width:28px;height:28px;border-radius:50%;
display:flex;align-items:center;justify-content:center;
font-size:12px;font-weight:700;
background:var(--border);color:var(--muted);
transition:all .3s;border:2px solid var(--border);
}
.stp-02__marker.done .stp-02__marker-dot{background:var(--done);border-color:var(--done);color:#fff}
.stp-02__marker.active .stp-02__marker-dot{background:var(--orange);border-color:var(--orange);color:#fff;transform:scale(1.2)}
.stp-02__marker-name{font-size:11px;color:var(--muted);font-weight:500;text-align:center;transition:color .3s}
.stp-02__marker.active .stp-02__marker-name{color:var(--orange);font-weight:700}
.stp-02__marker.done .stp-02__marker-name{color:var(--done)}
/* ── Variant C: segmented blocks ── */
.stp-02__varC{width:100%;max-width:680px}
.stp-02__segments{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.stp-02__seg{
height:56px;border-radius:10px;
display:flex;flex-direction:column;align-items:center;justify-content:center;
gap:4px;
background:var(--border);
transition:all .3s;
cursor:pointer;
}
.stp-02__seg-num{font-size:16px;font-weight:800;color:var(--muted)}
.stp-02__seg-name{font-size:9px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.stp-02__seg.done{background:linear-gradient(135deg,#d1fae5,#a7f3d0);border:1px solid var(--done)}
.stp-02__seg.done .stp-02__seg-num{color:var(--done)}
.stp-02__seg.done .stp-02__seg-name{color:#059669}
.stp-02__seg.active{background:linear-gradient(135deg,var(--orange),var(--amber));box-shadow:0 4px 20px rgba(249,115,22,.35)}
.stp-02__seg.active .stp-02__seg-num,.stp-02__seg.active .stp-02__seg-name{color:#fff}
/* controls */
.stp-02__controls{display:flex;gap:12px}
.stp-02__ctrl{
padding:10px 24px;border-radius:8px;border:none;
font-size:13px;font-weight:600;cursor:pointer;
transition:all .2s;
}
.stp-02__ctrl--prev{background:var(--border);color:var(--mid)}
.stp-02__ctrl--prev:hover{background:var(--muted);color:#fff}
.stp-02__ctrl--next{background:var(--orange);color:#fff;box-shadow:0 4px 16px rgba(249,115,22,.35)}
.stp-02__ctrl--next:hover{background:#ea6a0a;transform:translateY(-1px)}
@media (prefers-reduced-motion:reduce){
.stp-02__bar-fill,.stp-02__marker-dot,.stp-02__seg{transition:none}
}
```
**JS:**
```js
(function(){
let cur=3;
const pillPips=document.querySelectorAll('.stp-02__pip');
const pillCons=document.querySelectorAll('.stp-02__connector');
const markers=document.querySelectorAll('.stp-02__marker');
const fill=document.getElementById('stp-02-fill');
const segs=document.querySelectorAll('.stp-02__seg');
const total=6;
function updateAll(){
// pill (5 steps)
pillPips.forEach((p,i)=>{
p.classList.remove('done','active');
if(i+1{c.classList.toggle('done',i+1{
m.classList.remove('done','active');
if(i+1{
s.classList.remove('done','active');
if(i+1{cur=Math.max(1,cur-1);updateAll();});
document.getElementById('stp-02-next').addEventListener('click',()=>{cur=Math.min(total,cur+1);updateAll();});
updateAll();
})();
```
### 03. CSS Checkout Stepper UI Component
**Type:** Pure CSS
**Description:** A dark navy e-commerce checkout flow with a tab-rail step header, sidebar order summary, three product line items, running totals, and an SSL trust badge — step state driven by JS class toggling.
**HTML:**
```html
Order Summary
👟
Air Max Pro
Size 10 · Black
$129
Subtotal $256
Shipping Free
Tax (8%) $20.48
Total $276.48
← Back
🔒 256-bit SSL encrypted
Place Order →
```
**CSS:**
```css
.stp-03,.stp-03 *,.stp-03 *::before,.stp-03 *::after{box-sizing:border-box;margin:0;padding:0}
.stp-03 ::selection{background:#0ea5e9;color:#fff}
.stp-03{
--bg:#0a0f1e;
--card:#0f1629;
--border:#1e2d4a;
--blue:#0ea5e9;
--cyan:#06b6d4;
--white:#e8f4fd;
--muted:#4a6080;
--success:#22c55e;
--warning:#f59e0b;
font-family:'Segoe UI',system-ui,sans-serif;
background:var(--bg);
min-height:100vh;
display:flex;align-items:center;justify-content:center;
padding:40px 20px;
background-image:radial-gradient(ellipse at 20% 50%,rgba(14,165,233,.06) 0%,transparent 50%),
radial-gradient(ellipse at 80% 50%,rgba(6,182,212,.04) 0%,transparent 50%);
}
.stp-03__shell{max-width:820px;width:100%}
/* top stepper bar */
.stp-03__bar{
display:flex;align-items:stretch;
background:var(--card);
border:1px solid var(--border);
border-radius:16px 16px 0 0;
overflow:hidden;
border-bottom:none;
}
.stp-03__tab{
flex:1;display:flex;align-items:center;gap:12px;
padding:18px 20px;
position:relative;
border-right:1px solid var(--border);
transition:background .3s;
}
.stp-03__tab:last-child{border-right:none}
.stp-03__tab.done{background:rgba(34,197,94,.05)}
.stp-03__tab.active{background:rgba(14,165,233,.08)}
.stp-03__tab-icon{
width:36px;height:36px;flex-shrink:0;
border-radius:10px;
display:flex;align-items:center;justify-content:center;
font-size:15px;
background:var(--border);
color:var(--muted);
transition:all .3s;
font-weight:700;
}
.stp-03__tab.done .stp-03__tab-icon{background:rgba(34,197,94,.2);color:var(--success)}
.stp-03__tab.active .stp-03__tab-icon{background:rgba(14,165,233,.2);color:var(--blue)}
.stp-03__tab-info{min-width:0}
.stp-03__tab-step{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.stp-03__tab-name{font-size:13px;font-weight:600;color:var(--muted);transition:color .3s;white-space:nowrap}
.stp-03__tab.done .stp-03__tab-name{color:var(--success)}
.stp-03__tab.active .stp-03__tab-name{color:var(--white)}
/* active underline */
.stp-03__tab.active::after{
content:'';position:absolute;bottom:0;left:0;right:0;height:2px;
background:linear-gradient(90deg,var(--blue),var(--cyan));
}
/* body */
.stp-03__body{
background:var(--card);
border:1px solid var(--border);
border-top:none;
border-radius:0 0 16px 16px;
display:grid;grid-template-columns:1fr 300px;
}
.stp-03__main{padding:32px;border-right:1px solid var(--border)}
.stp-03__section-title{font-size:16px;font-weight:700;color:var(--white);margin-bottom:20px;display:flex;align-items:center;gap:8px}
.stp-03__section-title::before{content:'';width:3px;height:18px;background:linear-gradient(180deg,var(--blue),var(--cyan));border-radius:2px;display:block}
.stp-03__field{margin-bottom:14px}
.stp-03__field-label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:6px;display:block}
.stp-03__input{
width:100%;padding:11px 14px;
background:rgba(255,255,255,.03);
border:1px solid var(--border);
border-radius:8px;color:var(--white);font-size:14px;outline:none;
transition:border-color .2s,box-shadow .2s;
}
.stp-03__input::placeholder{color:var(--muted)}
.stp-03__input:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(14,165,233,.15)}
.stp-03__grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.stp-03__grid3{display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px}
/* order summary sidebar */
.stp-03__aside{padding:24px}
.stp-03__aside-title{font-size:14px;font-weight:700;color:var(--white);margin-bottom:16px}
.stp-03__item{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--border)}
.stp-03__item:last-of-type{border-bottom:none}
.stp-03__item-thumb{
width:40px;height:40px;border-radius:8px;flex-shrink:0;
display:flex;align-items:center;justify-content:center;font-size:18px;
}
.stp-03__item-name{font-size:12px;color:var(--white);font-weight:600}
.stp-03__item-sku{font-size:10px;color:var(--muted)}
.stp-03__item-price{font-size:13px;font-weight:700;color:var(--blue);margin-left:auto}
.stp-03__totals{margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}
.stp-03__total-row{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);padding:3px 0}
.stp-03__total-row.grand{font-size:15px;font-weight:700;color:var(--white);padding-top:8px;border-top:1px solid var(--border);margin-top:6px}
/* nav */
.stp-03__nav{display:flex;justify-content:space-between;align-items:center;padding:20px 32px;border-top:1px solid var(--border)}
.stp-03__btn{padding:11px 28px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;border:none;transition:all .2s}
.stp-03__btn--ghost{background:transparent;border:1px solid var(--border);color:var(--muted)}
.stp-03__btn--ghost:hover{color:var(--white);border-color:var(--blue)}
.stp-03__btn--primary{background:linear-gradient(135deg,var(--blue),var(--cyan));color:#fff;box-shadow:0 4px 20px rgba(14,165,233,.35)}
.stp-03__btn--primary:hover{transform:translateY(-1px);box-shadow:0 8px 28px rgba(14,165,233,.45)}
.stp-03__lock{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px}
@media (max-width:640px){
.stp-03__body{grid-template-columns:1fr}
.stp-03__aside{display:none}
.stp-03__tab-info{display:none}
}
@media (prefers-reduced-motion:reduce){
.stp-03__btn--primary,.stp-03__tab{transition:none}
}
```
### 04. CSS Vertical Timeline Stepper
**Type:** CSS + JS
**Description:** A vertical spine stepper where each step expands into a full content card when active, with fuchsia accent connectors, slide-in panel transitions, and a running progress bar on the left rail.
**HTML:**
```html
Step 1
Personal Information
Basic details about you — name, email, date of birth.
✓ Completed
Step 2
Address & Location
Your current residence and contact address.
✓ Completed
Step 3 · In Progress
Employment History
Tell us about your last two positions.
Step 4
Documents Upload
Upload your CV, cover letter, and ID documents.
📎 Drag & drop files or browse
← Back
Submit →
Step 5
Review & Submit
Final check before we process your application.
Everything looks great! Click submit when ready.
← Back
Submit Application ✓
🎉
Application Submitted!
We'll review your application and get back to you within 3 business days.
```
**CSS:**
```css
.stp-04,.stp-04 *,.stp-04 *::before,.stp-04 *::after{box-sizing:border-box;margin:0;padding:0}
.stp-04 ::selection{background:#d946ef;color:#fff}
.stp-04{
--bg:#faf5ff;
--card:#fff;
--purple:#9333ea;
--fuchsia:#d946ef;
--dark:#1e0a2e;
--mid:#6b21a8;
--muted:#a78bca;
--border:#e9d5ff;
--done:#7c3aed;
--success:#16a34a;
font-family:'Segoe UI',system-ui,sans-serif;
background:var(--bg);
min-height:100vh;
display:flex;align-items:flex-start;justify-content:center;
padding:60px 20px;
background-image:radial-gradient(circle at 70% 20%,rgba(217,70,239,.06),transparent 40%);
}
.stp-04__wrap{max-width:600px;width:100%}
.stp-04__header{margin-bottom:40px}
.stp-04__eyebrow{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--fuchsia);font-weight:700;margin-bottom:8px}
.stp-04__title{font-size:28px;font-weight:800;color:var(--dark);letter-spacing:-.03em;line-height:1.2}
.stp-04__sub{font-size:14px;color:var(--muted);margin-top:6px}
/* vertical stepper */
.stp-04__timeline{position:relative;padding-left:0}
.stp-04__entry{display:flex;gap:0;position:relative;margin-bottom:0}
/* left spine */
.stp-04__spine{
display:flex;flex-direction:column;align-items:center;
width:56px;flex-shrink:0;
}
.stp-04__node{
width:44px;height:44px;border-radius:50%;
display:flex;align-items:center;justify-content:center;
font-size:14px;font-weight:700;
background:var(--border);
color:var(--muted);
transition:all .4s cubic-bezier(.34,1.56,.64,1);
border:2px solid var(--border);
flex-shrink:0;
position:relative;z-index:1;
}
.stp-04__line{
width:2px;flex:1;min-height:32px;
background:var(--border);
transition:background .4s;
margin:4px 0;
}
.stp-04__entry:last-child .stp-04__line{display:none}
/* states */
.stp-04__entry.is-done .stp-04__node{
background:linear-gradient(135deg,var(--purple),var(--fuchsia));
border-color:var(--fuchsia);color:#fff;
box-shadow:0 0 0 4px rgba(217,70,239,.15),0 4px 16px rgba(147,51,234,.3);
}
.stp-04__entry.is-done .stp-04__line{background:linear-gradient(180deg,var(--fuchsia),var(--purple))}
.stp-04__entry.is-active .stp-04__node{
background:#fff;
border-color:var(--fuchsia);border-width:2px;
color:var(--fuchsia);
box-shadow:0 0 0 6px rgba(217,70,239,.12),0 4px 20px rgba(217,70,239,.3);
animation:stp-04-glow 2s ease-in-out infinite;
}
.stp-04__entry.is-active .stp-04__line{background:linear-gradient(180deg,var(--muted),var(--border))}
@keyframes stp-04-glow{
0%,100%{box-shadow:0 0 0 6px rgba(217,70,239,.12),0 4px 20px rgba(217,70,239,.3)}
50%{box-shadow:0 0 0 10px rgba(217,70,239,.06),0 4px 28px rgba(217,70,239,.45)}
}
/* right content */
.stp-04__content{flex:1;padding:8px 0 32px 16px}
.stp-04__entry:last-child .stp-04__content{padding-bottom:0}
.stp-04__step-tag{
display:inline-block;font-size:10px;letter-spacing:.1em;text-transform:uppercase;
color:var(--muted);font-weight:600;margin-bottom:4px;
}
.stp-04__entry.is-done .stp-04__step-tag{color:var(--fuchsia)}
.stp-04__entry.is-active .stp-04__step-tag{color:var(--fuchsia)}
.stp-04__step-name{font-size:17px;font-weight:700;color:var(--muted);margin-bottom:4px;transition:color .3s}
.stp-04__entry.is-done .stp-04__step-name{color:var(--dark)}
.stp-04__entry.is-active .stp-04__step-name{color:var(--dark)}
.stp-04__step-desc{font-size:13px;color:var(--muted);line-height:1.6}
.stp-04__entry.is-active .stp-04__step-desc{color:var(--mid)}
/* active card */
.stp-04__card{
background:var(--card);
border:1px solid var(--border);
border-radius:14px;
padding:20px;
margin-top:14px;
box-shadow:0 4px 24px rgba(147,51,234,.08);
display:none;
}
.stp-04__entry.is-active .stp-04__card{display:block}
.stp-04__field{margin-bottom:12px}
.stp-04__fl{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:5px;display:block}
.stp-04__in{
width:100%;padding:10px 14px;
background:var(--bg);
border:1px solid var(--border);
border-radius:8px;
color:var(--dark);font-size:14px;outline:none;
transition:border-color .2s,box-shadow .2s;
}
.stp-04__in:focus{border-color:var(--fuchsia);box-shadow:0 0 0 3px rgba(217,70,239,.12)}
.stp-04__done-badge{
display:inline-flex;align-items:center;gap:6px;
background:rgba(22,163,74,.1);
border:1px solid rgba(22,163,74,.2);
color:var(--success);
font-size:12px;font-weight:600;
padding:4px 10px;border-radius:999px;
margin-top:8px;
}
/* cta */
.stp-04__cta{margin-top:8px;display:flex;gap:10px;align-items:center}
.stp-04__btn{
padding:10px 22px;border-radius:8px;border:none;
font-size:13px;font-weight:600;cursor:pointer;transition:all .2s;
}
.stp-04__btn--primary{
background:linear-gradient(135deg,var(--purple),var(--fuchsia));
color:#fff;box-shadow:0 4px 16px rgba(147,51,234,.3);
}
.stp-04__btn--primary:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(217,70,239,.4)}
.stp-04__btn--ghost{background:transparent;border:1px solid var(--border);color:var(--muted)}
.stp-04__btn--ghost:hover{border-color:var(--purple);color:var(--dark)}
/* completion */
.stp-04__complete{
margin-top:32px;
background:linear-gradient(135deg,rgba(147,51,234,.08),rgba(217,70,239,.06));
border:1px solid var(--border);
border-radius:14px;padding:28px;text-align:center;
display:none;
}
.stp-04__complete.show{display:block;animation:stp-04-fadein .5s ease}
@keyframes stp-04-fadein{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.stp-04__complete-icon{font-size:40px;margin-bottom:12px}
.stp-04__complete-title{font-size:20px;font-weight:800;color:var(--dark)}
.stp-04__complete-msg{font-size:14px;color:var(--muted);margin-top:6px}
@media (prefers-reduced-motion:reduce){
.stp-04__entry.is-active .stp-04__node{animation:none}
.stp-04__complete{animation:none}
}
```
**JS:**
```js
(function(){
let cur=3;
const entries=document.querySelectorAll('.stp-04__entry');
const complete=document.getElementById('stp-04-complete');
function go(n){
if(n>entries.length){
entries.forEach(e=>{e.classList.remove('is-active');e.classList.add('is-done');e.querySelector('.stp-04__node').textContent='✓'});
complete.classList.add('show');return;
}
cur=n;
entries.forEach((e,i)=>{
e.classList.remove('is-done','is-active');
const node=e.querySelector('.stp-04__node');
if(i+1go(cur+1);
document.getElementById('stp-04-back').onclick=()=>go(Math.max(1,cur-1));
document.getElementById('stp-04-next2').onclick=()=>go(cur+1);
document.getElementById('stp-04-back2').onclick=()=>go(Math.max(1,cur-1));
document.getElementById('stp-04-submit').onclick=()=>go(cur+1);
document.getElementById('stp-04-back3').onclick=()=>go(Math.max(1,cur-1));
})();
```
### 05. CSS Animated Step Indicator With Icons
**Type:** CSS + JS
**Description:** Icon bubble steps with a checkmark overlay pop animation, an SVG arc ring that advances its stroke-dashoffset per step, and a teal/emerald colour scheme — designed for onboarding and setup flows.
**HTML:**
```html
Onboarding Flow
Set Up Your Workspace
Integrations
Connect apps
Analytics
Set up tracking
Choose Your Theme
Personalise your workspace with colours and typography that match your brand.
Dark Mode Custom Palette Font Scale
Invite Your Team
Add teammates by email. Assign roles and set permissions for each member.
Admin Editor Viewer
Connect Integrations
Link your favourite tools — Slack, GitHub, Figma, Linear and more — to keep everything in sync.
Slack GitHub Figma Linear Notion
Configure Analytics
Set up event tracking, conversion goals, and dashboard widgets to stay on top of performance.
Events Goals Funnels
🚀 Ready to Launch!
Your workspace is fully configured. Click Launch to go live and start collaborating with your team.
All systems go 5 steps complete
← Previous
Continue →
```
**CSS:**
```css
.stp-05,.stp-05 *,.stp-05 *::before,.stp-05 *::after{box-sizing:border-box;margin:0;padding:0}
.stp-05 ::selection{background:#059669;color:#fff}
.stp-05{
--bg:#041a14;
--card:#071f18;
--emerald:#10b981;
--teal:#14b8a6;
--lime:#84cc16;
--dark:#d1fae5;
--muted:#2d6a54;
--border:#0d3d2e;
--white:#ecfdf5;
font-family:'Segoe UI',system-ui,sans-serif;
background:var(--bg);
min-height:100vh;
display:flex;align-items:center;justify-content:center;
padding:40px 20px;
background-image:
radial-gradient(ellipse at 30% 60%,rgba(16,185,129,.08) 0%,transparent 55%),
radial-gradient(ellipse at 80% 20%,rgba(20,184,166,.06) 0%,transparent 40%);
}
.stp-05__wrap{max-width:700px;width:100%}
.stp-05__label{
font-size:10px;letter-spacing:.16em;text-transform:uppercase;
color:var(--emerald);font-weight:700;text-align:center;
margin-bottom:12px;
}
.stp-05__title{font-size:26px;font-weight:800;color:var(--white);text-align:center;letter-spacing:-.02em;margin-bottom:40px}
/* stepper */
.stp-05__stepper{
display:flex;align-items:flex-start;
gap:0;
margin-bottom:48px;
}
.stp-05__item{
flex:1;display:flex;flex-direction:column;align-items:center;
gap:12px;position:relative;
}
/* connector */
.stp-05__item:not(:last-child)::after{
content:'';
position:absolute;
top:32px;left:calc(50% + 32px);
width:calc(100% - 64px);height:2px;
background:var(--border);
transition:background .5s ease;
}
.stp-05__item.done::after{
background:linear-gradient(90deg,var(--emerald),var(--teal));
animation:stp-05-flash .4s ease;
}
@keyframes stp-05-flash{0%{opacity:0}100%{opacity:1}}
/* icon bubble */
.stp-05__bubble{
width:64px;height:64px;border-radius:20px;
display:flex;align-items:center;justify-content:center;
font-size:26px;
background:var(--border);
border:2px solid var(--muted);
transition:all .4s cubic-bezier(.34,1.56,.64,1);
position:relative;
overflow:hidden;
}
.stp-05__bubble::before{
content:'';
position:absolute;inset:0;
background:linear-gradient(135deg,rgba(255,255,255,.05),transparent);
opacity:0;transition:opacity .3s;
}
.stp-05__item.done .stp-05__bubble{
background:linear-gradient(135deg,rgba(16,185,129,.25),rgba(20,184,166,.15));
border-color:var(--emerald);
box-shadow:0 0 24px rgba(16,185,129,.3),inset 0 1px 0 rgba(255,255,255,.1);
}
.stp-05__item.done .stp-05__bubble::before{opacity:1}
.stp-05__item.active .stp-05__bubble{
background:linear-gradient(135deg,rgba(16,185,129,.15),rgba(132,204,22,.1));
border-color:var(--teal);
box-shadow:0 0 0 6px rgba(16,185,129,.1),0 0 32px rgba(16,185,129,.3);
animation:stp-05-bob 2.5s ease-in-out infinite;
}
@keyframes stp-05-bob{
0%,100%{transform:translateY(0)}
50%{transform:translateY(-4px)}
}
/* checkmark overlay */
.stp-05__check{
position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
font-size:22px;
background:linear-gradient(135deg,var(--emerald),var(--teal));
border-radius:18px;
opacity:0;transform:scale(.5);
transition:all .3s cubic-bezier(.34,1.56,.64,1);
}
.stp-05__item.done .stp-05__check{opacity:1;transform:scale(1)}
.stp-05__name{font-size:12px;font-weight:600;color:var(--muted);text-align:center;letter-spacing:.04em;text-transform:uppercase;transition:color .3s}
.stp-05__item.done .stp-05__name{color:var(--emerald)}
.stp-05__item.active .stp-05__name{color:var(--white)}
.stp-05__sub{font-size:11px;color:var(--border);text-align:center;transition:color .3s}
.stp-05__item.active .stp-05__sub{color:var(--muted)}
.stp-05__item.done .stp-05__sub{color:var(--muted)}
/* content panel */
.stp-05__panel{
background:var(--card);
border:1px solid var(--border);
border-radius:18px;
padding:28px 32px;
min-height:200px;
position:relative;
overflow:hidden;
}
.stp-05__panel::before{
content:'';
position:absolute;top:-60px;right:-60px;
width:180px;height:180px;border-radius:50%;
background:radial-gradient(circle,rgba(16,185,129,.08),transparent);
}
.stp-05__panel-inner{display:none}
.stp-05__panel-inner.active{display:block;animation:stp-05-in .35s ease}
@keyframes stp-05-in{from{opacity:0;transform:translateX(10px)}to{opacity:1;transform:none}}
.stp-05__panel-title{font-size:18px;font-weight:700;color:var(--white);margin-bottom:8px}
.stp-05__panel-desc{font-size:14px;color:var(--muted);line-height:1.7;margin-bottom:20px}
.stp-05__tags{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}
.stp-05__tag{
padding:4px 12px;border-radius:999px;font-size:11px;font-weight:600;
background:rgba(16,185,129,.12);border:1px solid rgba(16,185,129,.25);color:var(--emerald);
}
.stp-05__nav{display:flex;justify-content:space-between;margin-top:24px}
.stp-05__btn{padding:10px 24px;border-radius:10px;border:none;font-size:13px;font-weight:600;cursor:pointer;transition:all .2s}
.stp-05__btn--prev{background:var(--border);color:var(--muted)}
.stp-05__btn--prev:hover{color:var(--white)}
.stp-05__btn--next{background:linear-gradient(135deg,var(--emerald),var(--teal));color:#fff;box-shadow:0 4px 16px rgba(16,185,129,.3)}
.stp-05__btn--next:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(16,185,129,.4)}
/* progress ring */
.stp-05__progress{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:20px}
.stp-05__ring{width:52px;height:52px}
.stp-05__ring circle{fill:none;stroke-width:4;stroke-linecap:round}
.stp-05__ring .bg{stroke:var(--border)}
.stp-05__ring .fg{stroke:var(--emerald);stroke-dasharray:126;stroke-dashoffset:126;transform:rotate(-90deg);transform-origin:center;transition:stroke-dashoffset .5s ease}
.stp-05__pct{font-size:13px;font-weight:700;color:var(--emerald)}
.stp-05__pct-label{font-size:12px;color:var(--muted)}
@media (prefers-reduced-motion:reduce){
.stp-05__item.active .stp-05__bubble{animation:none}
.stp-05__item.done::after,.stp-05__panel-inner.active{animation:none}
}
```
**JS:**
```js
(function(){
let cur=3;
const items=document.querySelectorAll('.stp-05__item');
const panels=document.querySelectorAll('.stp-05__panel-inner');
const ring=document.getElementById('stp-05-ring');
const pct=document.getElementById('stp-05-pct');
const total=5;
function update(){
items.forEach((item,i)=>{
item.classList.remove('done','active','is-done');
if(i+1{
p.classList.remove('active');
if(parseInt(p.dataset.panel)===cur) p.classList.add('active');
});
const p=((cur-1)/(total-1)*100).toFixed(0);
const offset=126-(126*(cur-1)/(total-1));
ring.style.strokeDashoffset=offset;
pct.textContent=p+'%';
document.getElementById('stp-05-prev').disabled=cur<=1;
document.getElementById('stp-05-next').textContent=cur===total?'Launch 🚀':'Continue →';
}
document.getElementById('stp-05-prev').addEventListener('click',()=>{cur=Math.max(1,cur-1);update();});
document.getElementById('stp-05-next').addEventListener('click',()=>{cur=Math.min(total,cur+1);update();});
update();
})();
```
### 06. CSS Onboarding Stepper Flow
**Type:** CSS + JS
**Description:** A full-panel onboarding layout with a left sidebar step list, animated slide-in content panels, choice card selections, a live progress bar, and a coral/rose colour scheme built for SaaS welcome flows.
**HTML:**
```html
Step 3 of 5
Tell Us About Your Team
We'll tailor the experience for your team size and structure.
📈
Grow Sales
Increase revenue & leads
🤝
Improve CX
Better customer experience
⚙️
Automate
Streamline operations
🎯
Analytics
Data-driven decisions
🎉
You're all set!
Your workspace is ready. Let's start growing together.
```
**CSS:**
```css
.stp-06,.stp-06 *,.stp-06 *::before,.stp-06 *::after{box-sizing:border-box;margin:0;padding:0}
.stp-06 ::selection{background:#e11d48;color:#fff}
.stp-06{
--bg:#fff1f2;
--white:#fff;
--rose:#e11d48;
--pink:#fb7185;
--coral:#f43f5e;
--dark:#1a0510;
--mid:#9f1239;
--muted:#fda4af;
--border:#fecdd3;
--success:#059669;
font-family:'Segoe UI',system-ui,sans-serif;
background:var(--bg);
min-height:100vh;
display:flex;align-items:center;justify-content:center;
padding:40px 20px;
}
.stp-06__outer{
max-width:900px;width:100%;
display:grid;grid-template-columns:260px 1fr;
background:var(--white);
border-radius:24px;
box-shadow:0 24px 80px rgba(225,29,72,.12),0 0 0 1px var(--border);
overflow:hidden;
min-height:520px;
}
/* left sidebar nav */
.stp-06__sidebar{
background:linear-gradient(180deg,var(--rose),var(--coral));
padding:40px 24px;
display:flex;flex-direction:column;
position:relative;overflow:hidden;
}
.stp-06__sidebar::before{
content:'';position:absolute;top:-60px;right:-60px;
width:200px;height:200px;border-radius:50%;
background:rgba(255,255,255,.08);
}
.stp-06__sidebar::after{
content:'';position:absolute;bottom:-40px;left:-40px;
width:140px;height:140px;border-radius:50%;
background:rgba(255,255,255,.06);
}
.stp-06__brand{
font-size:20px;font-weight:800;color:#fff;letter-spacing:-.02em;
margin-bottom:36px;position:relative;z-index:1;
}
.stp-06__brand span{opacity:.6;font-weight:400}
.stp-06__nav{flex:1;display:flex;flex-direction:column;gap:6px;position:relative;z-index:1}
.stp-06__nav-item{
display:flex;align-items:center;gap:12px;
padding:12px 14px;border-radius:12px;
cursor:pointer;transition:all .25s;
}
.stp-06__nav-item.done{background:rgba(255,255,255,.12)}
.stp-06__nav-item.active{background:rgba(255,255,255,.2);box-shadow:0 2px 12px rgba(0,0,0,.1)}
.stp-06__nav-dot{
width:28px;height:28px;border-radius:50%;flex-shrink:0;
display:flex;align-items:center;justify-content:center;
font-size:11px;font-weight:700;
background:rgba(255,255,255,.15);color:rgba(255,255,255,.5);
transition:all .3s;border:1.5px solid rgba(255,255,255,.2);
}
.stp-06__nav-item.done .stp-06__nav-dot{background:rgba(255,255,255,.9);color:var(--rose);border-color:transparent}
.stp-06__nav-item.active .stp-06__nav-dot{background:#fff;color:var(--rose);border-color:transparent;box-shadow:0 0 0 3px rgba(255,255,255,.3)}
.stp-06__nav-text{font-size:13px;font-weight:600;color:rgba(255,255,255,.5);transition:color .3s}
.stp-06__nav-item.done .stp-06__nav-text{color:rgba(255,255,255,.8)}
.stp-06__nav-item.active .stp-06__nav-text{color:#fff}
/* sidebar progress bar */
.stp-06__sidebar-progress{margin-top:auto;position:relative;z-index:1;padding-top:24px}
.stp-06__sidebar-progress-label{font-size:11px;color:rgba(255,255,255,.6);margin-bottom:8px}
.stp-06__sidebar-bar{height:4px;background:rgba(255,255,255,.2);border-radius:2px;overflow:hidden}
.stp-06__sidebar-fill{height:100%;background:#fff;border-radius:2px;transition:width .4s ease}
/* right content */
.stp-06__content{padding:48px 40px;display:flex;flex-direction:column}
.stp-06__step-display{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);font-weight:600;margin-bottom:6px}
.stp-06__step-title{font-size:26px;font-weight:800;color:var(--dark);letter-spacing:-.02em;margin-bottom:6px}
.stp-06__step-desc{font-size:14px;color:#9ca3af;line-height:1.7;margin-bottom:28px}
/* panels */
.stp-06__pane{display:none;flex:1}
.stp-06__pane.active{display:block;animation:stp-06-in .3s ease}
@keyframes stp-06-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.stp-06__field{margin-bottom:16px}
.stp-06__fl{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:#6b7280;margin-bottom:6px;display:block}
.stp-06__in{
width:100%;padding:12px 16px;
background:#f9fafb;border:1.5px solid #e5e7eb;border-radius:10px;
color:var(--dark);font-size:14px;outline:none;
transition:border-color .2s,box-shadow .2s;
}
.stp-06__in:focus{background:#fff;border-color:var(--rose);box-shadow:0 0 0 3px rgba(225,29,72,.1)}
.stp-06__row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
/* choice cards */
.stp-06__choices{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:20px}
.stp-06__choice{
padding:16px;border-radius:12px;border:2px solid #e5e7eb;
cursor:pointer;transition:all .25s;
display:flex;flex-direction:column;align-items:flex-start;gap:6px;
}
.stp-06__choice:hover{border-color:var(--pink);background:#fff1f2}
.stp-06__choice.picked{border-color:var(--rose);background:#fff1f2;box-shadow:0 0 0 3px rgba(225,29,72,.1)}
.stp-06__choice-icon{font-size:22px}
.stp-06__choice-name{font-size:13px;font-weight:700;color:var(--dark)}
.stp-06__choice-desc{font-size:11px;color:#9ca3af}
/* nav buttons */
.stp-06__footer{display:flex;justify-content:space-between;align-items:center;margin-top:auto;padding-top:24px;border-top:1px solid var(--border)}
.stp-06__skip{font-size:13px;color:#9ca3af;cursor:pointer;background:none;border:none;transition:color .2s}
.stp-06__skip:hover{color:var(--dark)}
.stp-06__foot-right{display:flex;gap:10px}
.stp-06__btn{padding:11px 24px;border-radius:10px;font-size:14px;font-weight:600;cursor:pointer;border:none;transition:all .2s}
.stp-06__btn--ghost{background:#f3f4f6;color:#6b7280}
.stp-06__btn--ghost:hover{background:#e5e7eb;color:var(--dark)}
.stp-06__btn--primary{background:linear-gradient(135deg,var(--rose),var(--coral));color:#fff;box-shadow:0 4px 16px rgba(225,29,72,.3)}
.stp-06__btn--primary:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(225,29,72,.4)}
@media (max-width:600px){
.stp-06__outer{grid-template-columns:1fr}
.stp-06__sidebar{display:none}
}
@media (prefers-reduced-motion:reduce){
.stp-06__pane.active,.stp-06__btn--primary{animation:none;transition:none}
}
```
**JS:**
```js
(function(){
let cur=3;
const total=5;
const navItems=document.querySelectorAll('.stp-06__nav-item');
const panes=document.querySelectorAll('.stp-06__pane');
const fill=document.getElementById('stp-06-fill');
const pct=document.getElementById('stp-06-pct');
const stepDisplay=document.getElementById('stp-06-step-display');
const stepTitle=document.getElementById('stp-06-step-title');
const stepDesc=document.getElementById('stp-06-step-desc');
const nextBtn=document.getElementById('stp-06-next');
const titles=['Your Account','Your Goal','Your Team','Workspace','All Done!'];
const descs=[
'Create your personal account to get started.',
'What do you want to achieve with Sprout?',
'We\'ll tailor the experience for your team size.',
'Set up your shared workspace.',
'Your workspace is configured and ready to go.'
];
function update(){
navItems.forEach((n,i)=>{
n.classList.remove('done','active');
const dot=n.querySelector('.stp-06__nav-dot');
if(i+1{
p.classList.remove('active');
if(parseInt(p.dataset.pane)===cur) p.classList.add('active');
});
const p=((cur-1)/(total-1)*100).toFixed(0);
fill.style.width=p+'%';
pct.textContent=p+'%';
stepDisplay.textContent=`Step ${cur} of ${total}`;
stepTitle.textContent=titles[cur-1];
stepDesc.textContent=descs[cur-1];
nextBtn.textContent=cur===total?'Go to Dashboard →':'Continue →';
document.getElementById('stp-06-back').style.display=cur<=1?'none':'';
document.getElementById('stp-06-skip').style.display=cur===total?'none':'';
}
document.getElementById('stp-06-next').addEventListener('click',()=>{cur=Math.min(total,cur+1);update();});
document.getElementById('stp-06-back').addEventListener('click',()=>{cur=Math.max(1,cur-1);update();});
document.getElementById('stp-06-skip').addEventListener('click',()=>{cur=Math.min(total,cur+1);update();});
document.querySelectorAll('.stp-06__choice').forEach(c=>{
c.addEventListener('click',()=>{
const siblings=c.parentElement.querySelectorAll('.stp-06__choice');
siblings.forEach(s=>s.classList.remove('picked'));
c.classList.add('picked');
});
});
update();
})();
```
### 07. CSS Breadcrumb Style Step Tracker
**Type:** CSS + JS
**Description:** Three synced breadcrumb-style step tracker variants — chevron arrow tabs, a pill strip, and a dashed dot-connector row — all driven by one prev/next controller with an amber/gold colour scheme.
**HTML:**
```html
01 Discovery
02 Proposal
03 Review
04 Approval
05 Delivery
Step 3 — Review & Iterate
In Progress
Three different breadcrumb-style step trackers above are all in sync. Chevron arrows, pill strips, and dashed dot connectors each show the same progress state. Click Next or Back to advance all three simultaneously.
← Back
Next Step →
```
**CSS:**
```css
.stp-07,.stp-07 *,.stp-07 *::before,.stp-07 *::after{box-sizing:border-box;margin:0;padding:0}
.stp-07 ::selection{background:#f59e0b;color:#000}
.stp-07{
--bg:#1c1400;
--card:#241c00;
--amber:#f59e0b;
--yellow:#fbbf24;
--gold:#d97706;
--white:#fef3c7;
--muted:#78614a;
--border:#3d2e00;
--dark:#0c0900;
font-family:'Segoe UI',system-ui,sans-serif;
background:var(--bg);
min-height:100vh;
display:flex;flex-direction:column;align-items:center;justify-content:center;
padding:40px 20px;
gap:40px;
background-image:radial-gradient(ellipse at 50% 0%,rgba(245,158,11,.07) 0%,transparent 60%);
}
/* ── Row 1: chevron breadcrumb track ── */
.stp-07__crumbs{display:flex;align-items:stretch;max-width:720px;width:100%;overflow:hidden;border-radius:12px;border:1px solid var(--border)}
.stp-07__crumb{
flex:1;position:relative;
display:flex;align-items:center;justify-content:center;
flex-direction:column;gap:3px;
padding:16px 28px 16px 36px;
background:var(--card);
cursor:pointer;
transition:background .3s;
min-width:0;
}
.stp-07__crumb:first-child{padding-left:20px}
/* left cut */
.stp-07__crumb::before{
content:'';
position:absolute;left:-1px;top:0;
border-top:40px solid transparent;
border-bottom:40px solid transparent;
border-left:18px solid var(--bg);
z-index:2;
}
.stp-07__crumb:first-child::before{display:none}
/* right chevron */
.stp-07__crumb::after{
content:'';
position:absolute;right:-18px;top:0;
border-top:40px solid transparent;
border-bottom:40px solid transparent;
border-left:18px solid var(--card);
z-index:3;
transition:border-left-color .3s;
}
.stp-07__crumb:last-child::after{display:none}
.stp-07__crumb.done{background:rgba(245,158,11,.12)}
.stp-07__crumb.done::after{border-left-color:rgba(245,158,11,.12)}
.stp-07__crumb.active{background:rgba(245,158,11,.2)}
.stp-07__crumb.active::after{border-left-color:rgba(245,158,11,.2)}
.stp-07__crumb-num{font-size:11px;font-weight:700;color:var(--muted);transition:color .3s}
.stp-07__crumb-name{font-size:12px;font-weight:600;color:var(--muted);transition:color .3s;white-space:nowrap}
.stp-07__crumb.done .stp-07__crumb-num,.stp-07__crumb.done .stp-07__crumb-name{color:var(--amber)}
.stp-07__crumb.active .stp-07__crumb-num,.stp-07__crumb.active .stp-07__crumb-name{color:var(--yellow)}
/* ── Row 2: pill badge strip ── */
.stp-07__pills{display:flex;align-items:center;gap:0;max-width:720px;width:100%}
.stp-07__pill{
display:flex;align-items:center;gap:8px;
padding:10px 18px;
background:var(--card);
border:1px solid var(--border);
border-right:none;
cursor:pointer;transition:background .25s;
position:relative;
}
.stp-07__pill:first-child{border-radius:10px 0 0 10px}
.stp-07__pill:last-child{border-right:1px solid var(--border);border-radius:0 10px 10px 0}
.stp-07__pill-dot{
width:22px;height:22px;border-radius:50%;flex-shrink:0;
display:flex;align-items:center;justify-content:center;
font-size:10px;font-weight:700;
background:var(--border);color:var(--muted);
transition:all .3s;
}
.stp-07__pill-label{font-size:12px;font-weight:600;color:var(--muted);transition:color .25s;white-space:nowrap}
.stp-07__pill.done{background:rgba(245,158,11,.1)}
.stp-07__pill.done .stp-07__pill-dot{background:var(--amber);color:#000}
.stp-07__pill.done .stp-07__pill-label{color:var(--amber)}
.stp-07__pill.active{background:rgba(245,158,11,.18)}
.stp-07__pill.active .stp-07__pill-dot{background:var(--yellow);color:#000;box-shadow:0 0 0 3px rgba(251,191,36,.25)}
.stp-07__pill.active .stp-07__pill-label{color:var(--yellow)}
/* separator arrow */
.stp-07__sep{font-size:12px;color:var(--muted);padding:0 2px;background:var(--card);border-top:1px solid var(--border);border-bottom:1px solid var(--border);display:flex;align-items:center}
/* ── Row 3: dashed step dots ── */
.stp-07__dots{display:flex;align-items:center;max-width:720px;width:100%}
.stp-07__dot-step{display:flex;flex-direction:column;align-items:center;gap:8px;flex:1;position:relative}
.stp-07__dot-step:not(:last-child)::after{
content:'';
position:absolute;top:12px;left:calc(50% + 12px);
width:calc(100% - 24px);height:0;
border-top:2px dashed var(--border);
transition:border-color .4s;
}
.stp-07__dot-step.done::after{border-color:var(--amber)}
.stp-07__dot-step.done:nth-child(2)::after{border-color:var(--gold)}
.stp-07__dot-node{
width:24px;height:24px;border-radius:50%;
border:2px solid var(--border);background:var(--card);
display:flex;align-items:center;justify-content:center;
font-size:10px;color:var(--muted);
transition:all .35s cubic-bezier(.34,1.56,.64,1);
font-weight:700;
}
.stp-07__dot-step.done .stp-07__dot-node{border-color:var(--amber);background:var(--amber);color:#000}
.stp-07__dot-step.active .stp-07__dot-node{
border-color:var(--yellow);background:var(--yellow);color:#000;
box-shadow:0 0 0 4px rgba(251,191,36,.2),0 0 16px rgba(251,191,36,.3);
transform:scale(1.3);
}
.stp-07__dot-label{font-size:10px;color:var(--muted);letter-spacing:.06em;text-transform:uppercase;text-align:center;transition:color .3s}
.stp-07__dot-step.done .stp-07__dot-label{color:var(--amber)}
.stp-07__dot-step.active .stp-07__dot-label{color:var(--white)}
/* content card */
.stp-07__card{
max-width:720px;width:100%;
background:var(--card);border:1px solid var(--border);
border-radius:16px;padding:28px 32px;
}
.stp-07__card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.stp-07__card-title{font-size:18px;font-weight:700;color:var(--white)}
.stp-07__badge{
padding:4px 12px;border-radius:999px;
font-size:11px;font-weight:700;
background:rgba(245,158,11,.15);
border:1px solid rgba(245,158,11,.3);
color:var(--amber);
}
.stp-07__card-body{font-size:14px;color:var(--muted);line-height:1.7}
.stp-07__card-nav{display:flex;justify-content:space-between;margin-top:24px}
.stp-07__btn{padding:10px 24px;border-radius:8px;border:none;font-size:13px;font-weight:600;cursor:pointer;transition:all .2s}
.stp-07__btn--ghost{background:var(--border);color:var(--muted)}
.stp-07__btn--ghost:hover{color:var(--white)}
.stp-07__btn--primary{background:linear-gradient(135deg,var(--amber),var(--yellow));color:#000;box-shadow:0 4px 16px rgba(245,158,11,.3)}
.stp-07__btn--primary:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(245,158,11,.4)}
@media (prefers-reduced-motion:reduce){
.stp-07__dot-step.active .stp-07__dot-node{transform:none}
}
```
**JS:**
```js
(function(){
let cur=3;
const crumbs=document.querySelectorAll('.stp-07__crumb');
const pills=document.querySelectorAll('.stp-07__pill');
const dots=document.querySelectorAll('.stp-07__dot-step');
const title=document.getElementById('stp-07-title');
const badge=document.getElementById('stp-07-badge');
const body=document.getElementById('stp-07-body');
const steps=[
{t:'Step 1 — Discovery',b:'Gathering requirements and stakeholder input.',done:false},
{t:'Step 2 — Proposal',b:'Crafting a detailed project proposal.',done:false},
{t:'Step 3 — Review & Iterate',b:'Three different breadcrumb-style step trackers above are all in sync. Click Next or Back to advance all three simultaneously.',done:false},
{t:'Step 4 — Approval',b:'Getting sign-off from all stakeholders.',done:false},
{t:'Step 5 — Delivery',b:'Final deliverables packaged and shipped.',done:false},
];
function update(){
crumbs.forEach((c,i)=>{
c.classList.remove('done','active');
if(i+1{
p.classList.remove('done','active');
if(i+1{
d.classList.remove('done','active');
if(i+1crumbs.length?'Complete':'In Progress';
}
document.getElementById('stp-07-back').addEventListener('click',()=>{cur=Math.max(1,cur-1);update();});
document.getElementById('stp-07-next').addEventListener('click',()=>{cur=Math.min(crumbs.length+1,cur+1);update();});
update();
})();
```
### 08. CSS Stepper With Validation States
**Type:** CSS + JS
**Description:** A blue/indigo form stepper where each step has live input validation — valid (green), error (red), and warning (amber) states — with per-field messages and a step-level badge that reflects the field result.
**HTML:**
```html
Identity Verification
All identity fields are valid.
✓ Full Name
✓ Email
✓ Date of Birth
Security Setup
There are errors that need to be fixed.
✗ Password too weak
✗ Passwords don't match
Profile Details
Fill in your professional profile information.
Document Upload
Some documents are missing.
✓ ID Photo
⚠ Proof of Address
— CV (optional)
⚠️ Proof of address document is recommended but not required. You can submit without it, but verification may take longer.
Review & Submit
Check all validation states before submitting.
✓ Identity
✗ Security — fix required
✓ Profile
⚠ Docs — optional
❌ You cannot submit because Step 2 (Security) has errors. Please go back and fix the password fields.
← Back
Step 3 of 5
Next →
```
**CSS:**
```css
.stp-08,.stp-08 *,.stp-08 *::before,.stp-08 *::after{box-sizing:border-box;margin:0;padding:0}
.stp-08 ::selection{background:#3b82f6;color:#fff}
.stp-08{
--bg:#f0f4ff;
--white:#fff;
--blue:#3b82f6;
--indigo:#6366f1;
--dark:#0f172a;
--mid:#334155;
--muted:#94a3b8;
--border:#e2e8f0;
--success:#16a34a;
--error:#dc2626;
--warning:#d97706;
font-family:'Segoe UI',system-ui,sans-serif;
background:var(--bg);
min-height:100vh;
display:flex;align-items:center;justify-content:center;
padding:40px 20px;
}
.stp-08__card{
max-width:640px;width:100%;
background:var(--white);border-radius:20px;
box-shadow:0 12px 48px rgba(59,130,246,.1),0 0 0 1px var(--border);
overflow:hidden;
}
/* step header */
.stp-08__head{
background:linear-gradient(135deg,var(--blue),var(--indigo));
padding:28px 32px;
}
.stp-08__steps{display:flex;align-items:center;gap:0}
.stp-08__step{
flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;
position:relative;
}
.stp-08__step:not(:last-child)::after{
content:'';
position:absolute;top:18px;left:calc(50% + 18px);
width:calc(100% - 36px);height:1.5px;
background:rgba(255,255,255,.25);
}
.stp-08__step.done::after,.stp-08__step.valid::after{background:rgba(255,255,255,.7)}
.stp-08__node{
width:36px;height:36px;border-radius:50%;
display:flex;align-items:center;justify-content:center;
font-size:13px;font-weight:700;
background:rgba(255,255,255,.15);color:rgba(255,255,255,.5);
border:2px solid rgba(255,255,255,.2);
transition:all .35s cubic-bezier(.34,1.56,.64,1);
}
.stp-08__step.done .stp-08__node,.stp-08__step.valid .stp-08__node{
background:#fff;color:var(--success);border-color:transparent;
box-shadow:0 0 0 3px rgba(255,255,255,.3);
}
.stp-08__step.active .stp-08__node{
background:#fff;color:var(--blue);border-color:transparent;
box-shadow:0 0 0 4px rgba(255,255,255,.3);
}
.stp-08__step.error .stp-08__node{
background:rgba(220,38,38,.9);color:#fff;border-color:transparent;
box-shadow:0 0 0 4px rgba(220,38,38,.3);
animation:stp-08-shake .4s ease;
}
@keyframes stp-08-shake{
0%,100%{transform:translateX(0)}
25%{transform:translateX(-4px)}
75%{transform:translateX(4px)}
}
.stp-08__step.warning .stp-08__node{
background:rgba(217,119,6,.9);color:#fff;border-color:transparent;
}
.stp-08__node-label{font-size:10px;color:rgba(255,255,255,.5);letter-spacing:.06em;text-transform:uppercase;text-align:center;transition:color .3s}
.stp-08__step.active .stp-08__node-label{color:rgba(255,255,255,.9)}
.stp-08__step.done .stp-08__node-label,.stp-08__step.valid .stp-08__node-label{color:rgba(255,255,255,.8)}
.stp-08__step.error .stp-08__node-label{color:rgba(255,255,255,.7)}
/* body */
.stp-08__body{padding:32px}
.stp-08__pane{display:none}
.stp-08__pane.active{display:block;animation:stp-08-in .3s ease}
@keyframes stp-08-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.stp-08__pane-title{font-size:18px;font-weight:700;color:var(--dark);margin-bottom:4px}
.stp-08__pane-sub{font-size:13px;color:var(--muted);margin-bottom:24px}
/* fields with validation */
.stp-08__field{margin-bottom:16px}
.stp-08__fl{font-size:12px;font-weight:600;color:var(--mid);margin-bottom:6px;display:flex;justify-content:space-between;align-items:center}
.stp-08__fl-hint{font-size:11px;font-weight:400;color:var(--muted)}
.stp-08__in-wrap{position:relative}
.stp-08__in{
width:100%;padding:12px 42px 12px 14px;
background:#f8fafc;border:2px solid var(--border);
border-radius:10px;color:var(--dark);font-size:14px;outline:none;
transition:border-color .2s,background .2s,box-shadow .2s;
}
.stp-08__in:focus{background:#fff;border-color:var(--blue);box-shadow:0 0 0 3px rgba(59,130,246,.12)}
.stp-08__in.is-valid{border-color:var(--success);background:#f0fdf4}
.stp-08__in.is-invalid{border-color:var(--error);background:#fef2f2}
.stp-08__in.is-warning{border-color:var(--warning);background:#fffbeb}
.stp-08__icon{
position:absolute;right:14px;top:50%;transform:translateY(-50%);
font-size:14px;pointer-events:none;
}
.stp-08__msg{font-size:11px;margin-top:5px;font-weight:500;display:none}
.stp-08__msg.show{display:block}
.stp-08__msg.ok{color:var(--success)}
.stp-08__msg.err{color:var(--error)}
.stp-08__msg.warn{color:var(--warning)}
/* state summary chips */
.stp-08__chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}
.stp-08__chip{
padding:5px 12px;border-radius:999px;font-size:11px;font-weight:600;
display:inline-flex;align-items:center;gap:5px;
}
.stp-08__chip--ok{background:#dcfce7;color:var(--success);border:1px solid #bbf7d0}
.stp-08__chip--err{background:#fee2e2;color:var(--error);border:1px solid #fecaca}
.stp-08__chip--warn{background:#fef9c3;color:var(--warning);border:1px solid #fde047}
.stp-08__chip--none{background:#f1f5f9;color:var(--muted);border:1px solid var(--border)}
/* nav */
.stp-08__nav{display:flex;justify-content:space-between;padding:20px 32px;border-top:1px solid var(--border)}
.stp-08__btn{padding:11px 26px;border-radius:10px;border:none;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s}
.stp-08__btn--ghost{background:#f1f5f9;color:var(--muted)}
.stp-08__btn--ghost:hover{color:var(--dark)}
.stp-08__btn--primary{background:linear-gradient(135deg,var(--blue),var(--indigo));color:#fff;box-shadow:0 4px 16px rgba(59,130,246,.3)}
.stp-08__btn--primary:hover{transform:translateY(-1px)}
.stp-08__btn--danger{background:linear-gradient(135deg,var(--error),#ef4444);color:#fff;box-shadow:0 4px 16px rgba(220,38,38,.3)}
.stp-08__status{font-size:12px;font-weight:600;padding:6px 14px;border-radius:6px}
.stp-08__status.ok{background:#dcfce7;color:var(--success)}
.stp-08__status.err{background:#fee2e2;color:var(--error)}
@media (prefers-reduced-motion:reduce){
.stp-08__step.error .stp-08__node{animation:none}
.stp-08__pane.active{animation:none}
}
```
**JS:**
```js
(function(){
let cur=3;
const stateMap={1:'valid',2:'error',3:'active',4:'warning',5:''};
const icons={valid:'✓',error:'!',warning:'⚠'};
const steps=document.querySelectorAll('.stp-08__step');
const panels=document.querySelectorAll('.stp-08__pane');
const status=document.getElementById('stp-08-status');
const nextBtn=document.getElementById('stp-08-next');
const total=5;
function update(){
steps.forEach((s,i)=>{
const n=i+1;
const st=n===cur?'active':stateMap[n]||'';
s.className='stp-08__step'+(st?' '+st:'');
const node=s.querySelector('.stp-08__node');
node.textContent=st==='valid'?'✓':st==='error'?'!':st==='warning'?'⚠':n;
});
panels.forEach(p=>{
p.classList.remove('active');
if(parseInt(p.dataset.panel)===cur) p.classList.add('active');
});
status.textContent=`Step ${cur} of ${total}`;
const curState=stateMap[cur]||'';
status.className='stp-08__status'+(curState==='valid'||curState==='active'?' ok':curState==='error'?' err':'');
nextBtn.textContent=cur===total?'Submit →':'Next →';
nextBtn.className='stp-08__btn'+(cur===total&&stateMap[2]==='error'?' stp-08__btn--danger':' stp-08__btn--primary');
}
// live validation on panel 3
const titleIn=document.getElementById('stp-08-title');
const titleIcon=document.getElementById('stp-08-ti');
const titleMsg=document.getElementById('stp-08-tm');
const bioIn=document.getElementById('stp-08-bio');
const bioIcon=document.getElementById('stp-08-bi');
const bioMsg=document.getElementById('stp-08-bm');
if(titleIn) titleIn.addEventListener('input',()=>{
const v=titleIn.value.trim();
if(v.length>2){titleIn.className='stp-08__in is-valid';titleIcon.textContent='✅';titleMsg.className='stp-08__msg ok show';titleMsg.textContent='✓ Looks good';}
else if(v.length>0){titleIn.className='stp-08__in is-invalid';titleIcon.textContent='❌';titleMsg.className='stp-08__msg err show';titleMsg.textContent='✗ Too short';}
else{titleIn.className='stp-08__in';titleIcon.textContent='○';titleMsg.className='stp-08__msg';}
});
if(bioIn) bioIn.addEventListener('input',()=>{
const v=bioIn.value.trim();
if(v.length>20){bioIn.className='stp-08__in is-valid';bioIcon.textContent='✅';bioMsg.className='stp-08__msg ok show';bioMsg.textContent=`✓ ${150-v.length} chars remaining`;}
else if(v.length>0){bioIn.className='stp-08__in';bioIcon.textContent='✏️';bioMsg.className='stp-08__msg show';bioMsg.style.color='var(--muted)';bioMsg.textContent=`${v.length}/150 chars`;}
else{bioIn.className='stp-08__in';bioIcon.textContent='○';bioMsg.className='stp-08__msg';}
});
document.getElementById('stp-08-back').addEventListener('click',()=>{cur=Math.max(1,cur-1);update();});
document.getElementById('stp-08-next').addEventListener('click',()=>{cur=Math.min(total,cur+1);update();});
update();
})();
```
### 09. CSS Circular Step Progress Indicator
**Type:** CSS + JS
**Description:** A centred SVG arc ring whose stroke-dashoffset advances per step, surrounded by a tile grid of clickable step cards — violet/purple accent on a near-black background ideal for dashboard headers.
**HTML:**
```html
Step 01
Project Setup
Repository initialized, dependencies installed, CI configured.
✓ Complete
Step 02 · Active
Configuration
Environment variables, feature flags, and API keys.
● In Progress
Step 03
Integration
Third-party services, webhooks, and data pipelines.
Upcoming
Step 04
Launch
Production deployment, monitoring, and rollout plan.
Upcoming
← Prev
Next Step →
```
**CSS:**
```css
.stp-09,.stp-09 *,.stp-09 *::before,.stp-09 *::after{box-sizing:border-box;margin:0;padding:0}
.stp-09 ::selection{background:#8b5cf6;color:#fff}
.stp-09{
--bg:#09090b;
--card:#111113;
--violet:#8b5cf6;
--purple:#a78bfa;
--pink:#ec4899;
--white:#fafafa;
--muted:#52525b;
--border:#27272a;
--success:#22c55e;
font-family:'Segoe UI',system-ui,sans-serif;
background:var(--bg);
min-height:100vh;
display:flex;align-items:center;justify-content:center;
padding:40px 20px;
background-image:
radial-gradient(ellipse at 50% 50%,rgba(139,92,246,.04) 0%,transparent 70%);
}
.stp-09__shell{max-width:680px;width:100%;display:flex;flex-direction:column;align-items:center;gap:48px}
/* big circular progress */
.stp-09__circle-wrap{
display:flex;flex-direction:column;align-items:center;gap:24px;
}
.stp-09__ring{
position:relative;width:200px;height:200px;
}
.stp-09__svg{width:100%;height:100%;transform:rotate(-90deg)}
.stp-09__track{fill:none;stroke:var(--border);stroke-width:8}
.stp-09__arc{
fill:none;stroke-width:8;stroke-linecap:round;
stroke-dasharray:565;stroke-dashoffset:565;
stroke:url(#stp-09-grad);
transition:stroke-dashoffset .7s cubic-bezier(.4,0,.2,1);
}
.stp-09__ring-inner{
position:absolute;inset:0;
display:flex;flex-direction:column;align-items:center;justify-content:center;
}
.stp-09__pct-big{font-size:36px;font-weight:800;color:var(--white);letter-spacing:-.04em;line-height:1}
.stp-09__pct-label{font-size:11px;color:var(--muted);letter-spacing:.1em;text-transform:uppercase;margin-top:4px}
.stp-09__step-count{font-size:13px;color:var(--violet);font-weight:600;margin-top:2px}
/* step pills below ring */
.stp-09__track-row{display:flex;align-items:center;gap:0;width:100%;max-width:480px}
.stp-09__pip{flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;position:relative}
.stp-09__pip:not(:last-child)::after{
content:'';
position:absolute;top:12px;left:calc(50% + 12px);
width:calc(100% - 24px);height:2px;
background:var(--border);transition:background .5s;
}
.stp-09__pip.done::after{background:linear-gradient(90deg,var(--violet),var(--purple))}
.stp-09__pip.done .stp-09__pnode{background:linear-gradient(135deg,var(--violet),var(--purple));border-color:transparent;color:#fff}
.stp-09__pip.active .stp-09__pnode{border-color:var(--violet);color:var(--violet);box-shadow:0 0 0 4px rgba(139,92,246,.15),0 0 16px rgba(139,92,246,.25)}
.stp-09__pnode{
width:24px;height:24px;border-radius:50%;
display:flex;align-items:center;justify-content:center;
font-size:10px;font-weight:700;
border:2px solid var(--border);background:var(--card);color:var(--muted);
transition:all .35s cubic-bezier(.34,1.56,.64,1);
}
.stp-09__plabel{font-size:10px;color:var(--muted);text-align:center;letter-spacing:.04em;transition:color .3s}
.stp-09__pip.done .stp-09__plabel{color:var(--purple)}
.stp-09__pip.active .stp-09__plabel{color:var(--white)}
/* content grid */
.stp-09__grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%}
.stp-09__tile{
background:var(--card);border:1px solid var(--border);border-radius:14px;
padding:20px;transition:border-color .3s,box-shadow .3s;
position:relative;overflow:hidden;
}
.stp-09__tile::before{
content:'';position:absolute;inset:0;
background:linear-gradient(135deg,rgba(139,92,246,.05),transparent);
opacity:0;transition:opacity .3s;
}
.stp-09__tile.active{border-color:rgba(139,92,246,.4);box-shadow:0 0 24px rgba(139,92,246,.08)}
.stp-09__tile.active::before{opacity:1}
.stp-09__tile.done{border-color:rgba(139,92,246,.15)}
.stp-09__tile-step{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin-bottom:6px;font-weight:600}
.stp-09__tile.done .stp-09__tile-step{color:var(--violet)}
.stp-09__tile.active .stp-09__tile-step{color:var(--purple)}
.stp-09__tile-name{font-size:15px;font-weight:700;color:var(--muted);transition:color .3s}
.stp-09__tile.done .stp-09__tile-name,.stp-09__tile.active .stp-09__tile-name{color:var(--white)}
.stp-09__tile-desc{font-size:12px;color:var(--muted);margin-top:4px;line-height:1.5}
.stp-09__tile-badge{
display:inline-flex;align-items:center;gap:4px;margin-top:10px;
padding:3px 10px;border-radius:999px;font-size:10px;font-weight:600;
background:rgba(139,92,246,.12);border:1px solid rgba(139,92,246,.2);color:var(--violet);
}
.stp-09__tile.done .stp-09__tile-badge{background:rgba(34,197,94,.1);border-color:rgba(34,197,94,.2);color:var(--success)}
.stp-09__tile.active .stp-09__tile-badge{background:rgba(139,92,246,.2);animation:stp-09-pulse 2s ease-in-out infinite}
@keyframes stp-09-pulse{0%,100%{opacity:1}50%{opacity:.6}}
/* nav */
.stp-09__nav{display:flex;gap:12px;align-items:center}
.stp-09__btn{padding:10px 24px;border-radius:10px;border:none;font-size:13px;font-weight:600;cursor:pointer;transition:all .2s}
.stp-09__btn--ghost{background:var(--border);color:var(--muted)}
.stp-09__btn--ghost:hover{color:var(--white)}
.stp-09__btn--primary{background:linear-gradient(135deg,var(--violet),var(--purple));color:#fff;box-shadow:0 4px 16px rgba(139,92,246,.35)}
.stp-09__btn--primary:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(139,92,246,.45)}
@media (prefers-reduced-motion:reduce){
.stp-09__arc{transition:none}
.stp-09__tile.active .stp-09__tile-badge{animation:none}
}
```
**JS:**
```js
(function(){
let cur=2;
const total=4;
const pips=document.querySelectorAll('.stp-09__pip');
const tiles=document.querySelectorAll('.stp-09__tile');
const arc=document.getElementById('stp-09-arc');
const pctEl=document.getElementById('stp-09-pct');
const scEl=document.getElementById('stp-09-sc');
const circumference=565;
const badgeTexts=['✓ Complete','● In Progress','Upcoming','Upcoming'];
const badgeClasses=['done','active','',''];
function update(){
// ring
const pct=(cur-1)/(total-1);
arc.style.strokeDashoffset=circumference-(circumference*pct);
pctEl.textContent=Math.round(pct*100)+'%';
scEl.textContent=`Step ${cur} of ${total}`;
// pips
pips.forEach((p,i)=>{
p.classList.remove('done','active');
const node=p.querySelector('.stp-09__pnode');
if(i+1{
t.classList.remove('done','active');
const badge=t.querySelector('.stp-09__tile-badge');
const step=t.querySelector('.stp-09__tile-step');
if(i+1{cur=Math.max(1,cur-1);update();});
document.getElementById('stp-09-next').addEventListener('click',()=>{cur=Math.min(total,cur+1);update();});
update();
})();
```
### 10. CSS Glassmorphism Stepper UI
**Type:** CSS + JS
**Description:** Frosted-glass step cards layered over an animated aurora background, with backdrop-filter blur, cyan/teal accents, layered radial gradient orbs, and a multi-step panel flow inside the glass container.
**HTML:**
```html
Choose Your Plan
Select the tier that fits your needs
```
**CSS:**
```css
.stp-10,.stp-10 *,.stp-10 *::before,.stp-10 *::after{box-sizing:border-box;margin:0;padding:0}
.stp-10 ::selection{background:rgba(255,255,255,.4);color:#fff}
.stp-10{
--cyan:#22d3ee;
--blue:#38bdf8;
--violet:#818cf8;
--white:#fff;
--glass:rgba(255,255,255,.08);
--glass-border:rgba(255,255,255,.15);
--text:rgba(255,255,255,.9);
--muted:rgba(255,255,255,.4);
font-family:'Segoe UI',system-ui,sans-serif;
min-height:100vh;
display:flex;align-items:center;justify-content:center;
padding:40px 20px;
position:relative;
overflow:hidden;
background:#0a0e1a;
}
/* aurora background */
.stp-10::before{
content:'';position:absolute;inset:0;
background:
radial-gradient(ellipse at 20% 30%,rgba(34,211,238,.25) 0%,transparent 50%),
radial-gradient(ellipse at 80% 70%,rgba(129,140,248,.2) 0%,transparent 50%),
radial-gradient(ellipse at 60% 20%,rgba(56,189,248,.15) 0%,transparent 40%);
animation:stp-10-aurora 8s ease-in-out infinite alternate;
}
@keyframes stp-10-aurora{
0%{opacity:.6}
50%{opacity:1;filter:blur(2px)}
100%{opacity:.7}
}
/* floating blobs */
.stp-10__blob{
position:absolute;border-radius:50%;filter:blur(70px);pointer-events:none;
}
.stp-10__blob:nth-child(1){width:400px;height:400px;background:rgba(34,211,238,.12);top:-100px;left:-100px;animation:stp-10-float 12s ease-in-out infinite}
.stp-10__blob:nth-child(2){width:300px;height:300px;background:rgba(129,140,248,.1);bottom:-80px;right:-80px;animation:stp-10-float 10s ease-in-out infinite reverse}
@keyframes stp-10-float{0%,100%{transform:translate(0,0)}50%{transform:translate(40px,30px)}}
/* glass card */
.stp-10__card{
position:relative;z-index:1;
max-width:580px;width:100%;
background:var(--glass);
backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);
border:1px solid var(--glass-border);
border-radius:24px;
padding:40px 36px;
box-shadow:0 32px 80px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.1);
}
/* stepper */
.stp-10__steps{display:flex;align-items:center;margin-bottom:36px}
.stp-10__item{flex:1;display:flex;flex-direction:column;align-items:center;gap:10px;position:relative}
.stp-10__item:not(:last-child)::after{
content:'';
position:absolute;top:24px;left:calc(50% + 24px);
width:calc(100% - 48px);height:1px;
background:var(--glass-border);
transition:background .5s;
}
.stp-10__item.done::after{background:linear-gradient(90deg,var(--cyan),var(--blue))}
.stp-10__bubble{
width:48px;height:48px;border-radius:16px;
display:flex;align-items:center;justify-content:center;
font-size:16px;font-weight:700;
background:rgba(255,255,255,.06);
border:1px solid var(--glass-border);
color:var(--muted);
transition:all .4s cubic-bezier(.34,1.56,.64,1);
backdrop-filter:blur(8px);
position:relative;overflow:hidden;
}
.stp-10__bubble::before{
content:'';position:absolute;inset:0;
background:linear-gradient(135deg,rgba(255,255,255,.12),transparent);
opacity:0;transition:opacity .3s;
}
.stp-10__item.done .stp-10__bubble{
background:rgba(34,211,238,.2);
border-color:rgba(34,211,238,.4);
color:var(--cyan);
box-shadow:0 0 24px rgba(34,211,238,.2),inset 0 1px 0 rgba(255,255,255,.15);
}
.stp-10__item.done .stp-10__bubble::before{opacity:1}
.stp-10__item.active .stp-10__bubble{
background:rgba(56,189,248,.2);
border-color:rgba(56,189,248,.5);
color:var(--blue);
box-shadow:0 0 0 4px rgba(56,189,248,.1),0 0 32px rgba(56,189,248,.25),inset 0 1px 0 rgba(255,255,255,.15);
animation:stp-10-glow 2s ease-in-out infinite;
}
@keyframes stp-10-glow{
0%,100%{box-shadow:0 0 0 4px rgba(56,189,248,.1),0 0 32px rgba(56,189,248,.25)}
50%{box-shadow:0 0 0 8px rgba(56,189,248,.06),0 0 48px rgba(56,189,248,.35)}
}
.stp-10__item-label{font-size:11px;color:var(--muted);text-align:center;letter-spacing:.06em;text-transform:uppercase;transition:color .3s}
.stp-10__item.done .stp-10__item-label{color:rgba(34,211,238,.8)}
.stp-10__item.active .stp-10__item-label{color:var(--text)}
/* content */
.stp-10__title{font-size:22px;font-weight:700;color:var(--text);margin-bottom:6px}
.stp-10__subtitle{font-size:13px;color:var(--muted);margin-bottom:24px}
.stp-10__pane{display:none;animation:stp-10-in .35s ease}
.stp-10__pane.active{display:block}
@keyframes stp-10-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.stp-10__field{margin-bottom:14px}
.stp-10__fl{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-bottom:6px;display:block}
.stp-10__in{
width:100%;padding:12px 16px;
background:rgba(255,255,255,.06);
backdrop-filter:blur(8px);
border:1px solid var(--glass-border);
border-radius:10px;
color:var(--text);font-size:14px;outline:none;
transition:border-color .2s,background .2s,box-shadow .2s;
}
.stp-10__in::placeholder{color:var(--muted)}
.stp-10__in:focus{background:rgba(255,255,255,.1);border-color:rgba(56,189,248,.5);box-shadow:0 0 0 3px rgba(56,189,248,.1)}
.stp-10__row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
/* plan cards */
.stp-10__plans{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin-bottom:8px}
.stp-10__plan{
padding:14px;border-radius:12px;
background:rgba(255,255,255,.04);
border:1px solid var(--glass-border);
cursor:pointer;transition:all .25s;text-align:center;
}
.stp-10__plan:hover{background:rgba(255,255,255,.08);border-color:rgba(56,189,248,.3)}
.stp-10__plan.sel{background:rgba(56,189,248,.12);border-color:rgba(56,189,248,.5);box-shadow:0 0 20px rgba(56,189,248,.1)}
.stp-10__plan-name{font-size:13px;font-weight:700;color:var(--text)}
.stp-10__plan-price{font-size:19px;font-weight:800;color:var(--blue);margin:4px 0}
.stp-10__plan-desc{font-size:10px;color:var(--muted)}
/* nav */
.stp-10__nav{display:flex;justify-content:space-between;align-items:center;margin-top:28px}
.stp-10__btn{
padding:11px 26px;border-radius:10px;border:none;
font-size:14px;font-weight:600;cursor:pointer;transition:all .2s;
}
.stp-10__btn--ghost{
background:rgba(255,255,255,.06);
backdrop-filter:blur(8px);
border:1px solid var(--glass-border);
color:var(--muted);
}
.stp-10__btn--ghost:hover{background:rgba(255,255,255,.1);color:var(--text)}
.stp-10__btn--primary{
background:linear-gradient(135deg,var(--cyan),var(--blue));
color:#000;font-weight:700;
box-shadow:0 4px 20px rgba(34,211,238,.3);
}
.stp-10__btn--primary:hover{transform:translateY(-1px);box-shadow:0 8px 32px rgba(34,211,238,.4)}
.stp-10__dots{display:flex;gap:6px}
.stp-10__dot{width:6px;height:6px;border-radius:50%;background:var(--glass-border);transition:all .3s}
.stp-10__dot.active{width:18px;border-radius:3px;background:var(--cyan)}
@media (prefers-reduced-motion:reduce){
.stp-10::before,.stp-10__blob{animation:none}
.stp-10__item.active .stp-10__bubble{animation:none}
.stp-10__pane.active{animation:none}
}
```
**JS:**
```js
(function(){
let cur=3;
const total=4;
const items=document.querySelectorAll('.stp-10__item');
const panes=document.querySelectorAll('.stp-10__pane');
const dots=document.querySelectorAll('.stp-10__dot');
const title=document.getElementById('stp-10-title');
const sub=document.getElementById('stp-10-sub');
const nextBtn=document.getElementById('stp-10-next');
const info=[
{t:'Create Your Account',s:'Start with your email and password'},
{t:'Personal Details',s:'Tell us a bit about yourself'},
{t:'Choose Your Plan',s:'Select the tier that fits your needs'},
{t:'Payment Info',s:'Secure checkout — cancel anytime'},
];
function update(){
items.forEach((item,i)=>{
item.classList.remove('done','active');
const b=item.querySelector('.stp-10__bubble');
if(i+1{
p.classList.remove('active');
if(parseInt(p.dataset.pane)===cur) p.classList.add('active');
});
dots.forEach((d,i)=>{
d.classList.remove('active');
if(i+1===cur) d.classList.add('active');
});
const inf=info[cur-1];
title.textContent=inf.t;
sub.textContent=inf.s;
nextBtn.textContent=cur===total?'Complete Setup ✓':'Continue →';
document.getElementById('stp-10-back').style.display=cur<=1?'none':'';
}
document.querySelectorAll('.stp-10__plan').forEach(p=>{
p.addEventListener('click',()=>{
document.querySelectorAll('.stp-10__plan').forEach(x=>x.classList.remove('sel'));
p.classList.add('sel');
});
});
document.getElementById('stp-10-back').addEventListener('click',()=>{cur=Math.max(1,cur-1);update();});
document.getElementById('stp-10-next').addEventListener('click',()=>{cur=Math.min(total,cur+1);update();});
update();
})();
```
### 11. CSS Dark Mode Stepper Component
**Type:** CSS + JS
**Description:** A dark green/teal step component with a tab rail showing step sublabels, a mini progress bar beneath the rail, a light/dark theme toggle, and a completion summary panel at the final step.
**HTML:**
```html
Dark Mode Stepper · 4 Steps
Account Setup
Create your secure account credentials.
Email
Notification Settings
Choose what you want to hear about.
Email Digest
Weekly summary of your activity
Push Alerts
Real-time browser notifications
Product Updates
New features and changelog
Review & Confirm
Everything looks right?
Username @jordanblake
Email jordan@example.com
Time Zone UTC-08:00 Pacific
Email Digest ✓ Enabled
Push Alerts Disabled
```
**CSS:**
```css
.stp-11,.stp-11 *,.stp-11 *::before,.stp-11 *::after{box-sizing:border-box;margin:0;padding:0}
.stp-11 ::selection{background:#34d399;color:#000}
.stp-11{
--bg:#0f0f0f;
--surface:#181818;
--elevated:#222;
--green:#34d399;
--teal:#2dd4bf;
--white:#f5f5f5;
--muted:#525252;
--border:#2a2a2a;
--text:#e5e5e5;
font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
background:var(--bg);
min-height:100vh;
display:flex;flex-direction:column;align-items:center;justify-content:center;
padding:40px 20px;gap:32px;
}
/* ─ Top label ─ */
.stp-11__eyebrow{
display:flex;align-items:center;gap:8px;
font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:500;
}
.stp-11__dot-live{
width:7px;height:7px;border-radius:50%;background:var(--green);
animation:stp-11-blink 1.5s ease-in-out infinite;
}
@keyframes stp-11-blink{0%,100%{opacity:1}50%{opacity:.3}}
/* ─ Main card ─ */
.stp-11__card{
max-width:620px;width:100%;
background:var(--surface);
border:1px solid var(--border);
border-radius:16px;
overflow:hidden;
}
/* ─ Step rail ─ */
.stp-11__rail{
display:flex;
border-bottom:1px solid var(--border);
background:var(--bg);
}
.stp-11__rail-item{
flex:1;display:flex;align-items:center;gap:10px;
padding:14px 16px;
position:relative;border-right:1px solid var(--border);
cursor:pointer;transition:background .2s;
}
.stp-11__rail-item:last-child{border-right:none}
.stp-11__rail-item:hover{background:rgba(255,255,255,.02)}
.stp-11__rail-item.active{background:rgba(52,211,153,.04)}
.stp-11__rail-item.active::after{
content:'';position:absolute;bottom:0;left:0;right:0;height:2px;
background:linear-gradient(90deg,var(--green),var(--teal));
}
.stp-11__rail-num{
width:28px;height:28px;border-radius:8px;flex-shrink:0;
display:flex;align-items:center;justify-content:center;
font-size:12px;font-weight:700;
background:var(--border);color:var(--muted);
transition:all .3s;
}
.stp-11__rail-item.done .stp-11__rail-num{background:rgba(52,211,153,.15);color:var(--green)}
.stp-11__rail-item.active .stp-11__rail-num{background:rgba(52,211,153,.2);color:var(--green);box-shadow:0 0 12px rgba(52,211,153,.2)}
.stp-11__rail-text{min-width:0}
.stp-11__rail-label{font-size:12px;font-weight:600;color:var(--muted);white-space:nowrap;transition:color .3s}
.stp-11__rail-item.done .stp-11__rail-label{color:var(--green)}
.stp-11__rail-item.active .stp-11__rail-label{color:var(--text)}
.stp-11__rail-sublabel{font-size:10px;color:var(--muted);display:none}
.stp-11__rail-item.active .stp-11__rail-sublabel{display:block}
/* ─ Body ─ */
.stp-11__body{padding:28px 28px 24px}
/* progress micro bar */
.stp-11__mini-bar{height:3px;background:var(--border);border-radius:2px;margin-bottom:24px;overflow:hidden}
.stp-11__mini-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,var(--green),var(--teal));transition:width .4s ease}
.stp-11__pane{display:none}
.stp-11__pane.active{display:block;animation:stp-11-in .3s ease}
@keyframes stp-11-in{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:none}}
.stp-11__pane-head{margin-bottom:20px}
.stp-11__pane-title{font-size:17px;font-weight:700;color:var(--white)}
.stp-11__pane-desc{font-size:13px;color:var(--muted);margin-top:4px}
/* fields */
.stp-11__field{margin-bottom:14px}
.stp-11__fl{font-size:11px;font-weight:500;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px;display:block}
.stp-11__in{
width:100%;padding:10px 14px;
background:var(--elevated);
border:1px solid var(--border);border-radius:8px;
color:var(--white);font-size:14px;outline:none;
transition:border-color .2s,box-shadow .2s;
}
.stp-11__in::placeholder{color:var(--muted)}
.stp-11__in:focus{border-color:var(--green);box-shadow:0 0 0 2px rgba(52,211,153,.1)}
.stp-11__row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
/* toggle switches */
.stp-11__toggles{display:flex;flex-direction:column;gap:12px}
.stp-11__toggle{
display:flex;justify-content:space-between;align-items:center;
padding:14px 16px;
background:var(--elevated);border:1px solid var(--border);border-radius:10px;
}
.stp-11__toggle-info{flex:1}
.stp-11__toggle-name{font-size:14px;font-weight:600;color:var(--text)}
.stp-11__toggle-desc{font-size:12px;color:var(--muted);margin-top:2px}
.stp-11__sw{
width:40px;height:22px;border-radius:11px;
background:var(--border);position:relative;cursor:pointer;
transition:background .25s;flex-shrink:0;
}
.stp-11__sw.on{background:var(--green)}
.stp-11__sw::after{
content:'';position:absolute;top:3px;left:3px;
width:16px;height:16px;border-radius:50%;
background:#fff;transition:transform .25s;
box-shadow:0 1px 4px rgba(0,0,0,.3);
}
.stp-11__sw.on::after{transform:translateX(18px)}
/* review table */
.stp-11__review{display:grid;gap:10px}
.stp-11__review-row{
display:flex;justify-content:space-between;align-items:center;
padding:12px 14px;background:var(--elevated);border-radius:8px;
border:1px solid var(--border);
}
.stp-11__review-key{font-size:12px;color:var(--muted);font-weight:500}
.stp-11__review-val{font-size:13px;color:var(--white);font-weight:600}
/* footer nav */
.stp-11__foot{
display:flex;justify-content:space-between;align-items:center;
padding:16px 28px;
border-top:1px solid var(--border);
background:var(--bg);
}
.stp-11__step-text{font-size:12px;color:var(--muted)}
.stp-11__step-text strong{color:var(--green)}
.stp-11__foot-btns{display:flex;gap:10px}
.stp-11__btn{padding:9px 22px;border-radius:8px;border:none;font-size:13px;font-weight:600;cursor:pointer;transition:all .2s}
.stp-11__btn--ghost{background:var(--border);color:var(--muted)}
.stp-11__btn--ghost:hover{color:var(--white)}
.stp-11__btn--primary{background:linear-gradient(135deg,var(--green),var(--teal));color:#000}
.stp-11__btn--primary:hover{transform:translateY(-1px);box-shadow:0 6px 20px rgba(52,211,153,.25)}
@media (prefers-reduced-motion:reduce){
.stp-11__dot-live{animation:none}
.stp-11__pane.active{animation:none}
.stp-11__mini-fill{transition:none}
}
```
**JS:**
```js
(function(){
let cur=3;
const total=4;
const rails=document.querySelectorAll('.stp-11__rail-item');
const panes=document.querySelectorAll('.stp-11__pane');
const fill=document.getElementById('stp-11-fill');
const curEl=document.getElementById('stp-11-cur');
const nextBtn=document.getElementById('stp-11-next');
const sublabels=['Done','Done','In progress','Next'];
function update(){
rails.forEach((r,i)=>{
r.classList.remove('done','active');
const num=r.querySelector('.stp-11__rail-num');
const sub=r.querySelector('.stp-11__rail-sublabel');
if(i+1{
p.classList.remove('active');
if(parseInt(p.dataset.pane)===cur) p.classList.add('active');
});
fill.style.width=((cur-1)/(total-1)*100)+'%';
curEl.textContent=cur;
nextBtn.textContent=cur===total?'Confirm & Finish ✓':'Continue →';
document.getElementById('stp-11-back').style.display=cur<=1?'none':'';
}
document.querySelectorAll('.stp-11__sw').forEach(sw=>{
sw.addEventListener('click',()=>sw.classList.toggle('on'));
});
document.getElementById('stp-11-back').addEventListener('click',()=>{cur=Math.max(1,cur-1);update();});
document.getElementById('stp-11-next').addEventListener('click',()=>{cur=Math.min(total,cur+1);update();});
update();
})();
```
### 12. CSS Stepper With Connector Line Animation
**Type:** CSS + JS
**Description:** Animated fill connector lines in both horizontal and vertical layouts — a shimmer sweep runs along the line as each step completes, with ripple ring bursts on the active node and a rose/orange/amber gradient palette.
**HTML:**
```html
Horizontal — Animated Connector Fill
Step 01 · Completed
Project Kickoff
Stakeholder alignment, scope definition, and milestone planning locked in.
✓ Completed 3 Jan 2026
Step 02 · Completed
Design Phase
Wireframes approved, component library built, and brand tokens exported.
✓ Completed 14 Feb 2026
Step 03 · In Progress
Development Sprint
Feature development, API integration, and unit test coverage underway.
● Started 1 Mar 2026
Step 04
QA & Staging
Full regression, performance audits, and stakeholder UAT on staging.
— Scheduled Apr 2026
Step 05
Production Launch
Canary rollout, monitoring alerts active, and public release.
— Scheduled May 2026
← Previous
Mark Complete →
```
**CSS:**
```css
.stp-12,.stp-12 *,.stp-12 *::before,.stp-12 *::after{box-sizing:border-box;margin:0;padding:0}
.stp-12 ::selection{background:#f43f5e;color:#fff}
.stp-12{
--bg:#fef2f2;
--white:#fff;
--rose:#f43f5e;
--orange:#fb923c;
--amber:#fbbf24;
--dark:#1c0a0a;
--mid:#7f1d1d;
--muted:#f87171;
--border:#fde8e8;
--grad:linear-gradient(90deg,#f43f5e,#fb923c,#fbbf24);
--gradv:linear-gradient(180deg,#f43f5e,#fb923c,#fbbf24);
font-family:'Segoe UI',system-ui,sans-serif;
background:var(--bg);
min-height:100vh;
display:flex;align-items:center;justify-content:center;
padding:60px 20px;
background-image:
radial-gradient(ellipse at 20% 80%,rgba(244,63,94,.06),transparent 50%),
radial-gradient(ellipse at 80% 20%,rgba(251,146,60,.06),transparent 50%);
}
.stp-12__wrap{max-width:740px;width:100%;display:flex;flex-direction:column;gap:64px}
/* ── Horizontal animated connector ── */
.stp-12__horz{width:100%}
.stp-12__horz-label{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-weight:700;text-align:center;margin-bottom:28px}
.stp-12__h-track{display:flex;align-items:center;position:relative}
.stp-12__h-step{display:flex;flex-direction:column;align-items:center;gap:12px;flex-shrink:0;position:relative;z-index:1}
.stp-12__h-connector{flex:1;height:4px;background:var(--border);border-radius:2px;position:relative;overflow:hidden;margin:0 -2px}
.stp-12__h-connector-fill{
height:100%;width:0%;border-radius:2px;
background:var(--grad);
transition:width .6s cubic-bezier(.4,0,.2,1);
position:relative;
}
/* shimmer on connector fill */
.stp-12__h-connector-fill::after{
content:'';position:absolute;inset:0;
background:linear-gradient(90deg,transparent,rgba(255,255,255,.5),transparent);
background-size:200% 100%;
animation:stp-12-shimmer 1.5s linear infinite;
opacity:0;
}
.stp-12__h-connector.active .stp-12__h-connector-fill::after{opacity:1}
@keyframes stp-12-shimmer{0%{background-position:200%}100%{background-position:-200%}}
.stp-12__h-node{
width:52px;height:52px;border-radius:50%;
display:flex;align-items:center;justify-content:center;
font-size:16px;font-weight:700;
background:var(--white);
border:3px solid var(--border);
color:#c4b0b0;
transition:all .4s cubic-bezier(.34,1.56,.64,1);
position:relative;
box-shadow:0 2px 12px rgba(244,63,94,.06);
}
/* ripple ring on active */
.stp-12__h-node::before{
content:'';position:absolute;inset:-6px;border-radius:50%;
border:2px solid var(--rose);opacity:0;
transition:all .4s;
}
.stp-12__h-step.done .stp-12__h-node{
background:var(--grad);border-color:transparent;color:#fff;
box-shadow:0 4px 20px rgba(244,63,94,.3);
}
.stp-12__h-step.active .stp-12__h-node{
border-color:var(--rose);color:var(--rose);
box-shadow:0 4px 24px rgba(244,63,94,.25);
animation:stp-12-ring 2s ease-in-out infinite;
}
.stp-12__h-step.active .stp-12__h-node::before{opacity:.4;animation:stp-12-ripple 1.5s ease-out infinite}
@keyframes stp-12-ring{0%,100%{box-shadow:0 4px 24px rgba(244,63,94,.25)}50%{box-shadow:0 4px 36px rgba(244,63,94,.45)}}
@keyframes stp-12-ripple{0%{opacity:.5;transform:scale(1)}100%{opacity:0;transform:scale(1.4)}}
.stp-12__h-label{font-size:11px;font-weight:600;color:#c4b0b0;text-align:center;text-transform:uppercase;letter-spacing:.06em;transition:color .3s;max-width:64px}
.stp-12__h-step.done .stp-12__h-label{color:var(--rose)}
.stp-12__h-step.active .stp-12__h-label{color:var(--dark)}
/* ── Vertical animated connector ── */
.stp-12__vert{display:grid;grid-template-columns:auto 1fr;gap:0 20px;align-items:stretch}
.stp-12__v-spine{display:flex;flex-direction:column;align-items:center;padding-top:6px}
.stp-12__v-node{
width:44px;height:44px;border-radius:14px;flex-shrink:0;
display:flex;align-items:center;justify-content:center;
font-size:14px;font-weight:700;
background:var(--white);border:2px solid var(--border);color:#c4b0b0;
transition:all .4s cubic-bezier(.34,1.56,.64,1);
box-shadow:0 2px 8px rgba(244,63,94,.06);
}
.stp-12__v-entry.done .stp-12__v-node{
background:var(--gradv);border-color:transparent;color:#fff;
box-shadow:0 4px 16px rgba(244,63,94,.3);
}
.stp-12__v-entry.active .stp-12__v-node{
border-color:var(--rose);color:var(--rose);
box-shadow:0 4px 20px rgba(244,63,94,.2),0 0 0 4px rgba(244,63,94,.1);
}
.stp-12__v-line{
width:4px;flex:1;min-height:24px;margin:6px 0;border-radius:2px;
background:var(--border);position:relative;overflow:hidden;
}
.stp-12__v-line-fill{
position:absolute;top:0;left:0;right:0;height:0%;
background:var(--gradv);border-radius:2px;
transition:height .6s cubic-bezier(.4,0,.2,1);
}
.stp-12__v-entry.done+.stp-12__v-gap .stp-12__v-line-fill{height:100%}
.stp-12__v-entry{display:contents}
.stp-12__v-content{padding:6px 0 28px}
.stp-12__v-entry:last-child .stp-12__v-content{padding-bottom:0}
.stp-12__v-step-tag{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:#c4b0b0;font-weight:700;margin-bottom:4px}
.stp-12__v-entry.done .stp-12__v-step-tag,.stp-12__v-entry.active .stp-12__v-step-tag{color:var(--rose)}
.stp-12__v-title{font-size:17px;font-weight:700;color:#c4b0b0;margin-bottom:4px;transition:color .3s}
.stp-12__v-entry.done .stp-12__v-title,.stp-12__v-entry.active .stp-12__v-title{color:var(--dark)}
.stp-12__v-desc{font-size:13px;color:var(--muted);line-height:1.6}
.stp-12__v-entry.active .stp-12__v-desc{color:var(--mid)}
.stp-12__v-meta{font-size:11px;color:#c4b0b0;margin-top:6px;display:flex;align-items:center;gap:6px}
.stp-12__v-entry.done .stp-12__v-meta{color:var(--rose)}
.stp-12__v-entry.active .stp-12__v-meta{color:var(--rose)}
/* nav row */
.stp-12__nav{display:flex;justify-content:center;gap:12px}
.stp-12__btn{padding:12px 28px;border-radius:12px;border:none;font-size:14px;font-weight:700;cursor:pointer;transition:all .2s}
.stp-12__btn--ghost{background:var(--white);border:1.5px solid var(--border);color:var(--muted)}
.stp-12__btn--ghost:hover{border-color:var(--rose);color:var(--dark)}
.stp-12__btn--primary{background:var(--grad);color:#fff;box-shadow:0 4px 20px rgba(244,63,94,.3)}
.stp-12__btn--primary:hover{transform:translateY(-2px);box-shadow:0 10px 32px rgba(244,63,94,.4)}
@media (prefers-reduced-motion:reduce){
.stp-12__h-step.active .stp-12__h-node{animation:none}
.stp-12__h-step.active .stp-12__h-node::before{animation:none}
.stp-12__h-connector-fill::after{animation:none}
.stp-12__h-connector-fill,.stp-12__v-line-fill{transition:none}
}
```
**JS:**
```js
(function(){
let cur=3;
const hSteps=document.querySelectorAll('.stp-12__h-step');
const hCons=document.querySelectorAll('.stp-12__h-connector');
const vEntries=document.querySelectorAll('.stp-12__v-entry');
const total=5;
const vMeta=[
'✓ Completed 3 Jan 2026','✓ Completed 14 Feb 2026',
'● Started 1 Mar 2026','— Scheduled Apr 2026','— Scheduled May 2026'
];
const vTags=['Step 01 · Completed','Step 02 · Completed','Step 03 · In Progress','Step 04','Step 05'];
function update(){
// horizontal
hSteps.forEach((s,i)=>{
s.classList.remove('done','active');
const node=s.querySelector('.stp-12__h-node');
if(i+1{
c.classList.remove('active');
const fill=c.querySelector('.stp-12__h-connector-fill');
if(i+1{
e.classList.remove('done','active');
const node=e.querySelector('.stp-12__v-node');
const tag=e.querySelector('.stp-12__v-step-tag');
const meta=e.querySelector('.stp-12__v-meta');
const lineFill=e.querySelector('.stp-12__v-line-fill');
if(i+1{cur=Math.max(1,cur-1);update();});
document.getElementById('stp-12-next').addEventListener('click',()=>{cur=Math.min(total,cur+1);update();});
update();
})();
```
---
## 32 CSS Tab Designs
URL: https://codefronts.com/navigation/css-tabs/
Description: 32 CSS tab designs — 12 fan-favorite patterns (Ink Slider, Neon Electric, Brutalist Press, Chromatic, VS Code Files, iOS Segmented, Bento Grid, Vertical Dots, CRT Terminal, Morph Icon, Typewriter, Particle Burst) plus 20 typography-driven specimens. Sliding pills, halo blooms, drop caps, stencil cuts, folio folds. Each demo carries a distinct accent palette and motion choreography.
Demo count: 32
### 01. Ink Slider
**Type:** CSS + JS
**Description:** Solid ink-violet bar slides horizontally beneath the active tab. JS measures offsetLeft + offsetWidth so the bar matches each tab's exact width — no fixed-width assumption — and re-aligns on viewport resize.
**HTML:**
```html
Overview
Pricing
Reviews
Support
```
**CSS:**
```css
.tt21 {
background: #faf8f3;
padding: 32px 18px 0;
font-family: ui-sans-serif, system-ui, sans-serif;
min-height: 220px;
box-sizing: border-box;
width: 100%;
}
.tt21n {
position: relative;
display: flex;
border-bottom: 1px solid rgba(35, 28, 72, 0.12);
min-width: 0;
}
.tt21bar {
position: absolute;
bottom: -1px;
left: 0;
height: 3px;
width: 0;
background: #231c48;
border-radius: 2px 2px 0 0;
transition:
left 0.45s cubic-bezier(0.65, 0, 0.35, 1),
width 0.45s cubic-bezier(0.65, 0, 0.35, 1);
pointer-events: none;
}
.tt21b {
flex: 1;
min-width: 0;
padding: 12px 14px 14px;
border: 0;
background: transparent;
font:
600 13px/1 ui-sans-serif,
system-ui;
color: rgba(35, 28, 72, 0.55);
cursor: pointer;
transition: color 0.25s;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.tt21b:hover {
color: rgba(35, 28, 72, 0.85);
}
.tt21b.active {
color: #231c48;
}
.tt21b:focus-visible {
outline: 2px solid #231c48;
outline-offset: -2px;
}
@media (prefers-reduced-motion: reduce) {
.tt21bar {
transition: none;
}
}
```
**JS:**
```js
/* Ink Slider — toggle .active and slide the ink bar to the active tab.
Re-positions on viewport resize so the bar stays locked to its button. */
(function () {
var nav = document.querySelector(".tt21n");
if (!nav) return;
var btns = nav.querySelectorAll("[data-t]");
var bar = nav.querySelector(".tt21bar");
var current = null;
function reposition() {
if (!current || !bar) return;
bar.style.left = current.offsetLeft + "px";
bar.style.width = current.offsetWidth + "px";
}
function activate(btn) {
current = btn;
btns.forEach(function (b) {
b.classList.toggle("active", b === btn);
});
reposition();
}
btns.forEach(function (b) {
b.addEventListener("click", function () {
activate(b);
});
});
window.addEventListener("resize", reposition);
var initial = nav.querySelector("[data-t].active") || btns[0];
if (initial) activate(initial);
})();
```
### 02. Neon Electric
**Type:** Pure CSS
**Description:** Each tab owns its own electric accent via a CSS custom property. The active tab lights up with a neon border and a soft outer glow in its color. Pure CSS via radio inputs and `:has()` panel switching.
**HTML:**
```html
```
**CSS:**
```css
.tt22 {
background: #0c0c12;
padding: 22px 18px;
font-family: ui-monospace, monospace;
min-height: 220px;
box-sizing: border-box;
width: 100%;
}
.tt22n {
display: flex;
gap: 10px;
flex-wrap: wrap;
min-width: 0;
}
.tt22n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt22b {
flex: 1;
min-width: 0;
padding: 11px 12px;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 6px;
background: transparent;
font:
700 11px/1 ui-monospace,
monospace;
letter-spacing: 0.16em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.45);
cursor: pointer;
text-align: center;
transition:
color 0.25s,
border-color 0.25s,
box-shadow 0.3s,
background 0.25s;
white-space: nowrap;
}
.tt22b:hover {
color: rgba(255, 255, 255, 0.85);
border-color: rgba(255, 255, 255, 0.2);
}
.tt22n input:checked + .tt22b {
color: var(--c);
border-color: var(--c);
background: color-mix(in srgb, var(--c) 12%, transparent);
box-shadow:
0 0 12px color-mix(in srgb, var(--c) 50%, transparent),
inset 0 0 8px color-mix(in srgb, var(--c) 25%, transparent);
}
.tt22n input:focus-visible + .tt22b {
outline: 2px dashed var(--c);
outline-offset: 2px;
}
.tt22p {
display: none;
padding-top: 18px;
font:
12px/1.55 ui-monospace,
monospace;
color: rgba(255, 255, 255, 0.6);
letter-spacing: 0.04em;
}
.tt22:has(#tt22-r1:checked) .tt22p:nth-of-type(1),
.tt22:has(#tt22-r2:checked) .tt22p:nth-of-type(2),
.tt22:has(#tt22-r3:checked) .tt22p:nth-of-type(3),
.tt22:has(#tt22-r4:checked) .tt22p:nth-of-type(4) {
display: block;
}
```
### 03. Brutalist Press
**Type:** Pure CSS
**Description:** Heavy uppercase tabs with hard 4px black offset shadows. Active tab presses flush — shadow collapses, button translates 4px down-right, color inverts. Tactile mechanical-keyboard feedback.
**HTML:**
```html
```
**CSS:**
```css
.tt23 {
background: #fef0c7;
padding: 26px 22px;
font-family: ui-sans-serif, system-ui, sans-serif;
min-height: 220px;
box-sizing: border-box;
width: 100%;
}
.tt23n {
display: flex;
gap: 16px;
flex-wrap: wrap;
min-width: 0;
}
.tt23n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt23b {
flex: 1;
min-width: 0;
padding: 12px 16px;
border: 3px solid #0a0a0a;
background: #fff;
font:
800 12px/1 ui-sans-serif,
system-ui;
letter-spacing: 0.12em;
text-transform: uppercase;
color: #0a0a0a;
cursor: pointer;
text-align: center;
box-shadow: 4px 4px 0 0 #0a0a0a;
transition:
transform 0.12s ease-out,
box-shadow 0.12s ease-out,
background 0.2s,
color 0.2s;
white-space: nowrap;
}
.tt23b:hover {
background: #f4e7b3;
}
.tt23n input:checked + .tt23b {
transform: translate(4px, 4px);
box-shadow: 0 0 0 0 #0a0a0a;
background: #0a0a0a;
color: #fef0c7;
}
.tt23n input:focus-visible + .tt23b {
outline: 2px dashed #0a0a0a;
outline-offset: 4px;
}
.tt23p {
display: none;
padding-top: 22px;
font:
600 13px/1.55 ui-sans-serif,
system-ui;
color: #0a0a0a;
}
.tt23:has(#tt23-r1:checked) .tt23p:nth-of-type(1),
.tt23:has(#tt23-r2:checked) .tt23p:nth-of-type(2),
.tt23:has(#tt23-r3:checked) .tt23p:nth-of-type(3) {
display: block;
}
```
### 04. Chromatic
**Type:** Pure CSS
**Description:** Four color-coded tabs each with a dedicated tint, border, and active-state glow. Violet, rose, cyan, lime — each tab keeps its identity whether active or inactive. Pure CSS.
**HTML:**
```html
```
**CSS:**
```css
.tt24 {
background: #0f0f17;
padding: 24px 20px;
font-family: ui-sans-serif, system-ui, sans-serif;
min-height: 220px;
box-sizing: border-box;
width: 100%;
}
.tt24n {
display: flex;
gap: 8px;
flex-wrap: wrap;
min-width: 0;
}
.tt24n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt24b {
flex: 1;
min-width: 0;
padding: 11px 14px;
border-radius: 8px;
font:
700 12px/1 ui-sans-serif,
system-ui;
letter-spacing: 0.06em;
cursor: pointer;
text-align: center;
transition:
background 0.25s,
border-color 0.25s,
box-shadow 0.3s;
white-space: nowrap;
border: 1px solid;
}
.tt24-v {
color: #c4b5fd;
border-color: rgba(196, 181, 253, 0.3);
background: rgba(196, 181, 253, 0.06);
}
.tt24-r {
color: #fda4af;
border-color: rgba(253, 164, 175, 0.3);
background: rgba(253, 164, 175, 0.06);
}
.tt24-c {
color: #67e8f9;
border-color: rgba(103, 232, 249, 0.3);
background: rgba(103, 232, 249, 0.06);
}
.tt24-l {
color: #bef264;
border-color: rgba(190, 242, 100, 0.3);
background: rgba(190, 242, 100, 0.06);
}
.tt24n input:checked + .tt24-v {
background: rgba(196, 181, 253, 0.18);
border-color: #c4b5fd;
box-shadow: 0 0 18px rgba(196, 181, 253, 0.35);
}
.tt24n input:checked + .tt24-r {
background: rgba(253, 164, 175, 0.18);
border-color: #fda4af;
box-shadow: 0 0 18px rgba(253, 164, 175, 0.35);
}
.tt24n input:checked + .tt24-c {
background: rgba(103, 232, 249, 0.18);
border-color: #67e8f9;
box-shadow: 0 0 18px rgba(103, 232, 249, 0.35);
}
.tt24n input:checked + .tt24-l {
background: rgba(190, 242, 100, 0.18);
border-color: #bef264;
box-shadow: 0 0 18px rgba(190, 242, 100, 0.35);
}
.tt24n input:focus-visible + .tt24b {
outline: 2px dashed currentColor;
outline-offset: 3px;
}
.tt24p {
display: none;
padding-top: 20px;
font:
13px/1.55 ui-sans-serif,
system-ui;
color: rgba(255, 255, 255, 0.7);
}
.tt24:has(#tt24-r1:checked) .tt24p:nth-of-type(1),
.tt24:has(#tt24-r2:checked) .tt24p:nth-of-type(2),
.tt24:has(#tt24-r3:checked) .tt24p:nth-of-type(3),
.tt24:has(#tt24-r4:checked) .tt24p:nth-of-type(4) {
display: block;
}
```
### 05. VS Code Files
**Type:** Pure CSS
**Description:** IDE-inspired file tabs with language-colored dots and editor chrome. The active tab lifts with a top accent stripe and matches the editor surface, just like VS Code. Pure CSS.
**HTML:**
```html
```
**CSS:**
```css
.tt25 {
background: #1e1e1e;
padding: 0;
font-family: ui-monospace, monospace;
min-height: 220px;
box-sizing: border-box;
width: 100%;
}
.tt25n {
display: flex;
background: #2d2d2d;
border-bottom: 1px solid #1e1e1e;
min-width: 0;
}
.tt25n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt25b {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
font:
12px/1 ui-monospace,
monospace;
color: rgba(255, 255, 255, 0.6);
cursor: pointer;
border-right: 1px solid #1e1e1e;
position: relative;
white-space: nowrap;
transition:
background 0.18s,
color 0.18s;
}
.tt25b:hover {
color: rgba(255, 255, 255, 0.85);
background: rgba(255, 255, 255, 0.04);
}
.tt25dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--c);
flex-shrink: 0;
}
.tt25n input:checked + .tt25b {
background: #1e1e1e;
color: #fff;
border-bottom: 1px solid #1e1e1e;
margin-bottom: -1px;
}
.tt25n input:checked + .tt25b::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 2px;
background: #4fc1ff;
}
.tt25n input:focus-visible + .tt25b {
outline: 1px dashed #4fc1ff;
outline-offset: -3px;
}
.tt25body {
padding: 18px 20px;
}
.tt25p {
display: none;
font:
12px/1.6 ui-monospace,
monospace;
color: #d4d4d4;
}
.tt25p:nth-of-type(1) {
color: #569cd6;
}
.tt25:has(#tt25-r1:checked) .tt25p:nth-of-type(1),
.tt25:has(#tt25-r2:checked) .tt25p:nth-of-type(2),
.tt25:has(#tt25-r3:checked) .tt25p:nth-of-type(3) {
display: block;
}
```
### 06. iOS Segmented
**Type:** CSS + JS
**Description:** Apple-style segmented control: gray track, white pill that physically slides between segments. JS measures positions live; resize-listener keeps the pill aligned at any width.
**HTML:**
```html
Day
Week
Month
```
**CSS:**
```css
.tt26 {
background: #f2f2f7;
padding: 32px 24px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
min-height: 220px;
box-sizing: border-box;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.tt26n {
position: relative;
display: flex;
background: rgba(120, 120, 128, 0.16);
border-radius: 9px;
padding: 2px;
width: 100%;
max-width: 380px;
min-width: 0;
}
.tt26pill {
position: absolute;
top: 2px;
left: 2px;
height: calc(100% - 4px);
background: #fff;
border-radius: 7px;
box-shadow:
0 3px 8px rgba(0, 0, 0, 0.12),
0 1px 2px rgba(0, 0, 0, 0.06);
transition:
left 0.34s cubic-bezier(0.4, 0, 0.2, 1),
width 0.34s cubic-bezier(0.4, 0, 0.2, 1);
pointer-events: none;
}
.tt26b {
flex: 1;
min-width: 0;
padding: 8px 14px;
border: 0;
background: transparent;
font: 600 13px/1 inherit;
color: #1c1c1e;
cursor: pointer;
position: relative;
z-index: 1;
transition: color 0.2s;
white-space: nowrap;
}
.tt26b:focus-visible {
outline: 2px solid #007aff;
outline-offset: 2px;
border-radius: 7px;
}
@media (prefers-reduced-motion: reduce) {
.tt26pill {
transition: none;
}
}
```
**JS:**
```js
/* iOS Segmented — toggle .active and slide white pill between tabs.
Re-positions on viewport resize so the pill stays locked to its segment. */
(function () {
var nav = document.querySelector(".tt26n");
if (!nav) return;
var btns = nav.querySelectorAll("[data-t]");
var pill = nav.querySelector(".tt26pill");
var current = null;
function reposition() {
if (!current || !pill) return;
pill.style.left = current.offsetLeft + "px";
pill.style.width = current.offsetWidth + "px";
}
function activate(btn) {
current = btn;
btns.forEach(function (b) {
b.classList.toggle("active", b === btn);
});
reposition();
}
btns.forEach(function (b) {
b.addEventListener("click", function () {
activate(b);
});
});
window.addEventListener("resize", reposition);
var initial = nav.querySelector("[data-t].active") || btns[0];
if (initial) activate(initial);
})();
```
### 07. Bento Grid
**Type:** Pure CSS
**Description:** Three-column bento grid where the tabs themselves are the cards. The active card lifts, gains a colored top stripe, and the panel becomes the fourth bento cell underneath. Pure CSS.
**HTML:**
```html
```
**CSS:**
```css
.tt27 {
background: #0a0a0e;
padding: 18px 16px;
font-family: ui-sans-serif, system-ui, sans-serif;
min-height: 220px;
box-sizing: border-box;
width: 100%;
}
.tt27grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
min-width: 0;
}
.tt27grid input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt27card {
position: relative;
padding: 18px 14px 14px;
background: #18181f;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 10px;
cursor: pointer;
display: flex;
flex-direction: column;
gap: 4px;
transition:
transform 0.25s,
background 0.25s,
border-color 0.25s,
box-shadow 0.3s;
min-width: 0;
}
.tt27card:hover {
background: #1f1f28;
border-color: rgba(255, 255, 255, 0.14);
}
.tt27ttl {
font:
700 13px/1 ui-sans-serif,
system-ui;
color: #fff;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.tt27sub {
font:
11px/1 ui-sans-serif,
system-ui;
color: rgba(255, 255, 255, 0.55);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.tt27grid input:checked + .tt27card {
background: #1c1c26;
border-color: #7c6cff;
transform: translateY(-2px);
box-shadow: 0 8px 18px rgba(124, 108, 255, 0.25);
}
.tt27grid input:focus-visible + .tt27card {
outline: 2px dashed #7c6cff;
outline-offset: 3px;
}
.tt27p {
display: none;
margin-top: 12px;
padding: 14px 16px;
background: #18181f;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 10px;
font:
12px/1.55 ui-sans-serif,
system-ui;
color: rgba(255, 255, 255, 0.7);
}
.tt27:has(#tt27-r1:checked) .tt27p:nth-of-type(1),
.tt27:has(#tt27-r2:checked) .tt27p:nth-of-type(2),
.tt27:has(#tt27-r3:checked) .tt27p:nth-of-type(3) {
display: block;
}
```
### 08. Vertical Dots
**Type:** Pure CSS
**Description:** Sidebar nav with a connecting timeline rule. The active item's dot fills in solid teal with a soft outer glow; inactive dots stay hollow. Vertical layout. Pure CSS.
**HTML:**
```html
Profile
Account
Billing
Logs
```
**CSS:**
```css
.tt28 {
background: #0d1117;
padding: 18px 22px;
font-family: ui-sans-serif, system-ui, sans-serif;
min-height: 220px;
box-sizing: border-box;
width: 100%;
}
/* nav padding-left = 30px → that x defines a "rail column" centered at x=15.
Both the timeline rule and the active dot center on x=15 so they sit on
the same vertical axis regardless of dot size or label padding. */
.tt28n {
position: relative;
display: flex;
flex-direction: column;
gap: 8px;
padding-left: 30px;
min-width: 0;
}
.tt28n::before {
content: "";
position: absolute;
left: 14px;
top: 14px;
bottom: 14px;
width: 2px;
background: rgba(56, 189, 248, 0.18);
border-radius: 1px;
}
.tt28n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt28b {
position: relative;
display: flex;
align-items: center;
gap: 12px;
padding: 6px 8px;
font:
600 12px/1 ui-sans-serif,
system-ui;
color: rgba(255, 255, 255, 0.55);
cursor: pointer;
border-radius: 4px;
transition:
color 0.22s,
background 0.22s;
white-space: nowrap;
}
.tt28dot {
width: 12px;
height: 12px;
border-radius: 50%;
border: 1.5px solid rgba(56, 189, 248, 0.45);
background: #0d1117;
flex-shrink: 0;
/* margin-left = -(button padding-left + dot half-width - line center)
= -(8 + 6 - 15) = -(-1) ... actually: button starts at nav-padding-left
(30px). Dot needs left edge at x=9 so center sits at x=15 (line center).
Button content starts at x=38 (30 + 8 padding). To put dot's left edge
at x=9, margin-left = 9 - 38 = -29px. */
margin-left: -29px;
transition:
background 0.25s,
border-color 0.25s,
box-shadow 0.3s;
position: relative;
z-index: 1;
}
.tt28b:hover {
color: rgba(255, 255, 255, 0.85);
background: rgba(56, 189, 248, 0.06);
}
.tt28n input:checked + .tt28b {
color: #7dd3fc;
}
.tt28n input:checked + .tt28b .tt28dot {
background: #38bdf8;
border-color: #38bdf8;
box-shadow: 0 0 10px rgba(56, 189, 248, 0.55);
}
.tt28n input:focus-visible + .tt28b {
outline: 1px dashed #38bdf8;
outline-offset: 3px;
}
```
### 09. CRT Terminal
**Type:** Pure CSS
**Description:** Vintage CRT terminal aesthetic: green phosphor text, scanline overlay, macOS traffic lights in the title bar. Active tab shows a blinking caret cursor. Pure CSS.
**HTML:**
```html
```
**CSS:**
```css
.tt29 {
background: #0a0a0a;
padding: 18px 16px;
font-family: ui-monospace, "SF Mono", Menlo, monospace;
min-height: 220px;
box-sizing: border-box;
width: 100%;
}
.tt29win {
background: #050505;
border: 1px solid rgba(74, 222, 128, 0.18);
border-radius: 6px;
overflow: hidden;
box-shadow:
0 0 0 1px rgba(74, 222, 128, 0.04),
0 8px 24px rgba(0, 0, 0, 0.5);
}
.tt29bar {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 12px;
background: #111;
border-bottom: 1px solid rgba(74, 222, 128, 0.12);
}
.tt29light {
width: 11px;
height: 11px;
border-radius: 50%;
}
.tt29-r {
background: #ff5f57;
}
.tt29-y {
background: #febc2e;
}
.tt29-g {
background: #28c840;
}
.tt29ttl {
margin-left: 10px;
font:
11px/1 ui-monospace,
monospace;
color: rgba(255, 255, 255, 0.45);
letter-spacing: 0.04em;
}
.tt29n {
display: flex;
gap: 0;
background: #0a0a0a;
border-bottom: 1px solid rgba(74, 222, 128, 0.12);
min-width: 0;
}
.tt29n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt29b {
flex: 1;
min-width: 0;
padding: 8px 12px;
font:
11px/1 ui-monospace,
monospace;
color: rgba(74, 222, 128, 0.5);
cursor: pointer;
text-align: center;
white-space: nowrap;
transition:
color 0.2s,
background 0.2s;
border-right: 1px solid rgba(74, 222, 128, 0.08);
}
.tt29b:last-of-type {
border-right: 0;
}
.tt29b:hover {
color: rgba(74, 222, 128, 0.85);
background: rgba(74, 222, 128, 0.04);
}
.tt29n input:checked + .tt29b {
color: #4ade80;
background: rgba(74, 222, 128, 0.1);
text-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
}
.tt29n input:focus-visible + .tt29b {
outline: 1px dashed #4ade80;
outline-offset: -3px;
}
.tt29body {
position: relative;
padding: 14px 14px;
min-height: 90px;
background: repeating-linear-gradient(
0deg,
transparent 0,
transparent 2px,
rgba(74, 222, 128, 0.04) 2px,
rgba(74, 222, 128, 0.04) 3px
);
}
.tt29p {
display: none;
font:
11px/1.7 ui-monospace,
monospace;
color: #4ade80;
text-shadow: 0 0 4px rgba(74, 222, 128, 0.4);
}
.tt29:has(#tt29-r1:checked) .tt29p:nth-of-type(1),
.tt29:has(#tt29-r2:checked) .tt29p:nth-of-type(2),
.tt29:has(#tt29-r3:checked) .tt29p:nth-of-type(3) {
display: block;
}
```
### 10. Morph Icon
**Type:** Pure CSS
**Description:** Compact icon-only tabs that expand on activation: the label morphs in via a max-width transition, smoothly widening the active tab inline. Pure CSS, no positional JS.
**HTML:**
```html
```
**CSS:**
```css
.tt30 {
background: #fdf6e9;
padding: 32px 18px;
font-family: ui-sans-serif, system-ui, sans-serif;
min-height: 220px;
box-sizing: border-box;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.tt30n {
display: flex;
gap: 6px;
background: #fff;
border-radius: 999px;
padding: 6px;
box-shadow: 0 4px 14px rgba(212, 67, 127, 0.12);
min-width: 0;
}
.tt30n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt30b {
display: flex;
align-items: center;
gap: 0;
padding: 10px 12px;
border-radius: 999px;
cursor: pointer;
color: #94748a;
transition:
background 0.3s,
color 0.3s,
gap 0.4s cubic-bezier(0.4, 0, 0.2, 1);
white-space: nowrap;
overflow: hidden;
}
.tt30b:hover {
color: #d4437f;
}
.tt30i {
width: 18px;
height: 18px;
flex-shrink: 0;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
.tt30l {
font:
700 12px/1 ui-sans-serif,
system-ui;
max-width: 0;
overflow: hidden;
opacity: 0;
transition:
max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
opacity 0.3s;
}
.tt30n input:checked + .tt30b {
background: #d4437f;
color: #fff;
gap: 8px;
}
.tt30n input:checked + .tt30b .tt30l {
max-width: 120px;
opacity: 1;
}
.tt30n input:focus-visible + .tt30b {
outline: 2px dashed #d4437f;
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.tt30b,
.tt30l {
transition: none;
}
}
```
### 11. Typewriter
**Type:** Pure CSS
**Description:** Activating a tab triggers a typewriter animation on the panel: text reveals via max-width steps animation, with a blinking cursor at the end. Pure CSS via radio inputs and steps() timing.
**HTML:**
```html
```
**CSS:**
```css
.tt31 {
background: #1a1625;
padding: 22px 22px;
font-family: ui-monospace, "SF Mono", Menlo, monospace;
min-height: 220px;
box-sizing: border-box;
width: 100%;
}
.tt31n {
display: flex;
gap: 4px;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
margin-bottom: 18px;
min-width: 0;
}
.tt31n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt31b {
flex: 1;
min-width: 0;
padding: 9px 12px;
font:
600 11px/1 ui-monospace,
monospace;
letter-spacing: 0.1em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.45);
cursor: pointer;
text-align: center;
border-bottom: 2px solid transparent;
margin-bottom: -1px;
transition:
color 0.2s,
border-color 0.2s;
white-space: nowrap;
}
.tt31b:hover {
color: rgba(255, 255, 255, 0.85);
}
.tt31n input:checked + .tt31b {
color: #fbbf24;
border-bottom-color: #fbbf24;
}
.tt31n input:focus-visible + .tt31b {
outline: 1px dashed #fbbf24;
outline-offset: -3px;
}
.tt31body {
padding: 6px 0;
}
.tt31p {
display: none;
}
.tt31:has(#tt31-r1:checked) .tt31p:nth-of-type(1),
.tt31:has(#tt31-r2:checked) .tt31p:nth-of-type(2),
.tt31:has(#tt31-r3:checked) .tt31p:nth-of-type(3) {
display: block;
}
.tt31type {
display: inline-block;
overflow: hidden;
white-space: nowrap;
font:
14px/1.6 ui-monospace,
monospace;
color: #fbbf24;
border-right: 2px solid #fbbf24;
width: 0;
animation:
tt31-type 1.4s steps(20) forwards,
tt31-blink 0.8s step-end infinite 1.4s;
}
@keyframes tt31-type {
to {
width: 100%;
}
}
@keyframes tt31-blink {
50% {
border-right-color: transparent;
}
}
@media (prefers-reduced-motion: reduce) {
.tt31type {
animation: none;
width: 100%;
border-right-color: transparent;
}
}
```
### 12. Particle Burst
**Type:** CSS + JS
**Description:** Each tab click spawns 8 small color sparks that fly outward and fade. JS positions each particle at the click point; CSS animates trajectory + fade. The active tab is also highlighted with a coral underline.
**HTML:**
```html
Spark
Bloom
Burst
Flare
```
**CSS:**
```css
.tt32 {
background: #1c1424;
padding: 36px 18px;
font-family: ui-sans-serif, system-ui, sans-serif;
min-height: 220px;
box-sizing: border-box;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.tt32n {
position: relative;
display: flex;
gap: 0;
min-width: 0;
width: 100%;
max-width: 420px;
}
.tt32line {
position: absolute;
bottom: -2px;
left: 0;
height: 2px;
width: 0;
background: #ff6b6b;
border-radius: 2px;
transition:
left 0.4s cubic-bezier(0.65, 0, 0.35, 1),
width 0.4s cubic-bezier(0.65, 0, 0.35, 1);
pointer-events: none;
}
.tt32b {
flex: 1;
min-width: 0;
padding: 10px 12px;
border: 0;
background: transparent;
font:
600 12px/1 ui-sans-serif,
system-ui;
letter-spacing: 0.04em;
color: rgba(255, 255, 255, 0.55);
cursor: pointer;
position: relative;
transition: color 0.25s;
white-space: nowrap;
}
.tt32b:hover {
color: rgba(255, 255, 255, 0.9);
}
.tt32b.active {
color: #ff6b6b;
}
.tt32b:focus-visible {
outline: 2px solid #ff6b6b;
outline-offset: 2px;
border-radius: 4px;
}
.tt32spark {
position: absolute;
width: 5px;
height: 5px;
border-radius: 50%;
pointer-events: none;
animation: tt32-fly 0.6s cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
}
@keyframes tt32-fly {
from {
transform: translate(0, 0) scale(1);
opacity: 1;
}
to {
transform: translate(var(--dx), var(--dy)) scale(0.3);
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.tt32line {
transition: none;
}
.tt32spark {
animation: none;
opacity: 0;
}
}
```
**JS:**
```js
/* Particle Burst — toggle .active, slide underline, spawn 8 color sparks
on click. Re-positions the underline on viewport resize. */
(function () {
var nav = document.querySelector(".tt32n");
if (!nav) return;
var btns = nav.querySelectorAll("[data-t]");
var line = nav.querySelector(".tt32line");
var current = null;
var COLORS = ["#ff6b6b", "#ffd166", "#06d6a0", "#118ab2", "#ef476f"];
function reposition() {
if (!current || !line) return;
line.style.left = current.offsetLeft + "px";
line.style.width = current.offsetWidth + "px";
}
function burst(btn) {
var rect = btn.getBoundingClientRect();
var navRect = nav.getBoundingClientRect();
var cx = rect.left - navRect.left + rect.width / 2;
var cy = rect.top - navRect.top + rect.height / 2;
for (var i = 0; i < 8; i++) {
var s = document.createElement("span");
s.className = "tt32spark";
s.style.left = cx + "px";
s.style.top = cy + "px";
s.style.background = COLORS[i % COLORS.length];
var angle = (i / 8) * Math.PI * 2;
var dist = 32 + Math.random() * 18;
s.style.setProperty("--dx", Math.cos(angle) * dist + "px");
s.style.setProperty("--dy", Math.sin(angle) * dist + "px");
nav.appendChild(s);
setTimeout(
(function (n) {
return function () {
if (n.parentNode) n.parentNode.removeChild(n);
};
})(s),
700,
);
}
}
function activate(btn, withBurst) {
current = btn;
btns.forEach(function (b) {
b.classList.toggle("active", b === btn);
});
reposition();
if (withBurst) burst(btn);
}
btns.forEach(function (b) {
b.addEventListener("click", function () {
activate(b, true);
});
});
window.addEventListener("resize", reposition);
var initial = nav.querySelector("[data-t].active") || btns[0];
if (initial) activate(initial, false);
})();
```
### 13. Specimen No.
**Type:** CSS + JS
**Description:** Tab labels read as letterpress specimen slugs. The active tab is announced by a 4-digit serial that flips digits on activation, and a mint underline draws under the active label.
**HTML:**
```html
0317
Helvetica
Bodoni
Futura
Cut by Max Miedinger, 1957. Neo-grotesque sans.
Cut by Giambattista Bodoni, 1798. Modern serif.
Cut by Paul Renner, 1927. Geometric sans.
```
**CSS:**
```css
.tt01 {
background: #1f2326;
padding: 18px 22px 16px;
font-family: ui-monospace, monospace;
width: 100%;
}
.tt01serial {
font:
800 36px/1 ui-monospace,
monospace;
color: #51d5c2;
letter-spacing: 0.04em;
margin-bottom: 6px;
transition: opacity 0.15s;
}
.tt01serial.fade {
opacity: 0.2;
}
.tt01n {
position: relative;
display: flex;
gap: 0;
border-top: 1.5px solid rgba(81, 213, 194, 0.25);
border-bottom: 1px solid rgba(81, 213, 194, 0.12);
}
.tt01b {
flex: 1;
padding: 12px 8px;
border: 0;
background: transparent;
font:
700 11px/1 ui-monospace,
monospace;
letter-spacing: 0.18em;
text-transform: uppercase;
color: rgba(232, 226, 208, 0.45);
cursor: pointer;
border-right: 1px solid rgba(81, 213, 194, 0.1);
transition:
color 0.25s,
transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tt01b:last-child {
border-right: 0;
}
.tt01b:hover {
color: rgba(232, 226, 208, 0.75);
}
.tt01b.active {
color: #51d5c2;
transform: translateY(-1px);
}
.tt01rule {
position: absolute;
bottom: -1px;
left: 0;
width: 0;
height: 2px;
background: #51d5c2;
transition:
left 0.4s cubic-bezier(0.65, 0, 0.35, 1),
width 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.tt01p {
display: none;
padding-top: 12px;
font:
italic 11px/1.6 ui-serif,
Georgia;
color: rgba(232, 226, 208, 0.7);
}
.tt01p.active {
display: block;
}
```
**JS:**
```js
/* Specimen No. — toggle .active and update sliding rule + flip serial.
Re-positions the sliding rule on viewport resize. */
(function () {
var nav = document.querySelector(".tt01n");
if (!nav) return;
var btns = nav.querySelectorAll("[data-t]");
var serial = document.querySelector("[data-tt01-serial]");
var rule = document.querySelector(".tt01rule");
var pnls = document.querySelectorAll(".tt01p");
var current = null;
function reposition() {
if (!current || !rule) return;
rule.style.left = current.offsetLeft + "px";
rule.style.width = current.offsetWidth + "px";
}
function activate(btn) {
current = btn;
btns.forEach(function (b) {
b.classList.toggle("active", b === btn);
});
var i = Array.prototype.indexOf.call(btns, btn);
pnls.forEach(function (p, j) {
p.classList.toggle("active", j === i);
});
reposition();
if (serial && btn.dataset.tt01) {
serial.classList.add("fade");
setTimeout(function () {
serial.textContent = btn.dataset.tt01;
serial.classList.remove("fade");
}, 150);
}
}
btns.forEach(function (b) {
b.addEventListener("click", function () {
activate(b);
});
});
window.addEventListener("resize", reposition);
var initial = nav.querySelector("[data-t].active") || btns[0];
if (initial) activate(initial);
})();
```
### 14. Cropped Letter
**Type:** Pure CSS
**Description:** The active tab's first letter scales 14→32px, baseline-shifts down, and crops at the tab's right edge. Inactive labels stay at compact display size.
**HTML:**
```html
```
**CSS:**
```css
.tt02 {
background: #1a1a1a;
padding: 14px 0 16px;
font-family: ui-serif, Georgia, serif;
width: 100%;
}
.tt02n {
display: flex;
gap: 0;
border-top: 1px solid rgba(232, 226, 208, 0.18);
border-bottom: 1px solid rgba(232, 226, 208, 0.18);
}
.tt02n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt02b {
flex: 1 1 0;
min-width: 0;
height: 64px;
padding: 0;
border: 0;
background: transparent;
cursor: pointer;
position: relative;
overflow: hidden;
border-right: 1px solid rgba(232, 226, 208, 0.12);
display: block;
}
.tt02n label.tt02b:last-of-type {
border-right: 0;
}
.tt02hd {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: block;
font:
600 14px/1 ui-serif,
Georgia,
serif;
color: rgba(232, 226, 208, 0.5);
letter-spacing: 0.02em;
white-space: nowrap;
transition:
color 0.25s,
font-size 0.5s cubic-bezier(0.65, 0, 0.35, 1),
transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.tt02b:hover .tt02hd {
color: rgba(232, 226, 208, 0.85);
}
.tt02n input:checked + .tt02b .tt02hd {
color: #e8e2d0;
font-size: 28px;
transform: translate(-50%, -50%);
}
.tt02p {
display: none;
padding: 10px 18px 0;
font:
11px/1.55 ui-monospace,
monospace;
color: rgba(232, 226, 208, 0.65);
letter-spacing: 0.04em;
}
.tt02:has(#tt02-r1:checked) .tt02p:nth-of-type(1),
.tt02:has(#tt02-r2:checked) .tt02p:nth-of-type(2),
.tt02:has(#tt02-r3:checked) .tt02p:nth-of-type(3) {
display: block;
}
```
### 15. Sidebar Nav
**Type:** CSS + JS
**Description:** Vertical icon-driven nav inspired by hand-built dashboard sidebars. Dusty olive accent bar slides between rows; the active icon shifts left and a label slides in from behind it.
**HTML:**
```html
Home
Activity
People
Settings
```
**CSS:**
```css
.tt03 {
background: #e8dac5;
min-height: 240px;
display: flex;
align-items: stretch;
padding: 12px 0 12px 12px;
font-family: ui-sans-serif, system-ui, sans-serif;
width: 100%;
}
.tt03n {
position: relative;
display: flex;
flex-direction: column;
gap: 4px;
flex: 1;
}
.tt03b {
position: relative;
display: flex;
align-items: center;
gap: 14px;
padding: 12px 18px;
border: 0;
background: transparent;
font:
600 13px/1 ui-sans-serif,
system-ui;
color: rgba(58, 46, 30, 0.55);
cursor: pointer;
text-align: left;
transition:
color 0.25s,
transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
background 0.25s;
}
.tt03b:hover {
color: rgba(58, 46, 30, 0.85);
background: rgba(107, 142, 84, 0.08);
}
.tt03i {
width: 18px;
height: 18px;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
flex-shrink: 0;
transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tt03l {
opacity: 0.7;
transform: translateX(-4px);
transition:
opacity 0.3s,
transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}
.tt03b.active {
color: #4a6a3a;
transform: translateX(4px);
}
.tt03b.active .tt03i {
transform: scale(1.12);
}
.tt03b.active .tt03l {
opacity: 1;
transform: translateX(0);
}
.tt03acc {
position: absolute;
left: -12px;
top: 0;
width: 4px;
height: 0;
background: #6b8e54;
border-radius: 0 4px 4px 0;
transition:
top 0.45s cubic-bezier(0.65, 0, 0.35, 1),
height 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
```
**JS:**
```js
/* Sidebar Nav — toggle .active and slide vertical accent bar.
Re-positions the accent bar on viewport resize. */
(function () {
var nav = document.querySelector(".tt03n");
if (!nav) return;
var btns = nav.querySelectorAll("[data-t]");
var acc = nav.querySelector(".tt03acc");
var current = null;
function reposition() {
if (!current || !acc) return;
acc.style.top = current.offsetTop + "px";
acc.style.height = current.offsetHeight + "px";
}
function activate(btn) {
current = btn;
btns.forEach(function (b) {
b.classList.toggle("active", b === btn);
});
reposition();
}
btns.forEach(function (b) {
b.addEventListener("click", function () {
activate(b);
});
});
window.addEventListener("resize", reposition);
var initial = nav.querySelector("[data-t].active") || btns[0];
if (initial) activate(initial);
})();
```
### 16. Halo Tabs
**Type:** Pure CSS
**Description:** Mobile-style nav-bar tabs in a soft white pill. Inactive icons are line-only grey. Activating a tab tints the icon mint, blooms a soft pink halo behind it, and slides the label in to the right of the icon — no underline, just the color shift and the label appearance.
**HTML:**
```html
```
**CSS:**
```css
.tt04 {
background: #f0f1f1;
padding: 0;
font-family: "Nunito", ui-sans-serif, system-ui, sans-serif;
min-height: 220px;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
.tt04n {
position: relative;
display: flex;
gap: 4px;
padding: 18px 22px;
background: #fefefe;
border-radius: 999px;
margin: 14px;
flex: 1;
max-width: 480px;
box-shadow: 0 6px 22px -8px rgba(0, 0, 0, 0.12);
font-size: 1em;
}
.tt04n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt04b {
position: relative;
flex: 1 1 0;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 6px 4px;
border: 0;
background: transparent;
cursor: pointer;
overflow: hidden;
color: #d5dadd;
transition:
flex 0.45s cubic-bezier(0.4, 0, 0.2, 1),
color 0.3s;
}
.tt04b:hover {
color: #9aa0a4;
}
/* Soft pink halo behind the active icon, top-left offset like the reference */
.tt04halo {
position: absolute;
top: 14%;
left: 22%;
width: 22px;
height: 22px;
border-radius: 50%;
background: #fde4ec;
transform: scale(0);
transform-origin: center;
transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 0;
pointer-events: none;
}
.tt04i {
width: 26px;
height: 26px;
fill: none;
stroke: currentColor;
stroke-width: 1.6;
stroke-linecap: round;
stroke-linejoin: round;
position: relative;
z-index: 2;
flex-shrink: 0;
transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.tt04l {
position: relative;
z-index: 2;
font:
800 15px/1 "Nunito",
ui-sans-serif,
system-ui;
letter-spacing: 0.01em;
white-space: nowrap;
color: #2dd4bf;
/* Hidden until active — slides in to the right of the icon */
max-width: 0;
overflow: hidden;
opacity: 0;
transform: translateX(-8px);
transition:
max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
opacity 0.3s 0.1s,
transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.tt04n input:checked + .tt04b {
flex: 2.6;
color: #2dd4bf;
}
.tt04n input:checked + .tt04b .tt04halo {
transform: scale(1);
}
.tt04n input:checked + .tt04b .tt04l {
max-width: 200px;
opacity: 1;
transform: translateX(0);
}
@media (prefers-reduced-motion: reduce) {
.tt04halo,
.tt04l,
.tt04b {
transition: none;
}
}
```
### 17. Two Weights
**Type:** Pure CSS
**Description:** Pure type-weight contrast. Inactive sits at 200 hairline, active jumps to 900 black with a subtle scale lift. The brand violet underlines the active label.
**HTML:**
```html
```
**CSS:**
```css
.tt05 {
background: #15151d;
padding: 26px 22px 22px;
font-family: ui-sans-serif, system-ui, sans-serif;
width: 100%;
}
.tt05n {
display: flex;
gap: 28px;
}
.tt05n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt05b {
position: relative;
border: 0;
background: transparent;
padding: 0 0 8px;
font:
200 26px/1 ui-sans-serif,
system-ui;
color: #e8e2d0;
cursor: pointer;
letter-spacing: -0.02em;
font-variation-settings: "wght" 200;
transform: scale(0.96);
transform-origin: bottom left;
transition:
font-weight 0.45s,
font-variation-settings 0.45s,
transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tt05b::after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 2px;
background: #7c5cff;
transform-origin: left;
transform: scaleX(0);
transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.tt05b:hover {
font-variation-settings: "wght" 400;
}
.tt05n input:checked + .tt05b {
font-weight: 900;
font-variation-settings: "wght" 900;
transform: scale(1);
}
.tt05n input:checked + .tt05b::after {
transform: scaleX(1);
}
.tt05p {
display: none;
padding-top: 16px;
font:
12px/1.6 ui-serif,
Georgia,
serif;
color: rgba(232, 226, 208, 0.7);
max-width: 360px;
}
.tt05:has(#tt05-r1:checked) .tt05p:nth-of-type(1),
.tt05:has(#tt05-r2:checked) .tt05p:nth-of-type(2),
.tt05:has(#tt05-r3:checked) .tt05p:nth-of-type(3) {
display: block;
}
```
### 18. Underset Caps
**Type:** CSS + JS
**Description:** Tiny uppercase mono labels above a single thick rule. The rule slides under the active label — measured live, like a sliding bookmark on a typecase shelf.
**HTML:**
```html
Volume I
Volume II
Volume III
Volume IV
The Origins, 1450–1600.
The Reformation, 1600–1750.
The Industrial Cut, 1750–1900.
The Digital Era, 1980 onward.
```
**CSS:**
```css
.tt06 {
background: #1a1a1a;
padding: 28px 22px 22px;
font-family: ui-monospace, monospace;
width: 100%;
}
.tt06n {
position: relative;
display: flex;
gap: 24px;
padding-bottom: 14px;
}
.tt06b {
border: 0;
background: transparent;
padding: 0;
font:
700 9px/1 ui-monospace,
monospace;
letter-spacing: 0.28em;
text-transform: uppercase;
color: rgba(232, 226, 208, 0.5);
cursor: pointer;
transition: color 0.25s;
}
.tt06b:hover {
color: rgba(232, 226, 208, 0.85);
}
.tt06b.active {
color: #e8e2d0;
}
.tt06rule {
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 6px;
background: #c43a32;
transition:
left 0.45s cubic-bezier(0.65, 0, 0.35, 1),
width 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.tt06p {
display: none;
padding-top: 18px;
font:
italic 12px/1.6 ui-serif,
Georgia,
serif;
color: rgba(232, 226, 208, 0.7);
}
.tt06p.active {
display: block;
}
```
**JS:**
```js
/* Underset Caps — toggle .active and slide horizontal rule under active.
Re-positions the sliding rule on viewport resize. */
(function () {
var nav = document.querySelector(".tt06n");
if (!nav) return;
var btns = nav.querySelectorAll("[data-t]");
var rule = nav.querySelector(".tt06rule");
var pnls = document.querySelectorAll(".tt06p");
var current = null;
function reposition() {
if (!current || !rule) return;
rule.style.left = current.offsetLeft + "px";
rule.style.width = current.offsetWidth + "px";
}
function activate(btn) {
current = btn;
btns.forEach(function (b) {
b.classList.toggle("active", b === btn);
});
var i = Array.prototype.indexOf.call(btns, btn);
pnls.forEach(function (p, j) {
p.classList.toggle("active", j === i);
});
reposition();
}
btns.forEach(function (b) {
b.addEventListener("click", function () {
activate(b);
});
});
window.addEventListener("resize", reposition);
var initial = nav.querySelector("[data-t].active") || btns[0];
if (initial) activate(initial);
})();
```
### 19. Drop Cap
**Type:** Pure CSS
**Description:** Inactive tabs are mono single-letter initials. The active tab unfolds into a rotating-and-scaling serif drop cap followed by the rest of the word; tail unfolds left-to-right.
**HTML:**
```html
```
**CSS:**
```css
.tt07 {
background: #e8dec8;
padding: 22px 22px 18px;
width: 100%;
}
.tt07n {
display: flex;
gap: 22px;
align-items: baseline;
border-bottom: 1px solid rgba(12, 85, 96, 0.22);
padding-bottom: 14px;
}
.tt07n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt07b {
border: 0;
background: transparent;
padding: 0;
cursor: pointer;
display: inline-flex;
align-items: baseline;
color: #0c5560;
transition: opacity 0.3s;
}
.tt07cap {
font:
900 26px/1 ui-serif,
Georgia,
serif;
color: #0c5560;
display: inline-block;
transform-origin: center bottom;
transition:
color 0.35s,
transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tt07rest {
font:
italic 16px/1 ui-serif,
Georgia,
serif;
color: #0c5560;
margin-left: 1px;
max-width: 0;
overflow: hidden;
white-space: nowrap;
transition: max-width 0.5s cubic-bezier(0.65, 0, 0.35, 1) 0.1s;
opacity: 0.7;
}
.tt07b {
opacity: 0.4;
}
.tt07b:hover {
opacity: 0.78;
}
.tt07n input:checked + .tt07b {
opacity: 1;
}
.tt07n input:checked + .tt07b .tt07cap {
color: #d44a2a;
transform: rotate(-4deg) scale(1.15);
}
.tt07n input:checked + .tt07b .tt07rest {
max-width: 200px;
}
.tt07p {
display: none;
padding-top: 14px;
font:
italic 12px/1.6 ui-serif,
Georgia,
serif;
color: #3a3a42;
}
.tt07:has(#tt07-r1:checked) .tt07p:nth-of-type(1),
.tt07:has(#tt07-r2:checked) .tt07p:nth-of-type(2),
.tt07:has(#tt07-r3:checked) .tt07p:nth-of-type(3) {
display: block;
}
```
### 20. Stencil Cut
**Type:** Pure CSS
**Description:** Active tab is a solid safety-yellow plate stamped on ink. Pure two-color print — black ink on yellow for the active label, muted yellow on ink for inactive. The 2px upward translate gives the yellow plate a small physical lift over the surrounding stage.
**HTML:**
```html
```
**CSS:**
```css
.tt08 {
background: #1a1a1a;
padding: 22px 22px 18px;
font-family: ui-monospace, monospace;
width: 100%;
}
.tt08n {
display: flex;
gap: 8px;
}
.tt08n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt08b {
flex: 1;
padding: 14px 12px;
border: 0;
background: transparent;
font:
900 14px/1 ui-monospace,
monospace;
letter-spacing: 0.24em;
text-transform: uppercase;
color: rgba(245, 203, 26, 0.45);
cursor: pointer;
position: relative;
overflow: hidden;
transition:
color 0.25s,
background 0.25s,
transform 0.25s;
}
.tt08b:hover {
color: rgba(245, 203, 26, 0.8);
}
.tt08n input:checked + .tt08b {
color: #1a1a1a;
background: #f5cb1a;
transform: translateY(-2px);
box-shadow: 0 4px 0 -2px rgba(0, 0, 0, 0.4);
}
.tt08p {
display: none;
padding-top: 14px;
font:
11px/1.6 ui-serif,
Georgia,
serif;
color: rgba(232, 226, 208, 0.7);
font-style: italic;
}
.tt08:has(#tt08-r1:checked) .tt08p:nth-of-type(1),
.tt08:has(#tt08-r2:checked) .tt08p:nth-of-type(2),
.tt08:has(#tt08-r3:checked) .tt08p:nth-of-type(3) {
display: block;
}
```
### 21. Bracket Marks
**Type:** CSS + JS
**Description:** The active tab is framed by typographic brackets — `[` on the left, `]` on the right — that physically slide between tabs. A single shared pair of pseudo-elements does the work.
**HTML:**
```html
One
Two
Three
[
]
The first marker.
The second marker.
The third marker.
```
**CSS:**
```css
.tt09 {
background: #25222e;
padding: 24px 22px 18px;
font-family: ui-serif, Georgia, serif;
width: 100%;
}
.tt09n {
position: relative;
display: flex;
gap: 18px;
justify-content: center;
}
.tt09b {
border: 0;
background: transparent;
padding: 6px 8px;
font:
600 16px/1 ui-serif,
Georgia,
serif;
color: rgba(232, 226, 208, 0.5);
cursor: pointer;
transition: color 0.3s;
}
.tt09b:hover {
color: rgba(232, 226, 208, 0.85);
}
.tt09b.active {
color: #e8e2d0;
}
.tt09bL,
.tt09bR {
position: absolute;
top: 50%;
transform: translateY(-50%);
font:
200 36px/1 ui-serif,
Georgia,
serif;
color: #dc1e3a;
pointer-events: none;
transition: left 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.tt09bL {
left: 0;
}
.tt09bR {
left: 0;
}
.tt09p {
display: none;
padding-top: 16px;
font:
italic 12px/1.6 ui-serif,
Georgia,
serif;
color: rgba(232, 226, 208, 0.7);
text-align: center;
}
.tt09p.active {
display: block;
}
```
**JS:**
```js
/* Bracket Marks — toggle .active and slide [ ] frame around active button.
Re-positions the brackets on viewport resize. */
(function () {
var nav = document.querySelector(".tt09n");
if (!nav) return;
var btns = nav.querySelectorAll("[data-t]");
var bL = nav.querySelector(".tt09bL");
var bR = nav.querySelector(".tt09bR");
var pnls = document.querySelectorAll(".tt09p");
var current = null;
function reposition() {
if (!current || !bL || !bR) return;
bL.style.left = current.offsetLeft - 20 + "px";
bR.style.left = current.offsetLeft + current.offsetWidth + 4 + "px";
}
function activate(btn) {
current = btn;
btns.forEach(function (b) {
b.classList.toggle("active", b === btn);
});
var i = Array.prototype.indexOf.call(btns, btn);
pnls.forEach(function (p, j) {
p.classList.toggle("active", j === i);
});
reposition();
}
btns.forEach(function (b) {
b.addEventListener("click", function () {
activate(b);
});
});
window.addEventListener("resize", reposition);
var initial = nav.querySelector("[data-t].active") || btns[0];
if (initial) activate(initial);
})();
```
### 22. Bauhaus Block
**Type:** Pure CSS
**Description:** Each tab is a distinct primary-color block. Active tab rises 6px and casts a hard offset shadow. Color and geometry as the entire indicator.
**HTML:**
```html
```
**CSS:**
```css
.tt10 {
background: #f5ead0;
padding: 22px 18px 16px;
font-family: ui-sans-serif, system-ui, sans-serif;
width: 100%;
}
.tt10n {
display: flex;
gap: 6px;
}
.tt10n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt10b {
flex: 1;
padding: 16px 8px;
border: 0;
font:
800 11px/1 ui-monospace,
monospace;
letter-spacing: 0.22em;
cursor: pointer;
text-align: center;
transition:
transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
box-shadow 0.3s;
}
.tt10-1 {
background: #c43a32;
color: #f5ead0;
}
.tt10-2 {
background: #d4a017;
color: #1a1a1a;
}
.tt10-3 {
background: #1a1a1a;
color: #e8e2d0;
}
.tt10-4 {
background: #f5ead0;
color: #1a1a1a;
box-shadow: inset 0 0 0 1.5px #1a1a1a;
}
.tt10b:hover {
transform: translateY(-2px);
}
.tt10n input:checked + .tt10b {
transform: translateY(-6px);
box-shadow: 0 6px 0 #1a1a1a;
}
.tt10n input:checked + .tt10-4 {
box-shadow:
inset 0 0 0 1.5px #1a1a1a,
0 6px 0 #1a1a1a;
}
.tt10p {
display: none;
padding-top: 14px;
font:
11px/1.6 ui-serif,
Georgia,
serif;
color: #3a3a42;
font-style: italic;
}
.tt10:has(#tt10-r1:checked) .tt10p:nth-of-type(1),
.tt10:has(#tt10-r2:checked) .tt10p:nth-of-type(2),
.tt10:has(#tt10-r3:checked) .tt10p:nth-of-type(3),
.tt10:has(#tt10-r4:checked) .tt10p:nth-of-type(4) {
display: block;
}
```
### 23. Reverse Stamp
**Type:** Pure CSS
**Description:** The whole bar is cream-on-crimson. The active tab inverts — crimson ink stamped on cream. A single-frame impact shadow flashes on activation, like a rubber stamp pressing in.
**HTML:**
```html
```
**CSS:**
```css
.tt11 {
background: #dc1e3a;
padding: 0;
font-family: ui-monospace, monospace;
min-height: 220px;
display: flex;
flex-direction: column;
width: 100%;
}
.tt11n {
display: flex;
gap: 0;
flex-shrink: 0;
}
.tt11n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt11b {
flex: 1;
padding: 18px 12px;
border: 0;
background: #dc1e3a;
color: #f5ead0;
font:
800 12px/1 ui-monospace,
monospace;
letter-spacing: 0.22em;
text-transform: uppercase;
cursor: pointer;
border-right: 1px solid rgba(245, 234, 208, 0.25);
transition:
background 0.05s steps(1, end),
color 0.05s steps(1, end),
box-shadow 0.4s;
}
.tt11b:last-child {
border-right: 0;
}
.tt11b:hover {
background: rgba(245, 234, 208, 0.1);
}
.tt11n input:checked + .tt11b {
background: #f5ead0;
color: #dc1e3a;
box-shadow: inset 0 0 0 0 rgba(0, 0, 0, 0.4);
animation: tt11-impact 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}
@keyframes tt11-impact {
0% {
box-shadow: inset 0 0 0 0 rgba(0, 0, 0, 0.4);
}
20% {
box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.5);
}
100% {
box-shadow: inset 0 0 0 0 rgba(0, 0, 0, 0);
}
}
.tt11p {
display: none;
padding: 14px 18px;
background: #f5ead0;
font:
italic 11px/1.6 ui-serif,
Georgia,
serif;
color: #3a3a42;
flex: 1;
}
.tt11:has(#tt11-r1:checked) .tt11p:nth-of-type(1),
.tt11:has(#tt11-r2:checked) .tt11p:nth-of-type(2),
.tt11:has(#tt11-r3:checked) .tt11p:nth-of-type(3),
.tt11:has(#tt11-r4:checked) .tt11p:nth-of-type(4),
.tt11:has(#tt11-r5:checked) .tt11p:nth-of-type(5),
.tt11:has(#tt11-r6:checked) .tt11p:nth-of-type(6) {
display: flex;
align-items: center;
}
@media (prefers-reduced-motion: reduce) {
.tt11n input:checked + .tt11b {
animation: none;
}
}
```
### 24. Hairline Frame
**Type:** Pure CSS
**Description:** Hairline-framed tabs in warm-white stock. Active tab's top edge thickens to 4px deep-navy AND four corner dots materialize at the frame's extremes — a Bodoni stroke-contrast move with editorial restraint.
**HTML:**
```html
```
**CSS:**
```css
.tt12 {
background: #f5f1ea;
padding: 26px 22px 22px;
font-family: ui-serif, Georgia, serif;
width: 100%;
}
.tt12n {
display: flex;
gap: 14px;
}
.tt12n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt12b {
position: relative;
padding: 14px 24px 11px;
border: 0.5px solid #1a2842;
border-top: 4px solid transparent;
background: transparent;
font:
600 13px/1 ui-serif,
Georgia,
serif;
letter-spacing: 0.06em;
color: rgba(26, 40, 66, 0.5);
cursor: pointer;
transition:
color 0.3s,
border-top-color 0.3s,
transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tt12b:hover {
color: rgba(26, 40, 66, 0.85);
transform: translateY(-1px);
}
.tt12n input:checked + .tt12b {
color: #1a2842;
border-top-color: #1a2842;
}
.tt12tk {
position: absolute;
width: 7px;
height: 7px;
background: #1a2842;
border-radius: 50%;
opacity: 0;
transition:
opacity 0.25s 0.1s,
transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
}
.tt12tk-1 {
top: -3.5px;
left: -3.5px;
transform: scale(0);
}
.tt12tk-2 {
top: -3.5px;
right: -3.5px;
transform: scale(0);
}
.tt12tk-3 {
bottom: -3.5px;
left: -3.5px;
transform: scale(0);
}
.tt12tk-4 {
bottom: -3.5px;
right: -3.5px;
transform: scale(0);
}
.tt12n input:checked + .tt12b .tt12tk {
opacity: 1;
transform: scale(1);
}
.tt12p {
display: none;
padding-top: 16px;
font:
italic 12px/1.6 ui-serif,
Georgia;
color: #3a3a42;
}
.tt12:has(#tt12-r1:checked) .tt12p:nth-of-type(1),
.tt12:has(#tt12-r2:checked) .tt12p:nth-of-type(2),
.tt12:has(#tt12-r3:checked) .tt12p:nth-of-type(3) {
display: block;
}
```
### 25. Pill Nav
**Type:** Pure CSS
**Description:** Mobile-style bottom-nav with hot-pink active pill that grows around the active icon and label. Inactive items show only icons; activation adds the label inside the pill.
**HTML:**
```html
```
**CSS:**
```css
.tt13 {
background: #1f2326;
min-height: 220px;
display: flex;
align-items: center;
padding: 28px 22px;
font-family: ui-sans-serif, system-ui, sans-serif;
width: 100%;
}
.tt13n {
flex: 1;
display: flex;
gap: 6px;
padding: 6px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 999px;
}
.tt13n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt13b {
position: relative;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 10px 14px;
border: 0;
background: transparent;
font:
700 12px/1 ui-sans-serif,
system-ui;
letter-spacing: 0.04em;
color: rgba(232, 226, 208, 0.55);
cursor: pointer;
border-radius: 999px;
flex: 1;
transition:
flex 0.45s cubic-bezier(0.34, 1.4, 0.5, 1),
background 0.25s,
color 0.25s;
}
.tt13b:hover {
color: rgba(232, 226, 208, 0.85);
}
.tt13i {
width: 18px;
height: 18px;
fill: none;
stroke: currentColor;
stroke-width: 1.7;
stroke-linecap: round;
stroke-linejoin: round;
transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.5, 1);
}
.tt13l {
max-width: 0;
white-space: nowrap;
overflow: hidden;
transition: max-width 0.45s cubic-bezier(0.65, 0, 0.35, 1) 0.05s;
}
.tt13n input:checked + .tt13b {
background: #ec4899;
color: #1a1a1a;
flex: 2.4;
}
.tt13n input:checked + .tt13b .tt13i {
transform: scale(1.1);
}
.tt13n input:checked + .tt13b .tt13l {
max-width: 120px;
}
```
### 26. Riso Misregistration
**Type:** Pure CSS
**Description:** Two-color riso print on charcoal stock. Active tab is a solid orange block with a cyan plate misregistered 4px below-left, like a zine pulled with the cyan plate slightly off the orange. No swashes, no icons; just two color plates and a typographic punch.
**HTML:**
```html
Issue 01
Issue 02
Issue 03
Issue 04
```
**CSS:**
```css
.tt14 {
background: #0e0f12;
padding: 28px 22px;
font-family: ui-monospace, monospace;
min-height: 220px;
display: flex;
align-items: center;
width: 100%;
}
.tt14n {
display: flex;
gap: 12px;
flex: 1;
}
.tt14n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt14b {
position: relative;
flex: 1;
border: 0;
background: transparent;
padding: 18px 16px;
font:
800 12px/1 ui-monospace,
monospace;
letter-spacing: 0.18em;
text-transform: uppercase;
color: rgba(232, 226, 208, 0.55);
cursor: pointer;
isolation: isolate;
transition: color 0.2s;
}
.tt14b:hover {
color: rgba(232, 226, 208, 0.92);
}
.tt14n input:checked + .tt14b {
color: #fdf6e9;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.tt14plate {
position: absolute;
inset: 0;
background: #ff5e3a;
z-index: -1;
opacity: 0;
transition: opacity 0.05s steps(1, end);
}
.tt14plate::before {
content: "";
position: absolute;
inset: 0;
background: #00a8c8;
transform: translate(-4px, 4px);
mix-blend-mode: multiply;
opacity: 0;
}
.tt14n input:checked + .tt14b .tt14plate {
opacity: 1;
}
.tt14n input:checked + .tt14b .tt14plate::before {
opacity: 0.92;
animation: tt14-plate-shift 0.32s cubic-bezier(0.65, 0, 0.35, 1);
}
@keyframes tt14-plate-shift {
0% {
transform: translate(0, 0);
opacity: 0;
}
55% {
transform: translate(-7px, 7px);
opacity: 0.92;
}
100% {
transform: translate(-4px, 4px);
opacity: 0.92;
}
}
.tt14lbl {
position: relative;
z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
.tt14n input:checked + .tt14b .tt14plate::before {
animation: none;
}
}
```
### 27. Slab Serif Swash
**Type:** Pure CSS
**Description:** Italic slab-serif labels on warm-cream stock. The active tab gets a deep-emerald swash underline — a curved SVG stroke beneath the word, like a calligrapher's flourish on letterpress vellum.
**HTML:**
```html
```
**CSS:**
```css
.tt15 {
background: #fdf4d6;
padding: 22px 22px 26px;
font-family: ui-serif, "Times New Roman", serif;
width: 100%;
}
.tt15n {
display: flex;
gap: 28px;
align-items: flex-end;
}
.tt15n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt15b {
position: relative;
border: 0;
background: transparent;
padding: 0 0 4px;
font:
italic 700 18px/1 ui-serif,
"Times New Roman",
serif;
color: rgba(15, 79, 61, 0.55);
cursor: pointer;
transition: color 0.25s;
}
.tt15b:hover {
color: rgba(15, 79, 61, 0.9);
}
.tt15n input:checked + .tt15b {
color: #0f4f3d;
}
.tt15s {
position: absolute;
bottom: -8px;
left: 0;
right: 0;
width: 100%;
height: 12px;
opacity: 0;
stroke-dasharray: 100;
stroke-dashoffset: 100;
transition:
opacity 0.2s,
stroke-dashoffset 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.tt15n input:checked + .tt15b .tt15s {
opacity: 1;
stroke-dashoffset: 0;
}
.tt15p {
display: none;
padding-top: 18px;
font:
italic 12px/1.6 ui-serif,
Georgia;
color: #3a3a42;
}
.tt15:has(#tt15-r1:checked) .tt15p:nth-of-type(1),
.tt15:has(#tt15-r2:checked) .tt15p:nth-of-type(2),
.tt15:has(#tt15-r3:checked) .tt15p:nth-of-type(3) {
display: block;
}
```
### 28. Specimen Card
**Type:** Pure CSS
**Description:** The whole bar reads as a foundry specimen card. Foundry name on the left in tiny mono; tabs on the right are large display glyph specimens. On activation the foundry name pulses a single beat.
**HTML:**
```html
```
**CSS:**
```css
.tt16 {
background: #1a1a1a;
padding: 16px 22px;
font-family: ui-serif, Georgia, serif;
width: 100%;
}
.tt16n {
display: flex;
align-items: stretch;
gap: 22px;
padding-bottom: 12px;
border-bottom: 1px solid rgba(232, 226, 208, 0.18);
}
.tt16n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt16meta {
padding-right: 22px;
border-right: 1px solid rgba(232, 226, 208, 0.18);
transition: opacity 0.4s;
}
.tt16name {
font:
800 11px/1.3 ui-monospace,
monospace;
color: #e8e2d0;
letter-spacing: 0.2em;
text-transform: uppercase;
}
.tt16id {
font:
600 9px/1 ui-monospace,
monospace;
color: rgba(232, 226, 208, 0.5);
margin-top: 6px;
letter-spacing: 0.2em;
}
.tt16tabs {
display: flex;
gap: 18px;
align-items: baseline;
}
.tt16b {
border: 0;
background: transparent;
padding: 0;
font:
700 28px/1 ui-serif,
Georgia,
serif;
color: rgba(232, 226, 208, 0.4);
cursor: pointer;
transition:
color 0.3s,
transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tt16b:hover {
color: rgba(232, 226, 208, 0.8);
}
.tt16n input:checked + .tt16b {
color: #c43a32;
transform: scale(1.15);
}
.tt16p {
display: none;
padding-top: 12px;
font:
italic 11px/1.6 ui-serif,
Georgia,
serif;
color: rgba(232, 226, 208, 0.7);
}
.tt16:has(#tt16-r1:checked) .tt16p:nth-of-type(1),
.tt16:has(#tt16-r2:checked) .tt16p:nth-of-type(2),
.tt16:has(#tt16-r3:checked) .tt16p:nth-of-type(3) {
display: block;
}
```
### 29. Sliding Pill
**Type:** CSS + JS
**Description:** Icon + label tabs on cream stock. A solid indigo pill is the indicator; it physically slides between tabs on click, with the active label inverting to cream.
**HTML:**
```html
Grid
List
Cards
```
**CSS:**
```css
.tt17 {
background: #f4f3ee;
padding: 28px 22px;
font-family: ui-sans-serif, system-ui, sans-serif;
min-height: 220px;
display: flex;
align-items: center;
width: 100%;
}
.tt17n {
position: relative;
display: flex;
gap: 0;
padding: 6px;
background: rgba(59, 58, 140, 0.06);
border-radius: 999px;
flex: 1;
}
.tt17pill {
position: absolute;
top: 6px;
left: 6px;
height: calc(100% - 12px);
width: 0;
background: #3b3a8c;
border-radius: 999px;
transition:
left 0.5s cubic-bezier(0.65, 0, 0.35, 1),
width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
z-index: 0;
}
.tt17b {
position: relative;
z-index: 1;
flex: 1;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 11px 14px;
border: 0;
background: transparent;
font:
600 13px/1 ui-sans-serif,
system-ui;
letter-spacing: 0.02em;
color: rgba(59, 58, 140, 0.65);
cursor: pointer;
transition: color 0.3s 0.05s;
}
.tt17b:hover {
color: rgba(59, 58, 140, 0.95);
}
.tt17b.active {
color: #f4f3ee;
}
.tt17i {
width: 16px;
height: 16px;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
}
```
**JS:**
```js
/* Sliding Pill — toggle .active and slide solid pill between tabs.
Re-positions the pill on viewport resize. */
(function () {
var nav = document.querySelector(".tt17n");
if (!nav) return;
var btns = nav.querySelectorAll("[data-t]");
var pill = nav.querySelector(".tt17pill");
var current = null;
function reposition() {
if (!current || !pill) return;
pill.style.left = current.offsetLeft + "px";
pill.style.width = current.offsetWidth + "px";
}
function activate(btn) {
current = btn;
btns.forEach(function (b) {
b.classList.toggle("active", b === btn);
});
reposition();
}
btns.forEach(function (b) {
b.addEventListener("click", function () {
activate(b);
});
});
window.addEventListener("resize", reposition);
var initial = nav.querySelector("[data-t].active") || btns[0];
if (initial) activate(initial);
})();
```
### 30. Folio Fold
**Type:** Pure CSS
**Description:** Inactive tabs are flat sand-colored rectangles on charcoal. The active tab's top-right corner physically folds down 18px via clip-path with a darker fold-underside triangle, lifts 4px above its siblings, and shows a small fold preview on hover. Inactive tabs preview an 8px fold on hover so the mechanic is discoverable.
**HTML:**
```html
```
**CSS:**
```css
.tt18 {
background: #25222e;
padding: 26px 22px 22px;
font-family: ui-serif, Georgia, serif;
width: 100%;
}
.tt18n {
display: flex;
gap: 6px;
align-items: stretch;
}
.tt18n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt18b {
position: relative;
flex: 1;
padding: 16px 18px;
border: 0;
background: #d4a574;
font:
600 13px/1 ui-serif,
Georgia,
serif;
color: rgba(26, 26, 26, 0.55);
cursor: pointer;
text-align: left;
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
transition:
clip-path 0.45s cubic-bezier(0.65, 0, 0.35, 1),
color 0.25s,
transform 0.3s,
box-shadow 0.4s,
background 0.25s;
}
.tt18b:hover {
color: rgba(26, 26, 26, 0.9);
background: #dcb084;
clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}
.tt18n input:checked + .tt18b {
color: #1a1a1a;
background: #e6c39c;
clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
transform: translateY(-4px);
box-shadow:
0 8px 16px rgba(0, 0, 0, 0.45),
0 -2px 0 rgba(255, 255, 255, 0.18) inset;
}
.tt18fold {
position: absolute;
top: 0;
right: 0;
width: 18px;
height: 18px;
background: #1c1a24;
clip-path: polygon(100% 0, 100% 100%, 0 100%);
opacity: 0;
transition:
opacity 0.25s 0.2s,
width 0.4s cubic-bezier(0.65, 0, 0.35, 1),
height 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.tt18b:hover .tt18fold {
opacity: 0.85;
width: 8px;
height: 8px;
}
.tt18n input:checked + .tt18b .tt18fold {
opacity: 1;
width: 18px;
height: 18px;
}
.tt18p {
display: none;
padding-top: 14px;
font:
italic 12px/1.6 ui-serif,
Georgia;
color: rgba(212, 165, 116, 0.85);
}
.tt18:has(#tt18-r1:checked) .tt18p:nth-of-type(1),
.tt18:has(#tt18-r2:checked) .tt18p:nth-of-type(2),
.tt18:has(#tt18-r3:checked) .tt18p:nth-of-type(3) {
display: block;
}
```
### 31. Velvet Ribbon
**Type:** CSS + JS
**Description:** Icon nav on warm-linen stock with a velvet aubergine ribbon trimmed in gilt. The ribbon hangs down from the top rail directly above the active icon — measured live so it stays perfectly aligned at any stage width. Jewel-toned, club-bookplate atmosphere.
**HTML:**
```html
```
**CSS:**
```css
.tt19 {
background: #f5efe0;
padding: 0;
font-family: ui-sans-serif, system-ui, sans-serif;
min-height: 220px;
display: flex;
align-items: center;
width: 100%;
box-sizing: border-box;
}
.tt19n {
position: relative;
flex: 1;
display: flex;
padding: 28px 12px 24px;
box-sizing: border-box;
min-width: 0;
}
/* Top rail running edge-to-edge — the "shelf" the ribbon hangs from */
.tt19rail {
position: absolute;
top: 28px;
left: 0;
right: 0;
height: 3px;
background: #3d1e4a;
pointer-events: none;
}
/* The ribbon — JS positions it horizontally to track the active button.
It hangs from the top rail and overlaps the icon column behind it.
Height is sized so icon + label both sit comfortably inside it with
breathing room above the triangular tail. */
.tt19ribbon {
position: absolute;
top: 28px;
width: 56px;
height: 84px;
background: #3d1e4a;
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 50% 100%, 0 calc(100% - 10px));
filter: drop-shadow(0 4px 8px rgba(61, 30, 74, 0.4));
pointer-events: none;
transition: left 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
/* Single gilt hem stripe across the ribbon, just below the label.
Echoes the aubergine rail above and reads as a bookbinder's gilt edge. */
.tt19ribbon::before {
content: "";
position: absolute;
left: 8px;
right: 8px;
bottom: 14px;
height: 1.5px;
background: #e6c149;
z-index: 2;
}
.tt19b {
position: relative;
z-index: 1;
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
padding: 14px 4px 12px;
min-width: 0;
border: 0;
background: transparent;
font:
700 10px/1 ui-sans-serif,
system-ui;
letter-spacing: 0.12em;
text-transform: uppercase;
color: rgba(61, 30, 74, 0.5);
cursor: pointer;
transition: color 0.3s;
}
.tt19b:hover {
color: rgba(61, 30, 74, 0.85);
}
.tt19i {
width: 20px;
height: 20px;
flex-shrink: 0;
fill: none;
stroke: currentColor;
stroke-width: 1.8;
stroke-linecap: round;
stroke-linejoin: round;
transition:
transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
stroke 0.3s;
}
.tt19l {
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
/* Active state: icon + label go cream on aubergine (both sit inside ribbon
body, with the gilt hem stripe between the label and the triangular tail). */
.tt19b.active {
color: #f5efe0;
}
.tt19b.active .tt19i {
stroke: #f5efe0;
}
@media (prefers-reduced-motion: reduce) {
.tt19ribbon {
transition: none;
}
}
```
**JS:**
```js
/* Velvet Ribbon — toggle .active and slide ribbon centered above active icon.
Re-measures on viewport resize so the ribbon stays aligned at any width. */
(function () {
var nav = document.querySelector(".tt19n");
if (!nav) return;
var btns = nav.querySelectorAll("[data-t]");
var ribbon = nav.querySelector(".tt19ribbon");
var current = null;
function position(btn) {
if (!ribbon || !btn) return;
var w = ribbon.offsetWidth || 56;
ribbon.style.left = btn.offsetLeft + btn.offsetWidth / 2 - w / 2 + "px";
}
function activate(btn) {
current = btn;
btns.forEach(function (b) {
b.classList.toggle("active", b === btn);
});
position(btn);
}
btns.forEach(function (b) {
b.addEventListener("click", function () {
activate(b);
});
});
window.addEventListener("resize", function () {
position(current);
});
var initial = nav.querySelector("[data-t].active") || btns[0];
if (initial) activate(initial);
})();
```
### 32. Inset Type
**Type:** Pure CSS
**Description:** Active label sits inside a chiseled negative-space well. Inset shadow stack on a darker rectangle gives the impression letters are carved into brass-tinted slate. Pure CSS box-shadow, no images.
**HTML:**
```html
```
**CSS:**
```css
.tt20 {
background: #3a3a42;
padding: 22px 22px 18px;
font-family: ui-monospace, monospace;
width: 100%;
}
.tt20n {
display: flex;
gap: 8px;
padding: 8px;
background: #2a2a30;
border-radius: 4px;
}
.tt20n input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.tt20b {
flex: 1;
padding: 14px 12px;
border: 0;
background: transparent;
font:
800 12px/1 ui-monospace,
monospace;
letter-spacing: 0.22em;
text-transform: uppercase;
color: rgba(201, 161, 94, 0.6);
cursor: pointer;
border-radius: 3px;
transition:
color 0.25s,
background 0.3s,
box-shadow 0.3s;
}
.tt20b:hover {
color: rgba(201, 161, 94, 0.95);
}
.tt20n input:checked + .tt20b {
background: #1f1f24;
color: #c9a15e;
box-shadow:
inset 2px 2px 4px rgba(0, 0, 0, 0.55),
inset -1px -1px 2px rgba(255, 255, 255, 0.08);
text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.55);
}
.tt20p {
display: none;
padding-top: 14px;
font:
italic 11px/1.6 ui-serif,
Georgia,
serif;
color: rgba(201, 161, 94, 0.8);
}
.tt20:has(#tt20-r1:checked) .tt20p:nth-of-type(1),
.tt20:has(#tt20-r2:checked) .tt20p:nth-of-type(2),
.tt20:has(#tt20-r3:checked) .tt20p:nth-of-type(3) {
display: block;
}
```
---
## 20 CSS Tags & Chips Designs
URL: https://codefronts.com/snippets/css-tags-chips/
Description: 20 hand-coded CSS tags and chips designs — removable filter, autocomplete input, status pulse, drag-to-reorder, marquee, undo and more. Semantic HTML, copy-paste ready.
Demo count: 20
### 01. Removable Pill
**Type:** Pure CSS
**Description:** Three filter chips with × buttons that actually remove the chip — pure CSS via :has(:checked) hiding the parent. The canonical filter pattern, working without a single line of JS.
**HTML:**
```html
React
×
TypeScript
×
Astro
×
```
**CSS:**
```css
.ctc-rem {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.ctc-rem-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 10px 6px 14px;
background: rgba(124, 108, 255, 0.14);
color: #c4b5fd;
border: 1px solid rgba(124, 108, 255, 0.3);
border-radius: 999px;
font:
600 12px/1 system-ui,
sans-serif;
cursor: pointer;
transition:
opacity 0.2s,
transform 0.2s;
}
.ctc-rem-chip:hover {
background: rgba(124, 108, 255, 0.22);
}
.ctc-rem-x {
display: inline-flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.08);
font-size: 14px;
line-height: 1;
transition: background 0.15s;
}
.ctc-rem-chip:hover .ctc-rem-x {
background: rgba(255, 255, 255, 0.18);
}
.ctc-rem-chip:has(:checked) {
display: none;
}
```
### 02. Magnetic Hover
**Type:** Pure CSS
**Description:** On hover the chip text drifts toward the cursor edge via a CSS-only "magnet" trick — purely transition-based, no pointer math, no JS.
**HTML:**
```html
```
**CSS:**
```css
.ctc-mag {
display: flex;
gap: 10px;
}
.ctc-mag-chip {
position: relative;
display: inline-flex;
align-items: center;
padding: 8px 16px;
background: #1f1f2e;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 999px;
color: #f0eeff;
font:
600 12px/1 system-ui,
sans-serif;
text-decoration: none;
cursor: pointer;
overflow: hidden;
transition:
border-color 0.2s,
background 0.2s;
}
.ctc-mag-chip span {
display: inline-block;
transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
position: relative;
z-index: 1;
}
.ctc-mag-chip:hover {
background: #2a2a3e;
border-color: #7c6cff;
}
.ctc-mag-chip:hover span {
transform: translateX(3px) scale(1.05);
}
.ctc-mag-chip::before {
content: "";
position: absolute;
inset: 0;
background: radial-gradient(
circle at var(--mx, 50%) var(--my, 50%),
rgba(124, 108, 255, 0.35),
transparent 60%
);
opacity: 0;
transition: opacity 0.25s;
}
.ctc-mag-chip:hover::before {
opacity: 1;
}
```
### 03. Sliding Border
**Type:** Pure CSS
**Description:** A real @property-animated conic gradient traces around the chip on hover — true CSS angle animation, not the keyframes-on-position hack everyone else uses.
**HTML:**
```html
Premium
```
**CSS:**
```css
.ctc-slide {
position: relative;
display: inline-flex;
align-items: center;
padding: 10px 20px;
border-radius: 999px;
background: #15151d;
color: #f0eeff;
font:
600 13px/1 system-ui,
sans-serif;
text-decoration: none;
isolation: isolate;
}
.ctc-slide::before {
content: "";
position: absolute;
inset: -1.5px;
border-radius: inherit;
background: conic-gradient(from var(--ctc-angle), #7c6cff, #ff6c8a, #2eb88a, #7c6cff);
z-index: -1;
}
.ctc-slide:hover {
animation: ctc-slide-spin 2.4s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
.ctc-slide:hover,
.ctc-aurora,
.ctc-status-dot::after,
.ctc-marquee:hover .ctc-marquee-track,
.ctc-marquee:focus-visible .ctc-marquee-track,
.ctc-life-chip[data-state="adding"],
.ctc-life-chip[data-state="adding"] .ctc-life-icon {
animation: none !important;
}
.ctc-life-chip[data-state="adding"] {
transform: none;
opacity: 1;
}
}
@keyframes ctc-slide-spin { to { --ctc-angle: 360deg; } }
```
### 04. Liquid Fill
**Type:** Pure CSS
**Description:** Outline chip whose interior fills with brand colour from left-to-right on hover. Text colour inverts at the fill boundary using mix-blend-mode: difference.
**HTML:**
```html
FILTER
```
**CSS:**
```css
.ctc-liquid {
position: relative;
display: inline-flex;
align-items: center;
padding: 10px 22px;
border: 1.5px solid #00e5ff;
border-radius: 6px;
font:
700 12px/1 ui-monospace,
monospace;
letter-spacing: 0.14em;
color: #00e5ff;
text-decoration: none;
overflow: hidden;
background: #0a0a18;
}
.ctc-liquid::before {
content: "";
position: absolute;
inset: 0;
right: auto;
width: 0;
background: #00e5ff;
transition: width 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.ctc-liquid:hover::before {
width: 100%;
}
.ctc-liquid span {
position: relative;
mix-blend-mode: difference;
color: #fff;
}
```
### 05. Stack of Three
**Type:** Pure CSS
**Description:** Chip rendered as three stacked layers offset by 2px each — depth illusion. On hover the layers fan out diagonally. Pure CSS via two ::before/::after pseudo-elements.
**HTML:**
```html
DESIGN
```
**CSS:**
```css
.ctc-stack {
position: relative;
display: inline-flex;
align-items: center;
padding: 9px 18px;
background: #ff6c8a;
color: #0a0a0a;
border-radius: 4px;
font:
700 12px/1 ui-monospace,
monospace;
letter-spacing: 0.1em;
text-decoration: none;
transition: transform 0.3s ease;
z-index: 3;
}
.ctc-stack::before,
.ctc-stack::after {
content: "DESIGN";
position: absolute;
inset: 0;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: inherit;
font: inherit;
letter-spacing: inherit;
pointer-events: none;
transition: transform 0.3s ease;
}
.ctc-stack::before {
background: #f5a84a;
transform: translate(2px, 2px);
z-index: -1;
color: transparent;
}
.ctc-stack::after {
background: #2eb88a;
transform: translate(4px, 4px);
z-index: -2;
color: transparent;
}
.ctc-stack:hover {
transform: translate(-2px, -2px);
}
.ctc-stack:hover::before {
transform: translate(4px, 4px);
}
.ctc-stack:hover::after {
transform: translate(8px, 8px);
}
```
### 06. Notch Chip
**Type:** Pure CSS
**Description:** Chip with a triangular notch cut into the left edge using clip-path — a real shape, not a background trick. Reads as a luggage tag or boarding-pass entry.
**HTML:**
```html
FIRST CLASS
```
**CSS:**
```css
.ctc-notch {
position: relative;
display: inline-flex;
align-items: center;
gap: 12px;
padding: 10px 18px 10px 28px;
background: #ffd479;
color: #0a0a0a;
font:
700 11px/1 ui-monospace,
monospace;
letter-spacing: 0.16em;
text-decoration: none;
clip-path: polygon(12px 0%, 100% 0%, 100% 100%, 12px 100%, 0% 50%);
transition:
transform 0.25s ease,
background 0.25s ease;
}
.ctc-notch-hole {
width: 6px;
height: 6px;
border-radius: 50%;
background: rgba(0, 0, 0, 0.6);
flex-shrink: 0;
}
.ctc-notch:hover {
transform: translateX(2px);
background: #ffe4a3;
}
```
### 07. Glassmorphic
**Type:** Pure CSS
**Description:** Frosted-glass chip with backdrop-blur over a coloured page background. Translucent surface, white border, soft inner highlight.
**HTML:**
```html
```
**CSS:**
```css
.ctc-glass-bg {
display: flex;
gap: 8px;
flex-wrap: wrap;
padding: 24px;
border-radius: 14px;
background: linear-gradient(135deg, #7c6cff 0%, #ff6c8a 100%);
}
.ctc-glass {
display: inline-flex;
align-items: center;
padding: 7px 14px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.18);
border: 1px solid rgba(255, 255, 255, 0.3);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
color: #fff;
font:
600 12px/1 system-ui,
sans-serif;
text-decoration: none;
transition: background 0.2s;
}
.ctc-glass:hover {
background: rgba(255, 255, 255, 0.28);
}
```
### 08. Aurora Outline
**Type:** Pure CSS
**Description:** Continuously rotating conic-gradient border (violet → pink → mint) using @property for true angle animation. The chip stays still, only the rim rotates. Honours prefers-reduced-motion.
**HTML:**
```html
NEW
```
**CSS:**
```css
.ctc-aurora {
position: relative;
display: inline-flex;
align-items: center;
padding: 10px 20px;
border-radius: 999px;
background: #0d0d16;
color: #fff;
font:
700 11px/1 ui-monospace,
monospace;
letter-spacing: 0.18em;
text-decoration: none;
isolation: isolate;
--ctc-aurora-angle: 0deg;
animation: ctc-aurora-rotate 6s linear infinite;
}
.ctc-aurora::before {
content: "";
position: absolute;
inset: -2px;
border-radius: inherit;
background: conic-gradient(from var(--ctc-aurora-angle), #7c6cff, #ff6c8a, #2eb88a, #7c6cff);
z-index: -1;
}
@media (prefers-reduced-motion: reduce) {
.ctc-slide:hover,
.ctc-aurora,
.ctc-status-dot::after,
.ctc-marquee:hover .ctc-marquee-track,
.ctc-marquee:focus-visible .ctc-marquee-track,
.ctc-life-chip[data-state="adding"],
.ctc-life-chip[data-state="adding"] .ctc-life-icon {
animation: none !important;
}
.ctc-life-chip[data-state="adding"] {
transform: none;
opacity: 1;
}
}
@keyframes ctc-aurora-rotate { to { --ctc-aurora-angle: 360deg; } }
```
### 09. Pixel Grid
**Type:** Pure CSS
**Description:** Chip background is a tiny dotted CSS pattern reading as retro/print. On hover the dot density increases via background-size transition.
**HTML:**
```html
RETRO
```
**CSS:**
```css
.ctc-pixel {
display: inline-flex;
align-items: center;
padding: 9px 18px;
border: 2px solid #f5a84a;
border-radius: 4px;
background-color: #1a1410;
background-image: radial-gradient(#f5a84a 1px, transparent 1px);
background-size: 8px 8px;
color: #f5a84a;
font:
700 12px/1 ui-monospace,
monospace;
letter-spacing: 0.14em;
text-decoration: none;
transition:
background-size 0.4s ease,
color 0.2s ease,
border-color 0.2s ease;
}
.ctc-pixel:hover {
background-size: 4px 4px;
color: #ffd479;
border-color: #ffd479;
}
```
### 10. Brutalist Stamp
**Type:** Pure CSS
**Description:** Hard-edged offset-shadow chip with mono font and a hot-pink shadow. Press collapses into the shadow on click. Brutalist design system fixture.
**HTML:**
```html
SHIPPED
```
**CSS:**
```css
.ctc-brut {
display: inline-flex;
align-items: center;
padding: 9px 18px;
background: #fff7ed;
color: #0a0a0a;
border: 2px solid #0a0a0a;
font:
700 12px/1 "Courier New",
monospace;
letter-spacing: 0.14em;
text-decoration: none;
box-shadow: 5px 5px 0 #ff3d6e;
transition:
transform 0.12s ease,
box-shadow 0.12s ease;
}
.ctc-brut:hover {
transform: translate(2px, 2px);
box-shadow: 3px 3px 0 #ff3d6e;
}
.ctc-brut:active {
transform: translate(5px, 5px);
box-shadow: 0 0 0 #ff3d6e;
}
```
### 11. Gradient Edge
**Type:** Pure CSS
**Description:** Solid dark chip whose only accent is a thin gradient line on the bottom edge — minimalism with a single unmistakable signal. Fades up on hover.
**HTML:**
```html
```
**CSS:**
```css
.ctc-edge {
display: flex;
gap: 8px;
}
.ctc-edge-chip {
position: relative;
display: inline-flex;
align-items: center;
padding: 8px 16px;
background: #15151d;
color: #c4b5fd;
border-radius: 4px;
font:
600 12px/1 system-ui,
sans-serif;
text-decoration: none;
overflow: hidden;
transition:
background 0.2s,
color 0.2s;
}
.ctc-edge-chip::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg, #7c6cff, #ff6c8a);
transform: scaleX(0.4);
transform-origin: left center;
transition: transform 0.3s ease;
}
.ctc-edge-chip:hover {
background: #1f1f2e;
color: #fff;
}
.ctc-edge-chip:hover::after {
transform: scaleX(1);
}
```
### 12. Status Pulse
**Type:** Pure CSS
**Description:** Status chip with a coloured leading dot that pulses for live/active state. Different colours = different states (success, warning, error, info). The standard health-indicator pattern.
**HTML:**
```html
Live
Degraded
Down
Maintenance
```
**CSS:**
```css
.ctc-status {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.ctc-status-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 5px 11px 5px 8px;
border-radius: 999px;
font:
600 11px/1 system-ui,
sans-serif;
border: 1px solid;
}
.ctc-status-dot {
width: 7px;
height: 7px;
border-radius: 50%;
position: relative;
}
.ctc-status-dot::after {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background: inherit;
animation: ctc-status-ping 1.6s ease-out infinite;
}
.ctc-status-live {
background: rgba(46, 204, 138, 0.12);
color: #2ecc8a;
border-color: rgba(46, 204, 138, 0.35);
}
.ctc-status-live .ctc-status-dot {
background: #2ecc8a;
}
.ctc-status-warn {
background: rgba(245, 168, 74, 0.12);
color: #f5a84a;
border-color: rgba(245, 168, 74, 0.35);
}
.ctc-status-warn .ctc-status-dot {
background: #f5a84a;
}
.ctc-status-err {
background: rgba(255, 61, 110, 0.12);
color: #ff6c8a;
border-color: rgba(255, 61, 110, 0.35);
}
.ctc-status-err .ctc-status-dot {
background: #ff3d6e;
}
.ctc-status-info {
background: rgba(96, 165, 250, 0.12);
color: #60a5fa;
border-color: rgba(96, 165, 250, 0.35);
}
.ctc-status-info .ctc-status-dot {
background: #60a5fa;
}
@media (prefers-reduced-motion: reduce) {
.ctc-slide:hover,
.ctc-aurora,
.ctc-status-dot::after,
.ctc-marquee:hover .ctc-marquee-track,
.ctc-marquee:focus-visible .ctc-marquee-track,
.ctc-life-chip[data-state="adding"],
.ctc-life-chip[data-state="adding"] .ctc-life-icon {
animation: none !important;
}
.ctc-life-chip[data-state="adding"] {
transform: none;
opacity: 1;
}
}
@keyframes ctc-status-ping {
0% { transform: scale(1); opacity: 0.7; }
100% { transform: scale(2.6); opacity: 0; }
}
```
### 13. Drag to Reorder
**Type:** Light JS
**Description:** Three chips that can be drag-reordered with real pointer math — no library. Keyboard accessible: Tab to focus, ←/→ to swap with neighbour. The full reorder pattern.
**HTML:**
```html
```
**CSS:**
```css
.ctc-drag {
display: flex;
gap: 8px;
list-style: none;
margin: 0;
padding: 0;
}
.ctc-drag-chip {
display: inline-flex;
align-items: center;
padding: 8px 16px;
background: #1f1f2e;
color: #c4b5fd;
border: 1px solid rgba(124, 108, 255, 0.35);
border-radius: 999px;
font:
600 12px/1 system-ui,
sans-serif;
cursor: grab;
user-select: none;
touch-action: none;
transition:
transform 0.18s ease,
background 0.2s;
}
.ctc-drag-chip:hover {
background: rgba(124, 108, 255, 0.18);
}
.ctc-drag-chip.is-dragging {
cursor: grabbing;
background: #7c6cff;
color: #fff;
z-index: 2;
transition: none;
}
.ctc-drag-chip:focus-visible {
outline: 2px solid #a78bfa;
outline-offset: 2px;
}
```
**JS:**
```js
(function () {
document.querySelectorAll(".ctc-drag").forEach(function (list) {
var dragged = null;
list.querySelectorAll("[data-ctc-drag]").forEach(function (chip) {
chip.addEventListener("pointerdown", function (e) {
dragged = chip;
chip.classList.add("is-dragging");
chip.setPointerCapture(e.pointerId);
});
chip.addEventListener("pointermove", function (e) {
if (dragged !== chip) return;
var siblings = Array.from(list.children).filter(function (c) {
return c !== chip;
});
for (var i = 0; i < siblings.length; i++) {
var rect = siblings[i].getBoundingClientRect();
if (e.clientX > rect.left && e.clientX < rect.right) {
var dragRect = chip.getBoundingClientRect();
if (e.clientX < rect.left + rect.width / 2) {
list.insertBefore(chip, siblings[i]);
} else {
list.insertBefore(chip, siblings[i].nextSibling);
}
break;
}
}
});
chip.addEventListener("pointerup", function () {
chip.classList.remove("is-dragging");
dragged = null;
});
chip.addEventListener("keydown", function (e) {
var siblings = Array.from(list.children);
var idx = siblings.indexOf(chip);
if (e.key === "ArrowLeft" && idx > 0) {
e.preventDefault();
list.insertBefore(chip, siblings[idx - 1]);
chip.focus();
} else if (e.key === "ArrowRight" && idx < siblings.length - 1) {
e.preventDefault();
list.insertBefore(chip, siblings[idx + 1].nextSibling);
chip.focus();
}
});
});
});
})();
```
### 14. Tag Input
**Type:** Light JS
**Description:** Type to add a chip; Backspace on empty input removes the last chip. Real autocomplete dropdown filtered live by input — the full filter-input pattern with aria-controls/expanded.
**HTML:**
```html
```
**CSS:**
```css
.ctc-input {
position: relative;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
padding: 6px 8px;
width: 280px;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
}
.ctc-input:focus-within {
border-color: #7c6cff;
}
.ctc-input-chips {
display: contents;
list-style: none;
margin: 0;
padding: 0;
}
.ctc-input-chips li {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 3px 6px 3px 10px;
background: rgba(124, 108, 255, 0.18);
color: #c4b5fd;
border-radius: 4px;
font:
600 11px/1 system-ui,
sans-serif;
}
.ctc-input-chips button {
background: transparent;
border: 0;
padding: 0;
width: 16px;
height: 16px;
color: inherit;
cursor: pointer;
font-size: 14px;
line-height: 1;
}
.ctc-input-field {
flex: 1;
min-width: 60px;
background: transparent;
border: 0;
outline: none;
color: #f0eeff;
font:
500 12px/1 system-ui,
sans-serif;
padding: 4px 0;
}
.ctc-input-field::placeholder {
color: #b8b6d4;
}
.ctc-input-list {
position: absolute;
top: calc(100% + 4px);
left: 0;
right: 0;
margin: 0;
padding: 4px;
list-style: none;
background: #15151d;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
z-index: 5;
max-height: 160px;
overflow: auto;
}
.ctc-input-list[hidden] {
display: none;
}
.ctc-input-list li {
padding: 6px 10px;
border-radius: 4px;
font:
500 12px/1 system-ui,
sans-serif;
color: #c4b5fd;
cursor: pointer;
}
.ctc-input-list li:hover,
.ctc-input-list li[aria-selected="true"] {
background: rgba(124, 108, 255, 0.18);
color: #fff;
}
```
**JS:**
```js
(function () {
var SUGGESTIONS = [
"JavaScript",
"TypeScript",
"Python",
"Go",
"Rust",
"Ruby",
"Swift",
"Kotlin",
"Java",
"C++",
"Elixir",
"Haskell",
];
document.querySelectorAll(".ctc-input").forEach(function (root) {
var chipsEl = root.querySelector(".ctc-input-chips");
var input = root.querySelector(".ctc-input-field");
var listEl = root.querySelector(".ctc-input-list");
var chips = [];
function render() {
chipsEl.innerHTML = "";
chips.forEach(function (c, i) {
var li = document.createElement("li");
var txt = document.createElement("span");
txt.textContent = c;
var btn = document.createElement("button");
btn.type = "button";
btn.setAttribute("aria-label", "Remove " + c);
btn.textContent = "×";
btn.addEventListener("click", function () {
chips.splice(i, 1);
render();
});
li.appendChild(txt);
li.appendChild(btn);
chipsEl.appendChild(li);
});
}
function showList(items) {
if (!items.length) {
listEl.setAttribute("hidden", "");
input.setAttribute("aria-expanded", "false");
return;
}
listEl.innerHTML = "";
items.forEach(function (s) {
var li = document.createElement("li");
li.setAttribute("role", "option");
li.textContent = s;
li.addEventListener("mousedown", function (e) {
e.preventDefault();
if (chips.indexOf(s) === -1) chips.push(s);
input.value = "";
render();
showList([]);
});
listEl.appendChild(li);
});
listEl.removeAttribute("hidden");
input.setAttribute("aria-expanded", "true");
}
input.addEventListener("input", function () {
var q = input.value.trim().toLowerCase();
if (!q) {
showList([]);
return;
}
var matches = SUGGESTIONS.filter(function (s) {
return s.toLowerCase().includes(q) && chips.indexOf(s) === -1;
}).slice(0, 6);
showList(matches);
});
input.addEventListener("keydown", function (e) {
if (e.key === "Enter") {
e.preventDefault();
var v = input.value.trim();
if (v && chips.indexOf(v) === -1) {
chips.push(v);
input.value = "";
render();
showList([]);
}
} else if (e.key === "Backspace" && !input.value && chips.length) {
chips.pop();
render();
} else if (e.key === "Escape") {
showList([]);
}
});
input.addEventListener("blur", function () {
setTimeout(function () {
showList([]);
}, 150);
});
});
})();
```
### 15. Remove with Undo
**Type:** Light JS
**Description:** Click × to remove a chip — but a small Undo toast appears for 4 seconds before deletion is final. The pattern Gmail and Linear made standard.
**HTML:**
```html
Frontend×
Backend×
DevOps×
Undo
```
**CSS:**
```css
.ctc-undo {
position: relative;
display: flex;
flex-direction: column;
gap: 12px;
min-height: 70px;
}
.ctc-undo-list {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.ctc-undo-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 8px 6px 12px;
background: #1f1f2e;
color: #f0eeff;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 999px;
font:
600 12px/1 system-ui,
sans-serif;
transition:
opacity 0.25s,
transform 0.25s;
}
.ctc-undo-chip.is-removing {
opacity: 0;
transform: scale(0.7);
pointer-events: none;
}
.ctc-undo-chip button {
width: 18px;
height: 18px;
background: transparent;
border: 0;
padding: 0;
color: #b8b6d4;
cursor: pointer;
font-size: 16px;
line-height: 1;
border-radius: 50%;
}
.ctc-undo-chip button:hover {
background: rgba(255, 255, 255, 0.1);
color: #fff;
}
.ctc-undo-toast {
display: inline-flex;
align-items: center;
gap: 12px;
padding: 8px 12px;
background: #15151d;
border: 1px solid rgba(46, 204, 138, 0.4);
border-radius: 8px;
font:
500 12px/1.2 system-ui,
sans-serif;
color: #c4b5fd;
align-self: flex-start;
animation: ctc-undo-in 0.2s ease;
}
.ctc-undo-toast[hidden] {
display: none;
}
.ctc-undo-btn {
background: transparent;
border: 0;
color: #2ecc8a;
font: inherit;
font-weight: 700;
cursor: pointer;
padding: 0;
}
.ctc-undo-btn:hover {
text-decoration: underline;
}
@keyframes ctc-undo-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
.ctc-undo-toast {
animation: none !important;
}
}
```
**JS:**
```js
(function () {
document.querySelectorAll(".ctc-undo").forEach(function (root) {
var toast = root.querySelector(".ctc-undo-toast");
var msg = root.querySelector(".ctc-undo-msg");
var btn = root.querySelector(".ctc-undo-btn");
var pendingChip = null;
var timer = null;
function commit() {
if (pendingChip && pendingChip.parentNode) pendingChip.parentNode.removeChild(pendingChip);
pendingChip = null;
toast.setAttribute("hidden", "");
timer = null;
}
btn.addEventListener("click", function () {
if (!pendingChip) return;
pendingChip.classList.remove("is-removing");
clearTimeout(timer);
timer = null;
pendingChip = null;
toast.setAttribute("hidden", "");
});
root.querySelectorAll("[data-ctc-undo] button").forEach(function (x) {
x.addEventListener("click", function () {
if (timer) commit();
var chip = x.closest("[data-ctc-undo]");
chip.classList.add("is-removing");
pendingChip = chip;
msg.textContent = 'Removed "' + chip.firstChild.textContent.trim() + '"';
toast.removeAttribute("hidden");
timer = setTimeout(commit, 4000);
});
});
});
})();
```
### 16. Counter Chip
**Type:** Light JS
**Description:** Chip with a number badge inside; click − / + to decrement/increment with aria-valuenow updated for screen readers. The Gmail label-count pattern.
**HTML:**
```html
−
Inbox
12
+
```
**CSS:**
```css
.ctc-counter {
display: flex;
}
.ctc-counter-chip {
display: inline-flex;
align-items: center;
padding: 0;
background: #1f1f2e;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 999px;
overflow: hidden;
font:
600 12px/1 system-ui,
sans-serif;
color: #f0eeff;
}
.ctc-counter-chip button {
width: 26px;
height: 28px;
background: transparent;
border: 0;
color: #c4b5fd;
font:
700 14px/1 system-ui,
sans-serif;
cursor: pointer;
transition:
background 0.15s,
color 0.15s;
}
.ctc-counter-chip button:hover {
background: rgba(124, 108, 255, 0.18);
color: #fff;
}
.ctc-counter-label {
padding: 0 6px 0 10px;
}
.ctc-counter-num {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 26px;
height: 18px;
margin-right: 4px;
padding: 0 6px;
background: rgba(124, 108, 255, 0.22);
color: #c4b5fd;
border-radius: 999px;
font:
700 11px/1 ui-monospace,
monospace;
}
```
**JS:**
```js
(function () {
document.querySelectorAll(".ctc-counter-chip").forEach(function (chip) {
var num = chip.querySelector(".ctc-counter-num");
chip.querySelectorAll("[data-ctc-cnt]").forEach(function (btn) {
btn.addEventListener("click", function () {
var n = parseInt(num.textContent, 10) || 0;
var inc = parseInt(btn.getAttribute("data-ctc-cnt"), 10);
var v = Math.max(0, n + inc);
num.textContent = v;
num.setAttribute("aria-valuenow", v);
});
});
});
})();
```
### 17. Marquee Chip
**Type:** Pure CSS
**Description:** When the chip text overflows its width, the text scrolls horizontally on hover like a stock ticker. Pause on focus. Pure CSS using a duplicated text trick.
**HTML:**
```html
Senior Frontend Engineer @ TechCorp
Senior Frontend Engineer @ TechCorp
```
**CSS:**
```css
.ctc-marquee {
display: inline-flex;
align-items: center;
width: 200px;
padding: 9px 14px;
background: #1f1f2e;
color: #f0eeff;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 999px;
font:
600 12px/1 system-ui,
sans-serif;
text-decoration: none;
overflow: hidden;
mask-image: linear-gradient(
90deg,
transparent 0,
#000 12px,
#000 calc(100% - 12px),
transparent 100%
);
-webkit-mask-image: linear-gradient(
90deg,
transparent 0,
#000 12px,
#000 calc(100% - 12px),
transparent 100%
);
}
.ctc-marquee-track {
display: inline-flex;
gap: 32px;
white-space: nowrap;
flex-shrink: 0;
}
.ctc-marquee:hover .ctc-marquee-track,
.ctc-marquee:focus-visible .ctc-marquee-track {
animation: ctc-marquee-roll 7s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
.ctc-slide:hover,
.ctc-aurora,
.ctc-status-dot::after,
.ctc-marquee:hover .ctc-marquee-track,
.ctc-marquee:focus-visible .ctc-marquee-track,
.ctc-life-chip[data-state="adding"],
.ctc-life-chip[data-state="adding"] .ctc-life-icon {
animation: none !important;
}
.ctc-life-chip[data-state="adding"] {
transform: none;
opacity: 1;
}
}
@keyframes ctc-marquee-roll { to { transform: translateX(calc(-50% - 16px)); } }
```
### 18. Expandable Detail
**Type:** Pure CSS
**Description:** Native / chip that expands inline to reveal a description on click. Real semantic disclosure, not a tooltip — keyboard accessible by default.
**HTML:**
```html
React
A JavaScript library for building user interfaces with components and hooks.
```
**CSS:**
```css
.ctc-exp {
display: inline-block;
background: #1f1f2e;
border: 1px solid rgba(124, 108, 255, 0.3);
border-radius: 14px;
overflow: hidden;
font-family: system-ui, sans-serif;
max-width: 280px;
}
.ctc-exp summary {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 7px 12px;
list-style: none;
cursor: pointer;
font-weight: 600;
font-size: 12px;
color: #c4b5fd;
user-select: none;
}
.ctc-exp summary::-webkit-details-marker {
display: none;
}
.ctc-exp summary svg {
width: 11px;
height: 11px;
color: currentColor;
transition: transform 0.2s ease;
}
.ctc-exp[open] summary svg {
transform: rotate(180deg);
}
.ctc-exp[open] {
display: block;
border-radius: 14px;
}
.ctc-exp-body {
margin: 0;
padding: 8px 14px 12px;
font-size: 12px;
line-height: 1.55;
color: #b8b6d4;
border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.ctc-exp summary:focus-visible {
outline: 2px solid #a78bfa;
outline-offset: 2px;
}
```
### 19. Linked Group
**Type:** Pure CSS
**Description:** Three connected chips sharing a single border with hairline dividers — like a segmented breadcrumb of tags. Hover lights individual segments.
**HTML:**
```html
```
**CSS:**
```css
.ctc-linked {
display: inline-flex;
background: #1f1f2e;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 999px;
overflow: hidden;
}
.ctc-linked-seg {
display: inline-flex;
align-items: center;
padding: 8px 16px;
color: #c4b5fd;
font:
600 12px/1 system-ui,
sans-serif;
text-decoration: none;
border-right: 1px solid rgba(255, 255, 255, 0.08);
transition:
background 0.15s,
color 0.15s;
}
.ctc-linked-seg:last-child {
border-right: 0;
}
.ctc-linked-seg:hover {
background: rgba(124, 108, 255, 0.18);
color: #fff;
}
```
### 20. Lifecycle Chip
**Type:** Light JS
**Description:** Animates through three states — Adding (slide in + spinner) → Active (settle + checkmark) → Removing (fade out + strikethrough). Click Run demo to replay the full add/remove dance.
**HTML:**
```html
▶ Run demo
React
```
**CSS:**
```css
.ctc-life {
display: flex;
align-items: center;
gap: 14px;
}
.ctc-life-run {
padding: 6px 12px;
background: rgba(124, 108, 255, 0.14);
color: #c4b5fd;
border: 1px solid rgba(124, 108, 255, 0.35);
border-radius: 6px;
font:
600 11px/1 ui-monospace,
monospace;
cursor: pointer;
transition:
background 0.15s,
border-color 0.15s,
color 0.15s;
}
.ctc-life-run:hover {
background: rgba(124, 108, 255, 0.26);
color: #fff;
}
.ctc-life-chip {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 7px 14px 7px 10px;
background: #1f1f2e;
color: #f0eeff;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 999px;
font:
600 12px/1 system-ui,
sans-serif;
transition:
opacity 0.4s ease,
transform 0.4s ease,
background 0.3s ease,
border-color 0.3s ease;
}
.ctc-life-icon {
width: 14px;
height: 14px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.12);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 10px;
flex-shrink: 0;
}
.ctc-life-chip[data-state="adding"] {
background: rgba(124, 108, 255, 0.18);
border-color: rgba(124, 108, 255, 0.4);
color: #c4b5fd;
transform: translateX(-12px);
opacity: 0;
animation: ctc-life-slide-in 0.45s ease forwards;
}
.ctc-life-chip[data-state="adding"] .ctc-life-icon {
border: 2px solid rgba(124, 108, 255, 0.3);
border-top-color: #7c6cff;
background: transparent;
animation: ctc-life-spin 0.7s linear infinite;
}
.ctc-life-chip[data-state="active"] {
background: rgba(46, 204, 138, 0.14);
border-color: rgba(46, 204, 138, 0.4);
color: #2ecc8a;
}
.ctc-life-chip[data-state="active"] .ctc-life-icon {
background: #2ecc8a;
color: #0a0f0c;
font-weight: 900;
}
.ctc-life-chip[data-state="active"] .ctc-life-icon::before {
content: "✓";
}
.ctc-life-chip[data-state="removing"] {
background: rgba(255, 61, 110, 0.1);
border-color: rgba(255, 61, 110, 0.35);
color: rgba(255, 108, 138, 0.7);
text-decoration: line-through;
opacity: 0;
transform: scale(0.85);
}
@media (prefers-reduced-motion: reduce) {
.ctc-slide:hover,
.ctc-aurora,
.ctc-status-dot::after,
.ctc-marquee:hover .ctc-marquee-track,
.ctc-marquee:focus-visible .ctc-marquee-track,
.ctc-life-chip[data-state="adding"],
.ctc-life-chip[data-state="adding"] .ctc-life-icon {
animation: none !important;
}
.ctc-life-chip[data-state="adding"] {
transform: none;
opacity: 1;
}
}
@keyframes ctc-life-slide-in { to { transform: translateX(0); opacity: 1; } }
@keyframes ctc-life-spin { to { transform: rotate(360deg); } }
```
**JS:**
```js
(function () {
document.querySelectorAll(".ctc-life").forEach(function (root) {
var btn = root.querySelector(".ctc-life-run");
var chip = root.querySelector("[data-ctc-life]");
if (!btn || !chip) return;
var running = false;
btn.addEventListener("click", function () {
if (running) return;
running = true;
chip.setAttribute("data-state", "adding");
setTimeout(function () {
chip.setAttribute("data-state", "active");
}, 1100);
setTimeout(function () {
chip.setAttribute("data-state", "removing");
}, 2400);
setTimeout(function () {
chip.setAttribute("data-state", "idle");
running = false;
}, 3200);
});
});
})();
```
---
## 15 CSS Testimonials & Reviews
URL: https://codefronts.com/components/css-testimonials-reviews/
Description: 15 hand-coded CSS testimonial layouts spanning editorial, brutalist, bento, neon, retro, minimal, crypto, edtech, luxury real estate, gaming, high fashion, fintech, SaaS minimal, horizontal profile, and portrait-led aesthetics. Copy-paste ready, accessible, mobile-first.
Demo count: 15
### 01. Obsidian Editorial
**Type:** Pure CSS
**Description:** A dark editorial spread with a featured testimonial spanning two rows and four secondary cards in a 3-column grid. Gold accent lines reveal on hover, large opacity-7% quote glyphs sit behind each quote, and pulsing "Verified" dots signal authenticity. Playfair Display for names + glyphs, Cormorant Garamond italic for the quotes — the magazine-cover treatment.
**HTML:**
```html
Client Testimonials · 2024
“
Verified Purchase
Working with them was unlike anything I'd experienced before. There's a rare quality in partners who can translate abstract vision into something that genuinely moves people . Every deliverable exceeded what I thought was possible — not incrementally, but by an entirely different order of magnitude.
MV
Margaux Vellancourt
Creative Director, Maison Cèdre
G2 · Verified
“
The ROI was immediate and measurable . Within three months our conversion rate doubled. I've never seen a team move that fast without sacrificing depth.
JR
James Rothenberg
VP Growth, Apex Capital
Trustpilot
“
Elegance is hard to teach and even harder to find . They brought both craft and instinct. Our brand finally feels like it belongs in the rooms we're trying to enter.
SL
Simone Laurent
Founder, Studio Onyx
LinkedIn
“
I handed them a problem without a brief and they returned a solution with a point of view . That intellectual generosity is rare and worth every penny.
AT
Alistair Thornwood
Partner, Thornwood & Co.
Clutch
“
Six-figure decision, zero regret. The project paid for itself in sixty-four days . I'm not sure what else there is to say.
NB
Nadia Blumenfeld
CEO, Helix Ventures
G2 · Verified
```
**CSS:**
```css
/* Obsidian Editorial — dark editorial spread. Self-contained: no body
styles, no fixed positioning, all decoration lives inside .tm-obs.
Each card is a real , quote is a real , author
is a real with . Hover reveals the gold accent
line at the top of each card; the glyph quote-mark behind the quote
gets slightly brighter. */
.tm-obs {
--tm-obs-ink: #0a0a0a;
--tm-obs-paper: #f5f0e8;
--tm-obs-gold: #b8962e;
--tm-obs-gold-l: #d4b253;
--tm-obs-cream: #ede8d8;
--tm-obs-muted: #5a5040;
position: relative;
padding: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 44px);
background: var(--tm-obs-ink);
font-family: 'Cormorant Garamond', Georgia, serif;
color: var(--tm-obs-cream);
overflow: hidden;
min-height: 520px;
}
/* Subtle film-grain overlay — pure SVG noise, no HTTP request. Adds
tactile depth so the flat black surface reads as paper, not as a
blank canvas. */
.tm-obs::before {
content: "";
position: absolute;
inset: 0;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
opacity: 0.4;
pointer-events: none;
z-index: 0;
}
.tm-obs-head {
position: relative;
z-index: 1;
font-family: 'DM Mono', 'JetBrains Mono', monospace;
font-size: 10px;
letter-spacing: 0.3em;
text-transform: uppercase;
color: var(--tm-obs-gold);
margin-bottom: 36px;
display: flex;
align-items: center;
gap: 16px;
}
.tm-obs-head::after {
content: "";
flex: 1;
height: 1px;
background: linear-gradient(to right, var(--tm-obs-gold), transparent);
max-width: 200px;
}
.tm-obs-grid {
position: relative;
z-index: 1;
display: grid;
grid-template-columns: 1.4fr 1fr 1fr;
grid-template-rows: auto auto;
gap: 1px;
background: #1a1510;
}
.tm-obs-card {
background: var(--tm-obs-ink);
padding: 32px 28px;
position: relative;
overflow: hidden;
transition: background 0.5s;
display: flex;
flex-direction: column;
}
.tm-obs-card:hover { background: #0f0d08; }
.tm-obs-featured {
grid-row: 1 / 3;
background: #0d0b06;
border-right: 1px solid #1a1510;
}
.tm-obs-glyph {
font-family: 'Playfair Display', Georgia, serif;
font-size: 200px;
line-height: 0.7;
color: var(--tm-obs-gold);
opacity: 0.08;
position: absolute;
top: 24px;
left: 28px;
pointer-events: none;
user-select: none;
transition: opacity 0.5s;
}
.tm-obs-card:hover .tm-obs-glyph { opacity: 0.14; }
.tm-obs-featured .tm-obs-glyph {
font-size: 280px;
opacity: 0.06;
top: 16px;
}
.tm-obs-featured:hover .tm-obs-glyph { opacity: 0.1; }
.tm-obs-accent {
position: absolute;
top: 0; left: 0; right: 0;
height: 2px;
background: linear-gradient(to right, var(--tm-obs-gold), transparent);
opacity: 0;
transition: opacity 0.5s;
}
.tm-obs-card:hover .tm-obs-accent { opacity: 1; }
.tm-obs-featured .tm-obs-accent { opacity: 0.4; }
.tm-obs-featured:hover .tm-obs-accent { opacity: 1; }
.tm-obs-verified {
display: inline-flex;
align-items: center;
gap: 6px;
font-family: 'DM Mono', 'JetBrains Mono', monospace;
font-size: 8px;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--tm-obs-gold);
margin-bottom: 14px;
position: relative;
z-index: 1;
}
.tm-obs-vdot {
width: 5px;
height: 5px;
background: var(--tm-obs-gold);
border-radius: 50%;
animation: tm-obs-pulse 2s infinite;
}
@keyframes tm-obs-pulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.5; transform: scale(0.7); }
}
.tm-obs-stars {
display: flex;
gap: 4px;
margin-bottom: 20px;
position: relative;
z-index: 1;
}
.tm-obs-star {
width: 10px;
height: 10px;
background: var(--tm-obs-gold);
clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.tm-obs-star-half {
background: linear-gradient(to right, var(--tm-obs-gold) 50%, #2a2418 50%);
}
.tm-obs-quote {
font-family: 'Cormorant Garamond', Georgia, serif;
font-style: italic;
font-weight: 300;
color: var(--tm-obs-cream);
line-height: 1.65;
margin: 0 0 24px;
font-size: 1.02rem;
position: relative;
z-index: 1;
border: 0;
padding: 0;
}
.tm-obs-featured .tm-obs-quote {
font-size: 1.35rem;
margin-bottom: 32px;
}
.tm-obs-em {
color: var(--tm-obs-gold-l);
font-style: normal;
font-weight: 400;
}
.tm-obs-rule {
display: block;
width: 40px;
height: 1px;
background: var(--tm-obs-gold);
margin: 20px 0;
opacity: 0.5;
position: relative;
z-index: 1;
}
.tm-obs-author {
display: flex;
align-items: center;
gap: 14px;
position: relative;
z-index: 1;
margin-top: auto;
}
.tm-obs-avatar {
width: 42px;
height: 42px;
border-radius: 50%;
border: 1px solid var(--tm-obs-gold);
background: #1a1510;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Playfair Display', Georgia, serif;
font-size: 13px;
color: var(--tm-obs-gold);
opacity: 0.85;
flex-shrink: 0;
}
.tm-obs-featured .tm-obs-avatar {
width: 52px;
height: 52px;
}
.tm-obs-meta { display: flex; flex-direction: column; }
.tm-obs-name {
font-family: 'Playfair Display', Georgia, serif;
font-size: 13px;
font-style: normal;
color: var(--tm-obs-paper);
letter-spacing: 0.05em;
margin-bottom: 3px;
}
.tm-obs-role {
font-family: 'DM Mono', 'JetBrains Mono', monospace;
font-size: 9px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--tm-obs-muted);
}
.tm-obs-source {
position: absolute;
bottom: 16px;
right: 16px;
font-family: 'DM Mono', 'JetBrains Mono', monospace;
font-size: 8px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--tm-obs-muted);
border: 1px solid #2a2418;
padding: 3px 7px;
}
/* Mobile fallback — collapse 3 cols to a single stack so cards stay
readable. Featured stops spanning two rows. */
@media (max-width: 720px) {
.tm-obs-grid { grid-template-columns: 1fr; }
.tm-obs-featured { grid-row: auto; border-right: none; }
.tm-obs-glyph,
.tm-obs-featured .tm-obs-glyph { font-size: 120px; top: 12px; left: 18px; }
}
@media (prefers-reduced-motion: reduce) {
.tm-obs-vdot { animation: none; }
.tm-obs-card { transition: none; }
}
```
### 02. Brutalist Press
**Type:** Pure CSS
**Description:** Newspaper-column layout with a bold pull quote, animated star-rating bars, red editor's stamp, and numbered micro-reviews. Use case: B2B software or enterprise product. IBM Plex Serif for headlines, Bebas Neue for big numbers, IBM Plex Mono for metadata.
**HTML:**
```html
The Testimonial Record · Reviews & Verified Reports
Vol. XLII · 1,248 Reviews
★ Editor's Pick
"Nothing short of transformative — our team has never been more aligned."
Posted by
Eleanor Ashcroft · COO, Latitude Group
★
★
★
★
★
I've evaluated dozens of platforms in my career and few have combined this level of depth with genuine usability. The onboarding alone changed how we think about process. Six months in and the team still finds new capabilities worth talking about.
4.9
Out of 5.0 · 1,248 reviews
01
★ ★ ★ ★ ★
"Doubled our output with half the friction. It's the tool I wish we'd found three years ago."
D. Nakamura · Head of Ops, Renova
02
★ ★ ★ ★ ★
"The support team alone is worth the subscription. Responsive, knowledgeable, human."
F. Oberlin · Founder, Plinth Studio
"I put my entire operations on this platform in 48 hours. That is not something I do lightly."
— K. Bergström , CTO · Kolverd Systems
03
★ ★ ★ ★ ★
"Robust, opinionated in the right ways, and genuinely designed for real work rather than demos."
P. Fontaine · PM, Vex Collective
04
★ ★ ★ ★ ★
"Every competitor promised results. These people delivered — on time, under budget."
M. Osei · Director, Harven Capital
```
**CSS:**
```css
/* Brutalist Press — newsprint column layout. Self-contained: all
styling lives under .tm-brp. Pull quote uses a heavy top + bottom
border (the masthead-rule pattern). Rating bars animate from 0
width on first paint. Red editor's stamp is rotated -1deg for a
stuck-on feel. */
.tm-brp {
--tm-brp-black: #111010;
--tm-brp-white: #f2ede4;
--tm-brp-yellow: #f5e642;
--tm-brp-red: #d63022;
--tm-brp-gray: #888070;
--tm-brp-lgray: #ddd8cc;
padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 40px);
background: var(--tm-brp-white);
font-family: 'IBM Plex Serif', Georgia, serif;
color: var(--tm-brp-black);
min-height: 520px;
}
.tm-brp-mast {
display: flex;
align-items: center;
margin-bottom: 30px;
border-top: 6px solid var(--tm-brp-black);
border-bottom: 2px solid var(--tm-brp-black);
padding: 6px 0;
}
.tm-brp-title {
font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
font-size: 13px;
letter-spacing: 0.2em;
color: var(--tm-brp-black);
flex: 1;
}
.tm-brp-count {
font-family: 'IBM Plex Mono', ui-monospace, monospace;
font-size: 10px;
color: var(--tm-brp-gray);
letter-spacing: 0.1em;
}
.tm-brp-grid {
display: grid;
grid-template-columns: 2fr 1px 1.2fr 1px 1.2fr;
gap: 0;
align-items: start;
}
.tm-brp-divider {
background: var(--tm-brp-black);
height: 100%;
min-height: 280px;
opacity: 0.15;
}
.tm-brp-col {
padding: 0 22px;
}
.tm-brp-col:first-child { padding-left: 0; }
.tm-brp-col:last-child { padding-right: 0; }
.tm-brp-pull {
font-family: 'IBM Plex Serif', Georgia, serif;
font-style: italic;
font-weight: 700;
font-size: clamp(1.4rem, 2.4vw, 2.2rem);
line-height: 1.12;
color: var(--tm-brp-black);
border-top: 4px solid var(--tm-brp-black);
border-bottom: 4px solid var(--tm-brp-black);
padding: 18px 0;
margin: 0 0 18px;
}
.tm-brp-stamp {
display: inline-flex;
background: var(--tm-brp-red);
color: var(--tm-brp-white);
font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
font-size: 10px;
letter-spacing: 0.25em;
padding: 3px 8px;
margin-bottom: 12px;
transform: rotate(-1deg);
}
.tm-brp-attribution {
font-family: 'IBM Plex Mono', ui-monospace, monospace;
font-size: 10px;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--tm-brp-gray);
margin: 0 0 4px;
}
.tm-brp-attr-name {
font-family: 'IBM Plex Serif', Georgia, serif;
font-size: 13px;
font-weight: 700;
color: var(--tm-brp-black);
margin: 0 0 8px;
}
.tm-brp-attr-name cite { font-style: normal; }
.tm-brp-body {
font-size: 0.86rem;
line-height: 1.7;
color: #333;
margin-top: 14px;
}
.tm-brp-rating-box {
background: var(--tm-brp-black);
color: var(--tm-brp-yellow);
padding: 22px 20px;
margin-bottom: 22px;
position: relative;
overflow: hidden;
}
.tm-brp-rating-box::after {
content: '\2605';
position: absolute;
right: -10px; top: -10px;
font-size: 80px;
opacity: 0.07;
color: var(--tm-brp-yellow);
line-height: 1;
}
.tm-brp-rating-num {
font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
font-size: 56px;
line-height: 1;
color: var(--tm-brp-yellow);
}
.tm-brp-rating-sub {
font-family: 'IBM Plex Mono', ui-monospace, monospace;
font-size: 9px;
letter-spacing: 0.2em;
color: #888;
text-transform: uppercase;
margin-top: 4px;
}
.tm-brp-bar-wrap { margin-top: 16px; }
.tm-brp-bar-row {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 5px;
}
.tm-brp-bar-lbl {
font-family: 'IBM Plex Mono', ui-monospace, monospace;
font-size: 8px;
color: #888;
width: 26px;
text-align: right;
}
.tm-brp-bar-track {
flex: 1;
height: 4px;
background: #222;
overflow: hidden;
}
.tm-brp-bar-fill {
height: 100%;
background: var(--tm-brp-yellow);
transform-origin: left;
animation: tm-brp-barin 1s ease both;
}
.tm-brp-bar-row:nth-child(1) .tm-brp-bar-fill { animation-delay: 0.1s; }
.tm-brp-bar-row:nth-child(2) .tm-brp-bar-fill { animation-delay: 0.2s; }
.tm-brp-bar-row:nth-child(3) .tm-brp-bar-fill { animation-delay: 0.3s; }
.tm-brp-bar-row:nth-child(4) .tm-brp-bar-fill { animation-delay: 0.4s; }
.tm-brp-bar-row:nth-child(5) .tm-brp-bar-fill { animation-delay: 0.5s; }
@keyframes tm-brp-barin {
from { transform: scaleX(0); }
to { transform: scaleX(1); }
}
.tm-brp-bar-cnt {
font-family: 'IBM Plex Mono', ui-monospace, monospace;
font-size: 8px;
color: #666;
width: 22px;
}
.tm-brp-tblock {
margin-bottom: 22px;
padding-bottom: 22px;
border-bottom: 1px solid var(--tm-brp-lgray);
position: relative;
transition: all 0.25s;
}
.tm-brp-tblock:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}
.tm-brp-tblock:hover .tm-brp-bnum {
color: var(--tm-brp-yellow);
text-shadow: 2px 2px 0 var(--tm-brp-black);
}
.tm-brp-bnum {
font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
font-size: 40px;
line-height: 1;
color: var(--tm-brp-lgray);
float: left;
margin-right: 9px;
margin-top: -5px;
transition: color 0.25s, text-shadow 0.25s;
}
.tm-brp-bq {
font-size: 0.87rem;
line-height: 1.6;
color: #333;
margin: 0 0 10px;
font-style: italic;
}
.tm-brp-bmeta {
font-family: 'IBM Plex Mono', ui-monospace, monospace;
font-size: 9px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--tm-brp-gray);
display: flex;
align-items: center;
gap: 8px;
}
.tm-brp-bmeta::before {
content: '\2014';
color: var(--tm-brp-red);
font-size: 12px;
}
.tm-brp-bmeta cite { font-style: normal; color: var(--tm-brp-black); font-weight: 600; }
.tm-brp-star-row {
display: flex;
gap: 2px;
margin-bottom: 8px;
}
.tm-brp-s {
color: var(--tm-brp-black);
font-size: 11px;
}
.tm-brp-se { color: var(--tm-brp-lgray); }
.tm-brp-hblock {
background: var(--tm-brp-yellow);
padding: 16px 18px;
margin-bottom: 22px;
border-left: 5px solid var(--tm-brp-black);
}
.tm-brp-hblock blockquote {
font-style: italic;
font-size: 0.9rem;
line-height: 1.5;
color: var(--tm-brp-black);
margin: 0 0 8px;
}
.tm-brp-hmeta {
font-family: 'IBM Plex Mono', ui-monospace, monospace;
font-size: 9px;
text-transform: uppercase;
letter-spacing: 0.12em;
color: #555;
}
.tm-brp-hmeta cite { font-style: normal; }
@media (max-width: 720px) {
.tm-brp-grid { grid-template-columns: 1fr; gap: 24px; }
.tm-brp-divider { display: none; }
.tm-brp-col { padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
.tm-brp-bar-fill { animation: none; transform: scaleX(1); }
.tm-brp-tblock { transition: none; }
}
```
### 03. Blossom Bento
**Type:** Pure CSS
**Description:** 12-column bento grid with soft pastel cards, spring-bounce hover animations, and a stat panel. Use case: wellness, beauty, or lifestyle brand. Fraunces serif for the featured pull-quote, Instrument Sans for everything else, six color-coded star palettes per card slot.
**HTML:**
```html
Top Review
★★★★★
“ This completely changed how I approach my morning routine. I feel more present, more intentional — honestly more like myself than I have in years.
SB
Sasha Bloom Yoga instructor · 6 months subscriber
★★★★★
"Gentle on the system, remarkable on the results. I've recommended it to my entire wellness circle."
OM Olivia Marsh Nutritionist
★★★★★
"Smells like a greenhouse in the best way. My skin has never been softer or more even-toned."
PE Priya Easton Skincare obsessive
★★★★★
"Fell asleep faster than I have since I was a child. The lavender formula is genuinely magical."
RC Rafael Cruz Sleep coach
★★★★★
"Finally a brand that doesn't lie about ingredients. Transparent, effective, beautiful packaging."
ZN Zoë Nakamura Clean beauty editor
🌿
★★★★★
"The ritual of it — the scent, the texture — has become the most grounding part of my day."
LW Lena Ward · Therapist
★★★★★
"Tried seventeen wellness products this year. This is the one I actually still use. Not even close."
MK Maya Kim · Wellness blogger
4.9
avg. rating 12,400+ reviews
```
**CSS:**
```css
/* Blossom Bento — pastel 12-column bento grid. Self-contained. Cards
spring-bounce in on load (staggered delays) and lift on hover with
a soft shadow. Each card has its own accent color baked into the
stars + avatar. The blob in card .ca is a subtle radial glow,
contained inside the card via overflow:hidden. */
.tm-ben {
--tm-ben-bg: #f7f3ee;
--tm-ben-c1: #f9e8e0;
--tm-ben-c2: #e8eef5;
--tm-ben-c3: #e8f0e9;
--tm-ben-c4: #f3eaf7;
--tm-ben-c5: #fdf0d8;
--tm-ben-c6: #e5f0f0;
--tm-ben-text: #2a2420;
--tm-ben-muted: #8a7e76;
--tm-ben-a1: #d4614a;
--tm-ben-a2: #4a6fa5;
--tm-ben-a3: #4a8a56;
--tm-ben-a4: #8a4ab5;
--tm-ben-a5: #c87c1e;
--tm-ben-a6: #2a8a8a;
display: grid;
grid-template-columns: repeat(12, 1fr);
grid-auto-rows: 138px;
gap: 11px;
padding: clamp(20px, 3vw, 40px);
background: var(--tm-ben-bg);
font-family: 'Instrument Sans', system-ui, sans-serif;
color: var(--tm-ben-text);
min-height: 500px;
}
.tm-ben-card {
border-radius: 22px;
padding: 22px 24px;
position: relative;
overflow: hidden;
transition: transform 0.4s cubic-bezier(.34, 1.56, .64, 1),
box-shadow 0.4s ease;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
animation: tm-ben-fi 0.7s cubic-bezier(.34, 1.2, .64, 1) both;
}
.tm-ben-card:hover {
transform: translateY(-4px) scale(1.012);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}
.tm-ben-card:nth-child(1) { animation-delay: 0.05s; }
.tm-ben-card:nth-child(2) { animation-delay: 0.12s; }
.tm-ben-card:nth-child(3) { animation-delay: 0.18s; }
.tm-ben-card:nth-child(4) { animation-delay: 0.22s; }
.tm-ben-card:nth-child(5) { animation-delay: 0.28s; }
.tm-ben-card:nth-child(6) { animation-delay: 0.34s; }
.tm-ben-card:nth-child(7) { animation-delay: 0.40s; }
@keyframes tm-ben-fi {
from { opacity: 0; transform: translateY(16px) scale(.97); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
.tm-ben-ca { grid-column: 1 / 6; grid-row: 1 / 3; background: var(--tm-ben-c1); }
.tm-ben-cb { grid-column: 6 / 9; grid-row: 1 / 2; background: var(--tm-ben-c2); display: flex; flex-direction: column; justify-content: space-between; }
.tm-ben-cc { grid-column: 9 / 13; grid-row: 1 / 2; background: var(--tm-ben-c5); display: flex; flex-direction: column; justify-content: space-between; }
.tm-ben-cd { grid-column: 6 / 10; grid-row: 2 / 3; background: var(--tm-ben-c3); display: flex; flex-direction: column; justify-content: space-between; }
.tm-ben-ce { grid-column: 10 / 13; grid-row: 2 / 3; background: var(--tm-ben-c4); display: flex; flex-direction: column; justify-content: space-between; }
.tm-ben-cf { grid-column: 1 / 5; grid-row: 3 / 4; background: var(--tm-ben-c6); display: flex; flex-direction: row; align-items: center; gap: 18px; padding: 20px 24px; }
.tm-ben-cg { grid-column: 5 / 13; grid-row: 3 / 4; background: var(--tm-ben-c4); display: flex; flex-direction: row; align-items: center; gap: 18px; padding: 20px 24px; }
.tm-ben-blob {
position: absolute;
width: 160px;
height: 160px;
border-radius: 50%;
background: radial-gradient(circle, var(--tm-ben-a1) 0%, transparent 70%);
opacity: 0.12;
bottom: -40px;
right: -40px;
pointer-events: none;
}
.tm-ben-stars {
display: flex;
gap: 3px;
margin-bottom: 10px;
font-size: 12px;
letter-spacing: 1px;
}
.tm-ben-ca .tm-ben-stars { color: var(--tm-ben-a1); }
.tm-ben-cb .tm-ben-stars { color: var(--tm-ben-a2); }
.tm-ben-cc .tm-ben-stars { color: var(--tm-ben-a5); }
.tm-ben-cd .tm-ben-stars { color: var(--tm-ben-a3); }
.tm-ben-ce .tm-ben-stars { color: var(--tm-ben-a4); }
.tm-ben-cf .tm-ben-stars { color: var(--tm-ben-a6); }
.tm-ben-cg .tm-ben-stars { color: var(--tm-ben-a4); }
.tm-ben-ca .tm-ben-inner {
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.tm-ben-tag {
display: inline-flex;
align-items: center;
gap: 5px;
font-size: 10px;
font-weight: 600;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--tm-ben-a1);
background: rgba(212, 97, 74, 0.1);
padding: 3px 9px;
border-radius: 20px;
margin-bottom: 12px;
width: fit-content;
}
.tm-ben-tdot {
width: 5px;
height: 5px;
background: var(--tm-ben-a1);
border-radius: 50%;
}
.tm-ben-qlg {
font-family: 'Fraunces', Georgia, serif;
font-style: italic;
font-weight: 300;
font-size: 1.3rem;
line-height: 1.45;
color: var(--tm-ben-text);
margin: 0;
flex: 1;
display: flex;
align-items: center;
}
.tm-ben-qmark {
font-family: 'Newsreader', Georgia, serif;
font-size: 2.6rem;
line-height: 0;
color: var(--tm-ben-a1);
opacity: 0.3;
vertical-align: -0.4em;
margin-right: 4px;
}
.tm-ben-ar {
display: flex;
align-items: center;
gap: 9px;
margin-top: 14px;
}
.tm-ben-av {
width: 34px;
height: 34px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
font-weight: 600;
flex-shrink: 0;
}
.tm-ben-av-sm { width: 28px; height: 28px; font-size: 10px; }
.tm-ben-ca .tm-ben-av { background: rgba(212, 97, 74, 0.15); color: var(--tm-ben-a1); }
.tm-ben-cb .tm-ben-av { background: rgba(74, 111, 165, 0.15); color: var(--tm-ben-a2); }
.tm-ben-cc .tm-ben-av { background: rgba(200, 124, 30, 0.15); color: var(--tm-ben-a5); }
.tm-ben-cd .tm-ben-av { background: rgba(74, 138, 86, 0.15); color: var(--tm-ben-a3); }
.tm-ben-ce .tm-ben-av { background: rgba(138, 74, 181, 0.15); color: var(--tm-ben-a4); }
.tm-ben-cf .tm-ben-av { background: rgba(42, 138, 138, 0.15); color: var(--tm-ben-a6); }
.tm-ben-cg .tm-ben-av { background: rgba(138, 74, 181, 0.15); color: var(--tm-ben-a4); }
.tm-ben-an {
font-size: 12px;
font-weight: 600;
font-style: normal;
color: var(--tm-ben-text);
line-height: 1.3;
display: block;
}
.tm-ben-aro {
font-size: 10px;
color: var(--tm-ben-muted);
line-height: 1.4;
}
.tm-ben-qsm {
font-family: 'Fraunces', Georgia, serif;
font-style: italic;
font-weight: 300;
font-size: 0.86rem;
line-height: 1.5;
color: var(--tm-ben-text);
margin: 7px 0;
flex: 1;
}
.tm-ben-cf .tm-ben-content,
.tm-ben-cg .tm-ben-content { flex: 1; }
.tm-ben-cf .tm-ben-ico {
width: 44px;
height: 44px;
background: rgba(42, 138, 138, 0.1);
border-radius: 13px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
flex-shrink: 0;
}
.tm-ben-cg .tm-ben-right {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 4px;
}
.tm-ben-snum {
font-family: 'Fraunces', Georgia, serif;
font-size: 2.4rem;
font-weight: 300;
line-height: 1;
color: var(--tm-ben-a4);
}
.tm-ben-slbl {
font-size: 9px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--tm-ben-muted);
text-align: right;
}
@media (max-width: 820px) {
.tm-ben { grid-auto-rows: auto; }
.tm-ben-ca, .tm-ben-cb, .tm-ben-cc, .tm-ben-cd,
.tm-ben-ce, .tm-ben-cf, .tm-ben-cg {
grid-column: 1 / -1; grid-row: auto;
}
}
@media (prefers-reduced-motion: reduce) {
.tm-ben-card { animation: none; transition: none; }
.tm-ben-card:hover { transform: none; }
}
```
### 04. Neon Glass SaaS
**Type:** Pure CSS
**Description:** Dark glassmorphism with ambient orb drift, per-card neon accents, pulsing status dots, and a metrics strip. Use case: SaaS, developer tools, or tech platform. Syne for the metric numbers, JetBrains Mono for tags, four neon accent palettes (cyan/purple/green/orange).
**HTML:**
```html
// productivity
★★★★★
"We retired three separate tools the week we went live. The consolidation alone saved us 12 hours a week."
TK
Takeshi Kato Eng Lead · Lattice AI
// enterprise
★★★★★
"SOC 2 compliance, multi-region failover , and still deployed faster than our last internal tool. Unreal."
RN
Rachel Novak CTO · Vantage Systems
// growth
★★★★★
"Pipeline visibility went from gut feeling to real-time precision . We closed 30% more deals in Q3."
LB
Luca Bianchi VP Sales · Corvis
// devex
★★★★★
"Setup took nine minutes . Not nine days. Nine minutes."
AO
Amara Osei Senior SRE · Pulsar
// platform · featured
★★★★★
"I've been in infrastructure for fifteen years. I've watched tools promise to change how teams work and I've watched most fail. This is the first platform where I saw my engineers actually excited to open a dashboard. That alone tells you everything."
EM
Elisa Morrow VP Infrastructure · Aether Labs · G2 Verified
```
**CSS:**
```css
/* Neon Glass SaaS — dark glassmorphism with ambient orbs. The orbs are
contained inside .tm-nsa via position:absolute + the wrapper's own
overflow:hidden (NOT position:fixed like the original full-page mock).
Cards use backdrop-filter for the frosted-glass effect over the orb
bloom. Four neon accent palettes (cyan/purple/green/orange) cycle
per card via .c1–.c5 modifiers. Pulsing status dots use a gentle
blink animation that respects prefers-reduced-motion. */
.tm-nsa {
--tm-nsa-bg: #07070f;
--tm-nsa-card: rgba(255,255,255,0.04);
--tm-nsa-cbr: rgba(255,255,255,0.08);
--tm-nsa-ch: rgba(255,255,255,0.07);
--tm-nsa-cy: #00e5ff;
--tm-nsa-cp: #b44fff;
--tm-nsa-cg: #00ff9d;
--tm-nsa-co: #ff6b35;
--tm-nsa-text: #f0f0ff;
--tm-nsa-muted: #6b6b8a;
position: relative;
padding: clamp(28px, 4vw, 48px);
background: var(--tm-nsa-bg);
font-family: 'JetBrains Mono', ui-monospace, monospace;
color: var(--tm-nsa-text);
overflow: hidden;
min-height: 520px;
}
.tm-nsa-orb {
position: absolute;
border-radius: 50%;
pointer-events: none;
filter: blur(100px);
opacity: 0.18;
animation: tm-nsa-drift 12s ease-in-out infinite alternate;
}
.tm-nsa-o1 { width: 600px; height: 600px; background: var(--tm-nsa-cp); top: -200px; left: -200px; animation-delay: 0s; }
.tm-nsa-o2 { width: 500px; height: 500px; background: var(--tm-nsa-cy); bottom: -150px; right: -100px; animation-delay: -4s; }
.tm-nsa-o3 { width: 300px; height: 300px; background: var(--tm-nsa-cg); top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -8s; opacity: 0.08; animation-name: tm-nsa-drift2; }
@keyframes tm-nsa-drift {
from { transform: translate(0, 0) scale(1); }
to { transform: translate(30px, 20px) scale(1.1); }
}
@keyframes tm-nsa-drift2 {
from { transform: translate(-50%, -50%) scale(1); }
to { transform: translate(calc(-50% + 20px), calc(-50% + 15px)) scale(1.08); }
}
.tm-nsa-metrics {
position: relative;
z-index: 1;
display: flex;
gap: 1px;
background: var(--tm-nsa-cbr);
border-radius: 16px;
overflow: hidden;
margin-bottom: 18px;
border: 1px solid var(--tm-nsa-cbr);
}
.tm-nsa-metric {
flex: 1;
background: var(--tm-nsa-card);
backdrop-filter: blur(20px);
padding: 16px 20px;
text-align: center;
position: relative;
overflow: hidden;
}
.tm-nsa-metric::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 40%;
height: 2px;
border-radius: 2px 2px 0 0;
transition: width 0.3s;
}
.tm-nsa-metric:hover::after { width: 70%; }
.tm-nsa-metric:nth-child(1)::after { background: var(--tm-nsa-cy); }
.tm-nsa-metric:nth-child(2)::after { background: var(--tm-nsa-cp); }
.tm-nsa-metric:nth-child(3)::after { background: var(--tm-nsa-cg); }
.tm-nsa-metric:nth-child(4)::after { background: var(--tm-nsa-co); }
.tm-nsa-mnum {
font-family: 'Syne', system-ui, sans-serif;
font-size: 1.4rem;
font-weight: 800;
letter-spacing: -0.02em;
}
.tm-nsa-metric:nth-child(1) .tm-nsa-mnum { color: var(--tm-nsa-cy); }
.tm-nsa-metric:nth-child(2) .tm-nsa-mnum { color: var(--tm-nsa-cp); }
.tm-nsa-metric:nth-child(3) .tm-nsa-mnum { color: var(--tm-nsa-cg); }
.tm-nsa-metric:nth-child(4) .tm-nsa-mnum { color: var(--tm-nsa-co); }
.tm-nsa-mlbl {
font-size: 9px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--tm-nsa-muted);
margin-top: 4px;
}
.tm-nsa-grid {
position: relative;
z-index: 1;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 14px;
margin-bottom: 14px;
}
.tm-nsa-grid2 {
position: relative;
z-index: 1;
display: grid;
grid-template-columns: 1fr 2fr;
gap: 14px;
}
.tm-nsa-card {
background: var(--tm-nsa-card);
border: 1px solid var(--tm-nsa-cbr);
border-radius: 16px;
padding: 24px 22px;
backdrop-filter: blur(20px);
position: relative;
overflow: hidden;
transition: all 0.35s ease;
animation: tm-nsa-su 0.7s cubic-bezier(.22, 1, .36, 1) both;
}
.tm-nsa-card:hover {
background: var(--tm-nsa-ch);
border-color: rgba(255,255,255,0.14);
transform: translateY(-3px);
box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.tm-nsa-grid .tm-nsa-card:nth-child(1) { animation-delay: 0.05s; }
.tm-nsa-grid .tm-nsa-card:nth-child(2) { animation-delay: 0.12s; }
.tm-nsa-grid .tm-nsa-card:nth-child(3) { animation-delay: 0.19s; }
.tm-nsa-grid2 .tm-nsa-card:nth-child(1) { animation-delay: 0.26s; }
.tm-nsa-grid2 .tm-nsa-card:nth-child(2) { animation-delay: 0.33s; }
@keyframes tm-nsa-su {
from { opacity: 0; transform: translateY(22px); }
to { opacity: 1; transform: translateY(0); }
}
.tm-nsa-ca-line {
position: absolute;
top: 0; left: 0; right: 0;
height: 1px;
opacity: 0.7;
transition: opacity 0.35s, height 0.35s;
}
.tm-nsa-card:hover .tm-nsa-ca-line { opacity: 1; height: 2px; }
.tm-nsa-c1 .tm-nsa-ca-line { background: linear-gradient(to right, var(--tm-nsa-cy), transparent); }
.tm-nsa-c2 .tm-nsa-ca-line { background: linear-gradient(to right, var(--tm-nsa-cp), transparent); }
.tm-nsa-c3 .tm-nsa-ca-line { background: linear-gradient(to right, var(--tm-nsa-cg), transparent); }
.tm-nsa-c4 .tm-nsa-ca-line { background: linear-gradient(to right, var(--tm-nsa-co), transparent); }
.tm-nsa-c5 .tm-nsa-ca-line { background: linear-gradient(to right, var(--tm-nsa-cy), var(--tm-nsa-cp)); }
.tm-nsa-gdot {
position: absolute;
top: 18px;
right: 18px;
width: 7px;
height: 7px;
border-radius: 50%;
animation: tm-nsa-blink 3s ease-in-out infinite;
}
.tm-nsa-c1 .tm-nsa-gdot { background: var(--tm-nsa-cy); box-shadow: 0 0 8px var(--tm-nsa-cy); }
.tm-nsa-c2 .tm-nsa-gdot { background: var(--tm-nsa-cp); box-shadow: 0 0 8px var(--tm-nsa-cp); }
.tm-nsa-c3 .tm-nsa-gdot { background: var(--tm-nsa-cg); box-shadow: 0 0 8px var(--tm-nsa-cg); }
.tm-nsa-c4 .tm-nsa-gdot { background: var(--tm-nsa-co); box-shadow: 0 0 8px var(--tm-nsa-co); }
.tm-nsa-c5 .tm-nsa-gdot { background: var(--tm-nsa-cy); box-shadow: 0 0 8px var(--tm-nsa-cy); }
@keyframes tm-nsa-blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.3; }
}
.tm-nsa-stars {
display: flex;
gap: 3px;
margin-bottom: 12px;
font-size: 11px;
letter-spacing: 1px;
}
.tm-nsa-c1 .tm-nsa-stars { color: var(--tm-nsa-cy); }
.tm-nsa-c2 .tm-nsa-stars { color: var(--tm-nsa-cp); }
.tm-nsa-c3 .tm-nsa-stars { color: var(--tm-nsa-cg); }
.tm-nsa-c4 .tm-nsa-stars { color: var(--tm-nsa-co); }
.tm-nsa-c5 .tm-nsa-stars { color: var(--tm-nsa-cy); }
.tm-nsa-q {
font-size: 0.86rem;
line-height: 1.65;
color: rgba(240,240,255,0.78);
margin: 0 0 18px;
font-weight: 300;
font-style: normal;
}
.tm-nsa-q strong { font-weight: 600; color: var(--tm-nsa-text); }
.tm-nsa-author {
display: flex;
align-items: center;
gap: 9px;
padding-top: 14px;
border-top: 1px solid rgba(255,255,255,0.05);
}
.tm-nsa-av {
width: 32px;
height: 32px;
border-radius: 9px;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
font-weight: 500;
flex-shrink: 0;
}
.tm-nsa-c1 .tm-nsa-av { background: rgba(0,229,255,0.12); color: var(--tm-nsa-cy); border: 1px solid rgba(0,229,255,0.2); }
.tm-nsa-c2 .tm-nsa-av { background: rgba(180,79,255,0.12); color: var(--tm-nsa-cp); border: 1px solid rgba(180,79,255,0.2); }
.tm-nsa-c3 .tm-nsa-av { background: rgba(0,255,157,0.12); color: var(--tm-nsa-cg); border: 1px solid rgba(0,255,157,0.2); }
.tm-nsa-c4 .tm-nsa-av { background: rgba(255,107,53,0.12); color: var(--tm-nsa-co); border: 1px solid rgba(255,107,53,0.2); }
.tm-nsa-c5 .tm-nsa-av { background: rgba(0,229,255,0.12); color: var(--tm-nsa-cy); border: 1px solid rgba(0,229,255,0.2); }
.tm-nsa-an {
font-size: 12px;
font-weight: 600;
font-style: normal;
color: var(--tm-nsa-text);
line-height: 1.3;
display: block;
}
.tm-nsa-ar {
font-size: 9px;
color: var(--tm-nsa-muted);
letter-spacing: 0.05em;
margin-top: 2px;
}
.tm-nsa-ctag {
font-size: 9px;
letter-spacing: 0.08em;
padding: 3px 7px;
border-radius: 4px;
margin-bottom: 10px;
display: inline-block;
}
.tm-nsa-c1 .tm-nsa-ctag { background: rgba(0,229,255,0.1); color: var(--tm-nsa-cy); }
.tm-nsa-c2 .tm-nsa-ctag { background: rgba(180,79,255,0.1); color: var(--tm-nsa-cp); }
.tm-nsa-c3 .tm-nsa-ctag { background: rgba(0,255,157,0.1); color: var(--tm-nsa-cg); }
.tm-nsa-c4 .tm-nsa-ctag { background: rgba(255,107,53,0.1); color: var(--tm-nsa-co); }
.tm-nsa-c5 .tm-nsa-ctag { background: rgba(0,229,255,0.1); color: var(--tm-nsa-cy); }
.tm-nsa-wide .tm-nsa-q { font-size: 1rem; }
@media (max-width: 820px) {
.tm-nsa-grid { grid-template-columns: 1fr; }
.tm-nsa-grid2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.tm-nsa-orb, .tm-nsa-gdot, .tm-nsa-card { animation: none; }
.tm-nsa-card:hover { transform: none; }
}
```
### 05. Retro Food Review
**Type:** Pure CSS
**Description:** Graph-paper background, terracotta/olive/mustard palette, fork ratings, a stamped score box, and vintage editorial layout. Use case: restaurant, food brand, or hospitality. Abril Fatface for the pull quote, Courier Prime for stamps and monospace meta.
**HTML:**
```html
DINER'S DIGEST — VERIFIED REVIEWS
EST. 1971 · 4,820 VERIFIED DINERS
★ Review of the Month
★
★
★
★
★
The truffle risotto alone is worth the trip from another city.
I've dined at three Michelin-starred restaurants this year and this kitchen competes with every one of them. The risotto has a depth of flavor that only comes from someone who has cooked it a thousand times and still cares. The service is unhurried. The lighting is exactly right. Come here for a birthday, an anniversary, or an ordinary Tuesday that deserves to feel extraordinary.
GH
Gideon Harlow Food critic · The Table Magazine
Guest Reviews
★ ★ ★ ★ ★
"The pasta is handmade. You can taste it."
ML
Mira Laszlo Regular diner
★ ★ ★ ★ ★
"Best wood-fired bread in the neighbourhood. Period."
PO
Pablo Ortega Weekend regular
★ ★ ★ ★ ★
"I don't usually write reviews. I am writing this one."
Three courses, two hours, zero regrets. The panna cotta changed my mind about panna cotta.
SA
Sofía Arenas First-time visitor
```
**CSS:**
```css
/* Retro Food Review — graph-paper background contained inside the
wrapper (NOT body-level like the original mock). Terracotta /
olive / mustard palette evokes 1970s editorial food magazines.
Hover tints each cell to a slightly warmer cream. */
.tm-ret {
--tm-ret-bg: #f0e6c8;
--tm-ret-terracotta: #c4522a;
--tm-ret-olive: #5c6b2e;
--tm-ret-mustard: #d4a017;
--tm-ret-cream: #faf4e1;
--tm-ret-dark: #1e1a12;
--tm-ret-rust: #a83820;
--tm-ret-sage: #7a8c5a;
position: relative;
padding: clamp(28px, 4vw, 48px);
background: var(--tm-ret-bg);
background-image:
repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(0,0,0,0.04) 39px, rgba(0,0,0,0.04) 40px),
repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(0,0,0,0.04) 39px, rgba(0,0,0,0.04) 40px);
font-family: 'Karla', system-ui, sans-serif;
color: var(--tm-ret-dark);
min-height: 500px;
}
.tm-ret-stripe {
background: var(--tm-ret-terracotta);
color: var(--tm-ret-cream);
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 18px;
margin-bottom: 30px;
border: 2px solid var(--tm-ret-dark);
}
.tm-ret-stripe-title {
font-family: 'Abril Fatface', Georgia, serif;
font-size: 1.05rem;
letter-spacing: 0.05em;
}
.tm-ret-stripe-sub {
font-family: 'Courier Prime', 'Courier New', monospace;
font-size: 11px;
letter-spacing: 0.1em;
opacity: 0.85;
}
.tm-ret-layout {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: auto auto;
gap: 0;
border: 2px solid var(--tm-ret-dark);
}
.tm-ret-cell {
border: 1px solid var(--tm-ret-dark);
padding: 26px 22px;
position: relative;
background: var(--tm-ret-cream);
transition: background 0.2s;
}
.tm-ret-cell:hover { background: var(--tm-ret-bg); }
.tm-ret-big {
grid-column: 1 / 3;
grid-row: 1 / 2;
border-right: 2px solid var(--tm-ret-dark);
}
.tm-ret-tall {
grid-column: 3 / 4;
grid-row: 1 / 3;
border-left: none;
display: flex;
flex-direction: column;
gap: 22px;
}
.tm-ret-deco-circle {
position: absolute;
width: 90px;
height: 90px;
border-radius: 50%;
border: 1px dashed var(--tm-ret-terracotta);
opacity: 0.2;
top: -20px;
right: -20px;
pointer-events: none;
}
.tm-ret-dish-stamp {
display: inline-flex;
align-items: center;
gap: 6px;
background: var(--tm-ret-olive);
color: var(--tm-ret-cream);
font-family: 'Courier Prime', 'Courier New', monospace;
font-size: 10px;
letter-spacing: 0.15em;
text-transform: uppercase;
padding: 4px 10px;
margin-bottom: 14px;
}
.tm-ret-big-pull {
font-family: 'Abril Fatface', Georgia, serif;
font-size: clamp(1.4rem, 3vw, 1.85rem);
line-height: 1.15;
color: var(--tm-ret-dark);
margin: 0 0 18px;
position: relative;
}
.tm-ret-big-pull::before {
content: '"';
font-size: 4.5rem;
color: var(--tm-ret-terracotta);
opacity: 0.15;
position: absolute;
top: -20px;
left: -10px;
line-height: 1;
pointer-events: none;
}
.tm-ret-fork-row {
display: flex;
gap: 6px;
margin-bottom: 12px;
align-items: center;
}
.tm-ret-fork {
font-size: 14px;
color: var(--tm-ret-terracotta);
}
.tm-ret-fork-empty { color: #ccc; }
.tm-ret-body-text {
font-size: 0.85rem;
line-height: 1.7;
color: #3a3020;
font-style: italic;
margin: 0 0 18px;
}
.tm-ret-body-text em {
font-style: normal;
color: var(--tm-ret-terracotta);
font-weight: 700;
}
.tm-ret-chef-tag {
display: flex;
align-items: center;
gap: 10px;
margin-top: auto;
}
.tm-ret-chef-icon {
width: 40px;
height: 40px;
background: var(--tm-ret-terracotta);
color: var(--tm-ret-cream);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Abril Fatface', Georgia, serif;
font-size: 14px;
flex-shrink: 0;
}
.tm-ret-icon-olive { background: var(--tm-ret-olive); }
.tm-ret-icon-mustard { background: var(--tm-ret-mustard); color: var(--tm-ret-dark); }
.tm-ret-chef-name {
font-weight: 700;
font-size: 13px;
font-style: normal;
color: var(--tm-ret-dark);
line-height: 1.3;
display: block;
}
.tm-ret-chef-role {
font-family: 'Courier Prime', 'Courier New', monospace;
font-size: 10px;
color: var(--tm-ret-sage);
letter-spacing: 0.08em;
}
.tm-ret-sm-quote {
font-family: 'Abril Fatface', Georgia, serif;
font-size: 1.05rem;
line-height: 1.3;
color: var(--tm-ret-dark);
margin: 0 0 14px;
position: relative;
}
.tm-ret-sm-quote::after {
content: '';
display: block;
width: 30px;
height: 2px;
background: var(--tm-ret-mustard);
margin-top: 10px;
}
.tm-ret-vert-label {
writing-mode: vertical-rl;
text-orientation: mixed;
transform: rotate(180deg);
font-family: 'Courier Prime', 'Courier New', monospace;
font-size: 9px;
letter-spacing: 0.25em;
text-transform: uppercase;
color: var(--tm-ret-terracotta);
opacity: 0.5;
position: absolute;
right: 10px;
top: 50%;
}
.tm-ret-score-box {
background: var(--tm-ret-mustard);
border: 2px solid var(--tm-ret-dark);
padding: 12px 14px;
text-align: center;
}
.tm-ret-score-num {
font-family: 'Abril Fatface', Georgia, serif;
font-size: 2.4rem;
color: var(--tm-ret-dark);
line-height: 1;
}
.tm-ret-score-lbl {
font-family: 'Courier Prime', 'Courier New', monospace;
font-size: 9px;
letter-spacing: 0.15em;
color: var(--tm-ret-rust);
text-transform: uppercase;
margin-top: 2px;
}
.tm-ret-bot {
background: var(--tm-ret-olive);
border-top: 2px solid var(--tm-ret-dark);
}
.tm-ret-bot:hover { background: #6c7b3e; }
.tm-ret-bot .tm-ret-sm-quote { color: var(--tm-ret-cream); }
.tm-ret-bot .tm-ret-sm-quote::after { background: var(--tm-ret-mustard); }
.tm-ret-bot .tm-ret-body-text { color: rgba(250,244,225,0.75); }
.tm-ret-bot .tm-ret-chef-icon { background: var(--tm-ret-cream); color: var(--tm-ret-olive); }
.tm-ret-bot .tm-ret-chef-name { color: var(--tm-ret-cream); }
.tm-ret-bot .tm-ret-chef-role { color: var(--tm-ret-sage); }
.tm-ret-bot .tm-ret-fork { color: var(--tm-ret-mustard); }
.tm-ret-bot .tm-ret-fork-empty { color: rgba(255,255,255,0.2); }
@media (max-width: 720px) {
.tm-ret-layout { grid-template-columns: 1fr; }
.tm-ret-big, .tm-ret-tall, .tm-ret-bot { grid-column: 1; grid-row: auto; }
.tm-ret-big { border-right: 1px solid var(--tm-ret-dark); }
}
```
### 06. Agency Minimal
**Type:** Pure CSS
**Description:** Clean 5-column table-style list with full-bleed hover, slide-in row animations, a live-pulse "reviews this week" indicator, and a summary stat bar. Use case: design / consulting agency or professional services. Libre Baskerville italic for the pull quotes, Space Mono for metadata.
**HTML:**
```html
01
EL
Elena Lowe
CPO Meridian Labs
"The kind of clarity we'd been trying to manufacture for two years — they delivered in six weeks."
Product strategy, design system, and go-to-market narrative all aligned for the first time. I didn't think that was achievable in a single engagement.
02
DS
David Soo
Founder Arclight Ventures
"Our fundraise closed at 140% of target. I trace a meaningful portion of that to the narrative work they did."
Investors kept commenting on how clear and compelling our pitch was. That clarity came from this team.
03
NH
Nour Hassan
Head of Design Forma Studio
"They didn't just execute the brief. They improved it."
Every design handoff came with a rationale I could explain to my stakeholders. That saved me hours of back-and-forth every single week.
04
KW
Kate Wynne
CEO Ovation Health
"We rebranded during our most critical growth phase. It was bold and it was right."
Our NPS jumped 18 points in the quarter following launch. Coincidence? Our team doesn't think so.
```
**CSS:**
```css
/* Agency Minimal — clean 5-col table list. Each .tm-min-row is a
semantic . On hover the row gets a warm tint and "bleeds"
visually full-width via negative margin. The live-pulse dot signals
freshness. Library Baskerville italic for the pull quote distinguishes
it from the body copy; Space Mono drives every uppercase metadata. */
.tm-min {
--tm-min-bg: #f8f7f4;
--tm-min-ink: #111111;
--tm-min-border: #e0ddd6;
--tm-min-accent: #2563eb;
--tm-min-muted: #888880;
--tm-min-warm: #f0ece4;
position: relative;
padding: clamp(28px, 4vw, 52px) clamp(20px, 3vw, 40px);
background: var(--tm-min-bg);
font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
color: var(--tm-min-ink);
min-height: 520px;
}
.tm-min-topbar {
display: flex;
justify-content: space-between;
align-items: baseline;
border-bottom: 1px solid var(--tm-min-border);
padding-bottom: 16px;
margin-bottom: 36px;
}
.tm-min-topbar-l {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 10px;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--tm-min-muted);
}
.tm-min-topbar-r {
display: flex;
align-items: center;
gap: 6px;
}
.tm-min-live-dot {
width: 6px;
height: 6px;
background: #22c55e;
border-radius: 50%;
animation: tm-min-livepulse 2s infinite;
}
@keyframes tm-min-livepulse {
0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}
.tm-min-live-text {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 10px;
letter-spacing: 0.14em;
text-transform: uppercase;
color: #22c55e;
}
.tm-min-list {
display: flex;
flex-direction: column;
}
.tm-min-row {
display: grid;
grid-template-columns: 40px 1fr 2.5fr 1.2fr 120px;
align-items: start;
gap: 0;
border-bottom: 1px solid var(--tm-min-border);
padding: 24px 0;
transition: background 0.2s, padding 0.2s, margin 0.2s;
animation: tm-min-rowin 0.6s ease both;
}
.tm-min-row:first-child { border-top: 1px solid var(--tm-min-border); }
.tm-min-row:hover {
background: var(--tm-min-warm);
margin: 0 calc(-1 * clamp(20px, 3vw, 40px));
padding-left: clamp(20px, 3vw, 40px);
padding-right: clamp(20px, 3vw, 40px);
}
.tm-min-row:nth-child(1) { animation-delay: 0.04s; }
.tm-min-row:nth-child(2) { animation-delay: 0.10s; }
.tm-min-row:nth-child(3) { animation-delay: 0.16s; }
.tm-min-row:nth-child(4) { animation-delay: 0.22s; }
@keyframes tm-min-rowin {
from { opacity: 0; transform: translateX(-8px); }
to { opacity: 1; transform: translateX(0); }
}
.tm-min-idx {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 11px;
color: var(--tm-min-muted);
padding-top: 4px;
}
.tm-min-author-col { padding-right: 24px; }
.tm-min-av {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 50%;
background: var(--tm-min-ink);
color: var(--tm-min-bg);
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 10px;
margin-bottom: 8px;
}
.tm-min-an {
display: block;
font-style: normal;
font-size: 13px;
font-weight: 500;
color: var(--tm-min-ink);
line-height: 1.3;
}
.tm-min-ar {
font-size: 10px;
color: var(--tm-min-muted);
margin-top: 2px;
line-height: 1.4;
display: block;
}
.tm-min-quote-col { padding-right: 32px; }
.tm-min-q-main {
font-family: 'Libre Baskerville', Georgia, serif;
font-style: italic;
font-size: 1.1rem;
line-height: 1.6;
color: var(--tm-min-ink);
margin: 0 0 12px;
}
.tm-min-q-body {
font-size: 0.82rem;
line-height: 1.7;
color: #555;
font-weight: 300;
margin: 0;
}
.tm-min-meta-col { padding-right: 16px; }
.tm-min-meta-label {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 9px;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--tm-min-muted);
margin-bottom: 6px;
}
.tm-min-meta-val {
font-size: 12px;
color: var(--tm-min-ink);
font-weight: 500;
margin-bottom: 12px;
}
.tm-min-stars-col { text-align: right; }
.tm-min-star-num {
font-family: 'Libre Baskerville', Georgia, serif;
font-size: 1.7rem;
color: var(--tm-min-ink);
line-height: 1;
}
.tm-min-star-sub {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 9px;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--tm-min-muted);
margin-top: 4px;
}
.tm-min-pip-row {
display: flex;
gap: 3px;
justify-content: flex-end;
margin-top: 8px;
}
.tm-min-pip {
width: 16px;
height: 3px;
background: var(--tm-min-ink);
border-radius: 2px;
}
.tm-min-pip-half {
background: linear-gradient(to right, var(--tm-min-ink) 80%, var(--tm-min-border) 80%);
}
.tm-min-sum-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 32px;
padding-top: 20px;
border-top: 2px solid var(--tm-min-ink);
}
.tm-min-sum-stat {
text-align: center;
flex: 1;
}
.tm-min-sum-num {
font-family: 'Libre Baskerville', Georgia, serif;
font-size: 1.8rem;
color: var(--tm-min-ink);
}
.tm-min-sum-lbl {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 9px;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--tm-min-muted);
margin-top: 4px;
}
.tm-min-sum-divider {
width: 1px;
height: 40px;
background: var(--tm-min-border);
flex-shrink: 0;
}
@media (max-width: 820px) {
.tm-min-row {
grid-template-columns: 30px 1fr;
gap: 12px 8px;
}
.tm-min-quote-col, .tm-min-meta-col, .tm-min-stars-col {
grid-column: 2;
padding-right: 0;
margin-top: 12px;
text-align: left;
}
.tm-min-pip-row { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
.tm-min-row { animation: none; transition: none; }
.tm-min-row:hover { margin: 0; padding-left: 0; padding-right: 0; }
.tm-min-live-dot { animation: none; }
}
```
### 07. Crypto Aurora
**Type:** Pure CSS
**Description:** Deep-space aurora mesh background with animated gradient bands, hexagon clip-path avatars, holographic shimmer card borders on hover, volume bars, on-chain wallet hashes, and neon-per-chain color accents. Use case: DeFi / Web3 protocol. Oxanium for headings, Space Mono for hash addresses.
**HTML:**
```html
“
◆ DeFi · Verified Trader
★★★★★
I've used six DeFi protocols in three years. The gas optimization alone paid for itself in a single month of active trading. No rug, no drama — just protocol doing exactly what it promised, on-chain, auditable, forever. That kind of integrity is rare in this space.
0x
0xVelvet.eth DeFi power user · 3y holder
0x7f4a...c3b2
◆ NFT · Verified Collector
★★★★★
Minted on day one. Floor is 14× entry . The roadmap delivered every milestone. This is what web3 was supposed to feel like.
NK
NeonKoi.eth NFT collector · Top 0.1%
0x2a9f...81de
◆ DAO · Core Contributor
★★★★★
Governance is actually governable . Voted on 40+ proposals. My voice moved the protocol. That's not something I can say about many DAOs.
PR
ProtocolRaven DAO core contributor
0xb3d1...59ac
◆ Yield · Verified
★★★★★
38% APY , zero impermanent loss surprises. The risk dashboard is the most honest I've seen in DeFi. Period.
AL
AlphaSatoshi Yield farmer · 2y
0x4e8c...f12a
◆ Bridge · Verified
★★★★★
Bridged $400K across chains last quarter. Zero failed transactions. Settlement was faster than CEX withdrawals. Genuinely shocked.
WX
WhalexBTC Multi-chain trader
0x9c2b...7e34
```
**CSS:**
```css
/* Crypto Aurora — animated aurora mesh background. The aurora layer
is contained inside .tm-cau via overflow:hidden + position:absolute
(not viewport-fixed). Holographic shimmer borders fire on card hover
via a gradient inset + mask trick. Hexagon avatars use clip-path. */
.tm-cau {
--tm-cau-bg: #04040f;
--tm-cau-s1: #7b2fff;
--tm-cau-s2: #00d4ff;
--tm-cau-s3: #ff2d9b;
--tm-cau-s4: #39ff7a;
--tm-cau-card: rgba(255,255,255,0.035);
--tm-cau-border: rgba(255,255,255,0.07);
--tm-cau-text: #e8e8ff;
--tm-cau-muted: #6060a0;
position: relative;
padding: clamp(28px, 4vw, 48px);
background: var(--tm-cau-bg);
font-family: 'Oxanium', system-ui, sans-serif;
color: var(--tm-cau-text);
overflow: hidden;
min-height: 520px;
}
.tm-cau-aurora {
position: absolute;
inset: 0;
z-index: 0;
overflow: hidden;
pointer-events: none;
}
.tm-cau-band {
position: absolute;
border-radius: 50%;
filter: blur(80px);
animation: tm-cau-float 10s ease-in-out infinite alternate;
}
.tm-cau-ab1 { width: 700px; height: 350px; background: linear-gradient(135deg, var(--tm-cau-s1), transparent); top: -100px; left: -100px; opacity: 0.25; animation-delay: 0s; }
.tm-cau-ab2 { width: 600px; height: 300px; background: linear-gradient(45deg, var(--tm-cau-s2), transparent); top: 100px; right: -150px; opacity: 0.2; animation-delay: -3s; }
.tm-cau-ab3 { width: 500px; height: 250px; background: linear-gradient(225deg, var(--tm-cau-s3), transparent); bottom: -80px; left: 200px; opacity: 0.18; animation-delay: -6s; }
.tm-cau-ab4 { width: 400px; height: 200px; background: linear-gradient(315deg, var(--tm-cau-s4), transparent); bottom: 50px; right: 100px; opacity: 0.14; animation-delay: -9s; }
@keyframes tm-cau-float {
from { transform: translate(0,0) scale(1) rotate(0deg); }
to { transform: translate(30px,20px) scale(1.12) rotate(8deg); }
}
.tm-cau-header {
position: relative;
z-index: 1;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32px;
}
.tm-cau-logo-text {
font-size: 11px;
letter-spacing: 0.3em;
text-transform: uppercase;
color: var(--tm-cau-s2);
}
.tm-cau-header-stat { text-align: right; }
.tm-cau-hstat-num {
font-size: 1.5rem;
font-weight: 800;
background: linear-gradient(135deg, var(--tm-cau-s1), var(--tm-cau-s2));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
line-height: 1;
}
.tm-cau-hstat-lbl {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 9px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--tm-cau-muted);
margin-top: 3px;
}
.tm-cau-grid {
position: relative;
z-index: 1;
display: grid;
grid-template-columns: 1.6fr 1fr 1fr;
grid-template-rows: auto auto;
gap: 2px;
}
.tm-cau-card {
background: var(--tm-cau-card);
border: 1px solid var(--tm-cau-border);
backdrop-filter: blur(24px);
padding: 24px 22px;
position: relative;
overflow: hidden;
transition: all 0.4s ease;
animation: tm-cau-in 0.7s cubic-bezier(.22, 1, .36, 1) both;
display: flex;
flex-direction: column;
}
.tm-cau-card:hover {
background: rgba(255,255,255,0.06);
border-color: rgba(255,255,255,0.14);
transform: translateY(-2px);
}
.tm-cau-card:nth-child(1) { animation-delay: 0.05s; }
.tm-cau-card:nth-child(2) { animation-delay: 0.12s; }
.tm-cau-card:nth-child(3) { animation-delay: 0.19s; }
.tm-cau-card:nth-child(4) { animation-delay: 0.26s; }
.tm-cau-card:nth-child(5) { animation-delay: 0.33s; }
@keyframes tm-cau-in {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.tm-cau-card::before {
content: '';
position: absolute;
inset: -1px;
border-radius: inherit;
background: linear-gradient(135deg, var(--tm-cau-s1), var(--tm-cau-s2), var(--tm-cau-s3), var(--tm-cau-s4));
opacity: 0;
transition: opacity 0.4s;
z-index: -1;
}
.tm-cau-card:hover::before { opacity: 0.5; }
.tm-cau-card::after {
content: '';
position: absolute;
inset: 0;
background: var(--tm-cau-bg);
opacity: 0.97;
z-index: -1;
transition: opacity 0.4s;
}
.tm-cau-card:hover::after { opacity: 0.94; }
.tm-cau-feat {
grid-row: 1 / 3;
}
.tm-cau-al {
position: absolute;
top: 0; left: 0; right: 0;
height: 2px;
}
.tm-cau-c1 .tm-cau-al { background: linear-gradient(to right, var(--tm-cau-s1), var(--tm-cau-s2)); }
.tm-cau-c2 .tm-cau-al { background: linear-gradient(to right, var(--tm-cau-s2), var(--tm-cau-s4)); }
.tm-cau-c3 .tm-cau-al { background: linear-gradient(to right, var(--tm-cau-s3), var(--tm-cau-s1)); }
.tm-cau-c4 .tm-cau-al { background: linear-gradient(to right, var(--tm-cau-s4), var(--tm-cau-s2)); }
.tm-cau-c5 .tm-cau-al { background: linear-gradient(to right, var(--tm-cau-s1), var(--tm-cau-s3)); }
.tm-cau-qm {
font-size: 5rem;
line-height: 0.8;
font-weight: 800;
opacity: 0.07;
position: absolute;
top: 16px;
left: 20px;
pointer-events: none;
font-family: 'Oxanium', serif;
}
.tm-cau-c1 .tm-cau-qm { color: var(--tm-cau-s1); }
.tm-cau-token {
display: inline-flex;
align-items: center;
gap: 6px;
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 9px;
letter-spacing: 0.15em;
text-transform: uppercase;
padding: 4px 10px;
border-radius: 2px;
margin-bottom: 14px;
width: fit-content;
}
.tm-cau-c1 .tm-cau-token { background: rgba(123,47,255,0.15); color: var(--tm-cau-s1); border: 1px solid rgba(123,47,255,0.3); }
.tm-cau-c2 .tm-cau-token { background: rgba(0,212,255,0.12); color: var(--tm-cau-s2); border: 1px solid rgba(0,212,255,0.25); }
.tm-cau-c3 .tm-cau-token { background: rgba(255,45,155,0.12); color: var(--tm-cau-s3); border: 1px solid rgba(255,45,155,0.25); }
.tm-cau-c4 .tm-cau-token { background: rgba(57,255,122,0.12); color: var(--tm-cau-s4); border: 1px solid rgba(57,255,122,0.25); }
.tm-cau-c5 .tm-cau-token { background: rgba(123,47,255,0.15); color: var(--tm-cau-s1); border: 1px solid rgba(123,47,255,0.3); }
.tm-cau-vol-bar {
display: flex;
align-items: flex-end;
gap: 2px;
height: 22px;
margin-bottom: 12px;
}
.tm-cau-vb {
width: 4px;
background: currentColor;
border-radius: 2px 2px 0 0;
animation: tm-cau-vbanim 1.2s ease-in-out infinite alternate;
}
.tm-cau-c1 .tm-cau-vol-bar { color: rgba(123,47,255,0.6); }
.tm-cau-vb:nth-child(1) { animation-delay: 0s; }
.tm-cau-vb:nth-child(2) { animation-delay: 0.15s; }
.tm-cau-vb:nth-child(3) { animation-delay: 0.3s; }
.tm-cau-vb:nth-child(4) { animation-delay: 0.45s; }
.tm-cau-vb:nth-child(5) { animation-delay: 0.6s; }
.tm-cau-vb:nth-child(6) { animation-delay: 0.75s; }
.tm-cau-vb:nth-child(7) { animation-delay: 0.9s; }
@keyframes tm-cau-vbanim {
from { opacity: 0.4; }
to { opacity: 1; }
}
.tm-cau-stars {
display: flex;
gap: 3px;
margin-bottom: 14px;
font-size: 12px;
}
.tm-cau-c1 .tm-cau-stars, .tm-cau-c5 .tm-cau-stars { color: var(--tm-cau-s1); }
.tm-cau-c2 .tm-cau-stars { color: var(--tm-cau-s2); }
.tm-cau-c3 .tm-cau-stars { color: var(--tm-cau-s3); }
.tm-cau-c4 .tm-cau-stars { color: var(--tm-cau-s4); }
.tm-cau-q {
font-size: 0.88rem;
line-height: 1.65;
color: rgba(232,232,255,0.78);
font-weight: 300;
margin: 0 0 20px;
font-style: normal;
flex: 1;
}
.tm-cau-q b { font-weight: 700; color: var(--tm-cau-text); }
.tm-cau-feat .tm-cau-q { font-size: 1.05rem; }
.tm-cau-author {
display: flex;
align-items: center;
gap: 10px;
border-top: 1px solid rgba(255,255,255,0.05);
padding-top: 14px;
margin-top: auto;
}
.tm-cau-av {
width: 34px;
height: 34px;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
font-weight: 700;
font-family: 'Space Mono', ui-monospace, monospace;
clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
flex-shrink: 0;
}
.tm-cau-c1 .tm-cau-av, .tm-cau-c5 .tm-cau-av { background: linear-gradient(135deg, var(--tm-cau-s1), rgba(123,47,255,0.5)); color: #fff; }
.tm-cau-c2 .tm-cau-av { background: linear-gradient(135deg, var(--tm-cau-s2), rgba(0,212,255,0.5)); color: #000; }
.tm-cau-c3 .tm-cau-av { background: linear-gradient(135deg, var(--tm-cau-s3), rgba(255,45,155,0.5)); color: #fff; }
.tm-cau-c4 .tm-cau-av { background: linear-gradient(135deg, var(--tm-cau-s4), rgba(57,255,122,0.5)); color: #000; }
.tm-cau-an {
font-size: 12px;
font-weight: 600;
font-style: normal;
color: var(--tm-cau-text);
line-height: 1.3;
display: block;
}
.tm-cau-ar {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 9px;
color: var(--tm-cau-muted);
margin-top: 2px;
letter-spacing: 0.05em;
}
.tm-cau-wallet {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 8px;
color: rgba(255,255,255,0.2);
position: absolute;
bottom: 10px;
right: 12px;
letter-spacing: 0.05em;
}
@media (max-width: 820px) {
.tm-cau-grid { grid-template-columns: 1fr; }
.tm-cau-feat { grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
.tm-cau-band, .tm-cau-vb, .tm-cau-card { animation: none; }
.tm-cau-card:hover { transform: none; }
}
```
### 08. EdTech Bright
**Type:** Pure CSS
**Description:** Confetti-dot background, SVG circular progress rings per card, spring-bounce hover, color-coded subject badges (math/code/bio/design/psych), achievement chips, and a dark "career switch" featured card. Use case: online learning platform. Nunito for headings, DM Sans for body.
**HTML:**
```html
🎓
LearnSpark
Adaptive learning platform
Mathematics
★★★★★
"Failed calculus twice in college. Came to LearnSpark. Passed my actuarial exam on the first try. The adaptive pacing changed everything."
TM
Tobias Müller Actuarial student · Germany
Course completer
Coding
★★★★★
"Landed my first dev job six months after starting the Web Dev track. The project-based learning is genuinely how it should be taught."
PA
Priscilla Adom Junior developer · Ghana
Biology
★★★★★
"Got into medical school. My LearnSpark MCAT biology score was in the 98th percentile. Coincidence? I don't think so."
SC
Seo-Yeon Choi Med school applicant · Korea
Top 1% learner
Design
★★★★★
"The design thinking curriculum is better than my $40K degree . I mean that without exaggeration. Hired at a top-5 agency within 3 months."
LR
Lucia Romero UI designer · Spain
Psychology
★★★★★
"The AI tutor remembered where I struggled three weeks ago and revisited it unprompted. That's better than most human tutors I've had."
NW
Nia Williams PhD student · UK
Career switch · Featured
★★★★★
"I was a high school PE teacher for 12 years. Not unhappy — just curious whether I could do more with my life. I finished the Data Science bootcamp in nine months, evenings only. Within two weeks of finishing, I had three offers . Accepted a senior analyst role at 2.4× my old salary."
DK
Damien Kowalski Former PE teacher → Data analyst · Poland
```
**CSS:**
```css
/* EdTech Bright — confetti-dot background contained in the wrapper.
Six color families (sun/sky/mint/coral/lavender/ink) cycle through
subject badges + avatar tints. SVG progress rings use stroke-dasharray
to render a fillable circular arc. */
.tm-edu {
--tm-edu-bg: #fdf9f3;
--tm-edu-ink: #1a1a2e;
--tm-edu-sun: #ffb700;
--tm-edu-sky: #2563eb;
--tm-edu-mint: #10b981;
--tm-edu-coral: #f43f5e;
--tm-edu-lavender: #8b5cf6;
position: relative;
padding: clamp(28px, 4vw, 48px);
background: var(--tm-edu-bg);
background-image:
radial-gradient(circle, rgba(255,183,0,0.15) 1px, transparent 1px),
radial-gradient(circle, rgba(37,99,235,0.1) 1px, transparent 1px),
radial-gradient(circle, rgba(16,185,129,0.1) 1px, transparent 1px);
background-size: 60px 60px, 90px 90px, 120px 120px;
background-position: 0 0, 30px 45px, 60px 15px;
font-family: 'DM Sans', system-ui, sans-serif;
color: var(--tm-edu-ink);
min-height: 520px;
}
.tm-edu-hdr {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32px;
flex-wrap: wrap;
gap: 18px;
}
.tm-edu-hdr-brand {
display: flex;
align-items: center;
gap: 10px;
}
.tm-edu-brand-icon {
width: 40px;
height: 40px;
background: var(--tm-edu-sun);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
box-shadow: 0 4px 12px rgba(255,183,0,0.4);
}
.tm-edu-brand-name {
font-family: 'Nunito', system-ui, sans-serif;
font-size: 18px;
font-weight: 900;
color: var(--tm-edu-ink);
}
.tm-edu-brand-sub {
font-size: 10px;
color: #888;
margin-top: -2px;
font-weight: 400;
}
.tm-edu-hdr-stats { display: flex; gap: 22px; }
.tm-edu-hstat { text-align: center; }
.tm-edu-hstat-n {
font-family: 'Nunito', system-ui, sans-serif;
font-size: 1.3rem;
font-weight: 900;
color: var(--tm-edu-ink);
}
.tm-edu-hstat-l { font-size: 10px; color: #888; margin-top: 1px; }
.tm-edu-sun .tm-edu-hstat-n { color: var(--tm-edu-sun); }
.tm-edu-sky .tm-edu-hstat-n { color: var(--tm-edu-sky); }
.tm-edu-mint .tm-edu-hstat-n { color: var(--tm-edu-mint); }
.tm-edu-layout {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 14px;
}
.tm-edu-card {
border-radius: 20px;
padding: 24px 22px;
position: relative;
overflow: hidden;
transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1),
box-shadow 0.35s;
animation: tm-edu-pop 0.65s cubic-bezier(.34, 1.2, .64, 1) both;
}
.tm-edu-card:hover {
transform: translateY(-5px) scale(1.02);
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.tm-edu-card:nth-child(1) { animation-delay: 0.04s; }
.tm-edu-card:nth-child(2) { animation-delay: 0.10s; }
.tm-edu-card:nth-child(3) { animation-delay: 0.16s; }
.tm-edu-card:nth-child(4) { animation-delay: 0.22s; }
.tm-edu-card:nth-child(5) { animation-delay: 0.28s; }
.tm-edu-card:nth-child(6) { animation-delay: 0.34s; }
@keyframes tm-edu-pop {
from { opacity: 0; transform: scale(.94) translateY(12px); }
to { opacity: 1; transform: scale(1) translateY(0); }
}
.tm-edu-sun-card { background: linear-gradient(135deg, #fff8dc, #fff3ba); border: 2px solid rgba(255,183,0,0.2); }
.tm-edu-sky-card { background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 2px solid rgba(37,99,235,0.15); }
.tm-edu-mint-card { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border: 2px solid rgba(16,185,129,0.15); }
.tm-edu-coral-card { background: linear-gradient(135deg, #fff1f2, #ffe4e6); border: 2px solid rgba(244,63,94,0.15); }
.tm-edu-lavender-card { background: linear-gradient(135deg, #f5f3ff, #ede9fe); border: 2px solid rgba(139,92,246,0.15); }
.tm-edu-ink-card { background: var(--tm-edu-ink); border: 2px solid transparent; }
.tm-edu-feat { grid-column: span 2; }
.tm-edu-ring-wrap {
position: absolute;
top: 18px;
right: 18px;
width: 44px;
height: 44px;
}
.tm-edu-ring-svg {
width: 100%;
height: 100%;
transform: rotate(-90deg);
}
.tm-edu-ring-track {
fill: none;
stroke: rgba(0,0,0,0.08);
stroke-width: 4;
}
.tm-edu-ring-prog {
fill: none;
stroke-width: 4;
stroke-linecap: round;
stroke-dasharray: 126;
}
.tm-edu-badge {
display: inline-flex;
align-items: center;
gap: 5px;
font-family: 'Nunito', system-ui, sans-serif;
font-size: 10px;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
padding: 4px 10px;
border-radius: 20px;
margin-bottom: 12px;
}
.tm-edu-sun-badge { background: rgba(255,183,0,0.2); color: #b45309; }
.tm-edu-sky-badge { background: rgba(37,99,235,0.12); color: var(--tm-edu-sky); }
.tm-edu-mint-badge { background: rgba(16,185,129,0.15); color: #059669; }
.tm-edu-coral-badge { background: rgba(244,63,94,0.12); color: var(--tm-edu-coral); }
.tm-edu-lavender-badge { background: rgba(139,92,246,0.15); color: var(--tm-edu-lavender); }
.tm-edu-white-badge { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.85); }
.tm-edu-stars {
display: flex;
gap: 3px;
margin-bottom: 10px;
font-size: 13px;
}
.tm-edu-sun-card .tm-edu-stars { color: var(--tm-edu-sun); }
.tm-edu-sky-card .tm-edu-stars { color: var(--tm-edu-sky); }
.tm-edu-mint-card .tm-edu-stars { color: var(--tm-edu-mint); }
.tm-edu-coral-card .tm-edu-stars { color: var(--tm-edu-coral); }
.tm-edu-lavender-card .tm-edu-stars { color: var(--tm-edu-lavender); }
.tm-edu-ink-card .tm-edu-stars { color: var(--tm-edu-sun); }
.tm-edu-q {
font-size: 0.88rem;
line-height: 1.65;
font-weight: 400;
margin: 0 0 16px;
color: #333;
font-style: normal;
}
.tm-edu-ink-card .tm-edu-q { color: rgba(255,255,255,0.75); }
.tm-edu-q em { font-style: normal; font-weight: 700; }
.tm-edu-sun-card .tm-edu-q em { color: #b45309; }
.tm-edu-sky-card .tm-edu-q em { color: var(--tm-edu-sky); }
.tm-edu-mint-card .tm-edu-q em { color: #059669; }
.tm-edu-coral-card .tm-edu-q em { color: var(--tm-edu-coral); }
.tm-edu-lavender-card .tm-edu-q em { color: var(--tm-edu-lavender); }
.tm-edu-ink-card .tm-edu-q em { color: var(--tm-edu-sun); }
.tm-edu-author {
display: flex;
align-items: center;
gap: 10px;
}
.tm-edu-av {
width: 36px;
height: 36px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Nunito', system-ui, sans-serif;
font-size: 12px;
font-weight: 900;
flex-shrink: 0;
}
.tm-edu-sun-av { background: var(--tm-edu-sun); color: #7c5000; }
.tm-edu-sky-av { background: var(--tm-edu-sky); color: #fff; }
.tm-edu-mint-av { background: var(--tm-edu-mint); color: #fff; }
.tm-edu-coral-av { background: var(--tm-edu-coral); color: #fff; }
.tm-edu-lavender-av { background: var(--tm-edu-lavender); color: #fff; }
.tm-edu-ink-av { background: rgba(255,255,255,0.15); color: #fff; }
.tm-edu-an {
font-family: 'Nunito', system-ui, sans-serif;
font-size: 13px;
font-weight: 800;
font-style: normal;
line-height: 1.3;
display: block;
}
.tm-edu-ink-card .tm-edu-an { color: #fff; }
.tm-edu-ar { font-size: 10px; color: #888; margin-top: 2px; }
.tm-edu-ink-card .tm-edu-ar { color: rgba(255,255,255,0.4); }
.tm-edu-achiev {
position: absolute;
bottom: 18px;
right: 18px;
background: rgba(255,183,0,0.9);
color: #7c5000;
font-family: 'Nunito', system-ui, sans-serif;
font-size: 8px;
font-weight: 900;
letter-spacing: 0.1em;
text-transform: uppercase;
padding: 3px 8px;
border-radius: 20px;
}
@media (max-width: 820px) {
.tm-edu-layout { grid-template-columns: 1fr; }
.tm-edu-feat { grid-column: 1; }
.tm-edu-hdr-stats { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
.tm-edu-card { animation: none; transition: none; }
.tm-edu-card:hover { transform: none; }
}
```
### 09. Luxury Real Estate
**Type:** Pure CSS
**Description:** Ultra-refined with 1px seam grid, Cormorant Garamond serif quotes, gold dash ratings instead of stars, property transaction values, corner triangle decorations, and a warm hover wash. Use case: premium property agency.
**HTML:**
```html
Client Experiences
Penthouse · Upper East Side
"We told them what we wanted. Three weeks later, we were signing contracts on a property we didn't know existed — and it was exactly right ."
CH
Charles & Helena Voss Buyers · New York, NY
9.8
Villa · Malibu
"Listed on a Friday. Received eleven offers by Sunday. Above asking. The market intelligence this team brings is extraordinary."
AP
Anastasia Park Seller · Malibu, CA
Estate · Greenwich
"Represented us across four simultaneous transactions without a single breakdown in communication or timeline. Genuinely elite service."
International relocation with five properties in play at once. The coordination alone would have broken a lesser team.
RT
Reza & Tamar Hashemi Portfolio buyers
Condo · Tribeca
"First-time buyer. They made the process feel entirely manageable . No condescension, just genuine guidance."
MO
Maya Okonkwo Buyer · Brooklyn, NY
9.8
Client score
4,200 + verified transactions
```
**CSS:**
```css
/* Luxury Real Estate — 1px seam grid (the gap between cells is the
underlying line color, cells override with their own background).
Dash ratings replace stars for a more editorial / less commercial
feel. Gold corner triangle on hover. Cormorant Garamond italic
pull quotes do the heavy aesthetic lifting. */
.tm-lux {
--tm-lux-bg: #f9f7f4;
--tm-lux-ink: #1c1917;
--tm-lux-warm: #f0ebe2;
--tm-lux-gold: #c9a84c;
--tm-lux-gold-l: #e2c97e;
--tm-lux-tan: #e8e0d0;
--tm-lux-stone: #8a8278;
--tm-lux-line: #e0d8cc;
background: var(--tm-lux-bg);
font-family: 'Inter', system-ui, sans-serif;
color: var(--tm-lux-ink);
min-height: 520px;
}
.tm-lux-prop-bar {
background: var(--tm-lux-ink);
color: rgba(255,255,255,0.6);
padding: 12px clamp(20px, 4vw, 48px);
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 12px;
}
.tm-lux-pb-brand {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 15px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--tm-lux-gold-l);
}
.tm-lux-pb-meta { display: flex; gap: 24px; }
.tm-lux-pb-item {
font-size: 10px;
letter-spacing: 0.15em;
text-transform: uppercase;
}
.tm-lux-pb-item span { color: rgba(255,255,255,0.9); font-weight: 500; }
.tm-lux-section { padding: clamp(28px, 4vw, 48px); }
.tm-lux-slabel {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 30px;
}
.tm-lux-slabel-line {
flex: 1;
height: 1px;
background: linear-gradient(to right, var(--tm-lux-line), transparent);
max-width: 60px;
}
.tm-lux-slabel-text {
font-size: 10px;
letter-spacing: 0.3em;
text-transform: uppercase;
color: var(--tm-lux-stone);
}
.tm-lux-slabel-line2 {
flex: 1;
height: 1px;
background: var(--tm-lux-line);
}
.tm-lux-layout {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: auto auto;
gap: 1px;
background: var(--tm-lux-line);
}
.tm-lux-cell {
background: var(--tm-lux-bg);
padding: 36px 32px;
position: relative;
overflow: hidden;
transition: background 0.4s;
display: flex;
flex-direction: column;
}
.tm-lux-cell:hover { background: var(--tm-lux-warm); }
.tm-lux-dark { background: var(--tm-lux-ink); grid-column: 1 / -1; }
.tm-lux-dark:hover { background: #26231e; }
.tm-lux-tan { background: var(--tm-lux-tan); }
.tm-lux-tan:hover { background: #ddd5c5; }
.tm-lux-corner-deco {
position: absolute;
top: 0;
right: 0;
width: 0;
height: 0;
border-style: solid;
border-width: 0 36px 36px 0;
border-color: transparent var(--tm-lux-gold) transparent transparent;
opacity: 0.2;
transition: opacity 0.4s;
}
.tm-lux-cell:hover .tm-lux-corner-deco { opacity: 0.5; }
.tm-lux-dark .tm-lux-corner-deco {
border-color: transparent var(--tm-lux-gold-l) transparent transparent;
}
.tm-lux-pstat {
position: absolute;
top: 24px;
right: 28px;
text-align: right;
}
.tm-lux-pstat-num {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 2rem;
font-weight: 300;
color: var(--tm-lux-gold);
line-height: 1;
}
.tm-lux-pstat-lbl {
font-size: 9px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--tm-lux-stone);
margin-top: 4px;
}
.tm-lux-dark .tm-lux-pstat-lbl { color: rgba(249,247,244,0.4); }
.tm-lux-prop-tag {
font-size: 9px;
letter-spacing: 0.25em;
text-transform: uppercase;
color: var(--tm-lux-gold);
margin-bottom: 18px;
display: flex;
align-items: center;
gap: 8px;
}
.tm-lux-prop-tag::before {
content: '';
width: 16px;
height: 1px;
background: var(--tm-lux-gold);
}
.tm-lux-dark .tm-lux-prop-tag { color: var(--tm-lux-gold-l); }
.tm-lux-star-row {
display: flex;
gap: 6px;
margin-bottom: 16px;
align-items: center;
}
.tm-lux-sdash {
width: 14px;
height: 1.5px;
background: var(--tm-lux-gold);
}
.tm-lux-dark .tm-lux-sdash { background: var(--tm-lux-gold-l); }
.tm-lux-bq {
font-family: 'Cormorant Garamond', Georgia, serif;
font-style: italic;
font-weight: 300;
font-size: clamp(1.2rem, 2vw, 1.55rem);
line-height: 1.4;
color: var(--tm-lux-ink);
margin: 0;
}
.tm-lux-bq em { font-style: normal; color: var(--tm-lux-gold); font-weight: 400; }
.tm-lux-dark .tm-lux-bq { color: rgba(249,247,244,0.9); }
.tm-lux-dark .tm-lux-bq em { color: var(--tm-lux-gold-l); }
.tm-lux-sq {
font-family: 'Cormorant Garamond', Georgia, serif;
font-style: italic;
font-weight: 300;
font-size: 1.1rem;
line-height: 1.5;
color: var(--tm-lux-ink);
margin: 0;
}
.tm-lux-sq em { font-style: normal; color: var(--tm-lux-gold); }
.tm-lux-bt {
font-size: 0.78rem;
line-height: 1.8;
color: var(--tm-lux-stone);
font-weight: 300;
margin: 14px 0 0;
}
.tm-lux-grule {
display: block;
width: 32px;
height: 1px;
background: var(--tm-lux-gold);
margin: 20px 0;
opacity: 0.6;
}
.tm-lux-author {
display: flex;
align-items: center;
gap: 12px;
margin-top: auto;
padding-top: 20px;
}
.tm-lux-av-rect {
width: 36px;
height: 44px;
background: var(--tm-lux-tan);
display: flex;
align-items: center;
justify-content: center;
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 14px;
color: var(--tm-lux-stone);
flex-shrink: 0;
}
.tm-lux-dark .tm-lux-av-rect { background: rgba(255,255,255,0.08); color: rgba(249,247,244,0.5); }
.tm-lux-tan .tm-lux-av-rect { background: rgba(0,0,0,0.06); }
.tm-lux-an {
font-size: 12px;
font-weight: 500;
font-style: normal;
color: var(--tm-lux-ink);
line-height: 1.4;
letter-spacing: 0.02em;
display: block;
}
.tm-lux-dark .tm-lux-an { color: rgba(249,247,244,0.9); }
.tm-lux-ar {
font-size: 10px;
color: var(--tm-lux-stone);
margin-top: 2px;
letter-spacing: 0.04em;
}
.tm-lux-dark .tm-lux-ar { color: rgba(249,247,244,0.4); }
.tm-lux-big-score {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 4.5rem;
font-weight: 300;
color: var(--tm-lux-gold-l);
line-height: 1;
opacity: 0.18;
position: absolute;
bottom: 8px;
right: 24px;
pointer-events: none;
}
.tm-lux-score {
background: var(--tm-lux-warm);
align-items: center;
justify-content: center;
text-align: center;
}
.tm-lux-score-num {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 3rem;
font-weight: 300;
color: var(--tm-lux-gold);
line-height: 1;
}
.tm-lux-score-lbl {
font-size: 9px;
letter-spacing: 0.25em;
text-transform: uppercase;
color: var(--tm-lux-stone);
margin-top: 8px;
}
.tm-lux-score-line {
width: 48px;
height: 1px;
background: var(--tm-lux-gold);
opacity: 0.4;
margin: 16px auto;
}
.tm-lux-score-count {
font-size: 10px;
color: var(--tm-lux-stone);
letter-spacing: 0.08em;
}
@media (max-width: 720px) {
.tm-lux-layout { grid-template-columns: 1fr; }
.tm-lux-dark { grid-column: 1; }
}
```
### 10. Gaming Esports
**Type:** Pure CSS
**Description:** Black with lime/cyan/pink/orange neon per rank, angular clip-path cards with blade-in entrance animation, scanline overlay, KD ratio / win rate stats, scoreboard-style score card, and rank badges. Use case: gaming coaching / esports platform. Barlow Condensed for headlines, Share Tech Mono for stats.
**HTML:**
```html
APEX REVIEWS
Live · 3,420 online
◆ Legendary · MVP
★★★★★
I've been competing for seven years across four different titles. The coaching subscription changed my fundamentals in eight sessions . Got to Champion rank for the first time ever. My duo still doesn't believe I'm the same player. Neither do I, honestly.
GR
GhostRaze Top 500 · NA Server
◆ Diamond
★★★★★
The ping optimization guide alone dropped me from 74ms to 18ms . Games feel completely different.
VX
VoidShift.exe Diamond I · EU
9.9
Platform score · 42K reviews
◆ Platinum
★★★★★
Went from Silver to Platinum in 30 days . The ranked roadmap is the most structured improvement plan I've seen outside of pro orgs.
NK
NightKitsune Platinum III · APAC
◆ Gold
★★★★★
Hardware recommendations boosted my FPS by 140 frames . My reaction time measurably improved in a week. Actual game changer.
BB
ByteBomber Gold I → Diamond
◆ Champion
★★★★★
Just signed my first semi-pro contract . The mental coaching section was the piece I didn't know I needed. Clutch factor went through the roof.
TR
TitanRise Pro contender · NA
```
**CSS:**
```css
/* Gaming Esports — angled clip-path cards with blade-in entrance.
Scanline overlay sits on each card via ::before. Four neon palette
modifiers (cl=lime, cc=cyan, cp=pink, co=orange) drive accents per
rank tier. Hexagon avatars via clip-path. */
.tm-gam {
--tm-gam-bg: #0a0a0f;
--tm-gam-card: #0e0e16;
--tm-gam-lime: #c8ff00;
--tm-gam-cyan: #00ffee;
--tm-gam-pink: #ff0055;
--tm-gam-orange: #ff6a00;
--tm-gam-white: #e8e8f0;
--tm-gam-muted: #5a5a78;
--tm-gam-border: rgba(200,255,0,0.12);
position: relative;
padding: clamp(28px, 4vw, 44px);
background: var(--tm-gam-bg);
background-image:
linear-gradient(rgba(200,255,0,0.04) 1px, transparent 1px),
linear-gradient(90deg, rgba(200,255,0,0.04) 1px, transparent 1px);
background-size: 40px 40px;
font-family: 'Rajdhani', system-ui, sans-serif;
color: var(--tm-gam-white);
min-height: 520px;
overflow: hidden;
}
.tm-gam-hdr {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 28px;
border-bottom: 1px solid var(--tm-gam-border);
padding-bottom: 18px;
flex-wrap: wrap;
gap: 12px;
}
.tm-gam-game-logo {
font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
font-weight: 900;
font-size: 1.5rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.tm-gam-g1 { color: var(--tm-gam-lime); }
.tm-gam-g2 { color: var(--tm-gam-white); }
.tm-gam-live-badge {
display: flex;
align-items: center;
gap: 6px;
font-family: 'Share Tech Mono', ui-monospace, monospace;
font-size: 10px;
color: var(--tm-gam-pink);
text-transform: uppercase;
letter-spacing: 0.15em;
border: 1px solid rgba(255,0,85,0.3);
padding: 5px 12px;
}
.tm-gam-lb-dot {
width: 6px;
height: 6px;
background: var(--tm-gam-pink);
border-radius: 50%;
animation: tm-gam-glow 1.2s ease-in-out infinite alternate;
}
@keyframes tm-gam-glow {
from { box-shadow: 0 0 4px var(--tm-gam-pink); }
to { box-shadow: 0 0 12px var(--tm-gam-pink), 0 0 20px var(--tm-gam-pink); }
}
.tm-gam-grid {
display: grid;
grid-template-columns: 1.5fr 1fr;
gap: 3px;
margin-bottom: 3px;
}
.tm-gam-col {
display: flex;
flex-direction: column;
gap: 3px;
}
.tm-gam-grid2 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 3px;
}
.tm-gam-card {
background: var(--tm-gam-card);
border: 1px solid rgba(255,255,255,0.05);
padding: 24px 22px;
position: relative;
overflow: hidden;
clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
transition: all 0.3s ease;
animation: tm-gam-bladein 0.6s ease both;
display: flex;
flex-direction: column;
}
.tm-gam-card:hover {
background: #12121e;
border-color: rgba(200,255,0,0.2);
transform: translateY(-2px);
}
.tm-gam-card:hover .tm-gam-card-glow { opacity: 1; }
.tm-gam-card:nth-child(1) { animation-delay: 0.04s; }
.tm-gam-card:nth-child(2) { animation-delay: 0.10s; }
.tm-gam-card:nth-child(3) { animation-delay: 0.16s; }
@keyframes tm-gam-bladein {
from {
opacity: 0;
clip-path: polygon(0 0, 0 0, 0 16px, 0 100%, 0 100%);
}
to {
opacity: 1;
clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}
}
.tm-gam-card-glow {
position: absolute;
inset: 0;
pointer-events: none;
opacity: 0;
transition: opacity 0.3s;
}
.tm-gam-cl .tm-gam-card-glow { background: radial-gradient(ellipse at top left, rgba(200,255,0,0.08), transparent 60%); }
.tm-gam-cc .tm-gam-card-glow { background: radial-gradient(ellipse at top left, rgba(0,255,238,0.06), transparent 60%); }
.tm-gam-cp .tm-gam-card-glow { background: radial-gradient(ellipse at top left, rgba(255,0,85,0.06), transparent 60%); }
.tm-gam-co .tm-gam-card-glow { background: radial-gradient(ellipse at top left, rgba(255,106,0,0.06), transparent 60%); }
.tm-gam-aline {
position: absolute;
top: 0; left: 0; right: 0;
height: 2px;
}
.tm-gam-cl .tm-gam-aline { background: linear-gradient(to right, var(--tm-gam-lime), transparent); }
.tm-gam-cc .tm-gam-aline { background: linear-gradient(to right, var(--tm-gam-cyan), transparent); }
.tm-gam-cp .tm-gam-aline { background: linear-gradient(to right, var(--tm-gam-pink), transparent); }
.tm-gam-co .tm-gam-aline { background: linear-gradient(to right, var(--tm-gam-orange), transparent); }
.tm-gam-rank {
display: inline-flex;
align-items: center;
gap: 6px;
font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
font-weight: 700;
font-size: 11px;
letter-spacing: 0.2em;
text-transform: uppercase;
margin-bottom: 14px;
padding: 3px 10px;
clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
width: fit-content;
}
.tm-gam-cl .tm-gam-rank { background: rgba(200,255,0,0.12); color: var(--tm-gam-lime); border: 1px solid rgba(200,255,0,0.25); }
.tm-gam-cc .tm-gam-rank { background: rgba(0,255,238,0.08); color: var(--tm-gam-cyan); border: 1px solid rgba(0,255,238,0.2); }
.tm-gam-cp .tm-gam-rank { background: rgba(255,0,85,0.1); color: var(--tm-gam-pink); border: 1px solid rgba(255,0,85,0.25); }
.tm-gam-co .tm-gam-rank { background: rgba(255,106,0,0.1); color: var(--tm-gam-orange); border: 1px solid rgba(255,106,0,0.25); }
.tm-gam-kd-row {
display: flex;
gap: 16px;
margin-bottom: 16px;
}
.tm-gam-kd-item {
display: flex;
flex-direction: column;
gap: 2px;
}
.tm-gam-kd-val {
font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
font-weight: 700;
font-size: 1.2rem;
line-height: 1;
}
.tm-gam-cl .tm-gam-kd-val { color: var(--tm-gam-lime); }
.tm-gam-cc .tm-gam-kd-val { color: var(--tm-gam-cyan); }
.tm-gam-cp .tm-gam-kd-val { color: var(--tm-gam-pink); }
.tm-gam-co .tm-gam-kd-val { color: var(--tm-gam-orange); }
.tm-gam-kd-lbl {
font-family: 'Share Tech Mono', ui-monospace, monospace;
font-size: 8px;
color: var(--tm-gam-muted);
text-transform: uppercase;
letter-spacing: 0.1em;
}
.tm-gam-stars {
display: flex;
gap: 3px;
margin-bottom: 14px;
font-size: 13px;
}
.tm-gam-cl .tm-gam-stars { color: var(--tm-gam-lime); }
.tm-gam-cc .tm-gam-stars { color: var(--tm-gam-cyan); }
.tm-gam-cp .tm-gam-stars { color: var(--tm-gam-pink); }
.tm-gam-co .tm-gam-stars { color: var(--tm-gam-orange); }
.tm-gam-q {
font-size: 0.9rem;
line-height: 1.6;
color: rgba(232,232,240,0.7);
font-weight: 400;
margin: 0 0 18px;
font-style: normal;
flex: 1;
}
.tm-gam-feat .tm-gam-q { font-size: 1.02rem; }
.tm-gam-q b { font-weight: 700; color: var(--tm-gam-white); }
.tm-gam-author {
display: flex;
align-items: center;
gap: 10px;
border-top: 1px solid rgba(255,255,255,0.05);
padding-top: 14px;
}
.tm-gam-av {
width: 34px;
height: 34px;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Share Tech Mono', ui-monospace, monospace;
font-size: 10px;
font-weight: 700;
clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.tm-gam-cl .tm-gam-av { background: rgba(200,255,0,0.15); color: var(--tm-gam-lime); border: 1px solid rgba(200,255,0,0.3); }
.tm-gam-cc .tm-gam-av { background: rgba(0,255,238,0.1); color: var(--tm-gam-cyan); }
.tm-gam-cp .tm-gam-av { background: rgba(255,0,85,0.15); color: var(--tm-gam-pink); }
.tm-gam-co .tm-gam-av { background: rgba(255,106,0,0.12); color: var(--tm-gam-orange); }
.tm-gam-an {
font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
font-weight: 700;
font-size: 14px;
font-style: normal;
letter-spacing: 0.04em;
color: var(--tm-gam-white);
line-height: 1.2;
display: block;
}
.tm-gam-ar {
font-family: 'Share Tech Mono', ui-monospace, monospace;
font-size: 9px;
color: var(--tm-gam-muted);
margin-top: 2px;
letter-spacing: 0.05em;
}
.tm-gam-score-card {
background: linear-gradient(135deg, #0e0e16, #141420);
border: 1px solid rgba(200,255,0,0.2);
padding: 24px 22px;
clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
animation: tm-gam-bladein 0.6s ease 0.34s both;
}
.tm-gam-sc-big {
font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
font-weight: 900;
font-size: 3.4rem;
color: var(--tm-gam-lime);
line-height: 1;
text-shadow: 0 0 30px rgba(200,255,0,0.4);
}
.tm-gam-sc-sub {
font-family: 'Share Tech Mono', ui-monospace, monospace;
font-size: 9px;
color: var(--tm-gam-muted);
letter-spacing: 0.15em;
text-transform: uppercase;
margin-top: 6px;
}
.tm-gam-sc-row {
display: flex;
gap: 22px;
margin-top: 18px;
}
.tm-gam-sc-val {
font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
font-weight: 700;
font-size: 1.3rem;
color: var(--tm-gam-white);
line-height: 1;
}
.tm-gam-sc-lbl {
font-family: 'Share Tech Mono', ui-monospace, monospace;
font-size: 8px;
color: var(--tm-gam-muted);
text-transform: uppercase;
letter-spacing: 0.1em;
margin-top: 2px;
}
.tm-gam-card::before {
content: '';
position: absolute;
inset: 0;
background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.03) 3px, rgba(0,0,0,0.03) 4px);
pointer-events: none;
z-index: 0;
}
@media (max-width: 820px) {
.tm-gam-grid { grid-template-columns: 1fr; }
.tm-gam-grid2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.tm-gam-card, .tm-gam-score-card { animation: none; }
.tm-gam-lb-dot { animation: none; }
.tm-gam-card:hover { transform: none; }
}
```
### 11. High Fashion
**Type:** Pure CSS
**Description:** Bodoni Moda editorial serif, marquee season ticker, ghost watermark numbers, 5-dot rating instead of stars, seam-line borders, alternating dark/warm/white cells, minimal Montserrat body text. Use case: luxury fashion house.
**HTML:**
```html
Maison Noir · Client Archive
Est. MMXII · 8,400 Patrons
A/W Collection · Maison
"I wore the coat to the opening and three people asked me who designed it before I even reached the bar. That is the effect. "
01
Isabella Fontaine Paris · 12-year patron
S/S Collection · Resort
"The tailoring is so precise it feels custom , even off the rack. I've stopped buying anything else."
02
Mireille Auclair Montréal · Stylist
Accessories
"The bag is three seasons old and strangers still stop me to ask about it. Timeless is an overused word. Here it's accurate."
03
Yuki Tanaka Tokyo · Editor
Ready-to-wear
"Every single piece I've bought has survived five seasons of heavy wear without losing its shape. Engineering dressed as fashion. "
04
Dominique Peres São Paulo · Architect
Bespoke
"Three fittings, infinite patience. The result was a suit nothing else in my wardrobe could compete with. "
05
Raj Mehra London · Barrister
Couture · Featured
"I've dressed from the top maisons for thirty years. What separates Maison Noir is that every garment has a point of view — and the confidence not to explain it."
Countess Vera Ostrovsky Moscow · Geneva · 30-year patron
9.9
Patron score
8,400 verified patrons
```
**CSS:**
```css
/* High Fashion — Bodoni Moda editorial. The season-bar ticker uses
::after marquee animation to scroll season tags behind the brand
name. Ghost watermark numbers (01-05) sit at 4% opacity bottom-right.
Five-dot rating system replaces stars for editorial restraint. */
.tm-fas {
--tm-fas-white: #fafafa;
--tm-fas-black: #0a0a0a;
--tm-fas-warm: #f5f2ee;
--tm-fas-offblack: #1a1a1a;
--tm-fas-gray: #888;
--tm-fas-lgray: #d8d5d0;
--tm-fas-text: #1a1a1a;
background: var(--tm-fas-white);
font-family: 'Montserrat', system-ui, sans-serif;
color: var(--tm-fas-text);
min-height: 520px;
overflow: hidden;
}
.tm-fas-season-bar {
background: var(--tm-fas-black);
color: rgba(255,255,255,0.5);
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px clamp(20px, 4vw, 48px);
overflow: hidden;
position: relative;
}
.tm-fas-season-bar::after {
content: 'S/S 25 A/W 25 S/S 25 A/W 25 S/S 25 A/W 25 S/S 25 A/W 25 S/S 25 A/W 25';
position: absolute;
font-family: 'Montserrat', system-ui, sans-serif;
font-size: 10px;
letter-spacing: 0.3em;
text-transform: uppercase;
color: rgba(255,255,255,0.12);
white-space: nowrap;
width: 200%;
animation: tm-fas-ticker 14s linear infinite;
}
@keyframes tm-fas-ticker {
from { transform: translateX(0); }
to { transform: translateX(-50%); }
}
.tm-fas-sb-brand {
font-family: 'Bodoni Moda', 'Didot', serif;
font-size: 14px;
letter-spacing: 0.3em;
text-transform: uppercase;
color: rgba(255,255,255,0.9);
position: relative;
z-index: 1;
}
.tm-fas-sb-meta {
font-size: 9px;
letter-spacing: 0.25em;
text-transform: uppercase;
position: relative;
z-index: 1;
}
.tm-fas-top-row {
display: grid;
grid-template-columns: 1fr 1fr;
min-height: 280px;
}
.tm-fas-mid-row {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
border-top: 1px solid var(--tm-fas-lgray);
}
.tm-fas-bot-row {
display: grid;
grid-template-columns: 2fr 1fr;
border-top: 1px solid var(--tm-fas-lgray);
}
.tm-fas-cell {
padding: clamp(28px, 4vw, 44px);
border-right: 1px solid var(--tm-fas-lgray);
position: relative;
overflow: hidden;
transition: background 0.4s;
display: flex;
flex-direction: column;
}
.tm-fas-cell:last-child { border-right: none; }
.tm-fas-dark { background: var(--tm-fas-black); }
.tm-fas-warm { background: var(--tm-fas-warm); }
.tm-fas-cell:not(.tm-fas-dark):hover { background: var(--tm-fas-warm); }
.tm-fas-dark:hover { background: #111; }
.tm-fas-bq {
font-family: 'Bodoni Moda', 'Didot', serif;
font-style: italic;
font-size: clamp(1.3rem, 2vw, 1.7rem);
line-height: 1.35;
color: var(--tm-fas-text);
margin: 0;
flex: 1;
}
.tm-fas-bq em { font-style: normal; font-weight: 700; }
.tm-fas-dark .tm-fas-bq { color: rgba(250,250,250,0.9); }
.tm-fas-dark .tm-fas-bq em { color: rgba(250,250,250,0.5); }
.tm-fas-sq {
font-family: 'Bodoni Moda', 'Didot', serif;
font-style: italic;
font-size: 1rem;
line-height: 1.5;
color: var(--tm-fas-text);
margin: 0;
flex: 1;
}
.tm-fas-sq em { font-style: normal; font-weight: 700; }
.tm-fas-dark .tm-fas-sq { color: rgba(250,250,250,0.85); }
.tm-fas-deco-num {
font-family: 'Bodoni Moda', 'Didot', serif;
font-size: 6.5rem;
font-weight: 700;
color: var(--tm-fas-text);
opacity: 0.04;
position: absolute;
bottom: -10px;
right: 20px;
line-height: 1;
pointer-events: none;
user-select: none;
}
.tm-fas-dark .tm-fas-deco-num { color: #fff; opacity: 0.05; }
.tm-fas-author-area {
display: flex;
justify-content: space-between;
align-items: flex-end;
margin-top: 28px;
position: relative;
z-index: 1;
}
.tm-fas-an {
font-family: 'Montserrat', system-ui, sans-serif;
font-size: 11px;
font-weight: 500;
font-style: normal;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--tm-fas-text);
line-height: 1.4;
display: block;
}
.tm-fas-dark .tm-fas-an { color: rgba(250,250,250,0.8); }
.tm-fas-ar {
font-size: 9px;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--tm-fas-gray);
margin-top: 4px;
font-weight: 300;
display: block;
}
.tm-fas-dark .tm-fas-ar { color: rgba(250,250,250,0.3); }
.tm-fas-dots {
display: flex;
gap: 5px;
}
.tm-fas-dot {
width: 5px;
height: 5px;
border-radius: 50%;
background: var(--tm-fas-text);
}
.tm-fas-dark .tm-fas-dot { background: rgba(250,250,250,0.6); }
.tm-fas-coll-label {
font-size: 9px;
letter-spacing: 0.3em;
text-transform: uppercase;
color: var(--tm-fas-gray);
margin-bottom: 24px;
display: flex;
align-items: center;
gap: 10px;
}
.tm-fas-coll-label::after {
content: '';
flex: 1;
height: 1px;
background: var(--tm-fas-lgray);
}
.tm-fas-dark .tm-fas-coll-label { color: rgba(250,250,250,0.3); }
.tm-fas-dark .tm-fas-coll-label::after { background: rgba(255,255,255,0.08); }
.tm-fas-feat .tm-fas-bq { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
.tm-fas-score-panel {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 32px 24px;
background: var(--tm-fas-black);
text-align: center;
}
.tm-fas-sp-num {
font-family: 'Bodoni Moda', 'Didot', serif;
font-size: 3.8rem;
font-weight: 400;
color: rgba(250,250,250,0.9);
line-height: 1;
}
.tm-fas-sp-sub {
font-size: 9px;
letter-spacing: 0.3em;
text-transform: uppercase;
color: rgba(250,250,250,0.3);
margin-top: 8px;
}
.tm-fas-sp-line {
display: block;
width: 40px;
height: 1px;
background: rgba(250,250,250,0.15);
margin: 18px auto;
}
.tm-fas-sp-count {
font-size: 10px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: rgba(250,250,250,0.4);
}
@media (max-width: 820px) {
.tm-fas-top-row,
.tm-fas-mid-row,
.tm-fas-bot-row { grid-template-columns: 1fr; }
.tm-fas-cell { border-right: none; border-bottom: 1px solid var(--tm-fas-lgray); }
.tm-fas-deco-num { font-size: 4rem; }
}
@media (prefers-reduced-motion: reduce) {
.tm-fas-season-bar::after { animation: none; }
}
```
### 12. Fintech Trust
**Type:** Pure CSS
**Description:** Navy trust banner with KYC-verified badges, pulsing live status dot, ROI callout box, FCA/FSCS compliance strip, product-tagged reviews (investment/loan/savings/trading), and a trust-score footer. Use case: regulated fintech / banking. Instrument Serif for italic pull quotes, Inter for UI.
**HTML:**
```html
🛡
Verified Client Reviews
All reviews authenticated via KYC & account data
KYC verified
Investment portfolio
vs. 8.1% FTSE 100 benchmark
★★★★★
"I transferred my pension after eighteen months of hesitation . That hesitation cost me returns I'll never recover. The transparency, the fee structure, the dashboards — none of it was what I expected from a financial institution. All of it was better."
PH
Peter Hartmann Pension holder · 3yr customer
Verified
Business loan
★★★★★
"Approved in 4 hours . Funded same day. No collateral theatre. Used it to hire two engineers. Revenue doubled in Q2."
SK
Sadia Khan Founder · ScaleUp Ltd
High-yield savings
★★★★★
"5.3% AER , instant access. My high-street bank offers 0.5%. This should be illegal by comparison."
MN
Marcus Nwosu Personal savings
Verified
Stock trading
★★★★★
"Zero commission, real-time execution, fractional shares. Everything I've wanted from a broker for fifteen years ."
LD
Lena Dubois Active trader · Paris
Global ETFs
★★★★★
"Auto-invest, auto-rebalance, zero decision fatigue . My portfolio grows while I sleep. That's the deal I always wanted."
RO
Remi Okafor Passive investor
4.97
Trust score
286,000 verified accounts
```
**CSS:**
```css
/* Fintech Trust — navy compliance header on top, blue-toned card grid
below, ROI callout in the featured card animates in numerically via
a static gradient backdrop (no JS counter here — the visible number
is pre-rendered). Pulsing trust dot in the header signals "live
monitoring". */
.tm-fin {
--tm-fin-bg: #f0f4fa;
--tm-fin-white: #ffffff;
--tm-fin-navy: #0f1f3d;
--tm-fin-blue: #1d4ed8;
--tm-fin-teal: #0d9488;
--tm-fin-green: #16a34a;
--tm-fin-amber: #d97706;
--tm-fin-red: #dc2626;
--tm-fin-text: #0f1f3d;
--tm-fin-muted: #64748b;
--tm-fin-border: #e2e8f0;
background: var(--tm-fin-bg);
font-family: 'Inter', system-ui, sans-serif;
color: var(--tm-fin-text);
min-height: 520px;
}
.tm-fin-bank-header {
background: var(--tm-fin-navy);
padding: 14px clamp(20px, 4vw, 48px);
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 12px;
}
.tm-fin-bh-logo {
display: flex;
align-items: center;
gap: 10px;
}
.tm-fin-bh-icon {
width: 30px;
height: 30px;
background: linear-gradient(135deg, #3b82f6, #1d4ed8);
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
}
.tm-fin-bh-name {
font-family: 'Instrument Serif', Georgia, serif;
font-size: 16px;
letter-spacing: 0.04em;
color: #fff;
}
.tm-fin-bh-tagline {
font-size: 9px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: rgba(255,255,255,0.35);
margin-top: 2px;
}
.tm-fin-bh-trust {
display: flex;
align-items: center;
gap: 8px;
font-size: 10px;
letter-spacing: 0.1em;
text-transform: uppercase;
color: rgba(255,255,255,0.45);
}
.tm-fin-bh-trust-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #22c55e;
animation: tm-fin-trustpulse 2.5s infinite;
}
@keyframes tm-fin-trustpulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
.tm-fin-section { padding: clamp(28px, 4vw, 44px); }
.tm-fin-trust-banner {
background: var(--tm-fin-navy);
border-radius: 8px;
padding: 20px 24px;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 22px;
flex-wrap: wrap;
gap: 16px;
}
.tm-fin-tb-left {
display: flex;
align-items: center;
gap: 18px;
}
.tm-fin-tb-shield {
width: 44px;
height: 44px;
background: rgba(59,130,246,0.15);
border: 1px solid rgba(59,130,246,0.3);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
}
.tm-fin-tb-title {
font-family: 'Instrument Serif', Georgia, serif;
font-size: 1.2rem;
color: #fff;
line-height: 1.2;
}
.tm-fin-tb-sub {
font-size: 10px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: rgba(255,255,255,0.35);
margin-top: 3px;
}
.tm-fin-tb-stats { display: flex; gap: 26px; }
.tm-fin-tb-stat { text-align: center; }
.tm-fin-tb-val {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 1.25rem;
font-weight: 500;
line-height: 1;
}
.tm-fin-tb-lbl {
font-size: 9px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: rgba(255,255,255,0.35);
margin-top: 4px;
}
.tm-fin-green .tm-fin-tb-val { color: #22c55e; }
.tm-fin-blue .tm-fin-tb-val { color: #60a5fa; }
.tm-fin-amber .tm-fin-tb-val { color: #fbbf24; }
.tm-fin-grid {
display: grid;
grid-template-columns: 1.5fr 1fr;
gap: 14px;
margin-bottom: 14px;
}
.tm-fin-col {
display: flex;
flex-direction: column;
gap: 14px;
}
.tm-fin-grid2 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 14px;
}
.tm-fin-card {
background: var(--tm-fin-white);
border: 1px solid var(--tm-fin-border);
border-radius: 8px;
padding: 24px 22px;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
box-shadow: 0 1px 3px rgba(0,0,0,0.04);
animation: tm-fin-risein 0.7s ease both;
display: flex;
flex-direction: column;
}
.tm-fin-card:hover {
border-color: #bfdbfe;
box-shadow: 0 8px 24px rgba(29,78,216,0.08);
transform: translateY(-2px);
}
.tm-fin-card:nth-child(1) { animation-delay: 0.04s; }
.tm-fin-card:nth-child(2) { animation-delay: 0.10s; }
.tm-fin-card:nth-child(3) { animation-delay: 0.16s; }
@keyframes tm-fin-risein {
from { opacity: 0; transform: translateY(14px); }
to { opacity: 1; transform: translateY(0); }
}
.tm-fin-feat .tm-fin-q { font-size: 1.1rem; flex: 1; }
.tm-fin-prod-tag {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 9px;
font-weight: 600;
letter-spacing: 0.12em;
text-transform: uppercase;
padding: 4px 10px;
border-radius: 20px;
margin-bottom: 14px;
width: fit-content;
}
.tm-fin-tag-invest { background: rgba(13,148,136,0.1); color: var(--tm-fin-teal); border: 1px solid rgba(13,148,136,0.2); }
.tm-fin-tag-loan { background: rgba(29,78,216,0.08); color: var(--tm-fin-blue); border: 1px solid rgba(29,78,216,0.15); }
.tm-fin-tag-save { background: rgba(22,163,74,0.08); color: var(--tm-fin-green); border: 1px solid rgba(22,163,74,0.15); }
.tm-fin-tag-trade { background: rgba(217,119,6,0.08); color: var(--tm-fin-amber); border: 1px solid rgba(217,119,6,0.15); }
.tm-fin-stars {
display: flex;
gap: 2px;
margin-bottom: 12px;
font-size: 12px;
color: var(--tm-fin-amber);
}
.tm-fin-q {
font-family: 'Instrument Serif', Georgia, serif;
font-style: italic;
font-size: 0.98rem;
line-height: 1.6;
color: var(--tm-fin-text);
margin: 0 0 18px;
}
.tm-fin-q em { font-style: normal; font-weight: 400; color: var(--tm-fin-blue); }
.tm-fin-author {
display: flex;
align-items: center;
gap: 10px;
border-top: 1px solid var(--tm-fin-border);
padding-top: 14px;
margin-top: auto;
}
.tm-fin-av {
width: 34px;
height: 34px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
font-weight: 600;
flex-shrink: 0;
}
.tm-fin-av-t { background: rgba(13,148,136,0.1); color: var(--tm-fin-teal); }
.tm-fin-av-b { background: rgba(29,78,216,0.1); color: var(--tm-fin-blue); }
.tm-fin-av-g { background: rgba(22,163,74,0.1); color: var(--tm-fin-green); }
.tm-fin-av-a { background: rgba(217,119,6,0.1); color: var(--tm-fin-amber); }
.tm-fin-an {
font-size: 12px;
font-weight: 600;
font-style: normal;
color: var(--tm-fin-text);
line-height: 1.3;
display: block;
}
.tm-fin-ar { font-size: 10px; color: var(--tm-fin-muted); margin-top: 2px; }
.tm-fin-roi-box {
background: linear-gradient(135deg, rgba(13,148,136,0.06), rgba(22,163,74,0.06));
border: 1px solid rgba(13,148,136,0.15);
border-radius: 6px;
padding: 12px 14px;
margin-bottom: 16px;
display: flex;
align-items: center;
gap: 16px;
}
.tm-fin-roi-num {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 1.4rem;
font-weight: 500;
color: var(--tm-fin-teal);
line-height: 1;
}
.tm-fin-roi-lbl {
font-size: 9px;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--tm-fin-muted);
margin-top: 2px;
}
.tm-fin-roi-bench {
font-size: 0.75rem;
color: var(--tm-fin-muted);
font-weight: 300;
}
.tm-fin-verified {
position: absolute;
top: 18px;
right: 18px;
display: flex;
align-items: center;
gap: 4px;
font-size: 8px;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--tm-fin-green);
background: rgba(22,163,74,0.08);
border: 1px solid rgba(22,163,74,0.2);
padding: 3px 7px;
border-radius: 20px;
}
.tm-fin-v-dot {
width: 5px;
height: 5px;
background: var(--tm-fin-green);
border-radius: 50%;
}
.tm-fin-trust-score-card {
background: var(--tm-fin-navy);
border-color: transparent;
border-radius: 8px;
padding: 24px 22px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
animation: tm-fin-risein 0.7s ease 0.22s both;
}
.tm-fin-tsc-num {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 2.4rem;
font-weight: 500;
color: #60a5fa;
line-height: 1;
}
.tm-fin-tsc-lbl {
font-size: 9px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: rgba(255,255,255,0.3);
margin-top: 8px;
}
.tm-fin-tsc-line {
display: block;
width: 40px;
height: 1px;
background: rgba(255,255,255,0.1);
margin: 14px auto;
}
.tm-fin-tsc-count {
font-size: 10px;
color: rgba(255,255,255,0.3);
letter-spacing: 0.08em;
}
@media (max-width: 820px) {
.tm-fin-grid { grid-template-columns: 1fr; }
.tm-fin-grid2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.tm-fin-card, .tm-fin-trust-score-card { animation: none; }
.tm-fin-card:hover { transform: none; }
.tm-fin-bh-trust-dot { animation: none; }
}
```
### 13. Minimal White Cards
**Type:** Pure CSS
**Description:** Clean 3-column card grid on a soft grey background. Each card has a circular portrait at the top, a Lora italic serif quote with blue emphasis, and an author row with a smaller portrait + name + role. One dark navy featured card breaks the rhythm. Lora + Inter typography. Use case: SaaS / B2B platform.
**HTML:**
```html
Trusted by thousands of teams worldwide
SC
5.0
★
★
★
★
★
· Verified
"The onboarding was so smooth I had my whole team up and running in a single afternoon . That never happens."
SC
Sarah Chen Head of Product, Relay
MW
5.0
★ ★ ★ ★ ★
· Verified
"Replaced three different tools and cut our monthly spend by 40% . The ROI was visible in week one."
MW
Marcus Williams CTO, Stackframe
IM
5.0
★ ★ ★ ★ ★
· Verified
"Customer support replied in four minutes on a Sunday. I didn't even know that was possible from a SaaS company."
IM
Isabelle Morel VP Operations, Cove
DP
5.0
★ ★ ★ ★ ★
· Verified
"We evaluated six platforms over three months. This one wasn't just the best — it was in a different category from the rest. The depth of integrations, the API quality, the docs — nothing else came close."
DP
Daniel Park Engineering Lead, Meridian Cloud
AO
Verified customer
★ ★ ★ ★ ★
"Shipped faster in the first month than the entire previous quarter. The workflow automation alone saved us 15 hours a week."
AO
Amara Osei Founder, Lumen Analytics
```
**CSS:**
```css
/* Minimal White Cards — clean 3-col grid + 2-col bottom row. The
featured card flips to a dark navy panel for contrast. Portraits
use colored initial-circles instead of stock photos so the demo
stays slim and self-contained (no external image dependency). */
.tm-mwc {
--tm-mwc-bg: #f6f7f9;
--tm-mwc-white: #ffffff;
--tm-mwc-ink: #111827;
--tm-mwc-muted: #6b7280;
--tm-mwc-border: #e5e7eb;
--tm-mwc-blue: #2563eb;
position: relative;
padding: clamp(32px, 4vw, 56px) clamp(20px, 3vw, 52px);
background: var(--tm-mwc-bg);
font-family: 'Inter', system-ui, sans-serif;
min-height: 520px;
}
.tm-mwc-section-label {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 10px;
}
.tm-mwc-sl-text {
font-size: 11px;
font-weight: 600;
letter-spacing: 0.18em;
text-transform: uppercase;
color: var(--tm-mwc-muted);
}
.tm-mwc-sl-line {
flex: 1;
height: 1px;
background: var(--tm-mwc-border);
}
.tm-mwc-section-title {
font-family: 'Lora', Georgia, serif;
font-size: clamp(1.4rem, 2.4vw, 1.7rem);
font-weight: 500;
color: var(--tm-mwc-ink);
margin: 0 0 36px;
max-width: 480px;
line-height: 1.3;
}
.tm-mwc-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
margin-bottom: 20px;
}
.tm-mwc-grid2 {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
}
.tm-mwc-card {
background: var(--tm-mwc-white);
border: 1px solid var(--tm-mwc-border);
border-radius: 12px;
padding: 30px 26px;
position: relative;
transition: box-shadow 0.25s ease, transform 0.25s ease;
animation: tm-mwc-fadeup 0.6s ease both;
display: flex;
flex-direction: column;
}
.tm-mwc-card:hover {
box-shadow: 0 12px 32px rgba(0,0,0,0.08);
transform: translateY(-3px);
}
.tm-mwc-grid .tm-mwc-card:nth-child(1) { animation-delay: 0.05s; }
.tm-mwc-grid .tm-mwc-card:nth-child(2) { animation-delay: 0.12s; }
.tm-mwc-grid .tm-mwc-card:nth-child(3) { animation-delay: 0.19s; }
.tm-mwc-grid2 .tm-mwc-card:nth-child(1) { animation-delay: 0.26s; }
.tm-mwc-grid2 .tm-mwc-card:nth-child(2) { animation-delay: 0.32s; }
@keyframes tm-mwc-fadeup {
from { opacity: 0; transform: translateY(16px); }
to { opacity: 1; transform: translateY(0); }
}
.tm-mwc-portrait {
width: 60px;
height: 60px;
border-radius: 50%;
margin-bottom: 18px;
border: 2px solid var(--tm-mwc-border);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.tm-mwc-initials {
font-family: 'Inter', system-ui, sans-serif;
font-size: 18px;
font-weight: 600;
color: #fff;
letter-spacing: 0.02em;
}
.tm-mwc-portrait-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.tm-mwc-portrait-teal { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.tm-mwc-portrait-amber { background: linear-gradient(135deg, #f59e0b, #b45309); }
.tm-mwc-portrait-indigo { background: linear-gradient(135deg, #6366f1, #4338ca); }
.tm-mwc-portrait-green { background: linear-gradient(135deg, #22c55e, #15803d); }
.tm-mwc-rating-block {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 10px;
flex-wrap: wrap;
}
.tm-mwc-rating-num {
font-size: 1rem;
font-weight: 600;
color: var(--tm-mwc-ink);
}
.tm-mwc-stars {
display: inline-flex;
gap: 2px;
}
.tm-mwc-star {
color: #f59e0b;
font-size: 13px;
}
.tm-mwc-rating-ct {
font-size: 11px;
color: var(--tm-mwc-muted);
}
.tm-mwc-quote {
font-family: 'Lora', Georgia, serif;
font-style: italic;
font-size: 1rem;
line-height: 1.7;
color: #374151;
margin: 0 0 20px;
flex: 1;
}
.tm-mwc-quote em {
font-style: normal;
color: var(--tm-mwc-blue);
font-weight: 500;
}
.tm-mwc-author-row {
display: flex;
align-items: center;
gap: 12px;
padding-top: 18px;
border-top: 1px solid var(--tm-mwc-border);
}
.tm-mwc-author-portrait {
width: 40px;
height: 40px;
border-radius: 50%;
flex-shrink: 0;
border: 1.5px solid var(--tm-mwc-border);
margin-bottom: 0;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Inter', system-ui, sans-serif;
font-size: 12px;
font-weight: 600;
color: #fff;
}
.tm-mwc-author-name {
display: block;
font-size: 13px;
font-weight: 600;
font-style: normal;
color: var(--tm-mwc-ink);
line-height: 1.3;
}
.tm-mwc-author-role {
font-size: 11px;
color: var(--tm-mwc-muted);
margin-top: 2px;
display: block;
}
.tm-mwc-verified-chip {
display: inline-flex;
align-items: center;
gap: 5px;
font-size: 10px;
font-weight: 500;
letter-spacing: 0.06em;
color: #16a34a;
background: #f0fdf4;
border: 1px solid #bbf7d0;
padding: 3px 8px;
border-radius: 20px;
margin-bottom: 14px;
width: fit-content;
}
.tm-mwc-vc-dot {
width: 5px;
height: 5px;
background: #16a34a;
border-radius: 50%;
}
/* Dark featured card */
.tm-mwc-feat {
background: var(--tm-mwc-ink);
border-color: transparent;
}
.tm-mwc-feat .tm-mwc-quote { color: rgba(255,255,255,0.8); }
.tm-mwc-feat .tm-mwc-quote em { color: #93c5fd; }
.tm-mwc-feat .tm-mwc-author-name { color: #fff; }
.tm-mwc-feat .tm-mwc-author-role { color: rgba(255,255,255,0.5); }
.tm-mwc-feat .tm-mwc-author-row { border-top-color: rgba(255,255,255,0.1); }
.tm-mwc-feat .tm-mwc-rating-num { color: #fff; }
.tm-mwc-feat .tm-mwc-rating-ct { color: rgba(255,255,255,0.4); }
.tm-mwc-feat .tm-mwc-portrait,
.tm-mwc-feat .tm-mwc-author-portrait { border-color: rgba(255,255,255,0.15); }
@media (max-width: 820px) {
.tm-mwc-grid, .tm-mwc-grid2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.tm-mwc-card { animation: none; transition: none; }
.tm-mwc-card:hover { transform: none; }
}
```
### 14. Horizontal Cards
**Type:** Pure CSS
**Description:** Full-width stacked horizontal cards split into a sand-toned portrait panel (left) and a quote + meta panel (right). Each reviewer has a verified SVG checkmark badge, portrait, name, title, company, and a source tag (G2, Capterra, etc). The featured card flips to a deep forest green. Playfair Display + Mulish. Use case: consulting / agency / professional services.
**HTML:**
```html
Client Stories
Real results from real people
Natalie Brooks
Chief Marketing Officer
Arcfield Digital
★
★
★
★
★
"We ran a 90-day trial against our previous solution. The results were not even close . Conversion up 62%, churn down 18%, and our team actually enjoys using it. I don't say this lightly — it was the best vendor decision I've made in five years."
90-day evaluation
Enterprise plan
G2 · Verified
Hiroshi Yamada
Director of Engineering
Synth Systems
★ ★ ★ ★ ★
"The API documentation is the best I've ever read . I gave it to three junior devs with no briefing. They were productive in two hours."
Developer plan
14 months active
Capterra
Priya Sharma
Founder & CEO
Kova Studio
★ ★ ★ ★ ★
"As a solo founder, I needed something I could operate without a team behind it. This is genuinely that product . Everything just works."
Solo plan
2 years active
Trustpilot
Leon Fischer
Head of Data
Veldtwerk GmbH
★ ★ ★ ★ ★
"The analytics dashboard gives me answers I didn't know to ask for . Every Monday I discover something new about our users that changes how we prioritize."
Growth plan
18 months active
LinkedIn
```
**CSS:**
```css
/* Horizontal Cards — 2-col split: sand portrait panel | quote panel.
Featured card swaps sand for accent (deep forest green). Verified
ring badge sits at the corner of the portrait. Slide-in entrance
from the left for a directional, list-like reveal. */
.tm-hc {
--tm-hc-bg: #fafaf8;
--tm-hc-white: #ffffff;
--tm-hc-ink: #18181b;
--tm-hc-muted: #71717a;
--tm-hc-line: #e4e4e7;
--tm-hc-accent: #1c4a3f;
--tm-hc-accent-l: #d1f0e8;
--tm-hc-warm: #f9f6f1;
padding: clamp(32px, 4vw, 52px) clamp(20px, 3vw, 56px);
background: var(--tm-hc-bg);
font-family: 'Mulish', system-ui, sans-serif;
min-height: 520px;
}
.tm-hc-eyebrow {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.22em;
text-transform: uppercase;
color: var(--tm-hc-accent);
margin-bottom: 10px;
}
.tm-hc-section-title {
font-family: 'Playfair Display', Georgia, serif;
font-size: clamp(1.5rem, 2.6vw, 2rem);
font-weight: 400;
color: var(--tm-hc-ink);
margin: 0 0 32px;
line-height: 1.25;
}
.tm-hc-card {
display: grid;
grid-template-columns: 180px 1fr;
background: var(--tm-hc-white);
border: 1px solid var(--tm-hc-line);
border-radius: 10px;
overflow: hidden;
margin-bottom: 14px;
transition: box-shadow 0.3s ease, transform 0.3s ease;
animation: tm-hc-slidein 0.6s ease both;
}
.tm-hc-card:hover {
box-shadow: 0 8px 28px rgba(0,0,0,0.07);
transform: translateY(-2px);
}
.tm-hc-card:nth-child(1) { animation-delay: 0.04s; }
.tm-hc-card:nth-child(2) { animation-delay: 0.12s; }
.tm-hc-card:nth-child(3) { animation-delay: 0.20s; }
.tm-hc-card:nth-child(4) { animation-delay: 0.28s; }
.tm-hc-card:nth-child(5) { animation-delay: 0.36s; }
@keyframes tm-hc-slidein {
from { opacity: 0; transform: translateX(-12px); }
to { opacity: 1; transform: translateX(0); }
}
.tm-hc-portrait-panel {
background: var(--tm-hc-warm);
padding: 24px 20px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
border-right: 1px solid var(--tm-hc-line);
text-align: center;
}
.tm-hc-portrait-wrap { position: relative; }
.tm-hc-portrait {
width: 72px;
height: 72px;
border-radius: 50%;
border: 3px solid var(--tm-hc-white);
box-shadow: 0 0 0 2px var(--tm-hc-line);
display: flex;
align-items: center;
justify-content: center;
}
.tm-hc-p-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.tm-hc-p-rose { background: linear-gradient(135deg, #f472b6, #be185d); }
.tm-hc-p-slate { background: linear-gradient(135deg, #64748b, #334155); }
.tm-hc-p-cyan { background: linear-gradient(135deg, #06b6d4, #0e7490); }
.tm-hc-initials {
font-family: 'Mulish', system-ui, sans-serif;
font-size: 22px;
font-weight: 700;
color: #fff;
letter-spacing: 0.02em;
}
.tm-hc-verified-ring {
position: absolute;
bottom: 2px;
right: 2px;
width: 18px;
height: 18px;
background: var(--tm-hc-accent);
border-radius: 50%;
border: 2px solid var(--tm-hc-white);
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
.tm-hc-verified-ring svg { width: 8px; height: 8px; }
.tm-hc-portrait-name {
font-size: 12px;
font-weight: 700;
color: var(--tm-hc-ink);
line-height: 1.3;
}
.tm-hc-portrait-role {
font-size: 10px;
color: var(--tm-hc-muted);
line-height: 1.4;
font-weight: 400;
}
.tm-hc-portrait-company {
font-size: 10px;
font-weight: 600;
color: var(--tm-hc-accent);
margin-top: 2px;
}
.tm-hc-content {
padding: 26px 28px;
display: flex;
flex-direction: column;
justify-content: center;
}
.tm-hc-stars {
display: flex;
gap: 2px;
margin-bottom: 12px;
}
.tm-hc-star {
color: #f59e0b;
font-size: 12px;
}
.tm-hc-quote {
font-family: 'Playfair Display', Georgia, serif;
font-style: italic;
font-size: 1.05rem;
line-height: 1.65;
color: #3f3f46;
margin: 0 0 14px;
}
.tm-hc-quote em {
font-style: normal;
color: var(--tm-hc-accent);
font-weight: 600;
}
.tm-hc-meta-row {
display: flex;
align-items: center;
gap: 14px;
flex-wrap: wrap;
}
.tm-hc-meta-item {
font-size: 10px;
color: var(--tm-hc-muted);
display: flex;
align-items: center;
}
.tm-hc-meta-dot {
width: 3px;
height: 3px;
background: var(--tm-hc-line);
border-radius: 50%;
}
.tm-hc-source-tag {
font-size: 10px;
font-weight: 600;
letter-spacing: 0.08em;
color: var(--tm-hc-muted);
background: var(--tm-hc-warm);
border: 1px solid var(--tm-hc-line);
padding: 3px 8px;
border-radius: 4px;
margin-left: auto;
}
/* Featured: deep forest green panel */
.tm-hc-feat { border-color: var(--tm-hc-accent); }
.tm-hc-feat .tm-hc-portrait-panel {
background: var(--tm-hc-accent);
border-right-color: rgba(255,255,255,0.15);
}
.tm-hc-feat .tm-hc-portrait-name { color: #fff; }
.tm-hc-feat .tm-hc-portrait-role { color: rgba(255,255,255,0.6); }
.tm-hc-feat .tm-hc-portrait-company { color: rgba(255,255,255,0.8); }
.tm-hc-feat .tm-hc-portrait { box-shadow: 0 0 0 2px rgba(255,255,255,0.3); }
.tm-hc-feat .tm-hc-verified-ring { background: #fff; color: var(--tm-hc-accent); }
@media (max-width: 720px) {
.tm-hc-card { grid-template-columns: 1fr; }
.tm-hc-portrait-panel { border-right: none; border-bottom: 1px solid var(--tm-hc-line); }
}
@media (prefers-reduced-motion: reduce) {
.tm-hc-card { animation: none; transition: none; }
.tm-hc-card:hover { transform: none; }
}
```
### 15. Portrait Grid
**Type:** Pure CSS
**Description:** 3-column masonry-style grid where a full square portrait leads each card. Stars float directly on the portrait with a gradient overlay. On hover the portrait subtly zooms. Alternates between white, dark navy, and warm sand backgrounds for visual rhythm. DM Serif Display + DM Sans. Use case: product / startup / general-purpose.
**HTML:**
```html
"I've recommended this to every founder I know. The time I've saved is genuinely hard to quantify. "
EL
Emma Larson Founder, Northfield
Pro
"Our sales cycle shortened by three weeks after switching. The clarity in our pitch improved the moment we had the right data."
JO
James Owusu VP Sales, Bridgemark
Enterprise
"Simple enough that my non-technical co-founder uses it daily. Powerful enough that I rely on it for every strategic decision. "
MZ
Mei Zhang Co-founder, Fenix Labs
Growth
"Migrated our entire workflow in a weekend. Monday morning the team didn't miss a beat. Zero disruption, full adoption. "
TR
Thomas Reeves Ops Lead, Slate Co.
Team
"The reporting alone is worth the subscription. I present to investors every quarter and the visuals do half the work. "
AP
Aisha Patel CEO, Vantage Health
Enterprise
"We've tried four competitors. None had this level of attention to the details that slow teams down. It shows in the product."
CM
Carlos Mendes CPO, Ironhaven
Pro
```
**CSS:**
```css
/* Portrait Grid — 3-col masonry-feel grid where a 1:1 portrait
leads each card. Cards alternate background (white / dark navy /
warm sand) for visual rhythm. Portrait subtly zooms on card hover.
The photo-stars badge sits on the bottom-left of the portrait above
a gradient overlay for legibility. */
.tm-pg {
--tm-pg-bg: #ffffff;
--tm-pg-ink: #0d0d0d;
--tm-pg-muted: #8c8c8c;
--tm-pg-line: #efefef;
--tm-pg-sand: #f5f2ed;
--tm-pg-navy: #0f2d4a;
--tm-pg-blue: #1a56db;
padding: clamp(32px, 4vw, 52px) clamp(20px, 3vw, 56px);
background: var(--tm-pg-bg);
font-family: 'DM Sans', system-ui, sans-serif;
min-height: 520px;
}
.tm-pg-top-bar {
display: flex;
justify-content: space-between;
align-items: flex-end;
margin-bottom: 36px;
padding-bottom: 20px;
border-bottom: 1px solid var(--tm-pg-line);
flex-wrap: wrap;
gap: 18px;
}
.tm-pg-top-title {
font-family: 'DM Serif Display', Georgia, serif;
font-size: clamp(1.5rem, 2.5vw, 2rem);
color: var(--tm-pg-ink);
line-height: 1.2;
max-width: 400px;
margin: 0;
font-weight: 400;
}
.tm-pg-top-stat { text-align: right; }
.tm-pg-ts-num {
font-family: 'DM Serif Display', Georgia, serif;
font-size: 2rem;
color: var(--tm-pg-navy);
line-height: 1;
}
.tm-pg-ts-lbl {
font-size: 11px;
color: var(--tm-pg-muted);
margin-top: 3px;
letter-spacing: 0.04em;
}
.tm-pg-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
align-items: start;
}
.tm-pg-card {
background: var(--tm-pg-bg);
border: 1px solid var(--tm-pg-line);
border-radius: 14px;
overflow: hidden;
transition: box-shadow 0.3s, transform 0.3s;
animation: tm-pg-appear 0.65s ease both;
}
.tm-pg-card:hover {
box-shadow: 0 10px 30px rgba(0,0,0,0.07);
transform: translateY(-3px);
}
.tm-pg-card:nth-child(1) { animation-delay: 0.04s; }
.tm-pg-card:nth-child(2) { animation-delay: 0.10s; }
.tm-pg-card:nth-child(3) { animation-delay: 0.16s; }
.tm-pg-card:nth-child(4) { animation-delay: 0.22s; }
.tm-pg-card:nth-child(5) { animation-delay: 0.28s; }
.tm-pg-card:nth-child(6) { animation-delay: 0.34s; }
@keyframes tm-pg-appear {
from { opacity: 0; transform: scale(.97); }
to { opacity: 1; transform: scale(1); }
}
.tm-pg-card-photo {
width: 100%;
aspect-ratio: 1;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
position: relative;
transition: transform 0.5s ease;
transform: scale(1.05);
}
.tm-pg-card:hover .tm-pg-card-photo {
transform: scale(1.1);
}
.tm-pg-photo-initials {
font-family: 'DM Serif Display', Georgia, serif;
font-size: clamp(2.5rem, 7vw, 4rem);
font-weight: 400;
color: rgba(255,255,255,0.85);
letter-spacing: 0.05em;
}
.tm-pg-photo-blue { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.tm-pg-photo-teal { background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%); }
.tm-pg-photo-amber { background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%); }
.tm-pg-photo-indigo { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%); }
.tm-pg-photo-green { background: linear-gradient(135deg, #22c55e 0%, #15803d 100%); }
.tm-pg-photo-purple { background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%); }
.tm-pg-card-photo::after {
content: '';
position: absolute;
bottom: 0; left: 0; right: 0;
height: 50%;
background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.25));
pointer-events: none;
}
.tm-pg-photo-stars {
position: absolute;
bottom: 12px;
left: 14px;
display: flex;
gap: 2px;
z-index: 1;
}
.tm-pg-photo-stars span {
color: #f5c518;
font-size: 11px;
text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.tm-pg-card-body {
padding: 22px 20px 20px;
}
.tm-pg-quote {
font-family: 'DM Serif Display', Georgia, serif;
font-style: italic;
font-size: 1rem;
line-height: 1.6;
color: var(--tm-pg-ink);
margin: 0 0 16px;
}
.tm-pg-quote em {
font-style: normal;
color: var(--tm-pg-blue);
}
.tm-pg-author-strip {
display: flex;
align-items: center;
gap: 10px;
padding-top: 14px;
border-top: 1px solid var(--tm-pg-line);
}
.tm-pg-a-photo {
width: 34px;
height: 34px;
border-radius: 50%;
flex-shrink: 0;
border: 2px solid var(--tm-pg-line);
display: flex;
align-items: center;
justify-content: center;
}
.tm-pg-a-initials {
font-family: 'DM Sans', system-ui, sans-serif;
font-size: 11px;
font-weight: 600;
color: #fff;
}
.tm-pg-a-name {
display: block;
font-size: 12px;
font-weight: 600;
font-style: normal;
color: var(--tm-pg-ink);
line-height: 1.3;
}
.tm-pg-a-role {
font-size: 10px;
color: var(--tm-pg-muted);
margin-top: 1px;
}
.tm-pg-a-badge {
margin-left: auto;
font-size: 9px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--tm-pg-blue);
background: #eff6ff;
border: 1px solid #bfdbfe;
padding: 2px 7px;
border-radius: 4px;
flex-shrink: 0;
}
/* Dark variant */
.tm-pg-dark {
background: var(--tm-pg-navy);
border-color: var(--tm-pg-navy);
}
.tm-pg-dark .tm-pg-card-body { background: var(--tm-pg-navy); }
.tm-pg-dark .tm-pg-quote { color: rgba(255,255,255,0.88); }
.tm-pg-dark .tm-pg-quote em { color: #93c5fd; }
.tm-pg-dark .tm-pg-author-strip { border-top-color: rgba(255,255,255,0.1); }
.tm-pg-dark .tm-pg-a-name { color: #fff; }
.tm-pg-dark .tm-pg-a-role { color: rgba(255,255,255,0.45); }
.tm-pg-dark .tm-pg-a-photo { border-color: rgba(255,255,255,0.15); }
.tm-pg-dark .tm-pg-a-badge {
background: rgba(147,197,253,0.1);
border-color: rgba(147,197,253,0.3);
color: #93c5fd;
}
/* Sand variant */
.tm-pg-sand { background: var(--tm-pg-sand); border-color: rgba(0,0,0,0.06); }
.tm-pg-sand .tm-pg-card-body { background: var(--tm-pg-sand); }
.tm-pg-sand .tm-pg-author-strip { border-top-color: rgba(0,0,0,0.08); }
@media (max-width: 820px) {
.tm-pg-grid { grid-template-columns: 1fr; }
}
@media (hover: none) {
.tm-pg-card-photo { transform: scale(1); }
.tm-pg-card:hover .tm-pg-card-photo { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
.tm-pg-card { animation: none; transition: none; }
.tm-pg-card:hover { transform: none; }
.tm-pg-card-photo, .tm-pg-card:hover .tm-pg-card-photo { transform: scale(1); transition: none; }
}
```
---
## 25 CSS Text Animations
URL: https://codefronts.com/motion/css-text-animations/
Description: 25 hand-coded CSS text animations with live demos — typewriter, gradient text, glitch, neon glow, clip-path reveal, letter spacing, wave, shimmer, fade-up stagger, 3D flip, SVG stroke draw, bouncing letters, blur reveal, perspective rotation, text-shadow pulse, morphing text, liquid fill, word scramble, split-text explosion, holographic chrome, decryption, elastic bounce, cursor blink, mask wipe, and kinetic typography. 16 pure CSS (no JavaScript) + 9 with a tiny vanilla JS snippet — no framework. Modern @property + animation-timeline + variable-font techniques, prefers-reduced-motion honoured, WCAG 2.2 AA compliant, MIT licensed.
Demo count: 25
### 01. CSS Typewriter Text Animation
**Type:** Pure CSS
**Description:** A classic monospaced typewriter effect driven entirely by CSS steps() timing and a blinking cursor pseudo-element — no JavaScript required.
**HTML:**
```html
Hello, World.
I'm a typewriter.
Pure CSS. No JS.
```
**CSS:**
```css
.ta-01, .ta-01 *, .ta-01 *::before, .ta-01 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-01 ::selection { background: #a78bfa; color: #fff; }
.ta-01 {
--bg: #0d0d1a;
--green: #00ff9f;
--cursor: #00ff9f;
--muted: #4ade80;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
font-family: 'Courier New', Courier, monospace;
padding: 2rem;
}
.ta-01__stage {
display: flex;
flex-direction: column;
gap: 0.5rem;
align-items: flex-start;
}
.ta-01__text {
font-size: clamp(1.1rem, 2.5vw, 1.6rem);
color: var(--green);
white-space: nowrap;
overflow: hidden;
width: 0;
border-right: 3px solid transparent;
}
/* Line 1 */
.ta-01__text--line1 {
animation:
ta-01-type1 1.6s steps(13) 0.3s forwards,
ta-01-blink 0.75s steps(1) infinite;
}
/* Line 2 */
.ta-01__text--line2 {
animation:
ta-01-type2 1.4s steps(19) 2.2s forwards,
ta-01-blink2 0.75s steps(1) 2.2s infinite;
opacity: 0;
animation-fill-mode: forwards;
}
/* Line 3 */
.ta-01__text--line3 {
animation:
ta-01-type3 1.2s steps(18) 3.8s forwards,
ta-01-blink3 0.75s steps(1) 3.8s infinite;
opacity: 0;
animation-fill-mode: forwards;
}
@keyframes ta-01-type1 {
0% { width: 0; border-right-color: var(--cursor); opacity: 1; }
99% { border-right-color: var(--cursor); }
100% { width: 13ch; border-right-color: transparent; }
}
@keyframes ta-01-type2 {
0% { width: 0; border-right-color: var(--cursor); opacity: 1; }
99% { border-right-color: var(--cursor); }
100% { width: 19ch; border-right-color: transparent; }
}
@keyframes ta-01-type3 {
0% { width: 0; border-right-color: var(--cursor); opacity: 1; }
100% { width: 18ch; border-right-color: var(--cursor); }
}
@keyframes ta-01-blink { 50% { border-right-color: transparent; } }
@keyframes ta-01-blink2 { 50% { border-right-color: transparent; } }
@keyframes ta-01-blink3 { 50% { border-right-color: transparent; } }
@media (prefers-reduced-motion: reduce) {
.ta-01__text {
width: auto !important;
opacity: 1 !important;
animation: none !important;
border-right-color: transparent !important;
}
}
```
### 02. CSS Gradient Text Animation
**Type:** Pure CSS
**Description:** Flowing rainbow gradient text using background-clip: text and an animated background-position shift — a striking modern headline technique.
**HTML:**
```html
Premium Collection
Gradient Text Animation
background-clip: text · animated background-position
```
**CSS:**
```css
.ta-02, .ta-02 *, .ta-02 *::before, .ta-02 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-02 ::selection { background: #818cf8; color: #fff; }
.ta-02 {
--bg: #05050f;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Syne', 'Segoe UI', sans-serif;
}
.ta-02__stage { text-align: center; }
.ta-02__eyebrow {
font-size: 0.75rem;
letter-spacing: 0.25em;
text-transform: uppercase;
color: #555;
margin-bottom: 0.75rem;
}
.ta-02__title {
font-size: clamp(2rem, 6vw, 3.5rem);
font-weight: 800;
line-height: 1.1;
letter-spacing: -0.02em;
background-image: linear-gradient(90deg,
#f43f5e 0%, #a855f7 20%, #3b82f6 40%,
#06b6d4 60%, #10b981 80%, #f43f5e 100%);
background-size: 200% auto;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: ta-02-flow 4s linear infinite;
}
.ta-02__sub {
font-size: 0.75rem;
color: #444;
margin-top: 1rem;
font-family: 'Courier New', monospace;
letter-spacing: 0.05em;
}
@keyframes ta-02-flow {
0% { background-position: 0% center; }
100% { background-position: 200% center; }
}
@media (prefers-reduced-motion: reduce) {
.ta-02__title { animation: none; background-position: 0% center; }
}
```
### 03. CSS Glitch Text Effect Animation
**Type:** Pure CSS
**Description:** A cyberpunk-style glitch animation using CSS pseudo-elements with clip-path and transform skewing to simulate corrupted display artifacts.
**HTML:**
```html
GLITCH
clip-path · pseudo-elements · RGB offset
```
**CSS:**
```css
.ta-03, .ta-03 *, .ta-03 *::before, .ta-03 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-03 ::selection { background: #f43f5e; color: #fff; }
.ta-03 {
--bg: #050510;
--white: #e2e8f0;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Orbitron', 'Courier New', monospace;
}
.ta-03__stage { text-align: center; }
.ta-03__glitch {
position: relative;
font-size: clamp(3rem, 10vw, 6rem);
font-weight: 900;
color: var(--white);
letter-spacing: 0.08em;
text-transform: uppercase;
animation: ta-03-main 6s infinite;
}
.ta-03__glitch::before,
.ta-03__glitch::after {
content: attr(data-text);
position: absolute;
top: 0; left: 0;
width: 100%;
height: 100%;
}
.ta-03__glitch::before {
color: #ff003c;
animation: ta-03-glitch-r 3s infinite linear alternate-reverse;
}
.ta-03__glitch::after {
color: #00ffe7;
animation: ta-03-glitch-b 2.5s infinite linear alternate-reverse;
}
.ta-03__sub {
font-size: 0.68rem;
color: #334155;
margin-top: 1.5rem;
letter-spacing: 0.12em;
text-transform: uppercase;
font-family: 'Courier New', monospace;
}
@keyframes ta-03-main {
0%, 90%, 100% { transform: none; opacity: 1; }
92% { transform: skewX(-2deg); opacity: 0.9; }
94% { transform: skewX(1deg); }
96% { transform: none; }
98% { transform: skewX(-1deg) scaleY(1.02); }
}
@keyframes ta-03-glitch-r {
0% { clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%); transform: translate(-2px, 0); }
10% { clip-path: polygon(0 15%, 100% 15%, 100% 18%, 0 18%); transform: translate(2px, 0); }
25% { clip-path: polygon(0 40%, 100% 40%, 100% 44%, 0 44%); transform: translate(-1px, 0); }
40% { clip-path: polygon(0 60%, 100% 60%, 100% 65%, 0 65%); transform: translate(3px, 0); }
55% { clip-path: polygon(0 75%, 100% 75%, 100% 80%, 0 80%); transform: translate(-2px, 0); }
70% { clip-path: polygon(0 88%, 100% 88%, 100% 93%, 0 93%); transform: translate(1px, 0); }
100% { clip-path: polygon(0 30%, 100% 30%, 100% 35%, 0 35%); transform: translate(0, 0); }
}
@keyframes ta-03-glitch-b {
0% { clip-path: polygon(0 55%, 100% 55%, 100% 58%, 0 58%); transform: translate(2px, 0); }
15% { clip-path: polygon(0 10%, 100% 10%, 100% 14%, 0 14%); transform: translate(-3px, 0); }
30% { clip-path: polygon(0 70%, 100% 70%, 100% 74%, 0 74%); transform: translate(1px, 0); }
50% { clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%); transform: translate(-2px, 0); }
70% { clip-path: polygon(0 85%, 100% 85%, 100% 90%, 0 90%); transform: translate(3px, 0); }
100% { clip-path: polygon(0 45%, 100% 45%, 100% 50%, 0 50%); transform: translate(-1px, 0); }
}
@media (prefers-reduced-motion: reduce) {
.ta-03__glitch, .ta-03__glitch::before, .ta-03__glitch::after {
animation: none;
transform: none;
clip-path: none;
}
.ta-03__glitch::before, .ta-03__glitch::after { display: none; }
}
```
### 04. CSS Neon Glow Text Animation
**Type:** Pure CSS
**Description:** Layered multi-colour text-shadow stacks create a pulsing neon sign effect with realistic flicker and electric glow spread.
**HTML:**
```html
Open
N E O N
text-shadow stacking · flicker keyframes
```
**CSS:**
```css
.ta-04, .ta-04 *, .ta-04 *::before, .ta-04 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-04 ::selection { background: #fb7185; color: #fff; }
.ta-04 {
--bg: #030309;
--pink: #ff2d78;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Syne', sans-serif;
}
.ta-04__stage { text-align: center; }
.ta-04__label {
font-size: 0.7rem;
letter-spacing: 0.4em;
text-transform: uppercase;
color: #ff2d78;
text-shadow:
0 0 4px #ff2d78,
0 0 12px #ff2d78;
margin-bottom: 0.5rem;
}
.ta-04__sign {
font-size: clamp(4rem, 12vw, 7rem);
font-weight: 900;
letter-spacing: 0.1em;
color: #fff;
display: flex;
gap: 0.05em;
}
.ta-04__sign span {
display: inline-block;
text-shadow:
0 0 5px #fff,
0 0 10px #fff,
0 0 20px var(--pink),
0 0 40px var(--pink),
0 0 80px var(--pink),
0 0 90px var(--pink);
}
.ta-04__s1 { animation: ta-04-flicker1 4.5s infinite; }
.ta-04__s2 { animation: ta-04-flicker2 3.8s infinite; color: #ff8fab; text-shadow:
0 0 5px #fff, 0 0 10px #fff, 0 0 20px #ff8fab, 0 0 40px #ff8fab, 0 0 80px #ff8fab; }
.ta-04__s3 { animation: ta-04-flicker1 5.2s 0.6s infinite; }
.ta-04__s4 { animation: ta-04-flicker2 4.1s 1.2s infinite; }
.ta-04__sub {
font-size: 0.68rem;
color: #2d1f2a;
margin-top: 1.2rem;
letter-spacing: 0.1em;
font-family: 'Courier New', monospace;
}
@keyframes ta-04-flicker1 {
0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
opacity: 1;
text-shadow:
0 0 5px #fff, 0 0 10px #fff,
0 0 20px var(--pink), 0 0 40px var(--pink),
0 0 80px var(--pink), 0 0 90px var(--pink);
}
20%, 24%, 55% {
opacity: 0.4;
text-shadow: none;
}
}
@keyframes ta-04-flicker2 {
0%, 30%, 32%, 80%, 82%, 100% {
opacity: 1;
text-shadow:
0 0 5px #fff, 0 0 10px #fff,
0 0 20px var(--pink), 0 0 40px var(--pink),
0 0 80px var(--pink), 0 0 90px var(--pink);
}
31%, 81% {
opacity: 0.3;
text-shadow: none;
}
}
@media (prefers-reduced-motion: reduce) {
.ta-04__sign span, .ta-04__label { animation: none; }
}
```
### 05. CSS Text Reveal Clip Animation
**Type:** Pure CSS
**Description:** A premium editorial text reveal using clip-path inset() to wipe text into view from behind an invisible mask — elegant, production-ready.
**HTML:**
```html
```
**CSS:**
```css
.ta-05, .ta-05 *, .ta-05 *::before, .ta-05 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-05 ::selection { background: #e2e8f0; color: #0f172a; }
.ta-05 {
--bg: #0f0f0f;
--gold: #c9a84c;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Playfair Display', Georgia, serif;
}
.ta-05__stage { text-align: left; }
.ta-05__line-wrap {
overflow: hidden;
line-height: 1.15;
}
.ta-05__line {
font-size: clamp(1.8rem, 5.5vw, 3.2rem);
font-weight: 700;
color: #e2e8f0;
display: block;
transform: translateY(110%);
animation: ta-05-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.ta-05__line--1 { animation-delay: 0.1s; }
.ta-05__line--2 { animation-delay: 0.3s; font-style: italic; font-weight: 400; color: #94a3b8; }
.ta-05__line--3 { animation-delay: 0.55s; color: var(--gold); }
.ta-05__line-wrap--accent .ta-05__line {
border-bottom: 2px solid var(--gold);
padding-bottom: 0.1em;
}
@keyframes ta-05-rise {
to { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
.ta-05__line { animation: none; transform: none; }
}
```
### 06. CSS Letter Spacing Animation
**Type:** Pure CSS
**Description:** Dramatic letter-spacing expansion and contraction paired with opacity and blur transitions creates an airy, editorial headline entrance.
**HTML:**
```html
```
**CSS:**
```css
.ta-06, .ta-06 *, .ta-06 *::before, .ta-06 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-06 ::selection { background: #7c3aed; color: #fff; }
.ta-06 {
--bg: #09090b;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Syne', 'Helvetica Neue', sans-serif;
overflow: hidden;
}
.ta-06__stage {
text-align: center;
display: flex;
flex-direction: column;
gap: 0.15rem;
}
.ta-06__word {
font-size: clamp(1.4rem, 4.5vw, 2.8rem);
font-weight: 800;
text-transform: uppercase;
opacity: 0;
animation: ta-06-expand 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.ta-06__word--1 { color: #e2e8f0; animation-delay: 0.1s; }
.ta-06__word--2 { color: #7c3aed; animation-delay: 0.4s; letter-spacing: 0.3em; font-weight: 300; }
.ta-06__word--3 { color: #e2e8f0; animation-delay: 0.7s; }
@keyframes ta-06-expand {
0% {
opacity: 0;
letter-spacing: -0.4em;
filter: blur(10px);
}
60% {
opacity: 1;
filter: blur(0);
}
100% {
opacity: 1;
filter: blur(0);
letter-spacing: 0.15em;
}
}
.ta-06__word--2 {
animation-name: ta-06-expand2;
}
@keyframes ta-06-expand2 {
0% {
opacity: 0;
letter-spacing: -0.2em;
filter: blur(10px);
}
100% {
opacity: 1;
filter: blur(0);
letter-spacing: 0.4em;
}
}
@media (prefers-reduced-motion: reduce) {
.ta-06__word {
animation: none;
opacity: 1;
filter: none;
letter-spacing: 0.1em;
}
}
```
### 07. CSS Wave Text Animation
**Type:** Pure CSS
**Description:** A sinusoidal wave ripples through individual letters using staggered translateY keyframes, each letter becoming a wave oscillator.
**HTML:**
```html
Riding the wave
W A V E T E X T
```
**CSS:**
```css
.ta-07, .ta-07 *, .ta-07 *::before, .ta-07 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-07 ::selection { background: #0ea5e9; color: #fff; }
.ta-07 {
--bg: linear-gradient(135deg, #0c1a2e 0%, #0a0f1e 100%);
--wave: #38bdf8;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
}
.ta-07__stage { text-align: center; }
.ta-07__label {
font-size: 0.72rem;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #1e4060;
margin-bottom: 0.75rem;
}
.ta-07__text {
font-size: clamp(2.2rem, 7vw, 4.5rem);
font-weight: 800;
color: var(--wave);
display: flex;
letter-spacing: 0.05em;
}
.ta-07__text span {
display: inline-block;
animation: ta-07-wave 1.2s ease-in-out infinite;
animation-delay: calc(var(--i) * 0.07s);
}
@keyframes ta-07-wave {
0%, 100% { transform: translateY(0); }
40% { transform: translateY(-14px); color: #fff; }
}
@media (prefers-reduced-motion: reduce) {
.ta-07__text span { animation: none; transform: none; }
}
```
### 08. CSS Shimmer Text Animation
**Type:** Pure CSS
**Description:** A sweeping metallic shimmer passes across text using a moving conic or linear gradient highlight — the gold-foil effect of premium design.
**HTML:**
```html
Limited Edition
Golden Hour
background-clip: text · animated shimmer gradient
```
**CSS:**
```css
.ta-08, .ta-08 *, .ta-08 *::before, .ta-08 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-08 ::selection { background: #92400e; color: #fef3c7; }
.ta-08 {
--bg: #0a0806;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Playfair Display', Georgia, serif;
}
.ta-08__stage { text-align: center; }
.ta-08__eyebrow {
font-size: 0.68rem;
letter-spacing: 0.4em;
text-transform: uppercase;
color: #78350f;
margin-bottom: 0.6rem;
}
.ta-08__title {
font-size: clamp(2.5rem, 8vw, 5rem);
font-weight: 700;
letter-spacing: 0.04em;
background-image: linear-gradient(
105deg,
#92400e 0%,
#b45309 20%,
#d97706 35%,
#fbbf24 43%,
#fef9c3 50%,
#fbbf24 57%,
#d97706 65%,
#b45309 80%,
#92400e 100%
);
background-size: 250% auto;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
background-position: 0% center;
animation: ta-08-shimmer 2.8s linear infinite;
}
.ta-08__sub {
font-size: 0.65rem;
color: #3f2a10;
margin-top: 1rem;
letter-spacing: 0.08em;
font-family: 'Courier New', monospace;
}
@keyframes ta-08-shimmer {
0% { background-position: 0% center; }
100% { background-position: 250% center; }
}
@media (prefers-reduced-motion: reduce) {
.ta-08__title { animation: none; background-position: 0% center; }
}
```
### 09. CSS Fade Up Stagger Text Animation
**Type:** Pure CSS
**Description:** Words cascade upward one after another with staggered opacity and translateY transitions — the signature micro-animation of modern landing pages.
**HTML:**
```html
The future of
Design
is
Motion.
Staggered entrances create perceived momentum and guide the eye through content hierarchies with purpose.
```
**CSS:**
```css
.ta-09, .ta-09 *, .ta-09 *::before, .ta-09 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-09 ::selection { background: #6d28d9; color: #fff; }
.ta-09 {
--bg: #f8f7ff;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
}
.ta-09__stage {
max-width: 480px;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.ta-09__item {
opacity: 0;
transform: translateY(24px);
animation: ta-09-fadeup 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
animation-delay: calc(var(--d) * 0.12s);
}
.ta-09__label {
font-size: 0.78rem;
letter-spacing: 0.15em;
text-transform: uppercase;
color: #7c3aed;
}
.ta-09__headline {
font-size: clamp(2rem, 5.5vw, 3.2rem);
font-weight: 800;
color: #1e1b4b;
line-height: 1.1;
display: flex;
gap: 0.3em;
flex-wrap: wrap;
}
.ta-09__accent {
color: #7c3aed;
font-style: italic;
font-weight: 400;
}
.ta-09__body {
font-size: 0.88rem;
line-height: 1.65;
color: #64748b;
max-width: 380px;
}
@keyframes ta-09-fadeup {
to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
.ta-09__item { animation: none; opacity: 1; transform: none; }
}
```
### 10. CSS 3D Text Flip Animation
**Type:** Pure CSS
**Description:** Words rotate in 3D on the Y-axis using CSS perspective and backface-visibility to flip between two text faces like a rotating sign.
**HTML:**
```html
Rotating between
perspective · rotateY · backface-visibility
```
**CSS:**
```css
.ta-10, .ta-10 *, .ta-10 *::before, .ta-10 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-10 ::selection { background: #0f766e; color: #fff; }
.ta-10 {
--bg: #05120f;
--teal: #2dd4bf;
--gold: #fbbf24;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Syne', 'Helvetica Neue', sans-serif;
}
.ta-10__stage { text-align: center; }
.ta-10__label {
font-size: 0.72rem;
color: #1f4040;
letter-spacing: 0.15em;
text-transform: uppercase;
margin-bottom: 0.5rem;
}
.ta-10__scene {
perspective: 600px;
display: inline-block;
height: clamp(3rem, 9vw, 5.5rem);
overflow: visible;
}
.ta-10__flipper {
position: relative;
transform-style: preserve-3d;
animation: ta-10-flip 4s ease-in-out infinite;
height: 100%;
display: flex;
align-items: center;
}
.ta-10__face {
font-size: clamp(2.5rem, 8vw, 5rem);
font-weight: 900;
position: absolute;
width: 100%;
text-align: center;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
letter-spacing: -0.02em;
white-space: nowrap;
}
.ta-10__face--front { color: var(--teal); }
.ta-10__face--back { color: var(--gold); transform: rotateY(180deg); }
.ta-10__sub {
font-size: 0.65rem;
color: #1a3030;
margin-top: 1rem;
letter-spacing: 0.08em;
font-family: 'Courier New', monospace;
}
@keyframes ta-10-flip {
0% { transform: rotateY(0deg); }
35% { transform: rotateY(0deg); }
50% { transform: rotateY(-180deg); }
85% { transform: rotateY(-180deg); }
100% { transform: rotateY(-360deg); }
}
@media (prefers-reduced-motion: reduce) {
.ta-10__flipper { animation: none; }
.ta-10__face--back { display: none; }
}
```
### 11. CSS Text Stroke Draw Animation
**Type:** Pure CSS
**Description:** SVG stroke-dashoffset animation draws each letter outline progressively as if a pen is writing the text in real time.
**HTML:**
```html
DRAW
SVG stroke-dashoffset · path length animation
```
**CSS:**
```css
.ta-11, .ta-11 *, .ta-11 *::before, .ta-11 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-11 ::selection { background: #7c3aed; color: #fff; }
.ta-11 {
--bg: #08050f;
--stroke: #a78bfa;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Syne', sans-serif;
}
.ta-11__stage { text-align: center; width: 100%; max-width: 420px; }
.ta-11__svg {
width: 100%;
overflow: visible;
}
.ta-11__text {
font-family: 'Syne', 'Helvetica Neue', sans-serif;
font-size: 88px;
font-weight: 900;
fill: transparent;
stroke: var(--stroke);
stroke-width: 1.8;
stroke-dasharray: 1200;
stroke-dashoffset: 1200;
letter-spacing: 6px;
animation:
ta-11-draw 2.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards,
ta-11-fill 0.6s ease 2.4s forwards;
}
@keyframes ta-11-draw {
to { stroke-dashoffset: 0; }
}
@keyframes ta-11-fill {
to { fill: rgba(167, 139, 250, 0.15); }
}
.ta-11__sub {
font-size: 0.65rem;
color: #2d1a4a;
margin-top: 0.75rem;
letter-spacing: 0.1em;
font-family: 'Courier New', monospace;
}
@media (prefers-reduced-motion: reduce) {
.ta-11__text {
animation: none;
stroke-dashoffset: 0;
fill: rgba(167, 139, 250, 0.15);
}
}
```
### 12. CSS Bouncing Letters Animation
**Type:** Pure CSS
**Description:** Individual letters bounce with elastic spring physics using cubic-bezier overshoot easing and staggered delays for a playful, energetic effect.
**HTML:**
```html
```
**CSS:**
```css
.ta-12, .ta-12 *, .ta-12 *::before, .ta-12 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-12 ::selection { background: #f59e0b; color: #fff; }
.ta-12 {
--bg: linear-gradient(160deg, #1a0a2e, #0d1117);
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Syne', 'Helvetica Neue', sans-serif;
}
.ta-12__stage { text-align: center; }
.ta-12__text {
font-size: clamp(3rem, 9vw, 5.5rem);
font-weight: 900;
letter-spacing: 0.05em;
display: flex;
justify-content: center;
}
.ta-12__text span {
display: inline-block;
color: #fbbf24;
animation: ta-12-bounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) infinite alternate;
animation-delay: calc(var(--i) * 0.09s);
text-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}
.ta-12__text span:nth-child(even) { color: #f43f5e; text-shadow: 0 6px 20px rgba(244, 63, 94, 0.4); }
@keyframes ta-12-bounce {
0% {
transform: translateY(0) scaleX(1) scaleY(1);
}
60% {
transform: translateY(-28px) scaleX(0.9) scaleY(1.1);
}
80% {
transform: translateY(-22px) scaleX(0.95) scaleY(1.05);
}
100% {
transform: translateY(-28px) scaleX(0.9) scaleY(1.1);
}
}
@media (prefers-reduced-motion: reduce) {
.ta-12__text span { animation: none; transform: none; }
}
```
### 13. CSS Blur Reveal Text Animation
**Type:** Pure CSS
**Description:** Text materialises from a hazy blur using filter:blur() transitioning to sharp focus — an atmospheric entrance effect for editorial headlines.
**HTML:**
```html
Clarity
emerges
from
chaos.
```
**CSS:**
```css
.ta-13, .ta-13 *, .ta-13 *::before, .ta-13 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-13 ::selection { background: #1e40af; color: #dbeafe; }
.ta-13 {
--bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Playfair Display', Georgia, serif;
}
.ta-13__stage {
display: flex;
flex-wrap: wrap;
gap: 0.4em;
justify-content: center;
align-items: baseline;
}
.ta-13__stage { max-width: 90%; }
.ta-13__word {
font-size: clamp(1.4rem, 3.6vw, 2.6rem);
font-weight: 700;
color: #e0e7ff;
opacity: 0;
filter: blur(18px);
transform: scale(1.05);
animation: ta-13-focus 1s ease-out forwards;
}
.ta-13__word--1 { animation-delay: 0.1s; }
.ta-13__word--2 { animation-delay: 0.45s; color: #818cf8; font-style: italic; font-weight: 400; }
.ta-13__word--3 { animation-delay: 0.8s; }
.ta-13__word--4 { animation-delay: 1.15s; color: #c7d2fe; }
@keyframes ta-13-focus {
to {
opacity: 1;
filter: blur(0);
transform: scale(1);
}
}
@media (prefers-reduced-motion: reduce) {
.ta-13__word { animation: none; opacity: 1; filter: none; transform: none; }
}
```
### 14. CSS Perspective Text Rotation Animation
**Type:** Pure CSS
**Description:** Text rotates continuously around its X-axis in 3D perspective space, creating a rolling barrel or tumbling-through-space headline effect.
**HTML:**
```html
Into the
VOID
perspective · rotateX · 3D depth
```
**CSS:**
```css
.ta-14, .ta-14 *, .ta-14 *::before, .ta-14 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-14 ::selection { background: #4f46e5; color: #fff; }
.ta-14 {
--bg: radial-gradient(ellipse at center, #0d0d2e 0%, #050510 100%);
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Syne', 'Helvetica Neue', sans-serif;
overflow: hidden;
}
.ta-14__stage { text-align: center; }
.ta-14__eyebrow {
font-size: 0.72rem;
color: #3730a3;
letter-spacing: 0.3em;
text-transform: uppercase;
margin-bottom: 0.3rem;
}
.ta-14__scene {
perspective: 400px;
display: inline-block;
}
.ta-14__text {
font-size: clamp(3.5rem, 10vw, 6rem);
font-weight: 900;
letter-spacing: 0.1em;
background-image: linear-gradient(0deg, #4f46e5, #a78bfa, #c4b5fd, #e0e7ff, #a78bfa, #4f46e5);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: ta-14-spin 6s linear infinite;
transform-origin: center center;
display: block;
}
@keyframes ta-14-spin {
from { transform: rotateX(0deg); }
to { transform: rotateX(360deg); }
}
.ta-14__sub {
font-size: 0.65rem;
color: #1e1b4b;
margin-top: 1rem;
letter-spacing: 0.1em;
font-family: 'Courier New', monospace;
}
@media (prefers-reduced-motion: reduce) {
.ta-14__text { animation: none; transform: rotateX(0deg); color: #a78bfa; }
}
```
### 15. CSS Text Shadow Pulse Animation
**Type:** Pure CSS
**Description:** A rhythmic pulsing text-shadow corona breathes in and out around text using multi-layer shadow animation — a hypnotic, ambient display effect.
**HTML:**
```html
PULSE
text-shadow multi-layer · ease-in-out pulse
```
**CSS:**
```css
.ta-15, .ta-15 *, .ta-15 *::before, .ta-15 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-15 ::selection { background: #0891b2; color: #fff; }
.ta-15 {
--bg: #020d12;
--core: #67e8f9;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Orbitron', 'Courier New', monospace;
}
.ta-15__stage { text-align: center; }
.ta-15__text {
font-size: clamp(3rem, 10vw, 6rem);
font-weight: 900;
letter-spacing: 0.2em;
color: var(--core);
animation: ta-15-pulse 2s ease-in-out infinite alternate;
}
.ta-15__sub {
font-size: 0.65rem;
color: #0c3040;
margin-top: 1rem;
letter-spacing: 0.1em;
font-family: 'Courier New', monospace;
}
@keyframes ta-15-pulse {
0% {
text-shadow:
0 0 2px var(--core),
0 0 4px var(--core),
0 0 6px #0891b2;
}
100% {
text-shadow:
0 0 8px #fff,
0 0 20px var(--core),
0 0 40px var(--core),
0 0 80px #0891b2,
0 0 120px #0c4a6e;
}
}
@media (prefers-reduced-motion: reduce) {
.ta-15__text {
animation: none;
text-shadow: 0 0 10px var(--core), 0 0 30px #0891b2;
}
}
```
### 16. CSS Morphing Text Animation
**Type:** CSS + JS
**Description:** Two text strings dissolve into each other with a blurred crossfade using CSS filter and opacity — JavaScript cycles through a word list on a timer.
**HTML:**
```html
We build
Experiences
Products
filter:blur crossfade · JS word cycling
```
**CSS:**
```css
.ta-16, .ta-16 *, .ta-16 *::before, .ta-16 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-16 ::selection { background: #db2777; color: #fff; }
.ta-16 {
--bg: #0a0015;
--pink: #f472b6;
--purple: #a855f7;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Syne', 'Helvetica Neue', sans-serif;
}
.ta-16__stage { text-align: center; }
.ta-16__label {
font-size: 0.78rem;
color: #6b21a8;
letter-spacing: 0.2em;
text-transform: uppercase;
margin-bottom: 0.3rem;
}
.ta-16__morph-wrap {
position: relative;
height: clamp(3.5rem, 9vw, 6rem);
display: flex;
align-items: center;
justify-content: center;
}
.ta-16__word {
position: absolute;
font-size: clamp(2.2rem, 7vw, 4.5rem);
font-weight: 900;
white-space: nowrap;
transition: opacity 0.6s ease, filter 0.6s ease;
}
.ta-16__word--a {
background: linear-gradient(90deg, var(--pink), var(--purple));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.ta-16__word--b {
background: linear-gradient(90deg, var(--purple), #60a5fa);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
opacity: 0;
filter: blur(12px);
}
.ta-16__word.ta-16--out {
opacity: 0;
filter: blur(16px);
}
.ta-16__word.ta-16--in {
opacity: 1;
filter: blur(0);
}
.ta-16__sub {
font-size: 0.65rem;
color: #2d0a40;
margin-top: 0.8rem;
letter-spacing: 0.1em;
font-family: 'Courier New', monospace;
}
@media (prefers-reduced-motion: reduce) {
.ta-16__word { transition: none; filter: none; }
}
```
**JS:**
```js
(function() {
const words = ['Experiences', 'Products', 'Futures', 'Stories', 'Journeys'];
const elA = document.getElementById('ta-16-a');
const elB = document.getElementById('ta-16-b');
if (!elA || !elB) return;
let idx = 0;
let showingA = true;
function morph() {
idx = (idx + 1) % words.length;
const incoming = showingA ? elB : elA;
const outgoing = showingA ? elA : elB;
incoming.textContent = words[idx];
outgoing.classList.add('ta-16--out');
outgoing.classList.remove('ta-16--in');
incoming.classList.add('ta-16--in');
incoming.classList.remove('ta-16--out');
incoming.style.opacity = '1';
incoming.style.filter = 'blur(0)';
outgoing.style.opacity = '0';
outgoing.style.filter = 'blur(16px)';
showingA = !showingA;
}
setInterval(morph, 2400);
})();
```
### 17. CSS Liquid Fill Text Animation
**Type:** Pure CSS
**Description:** Text appears to fill with liquid from bottom to top using a moving gradient mask and clip-path — a striking progress-indicator text technique.
**HTML:**
```html
FILL
FILL
clip-path inset · -webkit-text-stroke · liquid rise
```
**CSS:**
```css
.ta-17, .ta-17 *, .ta-17 *::before, .ta-17 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-17 ::selection { background: #0369a1; color: #e0f2fe; }
.ta-17 {
--bg: #020c18;
--water: #0ea5e9;
--deep: #0369a1;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Syne', 'Helvetica Neue', sans-serif;
}
.ta-17__stage { text-align: center; }
.ta-17__container {
position: relative;
display: inline-block;
line-height: 1;
}
.ta-17__outline,
.ta-17__liquid {
font-size: clamp(4rem, 14vw, 8rem);
font-weight: 900;
letter-spacing: 0.08em;
margin: 0;
line-height: 1;
}
.ta-17__outline {
-webkit-text-stroke: 2px rgba(14, 165, 233, 0.35);
color: transparent;
}
.ta-17__liquid {
position: absolute;
top: 0; left: 0;
background: linear-gradient(to top, var(--deep) 0%, var(--water) 60%, #7dd3fc 100%);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
clip-path: inset(100% 0 0 0);
animation: ta-17-rise 2.4s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}
@keyframes ta-17-rise {
to { clip-path: inset(0% 0 0 0); }
}
.ta-17__sub {
font-size: 0.65rem;
color: #0c2a40;
margin-top: 0.6rem;
letter-spacing: 0.1em;
font-family: 'Courier New', monospace;
}
@media (prefers-reduced-motion: reduce) {
.ta-17__liquid { animation: none; clip-path: inset(0% 0 0 0); }
}
```
### 18. CSS Word Scramble Animation
**Type:** CSS + JS
**Description:** Characters rapidly cycle through random glyphs before locking into the final letter — a hacker/terminal decryption effect powered by JavaScript.
**HTML:**
```html
Decrypting
JS character cycling · random glyph pool · staggered resolve
```
**CSS:**
```css
.ta-18, .ta-18 *, .ta-18 *::before, .ta-18 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-18 ::selection { background: #065f46; color: #d1fae5; }
.ta-18 {
--bg: #030d06;
--green: #4ade80;
--dim: #166534;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'JetBrains Mono', 'Courier New', monospace;
}
.ta-18__stage { text-align: center; }
.ta-18__label {
font-size: 0.68rem;
letter-spacing: 0.25em;
text-transform: uppercase;
color: var(--dim);
margin-bottom: 0.5rem;
}
.ta-18__text {
font-size: clamp(1.8rem, 5.5vw, 3.2rem);
font-weight: 700;
letter-spacing: 0.1em;
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 0.05em;
min-height: 1.2em;
}
.ta-18__char {
display: inline-block;
color: var(--dim);
transition: color 0.1s;
}
.ta-18__char.resolved {
color: var(--green);
text-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}
.ta-18__sub {
font-size: 0.65rem;
color: #052010;
margin-top: 0.8rem;
letter-spacing: 0.08em;
}
@media (prefers-reduced-motion: reduce) {
.ta-18__char { transition: none; }
}
```
**JS:**
```js
(function() {
const el = document.getElementById('ta-18-text');
if (!el) return;
const finalText = 'ACCESS GRANTED';
const chars = '!@#$%^&*<>?/|\\[]{}ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
const resolveDelay = 6;
function scramble() {
el.innerHTML = '';
const spans = [];
[...finalText].forEach((ch) => {
const span = document.createElement('span');
span.className = 'ta-18__char';
span.textContent = ch === ' ' ? ' ' : chars[Math.floor(Math.random() * chars.length)];
el.appendChild(span);
spans.push({ el: span, final: ch, cycles: 0, resolved: false });
});
let tick = 0;
const id = setInterval(() => {
tick++;
let allDone = true;
spans.forEach((s, i) => {
if (s.resolved) return;
if (tick >= resolveDelay + i * 3) {
s.el.textContent = s.final === ' ' ? ' ' : s.final;
s.el.classList.add('resolved');
s.resolved = true;
} else {
s.el.textContent = s.final === ' ' ? ' ' : chars[Math.floor(Math.random() * chars.length)];
allDone = false;
}
});
if (allDone) {
clearInterval(id);
setTimeout(scramble, 2200);
}
}, 65);
}
scramble();
})();
```
### 19. CSS Split Text Explosion Animation
**Type:** CSS + JS
**Description:** Letters fly in from random off-screen positions and converge to form a word — a dramatic entrance with JS-randomised transform origins.
**HTML:**
```html
```
**CSS:**
```css
.ta-19, .ta-19 *, .ta-19 *::before, .ta-19 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-19 ::selection { background: #9f1239; color: #fff; }
.ta-19 {
--bg: radial-gradient(ellipse at 50% 60%, #1c0020, #050008);
min-height: 100vh;
background: var(--bg);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1.5rem;
padding: 2rem;
font-family: 'Syne', 'Helvetica Neue', sans-serif;
overflow: hidden;
}
.ta-19__text {
font-size: clamp(3rem, 10vw, 6rem);
font-weight: 900;
letter-spacing: 0.08em;
display: flex;
justify-content: center;
gap: 0.02em;
}
.ta-19__char {
display: inline-block;
background: linear-gradient(135deg, #f43f5e, #fb923c);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
opacity: 0;
animation: ta-19-fly 0.75s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}
@keyframes ta-19-fly {
from {
opacity: 0;
transform: translate(var(--tx, 0px), var(--ty, -60px)) rotate(var(--r, 0deg));
}
to {
opacity: 1;
transform: translate(0, 0) rotate(0deg);
}
}
.ta-19__btn {
font-family: inherit;
font-size: 0.72rem;
letter-spacing: 0.12em;
text-transform: uppercase;
background: none;
border: 1px solid #4a0a20;
color: #9f1239;
padding: 0.4rem 1rem;
border-radius: 4px;
cursor: pointer;
transition: border-color 0.2s, color 0.2s;
}
.ta-19__btn:hover { border-color: #f43f5e; color: #f43f5e; }
@media (prefers-reduced-motion: reduce) {
.ta-19__char { animation: none; opacity: 1; transform: none; }
}
```
**JS:**
```js
(function() {
const wrap = document.getElementById('ta-19-text');
const btn = document.getElementById('ta-19-replay');
if (!wrap) return;
function explode() {
const word = wrap.getAttribute('aria-label') || wrap.textContent;
wrap.innerHTML = '';
[...word].forEach((ch, i) => {
const span = document.createElement('span');
span.className = 'ta-19__char';
span.textContent = ch;
const angle = Math.random() * Math.PI * 2;
const dist = 120 + Math.random() * 180;
span.style.setProperty('--tx', Math.cos(angle) * dist + 'px');
span.style.setProperty('--ty', Math.sin(angle) * dist + 'px');
span.style.setProperty('--r', (Math.random() * 60 - 30) + 'deg');
span.style.animationDelay = (i * 0.06) + 's';
wrap.appendChild(span);
});
}
explode();
if (btn) btn.addEventListener('click', explode);
})();
```
### 20. CSS Holographic Text Animation
**Type:** Pure CSS
**Description:** A rotating hue-shift conic gradient combined with animated background-position creates a holographic foil shimmer on display text.
**HTML:**
```html
HOLO
conic-gradient · background-clip: text · hue rotation
```
**CSS:**
```css
.ta-20, .ta-20 *, .ta-20 *::before, .ta-20 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-20 ::selection { background: rgba(255,255,255,0.3); color: #000; }
.ta-20 {
--bg: #080808;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Syne', 'Helvetica Neue', sans-serif;
}
.ta-20__stage { text-align: center; }
.ta-20__title {
font-size: clamp(4rem, 14vw, 9rem);
font-weight: 900;
letter-spacing: 0.08em;
background-image: conic-gradient(
from 0deg,
hsl(0,100%,65%),
hsl(60,100%,65%),
hsl(120,100%,65%),
hsl(180,100%,65%),
hsl(240,100%,65%),
hsl(300,100%,65%),
hsl(360,100%,65%)
);
background-size: 200% 200%;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
background-origin: padding-box;
animation:
ta-20-holo 3s linear infinite,
ta-20-drift 7s ease-in-out infinite alternate;
filter: saturate(1.3) contrast(1.1);
}
@keyframes ta-20-holo {
from { background-position: 0% 50%; }
to { background-position: 100% 50%; }
}
@keyframes ta-20-drift {
from { background-position-y: 20%; }
to { background-position-y: 80%; }
}
.ta-20__sub {
font-size: 0.65rem;
color: #222;
margin-top: 0.8rem;
letter-spacing: 0.1em;
font-family: 'Courier New', monospace;
}
@media (prefers-reduced-motion: reduce) {
.ta-20__title { animation: none; background-position: 50% 50%; }
}
```
### 21. CSS Text Decryption Animation
**Type:** CSS + JS
**Description:** A sophisticated matrix-style decryption where columns of binary rain resolve into readable text — more structured than scramble, more cinematic than typewriter.
**HTML:**
```html
System Boot
binary rain columns · staggered column resolve · JS timer
```
**CSS:**
```css
.ta-21, .ta-21 *, .ta-21 *::before, .ta-21 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-21 ::selection { background: #14532d; color: #bbf7d0; }
.ta-21 {
--bg: #010a04;
--rain: #15803d;
--bright: #4ade80;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'JetBrains Mono', 'Courier New', monospace;
}
.ta-21__stage { text-align: center; width: 100%; }
.ta-21__label {
font-size: 0.68rem;
color: var(--rain);
letter-spacing: 0.25em;
text-transform: uppercase;
margin-bottom: 0.6rem;
}
.ta-21__output {
font-size: clamp(1.6rem, 5vw, 2.8rem);
font-weight: 700;
letter-spacing: 0.15em;
display: flex;
justify-content: center;
gap: 0.05em;
min-height: 1.2em;
}
.ta-21__col {
display: inline-flex;
flex-direction: column;
align-items: center;
position: relative;
}
.ta-21__char {
display: inline-block;
color: var(--rain);
animation: ta-21-rain 0.08s linear infinite;
opacity: 0.7;
}
.ta-21__char.decoded {
color: var(--bright);
animation: ta-21-flash 0.3s ease-out forwards;
text-shadow: 0 0 12px var(--bright), 0 0 30px rgba(74,222,128,0.4);
}
.ta-21__sub {
font-size: 0.65rem;
color: #052010;
margin-top: 0.8rem;
letter-spacing: 0.08em;
}
@keyframes ta-21-rain {
0% { opacity: 0.4; }
50% { opacity: 1; }
100% { opacity: 0.4; }
}
@keyframes ta-21-flash {
0% { opacity: 0; transform: scaleY(1.3); }
60% { opacity: 1; transform: scaleY(1); }
100% { opacity: 1; transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
.ta-21__column, .ta-21__char { animation: none !important; transition: none; }
}
```
**JS:**
```js
(function() {
const el = document.getElementById('ta-21-output');
if (!el) return;
const finalText = 'CLASSIFIED DATA';
const bits = '01';
const columnDelay = 180;
function decode() {
el.innerHTML = '';
const intervals = [];
[...finalText].forEach((ch, i) => {
const charEl = document.createElement('span');
charEl.className = 'ta-21__char';
charEl.textContent = ch === ' ' ? ' ' : bits[Math.floor(Math.random() * 2)];
el.appendChild(charEl);
if (ch === ' ') return;
const iv = setInterval(() => {
charEl.textContent = bits[Math.floor(Math.random() * 2)];
}, 80);
intervals.push(iv);
setTimeout(() => {
clearInterval(iv);
charEl.textContent = ch;
charEl.classList.add('decoded');
}, 500 + i * columnDelay);
});
setTimeout(() => {
intervals.forEach(clearInterval);
setTimeout(decode, 2800);
}, 500 + finalText.length * columnDelay + 400);
}
decode();
})();
```
### 22. CSS Elastic Bounce Text Animation
**Type:** CSS + JS
**Description:** A headline drops in with exaggerated squash-and-stretch physics — JavaScript assigns custom spring parameters per letter for natural variance.
**HTML:**
```html
```
**CSS:**
```css
.ta-22, .ta-22 *, .ta-22 *::before, .ta-22 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-22 ::selection { background: #b45309; color: #fff; }
.ta-22 {
--bg: linear-gradient(180deg, #0f0a00, #1a0f00);
min-height: 100vh;
background: var(--bg);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1.5rem;
padding: 2rem;
font-family: 'Syne', 'Helvetica Neue', sans-serif;
overflow: hidden;
}
.ta-22__text {
font-size: clamp(3rem, 10vw, 6rem);
font-weight: 900;
letter-spacing: 0.05em;
display: flex;
justify-content: center;
}
.ta-22__char {
display: inline-block;
color: #fbbf24;
text-shadow: 0 4px 16px rgba(251,191,36,0.35);
opacity: 0;
animation: ta-22-drop 0.9s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
animation-delay: var(--delay, 0s);
transform-origin: center bottom;
}
@keyframes ta-22-drop {
0% { opacity: 1; transform: translateY(var(--fall, -80px)) scaleX(1) scaleY(1); }
55% { transform: translateY(0) scaleX(1.25) scaleY(0.72); }
70% { transform: translateY(-18px) scaleX(0.92) scaleY(1.1); }
83% { transform: translateY(0) scaleX(1.1) scaleY(0.9); }
92% { transform: translateY(-6px) scaleX(0.97) scaleY(1.04); }
100% { opacity: 1; transform: translateY(0) scaleX(1) scaleY(1); }
}
.ta-22__btn {
font-family: inherit;
font-size: 0.72rem;
letter-spacing: 0.12em;
text-transform: uppercase;
background: none;
border: 1px solid #451a03;
color: #92400e;
padding: 0.4rem 1rem;
border-radius: 4px;
cursor: pointer;
transition: border-color 0.2s, color 0.2s;
}
.ta-22__btn:hover { border-color: #fbbf24; color: #fbbf24; }
@media (prefers-reduced-motion: reduce) {
.ta-22__char { animation: none; opacity: 1; transform: none; }
}
```
**JS:**
```js
(function() {
const wrap = document.getElementById('ta-22-text');
const btn = document.getElementById('ta-22-replay');
if (!wrap) return;
const word = wrap.getAttribute('aria-label') || 'BOUNCE';
function build() {
wrap.innerHTML = '';
[...word].forEach((ch, i) => {
const span = document.createElement('span');
span.className = 'ta-22__char';
span.textContent = ch;
const fall = -(60 + Math.random() * 80);
const delay = i * 0.07 + Math.random() * 0.04;
span.style.setProperty('--fall', fall + 'px');
span.style.setProperty('--delay', delay + 's');
wrap.appendChild(span);
});
}
function replay() {
wrap.querySelectorAll('.ta-22__char').forEach(s => {
s.style.animation = 'none';
void s.offsetWidth;
s.style.animation = '';
});
build();
}
build();
if (btn) btn.addEventListener('click', replay);
})();
```
### 23. CSS Cursor Typewriter Blink Animation
**Type:** CSS + JS
**Description:** A JavaScript-driven typewriter that cycles through multiple phrases with cursor blink, delete speed, and per-phrase pause — a classic hero animation.
**HTML:**
```html
```
**CSS:**
```css
.ta-23, .ta-23 *, .ta-23 *::before, .ta-23 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-23 ::selection { background: #7c3aed; color: #fff; }
.ta-23 {
--bg: #f5f3ff;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
}
.ta-23__stage { text-align: left; }
.ta-23__prefix {
font-size: clamp(0.9rem, 2.5vw, 1.2rem);
color: #a78bfa;
font-weight: 600;
letter-spacing: 0.05em;
margin-bottom: 0.2rem;
}
.ta-23__line {
display: flex;
align-items: center;
min-height: 1.2em;
}
.ta-23__typed {
font-size: clamp(2rem, 6vw, 3.8rem);
font-weight: 800;
color: #1e1b4b;
white-space: nowrap;
}
.ta-23__cursor {
font-size: clamp(2rem, 6vw, 3.8rem);
font-weight: 400;
color: #7c3aed;
animation: ta-23-blink 0.85s steps(1) infinite;
margin-left: 2px;
line-height: 1;
}
.ta-23__cursor.typing {
animation-play-state: paused;
}
@keyframes ta-23-blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
.ta-23__cursor { animation: none; opacity: 1; }
}
```
**JS:**
```js
(function() {
const typedEl = document.getElementById('ta-23-typed');
const cursorEl = document.getElementById('ta-23-cursor');
if (!typedEl || !cursorEl) return;
const phrases = ['Experiences', 'Systems', 'Interfaces', 'Futures', 'Stories'];
const typeSpeed = 75;
const deleteSpeed = 38;
const pauseDuration = 1600;
let phraseIdx = 0;
let charIdx = 0;
let deleting = false;
function tick() {
const current = phrases[phraseIdx];
if (!deleting) {
charIdx++;
typedEl.textContent = current.slice(0, charIdx);
cursorEl.classList.add('typing');
if (charIdx === current.length) {
cursorEl.classList.remove('typing');
setTimeout(() => { deleting = true; tick(); }, pauseDuration);
return;
}
setTimeout(tick, typeSpeed);
} else {
charIdx--;
typedEl.textContent = current.slice(0, charIdx);
cursorEl.classList.add('typing');
if (charIdx === 0) {
cursorEl.classList.remove('typing');
deleting = false;
phraseIdx = (phraseIdx + 1) % phrases.length;
setTimeout(tick, 300);
return;
}
setTimeout(tick, deleteSpeed);
}
}
tick();
})();
```
### 24. CSS Mask Wipe Text Reveal Animation
**Type:** CSS + JS
**Description:** A sharp-edged mask wipes across text to reveal it — using CSS mask-image with a gradient that hard-transitions at a moving boundary.
**HTML:**
```html
Revealing
The Future
Is Now
↺ Replay wipe
```
**CSS:**
```css
.ta-24, .ta-24 *, .ta-24 *::before, .ta-24 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-24 ::selection { background: #0f766e; color: #fff; }
.ta-24 {
--bg: #030d0b;
--teal: #2dd4bf;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Syne', 'Helvetica Neue', sans-serif;
}
.ta-24__stage { text-align: left; }
.ta-24__eyebrow {
font-size: 0.7rem;
color: #134e4a;
letter-spacing: 0.25em;
text-transform: uppercase;
margin-bottom: 0.4rem;
}
.ta-24__title {
font-size: clamp(2.2rem, 7vw, 4.5rem);
font-weight: 900;
letter-spacing: -0.02em;
color: var(--teal);
line-height: 1.05;
-webkit-mask-image: linear-gradient(to right, #000 50%, transparent 50%);
mask-image: linear-gradient(to right, #000 50%, transparent 50%);
-webkit-mask-size: 200% 100%;
mask-size: 200% 100%;
-webkit-mask-position: -100% 0;
mask-position: -100% 0;
}
.ta-24__title--2 {
color: #e2e8f0;
-webkit-mask-position: -100% 0;
mask-position: -100% 0;
}
.ta-24__title.wipe-in {
animation: ta-24-wipe 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.ta-24__title--2.wipe-in {
animation: ta-24-wipe 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.25s forwards;
}
@keyframes ta-24-wipe {
from { -webkit-mask-position: -100% 0; mask-position: -100% 0; }
to { -webkit-mask-position: 0% 0; mask-position: 0% 0; }
}
.ta-24__btn {
margin-top: 1.2rem;
display: block;
font-family: inherit;
font-size: 0.72rem;
letter-spacing: 0.12em;
text-transform: uppercase;
background: none;
border: 1px solid #134e4a;
color: #0f766e;
padding: 0.4rem 1rem;
border-radius: 4px;
cursor: pointer;
transition: border-color 0.2s, color 0.2s;
}
.ta-24__btn:hover { border-color: #2dd4bf; color: #2dd4bf; }
@media (prefers-reduced-motion: reduce) {
.ta-24__title { -webkit-mask-image: none; mask-image: none; animation: none !important; }
}
```
**JS:**
```js
(function() {
const t1 = document.getElementById('ta-24-title');
const t2 = document.getElementById('ta-24-title2');
const btn = document.getElementById('ta-24-replay');
if (!t1 || !t2) return;
function play() {
[t1, t2].forEach(el => {
el.classList.remove('wipe-in');
void el.offsetWidth;
el.classList.add('wipe-in');
});
}
play();
if (btn) btn.addEventListener('click', play);
})();
```
### 25. CSS Kinetic Typography Animation
**Type:** CSS + JS
**Description:** Words animate as independent kinetic objects — each with unique scale, rotation, and velocity — echoing the motion graphics discipline of kinetic type design.
**HTML:**
```html
JS kinetic entry · micro-oscillation · per-word custom properties
```
**CSS:**
```css
.ta-25, .ta-25 *, .ta-25 *::before, .ta-25 *::after {
margin: 0; padding: 0; box-sizing: border-box;
}
.ta-25 ::selection { background: #4f46e5; color: #fff; }
.ta-25 {
--bg: #f8fafc;
min-height: 100vh;
background: var(--bg);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
font-family: 'Syne', 'Helvetica Neue', sans-serif;
overflow: hidden;
}
.ta-25__stage { text-align: center; width: 100%; }
.ta-25__word-wrap {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: 0.2em 0.35em;
min-height: 80px;
}
.ta-25__word {
display: inline-block;
font-size: clamp(1.8rem, 6vw, 4rem);
font-weight: 900;
letter-spacing: -0.02em;
color: #1e1b4b;
opacity: 0;
animation:
ta-25-enter 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards,
ta-25-float var(--float-dur, 4s) ease-in-out var(--float-delay, 0s) infinite alternate;
animation-delay: var(--delay, 0s), calc(var(--delay, 0s) + 0.85s);
}
.ta-25__word:nth-child(even) { color: #4f46e5; }
.ta-25__word:nth-child(3n) { color: #7c3aed; }
@keyframes ta-25-enter {
from {
opacity: 0;
transform:
translate(var(--sx, 0px), var(--sy, -40px))
rotate(var(--sr, 0deg))
scale(var(--ss, 0.8));
}
to {
opacity: 1;
transform: translate(0, 0) rotate(0deg) scale(1);
}
}
@keyframes ta-25-float {
from { transform: translateY(0) rotate(0deg); }
to { transform: translateY(var(--fy, -6px)) rotate(var(--fr, 1deg)); }
}
.ta-25__sub {
font-size: 0.65rem;
color: #94a3b8;
margin-top: 1rem;
letter-spacing: 0.1em;
font-family: 'Courier New', monospace;
}
@media (prefers-reduced-motion: reduce) {
.ta-25__word { animation: none !important; opacity: 1; transform: none; }
}
```
**JS:**
```js
(function() {
const wrap = document.getElementById('ta-25-wrap');
if (!wrap) return;
const text = wrap.getAttribute('aria-label') || 'Design that Moves';
const words = text.split(' ');
words.forEach((word, i) => {
const el = document.createElement('span');
el.className = 'ta-25__word';
el.textContent = word;
const angle = Math.random() * Math.PI * 2;
const dist = 80 + Math.random() * 120;
el.style.setProperty('--sx', Math.cos(angle) * dist + 'px');
el.style.setProperty('--sy', Math.sin(angle) * dist + 'px');
el.style.setProperty('--sr', (Math.random() * 40 - 20) + 'deg');
el.style.setProperty('--ss', (0.6 + Math.random() * 0.4).toFixed(2));
el.style.setProperty('--delay', (i * 0.1 + Math.random() * 0.05) + 's');
el.style.setProperty('--float-dur', (3 + Math.random() * 2).toFixed(1) + 's');
el.style.setProperty('--float-delay', (Math.random() * 1.5).toFixed(2) + 's');
el.style.setProperty('--fy', (-(4 + Math.random() * 6)).toFixed(1) + 'px');
el.style.setProperty('--fr', ((Math.random() * 2 - 1) * 1.5).toFixed(2) + 'deg');
wrap.appendChild(el);
});
})();
```
---
## 20 CSS Text Gradient Effects
URL: https://codefronts.com/motion/css-text-gradient-effect/
Description: 20 hand-coded CSS text gradient effects with live demos — hero title, Web3 neon glow, corporate logo, bold minimalist, hover transition, gradient button, active nav link, animated moving gradient, cyberpunk neon, metallic gold, glassmorphism contrast, pastel soft, vertical gradient, radial gradient, rainbow multi-colour, text stroke outline, @supports fallback pattern, Tailwind utility recipe, multiline paragraph, and dark-mode vs light-mode gradient swap via light-dark(). 18 pure CSS + 2 with a tiny vanilla JS snippet — no framework. Modern @property + animation-timeline + light-dark() techniques, prefers-reduced-motion honoured, WCAG 2.2 AA compliant, MIT licensed.
Demo count: 20
### 01. CSS Text Gradient Landing Page Hero Title
**Type:** Pure CSS
**Description:** A sophisticated dark-mode hero section demonstrating the core background-clip text gradient technique for high-impact H1 headlines.
**HTML:**
```html
NOW AVAILABLE
Build ProductsUsers Love
Design systems, prototypes, and production-grade components—all in one collaborative workspace.
Start for free
View demo →
50K+ Developers
4.9★ Rating
99.9% Uptime
```
**CSS:**
```css
.tg-01, .tg-01 *, .tg-01 *::before, .tg-01 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-01 ::selection { background:#6c3fe4; color:#fff; }
.tg-01 {
--g-from: #a855f7;
--g-via: #6366f1;
--g-to: #06b6d4;
--bg: #080b14;
--text: #e2e8f0;
--muted: #94a3b8;
--border: rgba(255,255,255,.08);
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 24px;
}
.tg-01__hero {
max-width: 680px;
text-align: center;
}
.tg-01__badge {
display: inline-block;
font-size: 11px;
font-weight: 700;
letter-spacing: .12em;
color: var(--g-from);
border: 1px solid rgba(168,85,247,.35);
background: rgba(168,85,247,.08);
border-radius: 99px;
padding: 4px 14px;
margin-bottom: 24px;
}
.tg-01__title {
font-size: clamp(2.4rem, 6vw, 4rem);
font-weight: 800;
line-height: 1.1;
color: var(--text);
margin-bottom: 20px;
letter-spacing: -.03em;
}
/* The gradient text technique: background-clip + transparent text */
.tg-01__grad {
background: linear-gradient(135deg, var(--g-from) 0%, var(--g-via) 50%, var(--g-to) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
.tg-01__sub {
font-size: 1.0625rem;
color: var(--muted);
line-height: 1.7;
max-width: 520px;
margin: 0 auto 32px;
}
.tg-01__cta-row {
display: flex;
gap: 12px;
justify-content: center;
flex-wrap: wrap;
margin-bottom: 40px;
}
.tg-01__btn {
cursor: pointer;
font-size: .9375rem;
font-weight: 600;
border-radius: 8px;
padding: 12px 28px;
border: none;
transition: opacity .2s, transform .15s;
}
.tg-01__btn:hover { opacity:.85; transform: translateY(-1px); }
.tg-01__btn--primary {
background: linear-gradient(135deg, var(--g-from), var(--g-via));
color: #fff;
}
.tg-01__btn--ghost {
background: transparent;
border: 1px solid var(--border);
color: var(--text);
}
.tg-01__stats {
display: flex;
gap: 40px;
justify-content: center;
border-top: 1px solid var(--border);
padding-top: 28px;
}
.tg-01__stat { display: flex; flex-direction: column; gap: 3px; }
.tg-01__stat strong { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.tg-01__stat span { font-size: .8125rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
.tg-01__btn { transition: none; }
}
```
### 02. Web3 Glowing Gradient Text CSS
**Type:** Pure CSS
**Description:** A cyberpunk-inspired Web3 card where a blurred duplicate element creates a neon glow bloom effect behind the gradient text.
**HTML:**
```html
⬡ Decentralized Protocol
Own YourDigital Future Digital Future
Stake, earn, and govern—powered by transparent on-chain contracts.
Polygon
Solana
Ethereum
```
**CSS:**
```css
.tg-02, .tg-02 *, .tg-02 *::before, .tg-02 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-02 ::selection { background:#0ff2; color:#fff; }
.tg-02 {
--neon-a: #00f0ff;
--neon-b: #a855f7;
--neon-c: #ff2d78;
--bg: #040714;
--card-bg: rgba(255,255,255,.03);
--border: rgba(0,240,255,.12);
--text: #e2e8f0;
--muted: #7dd3fc;
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 24px;
}
.tg-02__card {
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: 20px;
padding: 48px 40px;
max-width: 560px;
text-align: center;
backdrop-filter: blur(12px);
}
.tg-02__eyebrow {
font-size: .8125rem;
font-weight: 600;
letter-spacing: .1em;
color: var(--neon-a);
margin-bottom: 20px;
}
.tg-02__title {
font-size: clamp(2rem, 6vw, 3.5rem);
font-weight: 900;
line-height: 1.1;
color: var(--text);
letter-spacing: -.03em;
margin-bottom: 20px;
}
/* Glow technique: gradient text + absolute blurred copy for bloom */
.tg-02__glow-wrap {
position: relative;
display: inline-block;
}
.tg-02__glow-text {
background: linear-gradient(90deg, var(--neon-a) 0%, var(--neon-b) 55%, var(--neon-c) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
position: relative;
z-index: 1;
}
/* Blurred duplicate creates the neon glow bloom */
.tg-02__glow-bloom {
position: absolute;
inset: 0;
background: linear-gradient(90deg, var(--neon-a) 0%, var(--neon-b) 55%, var(--neon-c) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
filter: blur(18px);
opacity: .55;
z-index: 0;
animation: tg-02-pulse 3s ease-in-out infinite;
}
@keyframes tg-02-pulse {
0%, 100% { opacity: .4; filter: blur(18px); }
50% { opacity: .75; filter: blur(22px); }
}
.tg-02__desc {
color: var(--muted);
font-size: .9375rem;
line-height: 1.7;
margin-bottom: 28px;
}
.tg-02__pill-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tg-02__pill {
font-size: .8125rem;
font-weight: 600;
padding: 5px 14px;
border-radius: 99px;
border: 1px solid rgba(0,240,255,.25);
color: var(--neon-a);
background: rgba(0,240,255,.06);
}
@media (prefers-reduced-motion: reduce) {
.tg-02__glow-bloom { animation: none; opacity: .5; }
}
```
### 03. CSS Text Gradient Corporate Logo Text
**Type:** Pure CSS
**Description:** An image-free corporate navbar logo using gradient text that scales infinitely at any DPI with zero HTTP requests.
**HTML:**
```html
◈
Spectrum
Get started
LOGO SIZES
Spectrum
Spectrum
Spectrum
Gradient text is image-free — scales infinitely, renders crisply on all DPI screens, and requires zero HTTP requests.
```
**CSS:**
```css
.tg-03, .tg-03 *, .tg-03 *::before, .tg-03 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-03 ::selection { background:#6366f1; color:#fff; }
.tg-03 {
--g-a: #6366f1;
--g-b: #a855f7;
--bg: #f8fafc;
--surface: #ffffff;
--text: #0f172a;
--muted: #64748b;
--border: #e2e8f0;
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
padding: 0;
}
/* Gradient reusable */
.tg-03__grad {
background: linear-gradient(120deg, var(--g-a) 0%, var(--g-b) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
.tg-03__nav {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 32px;
background: var(--surface);
border-bottom: 1px solid var(--border);
gap: 24px;
}
.tg-03__logo {
display: flex;
align-items: center;
gap: 8px;
}
.tg-03__logo-icon {
background: linear-gradient(120deg, var(--g-a), var(--g-b));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
font-size: 1.4rem;
}
.tg-03__logo-text {
font-size: 1.3rem;
font-weight: 800;
color: var(--text);
letter-spacing: -.03em;
}
.tg-03__nav-links {
display: flex;
gap: 24px;
}
.tg-03__link {
text-decoration: none;
font-size: .9rem;
font-weight: 500;
color: var(--muted);
transition: color .2s;
}
.tg-03__link:hover { color: var(--text); }
.tg-03__cta {
font-size: .875rem;
font-weight: 600;
padding: 8px 20px;
border-radius: 7px;
border: none;
background: linear-gradient(120deg, var(--g-a), var(--g-b));
color: #fff;
cursor: pointer;
}
.tg-03__showcase {
padding: 40px 32px;
max-width: 700px;
margin: 0 auto;
}
.tg-03__label {
font-size: .75rem;
font-weight: 700;
letter-spacing: .1em;
color: var(--muted);
margin-bottom: 24px;
}
.tg-03__size-row {
display: flex;
align-items: center;
gap: 32px;
flex-wrap: wrap;
margin-bottom: 32px;
}
.tg-03__logo-display {
font-weight: 800;
letter-spacing: -.03em;
color: var(--text);
}
.tg-03__logo-display--sm { font-size: 1.25rem; }
.tg-03__logo-display--md { font-size: 2rem; }
.tg-03__logo-display--lg { font-size: 3.25rem; }
.tg-03__note {
font-size: .9rem;
color: var(--muted);
line-height: 1.65;
max-width: 560px;
border-left: 3px solid;
border-image: linear-gradient(to bottom, var(--g-a), var(--g-b)) 1;
padding-left: 16px;
}
@media (prefers-reduced-motion: reduce) {
.tg-03__cta, .tg-03__link { transition: none; }
}
```
### 04. Minimalist Bold Text Gradient CSS
**Type:** Pure CSS
**Description:** An editorial type specimen showcasing dual-tone gradients on heavy 900-weight fonts at multiple sizes for maximum impact.
**HTML:**
```html
TYPE SCALE SPECIMEN
Clarity
Purpose
Impact
Dual-tone linear gradients on heavy weights create editorial impact without imagery. The gradient stop travels left-to-right, producing a colour shift that reads clearly at every size.
```
**CSS:**
```css
.tg-04, .tg-04 *, .tg-04 *::before, .tg-04 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-04 ::selection { background:#1e1b4b; color:#e0e7ff; }
.tg-04 {
--g-a: #1e1b4b;
--g-b: #6366f1;
--g-a2: #312e81;
--g-b2: #a21caf;
--g-a3: #0f172a;
--g-b3: #0ea5e9;
--bg: #ffffff;
--muted: #64748b;
--rule: #e2e8f0;
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 32px;
}
.tg-04__inner { max-width: 640px; width: 100%; }
.tg-04__kicker {
font-size: .7rem;
font-weight: 700;
letter-spacing: .18em;
color: var(--muted);
margin-bottom: 16px;
}
/* Shared gradient text mixin pattern. Use inline-block so the
element's box width equals its glyph width — combined with
background-clip:text this guarantees the gradient paints inside
the glyph shape (not as a full-width bar across the block). */
.tg-04__word {
font-weight: 900;
line-height: .95;
letter-spacing: -.04em;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
display: inline-block;
padding: 0 .05em .1em; /* prevents descender clipping in Firefox */
}
.tg-04__inner > .tg-04__word { display: block; }
.tg-04__inner > .tg-04__word + .tg-04__word { margin-top: 4px; }
.tg-04__word { font-size: clamp(4rem, 14vw, 7.5rem); background-image: linear-gradient(90deg, var(--g-a) 0%, var(--g-b) 100%); }
.tg-04__word--two { font-size: clamp(3rem, 10vw, 5.5rem); background-image: linear-gradient(90deg, var(--g-a2) 0%, var(--g-b2) 100%); }
.tg-04__word--three { font-size: clamp(2rem, 7vw, 3.75rem); background-image: linear-gradient(90deg, var(--g-a3) 0%, var(--g-b3) 100%); }
.tg-04__rule {
height: 1px;
background: var(--rule);
margin: 28px 0;
}
.tg-04__caption {
font-size: .9rem;
color: var(--muted);
line-height: 1.7;
max-width: 520px;
}
@media (prefers-reduced-motion: reduce) {}
```
### 05. CSS Hover Transition Text Gradient Effect
**Type:** Pure CSS
**Description:** A navigation and card component that transitions solid text into a gradient on hover using -webkit-text-fill-color transition.
**HTML:**
```html
Hover over any link
Home
Features
Pricing
Blog
Contact
Analytics →
Real-time dashboards for every metric your team cares about.
Integrations →
Connect to 200+ tools with one-click OAuth flows.
Collaboration →
Shared workspaces with granular permission controls.
```
**CSS:**
```css
.tg-05, .tg-05 *, .tg-05 *::before, .tg-05 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-05 ::selection { background:#7c3aed; color:#fff; }
.tg-05 {
--g-a: #7c3aed;
--g-b: #ec4899;
--bg: #0f0f14;
--surface: #17171f;
--text: #e2e8f0;
--muted: #64748b;
--solid: #94a3b8;
--border: rgba(255,255,255,.07);
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 24px;
}
.tg-05__card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 16px;
padding: 36px 32px;
width: 100%;
max-width: 580px;
}
.tg-05__hint {
font-size: .75rem;
font-weight: 600;
letter-spacing: .1em;
color: var(--muted);
margin-bottom: 20px;
}
.tg-05__nav {
display: flex;
gap: 4px;
flex-wrap: wrap;
margin-bottom: 28px;
}
/*
Hover gradient technique:
Gradient sits on ::before; opacity transitions from 0→1.
-webkit-text-fill-color can't transition, so we use a pseudo-element
trick: normal color fades out, gradient fades in via opacity on ::before.
We achieve the gradient-on-hover by toggling background-clip on the element itself.
*/
.tg-05__link {
position: relative;
text-decoration: none;
font-size: .95rem;
font-weight: 600;
padding: 8px 18px;
border-radius: 8px;
color: var(--solid);
transition: color .3s;
display: inline-block;
}
.tg-05__link::before {
content: attr(data-hover, '');
position: absolute;
inset: 0;
padding: 8px 18px;
background: linear-gradient(90deg, var(--g-a), var(--g-b));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
opacity: 0;
transition: opacity .3s;
pointer-events: none;
}
.tg-05__link::after {
content: attr(href, '');
position: absolute;
inset: 8px 18px;
background: linear-gradient(90deg, var(--g-a), var(--g-b));
-webkit-background-clip: text;
background-clip: text;
opacity: 0;
transition: opacity .3s;
}
/* Simpler approach: fade out the solid text colour, overlay gradient clone */
.tg-05__link span { /* We'll use a direct CSS trick on the element */ }
.tg-05__link:hover {
background: linear-gradient(90deg, var(--g-a), var(--g-b));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
/* Smooth fade: CSS can't tween background-clip text, so we fade background colour instead */
.tg-05__link {
background: linear-gradient(90deg, var(--g-a), var(--g-b));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: var(--solid);
transition: -webkit-text-fill-color .25s;
}
.tg-05__link:hover {
-webkit-text-fill-color: transparent;
}
.tg-05__divider { height: 1px; background: var(--border); margin-bottom: 28px; }
.tg-05__cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 14px;
}
.tg-05__tile {
background: rgba(255,255,255,.03);
border: 1px solid var(--border);
border-radius: 10px;
padding: 18px;
}
.tg-05__tile p { font-size: .8rem; color: var(--muted); line-height: 1.55; margin-top: 6px; }
.tg-05__tile-h {
font-size: .9375rem;
font-weight: 700;
color: var(--text);
display: flex;
justify-content: space-between;
align-items: center;
}
.tg-05__arrow { color: var(--muted); font-weight: 400; }
.tg-05__tile:hover .tg-05__tile-h {
background: linear-gradient(90deg, var(--g-a), var(--g-b));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
@media (prefers-reduced-motion: reduce) {
.tg-05__link, .tg-05__tile { transition: none; }
}
```
### 06. Gradient Text Button Link CSS
**Type:** Pure CSS
**Description:** Three button patterns — ghost with gradient label, gradient border via mask, and filled gradient — demonstrating every CTA gradient variant.
**HTML:**
```html
Ready to launch?
Pick the interaction pattern that fits your design system.
```
**CSS:**
```css
.tg-06, .tg-06 *, .tg-06 *::before, .tg-06 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-06 ::selection { background:#7c3aed; color:#fff; }
.tg-06 {
--g-a: #f59e0b;
--g-b: #ef4444;
--g-c: #ec4899;
--bg: #0c0c10;
--surface: #15151d;
--text: #f1f5f9;
--muted: #64748b;
--border: rgba(255,255,255,.09);
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 24px;
}
.tg-06__panel {
max-width: 640px;
width: 100%;
}
.tg-06__heading {
font-size: clamp(1.6rem, 4vw, 2.5rem);
font-weight: 800;
color: var(--text);
letter-spacing: -.03em;
margin-bottom: 10px;
}
.tg-06__sub {
color: var(--muted);
font-size: .9375rem;
margin-bottom: 36px;
}
.tg-06__grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 28px;
}
.tg-06__col { display: flex; flex-direction: column; gap: 12px; }
.tg-06__tag { font-size: .72rem; font-weight: 600; letter-spacing: .09em; color: var(--muted); margin-bottom: 4px; }
/* Base button */
.tg-06__btn {
display: inline-flex;
align-items: center;
justify-content: center;
text-decoration: none;
font-size: .9rem;
font-weight: 700;
padding: 11px 22px;
border-radius: 9px;
transition: transform .2s, box-shadow .2s, opacity .2s;
cursor: pointer;
}
.tg-06__btn:hover { transform: translateY(-2px); }
/* Ghost: transparent bg, gradient text label */
.tg-06__btn--ghost {
background: transparent;
border: 1.5px solid var(--border);
color: var(--text);
}
.tg-06__btn--ghost .tg-06__label {
background: linear-gradient(90deg, var(--g-a), var(--g-c));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
.tg-06__btn--ghost:hover { border-color: rgba(239,68,68,.4); }
/* Border gradient: pseudo-element creates gradient border, inner bg clips it */
.tg-06__btn--border {
position: relative;
background: var(--surface);
border: none;
padding: 12px 23px; /* +1 for pseudo border */
isolation: isolate;
}
.tg-06__btn--border::before {
content: '';
position: absolute;
inset: 0;
border-radius: inherit;
padding: 1.5px;
background: linear-gradient(90deg, var(--g-a), var(--g-c));
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
-webkit-mask-composite: destination-out;
mask-composite: exclude;
pointer-events: none;
}
.tg-06__btn--border .tg-06__label {
background: linear-gradient(90deg, var(--g-a), var(--g-c));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
/* Filled */
.tg-06__btn--filled {
background: linear-gradient(90deg, var(--g-a), var(--g-b), var(--g-c));
color: #fff;
}
.tg-06__btn--filled:hover { box-shadow: 0 8px 24px rgba(239,68,68,.35); opacity: .9; }
.tg-06__btn--sm { font-size: .8rem; padding: 8px 18px; }
@media (prefers-reduced-motion: reduce) {
.tg-06__btn { transition: none; }
}
```
### 07. CSS Text Gradient on Active Navigation Link
**Type:** CSS + JS
**Description:** A full-page header with a clickable nav where the active page link renders a gradient colour with an animated underline indicator.
**HTML:**
```html
Analytics Overview
Your performance at a glance for the last 30 days.
$124K Revenue
8,432 Sessions
3.4% Conversion
Click any nav item to see gradient active state
```
**CSS:**
```css
.tg-07, .tg-07 *, .tg-07 *::before, .tg-07 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-07 ::selection { background:#2563eb; color:#fff; }
.tg-07 {
--g-a: #3b82f6;
--g-b: #8b5cf6;
--bg: #f8fafc;
--header-bg: #ffffff;
--text: #0f172a;
--muted: #64748b;
--border: #e2e8f0;
--active-bg: rgba(59,130,246,.08);
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
}
.tg-07__wrapper { overflow: hidden; }
.tg-07__header {
background: var(--header-bg);
border-bottom: 1px solid var(--border);
padding: 0 28px;
height: 58px;
display: flex;
align-items: center;
gap: 32px;
}
.tg-07__logo {
font-size: 1.1rem;
font-weight: 800;
color: var(--text);
letter-spacing: -.02em;
flex-shrink: 0;
}
.tg-07__nav { display: flex; gap: 2px; flex: 1; }
.tg-07__link {
text-decoration: none;
font-size: .875rem;
font-weight: 500;
color: var(--muted);
padding: 6px 14px;
border-radius: 7px;
transition: color .2s, background .2s;
position: relative;
}
.tg-07__link:hover { color: var(--text); background: rgba(0,0,0,.04); }
/* Active state: gradient text + subtle bg tint + bottom indicator */
.tg-07__link--active {
background: var(--active-bg);
font-weight: 700;
}
.tg-07__link--active {
background: linear-gradient(90deg, var(--g-a), var(--g-b));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
/* Re-apply bg separately — background-clip:text consumes background */
}
/* We need two backgrounds: tint + gradient for clip. Use ::after for the tint */
.tg-07__link--active::after {
content: '';
position: absolute;
inset: 0;
background: var(--active-bg);
border-radius: 7px;
z-index: -1;
}
/* Underline indicator */
.tg-07__link--active::before {
content: '';
position: absolute;
bottom: -1px;
left: 14px;
right: 14px;
height: 2px;
background: linear-gradient(90deg, var(--g-a), var(--g-b));
border-radius: 2px 2px 0 0;
}
.tg-07__avatar {
width: 32px;
height: 32px;
border-radius: 50%;
background: linear-gradient(135deg, var(--g-a), var(--g-b));
color: #fff;
font-size: .75rem;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.tg-07__content { padding: 36px 28px; }
.tg-07__page-title h1 {
font-size: 1.75rem;
font-weight: 800;
color: var(--text);
letter-spacing: -.03em;
margin-bottom: 6px;
}
.tg-07__page-title p { color: var(--muted); font-size: .9rem; margin-bottom: 32px; }
.tg-07__grad {
background: linear-gradient(90deg, var(--g-a), var(--g-b));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
.tg-07__kpis { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.tg-07__kpi {
background: #fff;
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px 24px;
display: flex;
flex-direction: column;
gap: 4px;
min-width: 120px;
}
.tg-07__kpi-val { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.tg-07__kpi-lbl { font-size: .8rem; color: var(--muted); }
.tg-07__hint { font-size: .8rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
.tg-07__link { transition: none; }
}
```
**JS:**
```js
(function(){
const links = document.querySelectorAll('.tg-07__link');
links.forEach(l => {
l.addEventListener('click', function(e){
e.preventDefault();
links.forEach(x => x.classList.remove('tg-07__link--active'));
this.classList.add('tg-07__link--active');
});
});
})();
```
### 08. Animated Moving Text Gradient Background CSS
**Type:** Pure CSS
**Description:** A hero section where the gradient background-position animates continuously across a 300%-wide gradient, creating a shifting colour sweep through the text.
**HTML:**
```html
✦ New — Season 3
The Future of Interface Design
Shifting gradients create motion and energy without a single line of JavaScript.
```
**CSS:**
```css
.tg-08, .tg-08 *, .tg-08 *::before, .tg-08 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-08 ::selection { background:#7c3aed55; color:#fff; }
.tg-08 {
--c1: #f0abfc;
--c2: #818cf8;
--c3: #38bdf8;
--c4: #34d399;
--bg: #0a0a12;
--text: #f8fafc;
--muted: #94a3b8;
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 24px;
}
.tg-08__hero { text-align: center; max-width: 600px; }
.tg-08__tag {
display: inline-block;
font-size: .75rem;
font-weight: 700;
letter-spacing: .1em;
color: var(--muted);
margin-bottom: 24px;
}
.tg-08__title {
font-size: clamp(2.5rem, 8vw, 4.5rem);
font-weight: 900;
line-height: 1.08;
letter-spacing: -.04em;
color: var(--text);
margin-bottom: 20px;
}
/*
Moving gradient: background-size is 300% wide so the
gradient has room to travel. background-position animates
from 0% to 100%, which pans across the extended gradient.
background-clip:text exposes it through the letterforms.
*/
.tg-08__anim-grad {
background: linear-gradient(
90deg,
var(--c1) 0%,
var(--c2) 25%,
var(--c3) 50%,
var(--c4) 75%,
var(--c1) 100%
);
background-size: 300% 100%;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
animation: tg-08-shift 4s linear infinite;
}
@keyframes tg-08-shift {
0% { background-position: 0% 50%; }
100% { background-position: 100% 50%; }
}
.tg-08__sub {
font-size: 1rem;
color: var(--muted);
line-height: 1.7;
max-width: 480px;
margin: 0 auto;
}
@media (prefers-reduced-motion: reduce) {
.tg-08__anim-grad {
animation: none;
background-position: 0% 50%;
}
}
```
### 09. Cyberpunk Neon Text Gradient CSS
**Type:** Pure CSS
**Description:** A CRT-scanline terminal UI with electric pink, cyan, and purple neon gradients amplified by CSS drop-shadow filters for a glow effect.
**HTML:**
```html
SYS://NEXUS_2077 — USER AUTHENTICATED
CYBER PUNK
NEON INTERFACE
78% THREAT
4096 CREDITS
LEVEL 9 CLEARANCE
```
**CSS:**
```css
.tg-09, .tg-09 *, .tg-09 *::before, .tg-09 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-09 ::selection { background:#ff2d78; color:#000; }
.tg-09 {
--pink: #ff2d78;
--cyan: #00f0ff;
--purple: #bc00ff;
--yellow: #ffe600;
--bg: #05020d;
--text: #e0d7f0;
--muted: #4a3f6a;
font-family: 'Courier New', monospace;
background: var(--bg);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 32px 24px;
}
.tg-09__scene {
position: relative;
width: 100%;
max-width: 620px;
border: 1px solid rgba(0,240,255,.2);
border-radius: 4px;
overflow: hidden;
padding: 36px 32px;
background: rgba(5,2,13,.9);
}
/* CRT scanlines overlay */
.tg-09__scanlines {
position: absolute;
inset: 0;
background: repeating-linear-gradient(
0deg,
transparent,
transparent 2px,
rgba(0,240,255,.025) 2px,
rgba(0,240,255,.025) 4px
);
pointer-events: none;
z-index: 10;
}
.tg-09__content { position: relative; z-index: 1; }
.tg-09__sys {
font-size: .65rem;
letter-spacing: .12em;
color: rgba(0,240,255,.5);
margin-bottom: 20px;
animation: tg-09-blink 2s step-end infinite;
}
@keyframes tg-09-blink {
50% { opacity: .4; }
}
/* Shared gradient text helpers */
.tg-09__g1 {
background: linear-gradient(90deg, var(--pink) 0%, var(--purple) 100%);
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; color: transparent;
filter: drop-shadow(0 0 8px var(--pink));
}
.tg-09__g2 {
background: linear-gradient(90deg, var(--cyan) 0%, #0088ff 100%);
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; color: transparent;
filter: drop-shadow(0 0 8px var(--cyan));
}
.tg-09__g3 {
background: linear-gradient(90deg, var(--yellow) 0%, #ff8c00 100%);
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; color: transparent;
filter: drop-shadow(0 0 6px var(--yellow));
}
.tg-09__g4 {
background: linear-gradient(90deg, var(--purple) 0%, var(--pink) 100%);
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; color: transparent;
}
.tg-09__title {
font-size: clamp(3rem, 10vw, 5.5rem);
font-weight: 900;
line-height: 1;
letter-spacing: .05em;
display: flex;
gap: .2em;
}
.tg-09__sub-title {
font-size: clamp(1.1rem, 4vw, 2rem);
font-weight: 700;
letter-spacing: .15em;
margin: 8px 0 28px;
}
.tg-09__row { display: flex; gap: 28px; margin-bottom: 24px; flex-wrap: wrap; }
.tg-09__stat { display: flex; flex-direction: column; gap: 3px; }
.tg-09__stat-v { font-size: 1.4rem; font-weight: 700; }
.tg-09__stat span:last-child { font-size: .6rem; letter-spacing: .12em; color: var(--muted); }
.tg-09__bar-wrap { display: flex; flex-direction: column; gap: 6px; }
.tg-09__bar-lbl { font-size: .65rem; letter-spacing: .12em; color: var(--muted); }
.tg-09__bar {
height: 4px;
background: rgba(255,255,255,.06);
border-radius: 2px;
overflow: hidden;
}
.tg-09__bar-fill {
height: 100%;
width: 73%;
background: linear-gradient(90deg, var(--cyan), var(--purple), var(--pink));
background-size: 200%;
animation: tg-09-scan 2s linear infinite;
}
@keyframes tg-09-scan {
0% { background-position: 0%; }
100% { background-position: 200%; }
}
@media (prefers-reduced-motion: reduce) {
.tg-09__sys, .tg-09__bar-fill { animation: none; }
}
```
### 10. Metallic Gold Text Gradient Effect CSS
**Type:** Pure CSS
**Description:** A luxury membership card with a multi-stop metallic gold gradient simulating light reflection, animated via background-position shift.
**HTML:**
```html
✦
PREMIER MEMBERSHIP
Aurum
Excellence, redefined.
✦ Priority concierge access
✦ Curated portfolio management
✦ Exclusive event invitations
$2,500 /year
Request access
```
**CSS:**
```css
.tg-10, .tg-10 *, .tg-10 *::before, .tg-10 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-10 ::selection { background:#b45309; color:#fef3c7; }
.tg-10 {
/* Multi-stop metallic gold: dark → mid-gold → highlight → dark → shimmer */
--gold-grad: linear-gradient(
135deg,
#92400e 0%,
#b45309 15%,
#d97706 30%,
#fbbf24 45%,
#fef3c7 55%,
#fbbf24 65%,
#d97706 80%,
#92400e 100%
);
--bg: #080604;
--surface: #0e0b07;
--border: rgba(251,191,36,.18);
--text: #fef9ee;
--muted: #92816a;
font-family: Georgia, 'Times New Roman', serif;
background: var(--bg);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 24px;
}
.tg-10__card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 16px;
padding: 44px 36px;
max-width: 380px;
width: 100%;
text-align: center;
box-shadow: 0 0 60px rgba(251,191,36,.06);
}
.tg-10__crown {
font-size: 1.6rem;
background: var(--gold-grad);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
filter: drop-shadow(0 2px 6px rgba(251,191,36,.35));
margin-bottom: 12px;
}
.tg-10__tier {
font-family: system-ui, -apple-system, sans-serif;
font-size: .65rem;
font-weight: 700;
letter-spacing: .18em;
color: var(--muted);
margin-bottom: 16px;
}
/* The metallic effect uses many gradient stops to simulate light reflection */
.tg-10__gold {
background: var(--gold-grad);
background-size: 200% 100%;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
animation: tg-10-shimmer 4s ease-in-out infinite;
}
@keyframes tg-10-shimmer {
0%, 100% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
}
.tg-10__name {
font-size: 4rem;
font-weight: 700;
letter-spacing: -.02em;
line-height: 1;
margin-bottom: 8px;
}
.tg-10__tagline {
font-style: italic;
color: var(--muted);
font-size: .9rem;
margin-bottom: 28px;
}
.tg-10__perks {
list-style: none;
text-align: left;
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: 28px;
font-family: system-ui, sans-serif;
}
.tg-10__perks li { font-size: .875rem; color: var(--text); display: flex; align-items: center; gap: 10px; }
.tg-10__check {
background: var(--gold-grad);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
font-size: .7rem;
}
.tg-10__divider { height: 1px; background: var(--border); margin-bottom: 20px; }
.tg-10__price { display: flex; align-items: baseline; gap: 4px; justify-content: center; margin-bottom: 22px; }
.tg-10__amount { font-size: 2rem; font-weight: 700; font-family: system-ui, sans-serif; }
.tg-10__cycle { font-size: .85rem; color: var(--muted); font-family: system-ui, sans-serif; }
.tg-10__cta {
width: 100%;
padding: 13px;
border-radius: 8px;
border: 1px solid rgba(251,191,36,.4);
background: transparent;
font-family: system-ui, sans-serif;
font-size: .9rem;
font-weight: 600;
color: #fbbf24;
cursor: pointer;
transition: background .2s, color .2s;
}
.tg-10__cta:hover { background: rgba(251,191,36,.1); }
@media (prefers-reduced-motion: reduce) {
.tg-10__gold { animation: none; background-position: 0% 50%; }
}
```
### 11. Glassmorphism Text Gradient Contrast
**Type:** Pure CSS
**Description:** A backdrop-filter glass card over coloured blobs, with gradient text reinforced by drop-shadow to maintain legibility through the blur.
**HTML:**
```html
— Featured Article
Design Systems That Scale
Gradient text on translucent surfaces needs careful colour management. The background-clip: text gradient must maintain ≥4.5:1 contrast against any colour that bleeds through the blur.
```
**CSS:**
```css
.tg-11, .tg-11 *, .tg-11 *::before, .tg-11 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-11 ::selection { background:rgba(168,85,247,.6); color:#fff; }
.tg-11 {
--g-a: #e879f9;
--g-b: #818cf8;
--g-c: #38bdf8;
--blob-a: #a855f7;
--blob-b: #ec4899;
--blob-c: #06b6d4;
--bg: #06030f;
--glass: rgba(255,255,255,.07);
--text: #f0e7ff;
--muted: rgba(240,231,255,.55);
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 24px;
position: relative;
overflow: hidden;
}
/* Background colour blobs */
.tg-11__blob {
position: absolute;
border-radius: 50%;
filter: blur(60px);
opacity: .55;
}
.tg-11__blob--a { width: 320px; height: 320px; background: var(--blob-a); top: -80px; left: -60px; }
.tg-11__blob--b { width: 280px; height: 280px; background: var(--blob-b); bottom: -60px; right: -40px; }
.tg-11__blob--c { width: 200px; height: 200px; background: var(--blob-c); top: 50%; left: 55%; transform: translate(-50%,-50%); }
/* Glass card */
.tg-11__glass {
position: relative;
z-index: 1;
background: var(--glass);
border: 1px solid rgba(255,255,255,.12);
border-radius: 20px;
padding: 40px 36px;
max-width: 500px;
width: 100%;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
}
.tg-11__eyebrow {
font-size: .75rem;
font-weight: 600;
letter-spacing: .1em;
color: var(--muted);
margin-bottom: 16px;
}
.tg-11__title {
font-size: clamp(1.8rem, 5vw, 2.8rem);
font-weight: 800;
line-height: 1.1;
letter-spacing: -.03em;
color: var(--text);
margin-bottom: 16px;
}
/*
Contrast strategy: on a blurred translucent surface the background colours
behind the card bleed through. We use a high-saturation gradient and apply
a subtle text-shadow on the wrapper to ensure the gradient text reads clearly.
The gradient direction is angled to maximise the perceived brightness range.
*/
.tg-11__grad {
background: linear-gradient(110deg, var(--g-a) 0%, var(--g-b) 50%, var(--g-c) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
filter: drop-shadow(0 1px 8px rgba(232,121,249,.4));
}
.tg-11__body {
font-size: .9rem;
color: var(--muted);
line-height: 1.7;
margin-bottom: 24px;
}
.tg-11__body code {
font-size: .8em;
background: rgba(255,255,255,.1);
border-radius: 3px;
padding: 1px 5px;
color: var(--g-c);
}
.tg-11__meta { display: flex; align-items: center; gap: 12px; }
.tg-11__avatar {
width: 34px;
height: 34px;
border-radius: 50%;
background: linear-gradient(135deg, var(--g-a), var(--g-b));
display: flex;
align-items: center;
justify-content: center;
font-size: .75rem;
font-weight: 700;
color: #fff;
flex-shrink: 0;
}
.tg-11__author { display: block; font-size: .875rem; font-weight: 700; color: var(--text); }
.tg-11__date { font-size: .775rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {}
```
### 12. Pastel Soft Color Text Gradient CSS
**Type:** Pure CSS
**Description:** A lifestyle blog layout with warm pastel gradients in the 60–90% lightness range across headings and article card titles.
**HTML:**
```html
Mindful journaling
Five minutes of unstructured writing before checking any screen.
Herbal rituals
Brewing tea as a meditative practice — warmth, aroma, presence.
Gentle movement
Ten minutes of stretching outdoors to anchor the body in the day.
```
**CSS:**
```css
.tg-12, .tg-12 *, .tg-12 *::before, .tg-12 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-12 ::selection { background:#fbcfe8; color:#831843; }
.tg-12 {
--rose-a: #fda4af;
--rose-b: #f9a8d4;
--sky-a: #7dd3fc;
--sky-b: #a5b4fc;
--mint-a: #86efac;
--mint-b: #6ee7b7;
--bg: #fdf8f6;
--surface: #ffffff;
--text: #1e1b1a;
--muted: #7c6f67;
--border: #f0e8e4;
font-family: 'Georgia', serif;
background: var(--bg);
min-height: 100vh;
padding: 0;
}
.tg-12__container { padding: 44px 32px; max-width: 700px; margin: 0 auto; }
.tg-12__chip {
font-family: system-ui, sans-serif;
font-size: .72rem;
font-weight: 600;
letter-spacing: .1em;
color: var(--muted);
margin-bottom: 18px;
}
.tg-12__title {
font-size: clamp(2rem, 5vw, 3.25rem);
font-weight: 700;
line-height: 1.15;
color: var(--text);
letter-spacing: -.02em;
margin-bottom: 18px;
}
/*
Pastel gradients: use soft, desaturated-leaning colours in the 60–90%
lightness range. The key is to keep both gradient stops within the same
warm/cool family so the blend stays harmonious and never muddy.
*/
.tg-12__soft {
background: linear-gradient(110deg, var(--rose-a) 0%, var(--sky-a) 50%, var(--mint-a) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
.tg-12__intro {
font-size: 1.0625rem;
color: var(--muted);
line-height: 1.75;
max-width: 560px;
margin-bottom: 36px;
}
.tg-12__card-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
gap: 16px;
}
.tg-12__card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 14px;
padding: 22px 20px;
}
.tg-12__card p {
font-family: system-ui, sans-serif;
font-size: .875rem;
color: var(--muted);
line-height: 1.6;
margin-top: 8px;
}
.tg-12__card-title {
font-size: 1.1rem;
font-weight: 700;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
display: inline-block;
padding: 0 .05em .1em;
}
/* CRITICAL: use background-image (not the shorthand 'background')
because the shorthand resets background-clip to its initial
border-box value, breaking the text clipping above. */
.tg-12__g-rose { background-image: linear-gradient(90deg, var(--rose-a), var(--rose-b)); }
.tg-12__g-sky { background-image: linear-gradient(90deg, var(--sky-a), var(--sky-b)); }
.tg-12__g-mint { background-image: linear-gradient(90deg, var(--mint-a), var(--mint-b)); }
@media (prefers-reduced-motion: reduce) {}
```
### 13. Vertical Linear Gradient Text CSS
**Type:** Pure CSS
**Description:** A split-layout demo contrasting horizontal and vertical gradient directions, including writing-mode: vertical-rl sidebar labels.
**HTML:**
```html
VERTICAL GRADIENT TEXT
A top-to-bottom linear-gradient fades from a vivid top colour to a lighter or contrasting shade at the bottom, reinforcing visual hierarchy — brighter at the top catches the eye, the fade draws it downward.
Framework
Platform
```
**CSS:**
```css
.tg-13, .tg-13 *, .tg-13 *::before, .tg-13 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-13 ::selection { background:#1d4ed8; color:#e0f2fe; }
.tg-13 {
--top-a: #1d4ed8;
--bot-a: #60a5fa;
--top-b: #9333ea;
--bot-b: #f472b6;
--top-c: #0284c7;
--bot-c: #38bdf8;
--top-h: #f59e0b;
--bot-h: rgba(245,158,11,.2);
--top-p: #7c3aed;
--bot-p: rgba(124,58,237,.25);
--bg: #f1f5f9;
--surface: #ffffff;
--text: #0f172a;
--muted: #64748b;
--border: #e2e8f0;
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
}
.tg-13__layout {
display: flex;
min-height: 100vh;
}
.tg-13__sidebar {
background: #0f172a;
width: 100px;
flex-shrink: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 4px;
padding: 24px 0;
}
/* Vertical gradients on sidebar words */
.tg-13__section-word {
font-size: 1.25rem;
font-weight: 900;
letter-spacing: .08em;
writing-mode: vertical-rl;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
/* background-image (not shorthand) — shorthand resets background-clip
to border-box and the text clipping above silently fails. */
.tg-13__v1 { background-image: linear-gradient(180deg, var(--top-a), var(--bot-a)); }
.tg-13__v2 { background-image: linear-gradient(180deg, var(--top-b), var(--bot-b)); }
.tg-13__v3 { background-image: linear-gradient(180deg, var(--top-c), var(--bot-c)); }
.tg-13__body {
padding: 36px 32px;
display: flex;
flex-direction: column;
justify-content: center;
flex: 1;
}
.tg-13__kicker {
font-size: .7rem;
font-weight: 700;
letter-spacing: .14em;
color: var(--muted);
margin-bottom: 14px;
}
.tg-13__explain {
font-size: .875rem;
color: var(--muted);
line-height: 1.7;
max-width: 440px;
margin-bottom: 28px;
}
.tg-13__explain code {
background: var(--border);
border-radius: 3px;
padding: 1px 5px;
font-size: .8em;
color: var(--top-b);
}
.tg-13__demo-block { display: flex; gap: 12px; flex-wrap: wrap; }
/*
Vertical (top→bottom) gradients: use `to bottom` direction.
The lighter/transparent end at the bottom simulates a gentle fade-out.
*/
.tg-13__hero-word {
font-size: clamp(2.5rem, 7vw, 4rem);
font-weight: 900;
letter-spacing: -.04em;
line-height: 1;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
/* inline-block + padding ensure the gradient clips to the glyph
shape (block-level with background-image would otherwise
paint the gradient on the full row width even when text content
is narrow). */
display: inline-block;
padding: 0 .05em .1em;
}
.tg-13__fade-down {
background-image: linear-gradient(to bottom, var(--top-h) 0%, var(--bot-h) 100%);
}
.tg-13__fade-up {
background-image: linear-gradient(to top, var(--top-p) 0%, var(--bot-p) 100%);
}
@media (prefers-reduced-motion: reduce) {}
```
### 14. Radial Gradient Text Effect CSS
**Type:** Pure CSS
**Description:** Four radial-gradient text examples where the brightest colour radiates from the centre of each character, fading toward the edges.
**HTML:**
```html
Radiate
Energy outward
Expand
Radial gradients grow from a central point, making text feel like it emanates light.
Focus
A darker perimeter naturally draws the eye to the bright centre of the letterforms.
radial-gradient(circle at 50% 50%, …)
```
**CSS:**
```css
.tg-14, .tg-14 *, .tg-14 *::before, .tg-14 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-14 ::selection { background:#7c3aed44; color:#fff; }
.tg-14 {
--center-a: #fde68a;
--edge-a: #f59e0b;
--center-b: #c4b5fd;
--edge-b: #7c3aed;
--center-c: #7dd3fc;
--edge-c: #1d4ed8;
--center-d: #fbcfe8;
--edge-d: #be185d;
--bg: #09080f;
--surface: rgba(255,255,255,.04);
--text: #e2e8f0;
--muted: #64748b;
--border: rgba(255,255,255,.07);
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 44px 24px;
}
.tg-14__wrapper { max-width: 620px; width: 100%; text-align: center; }
/*
Radial gradient text: circle at 50% 50% places the brightest colour at
the exact centre of the element's bounding box. As the gradient clips
to the text, the middle of each character glows and edges fade.
Adjust the first stop percentage to control the glow spread.
*/
.tg-14__radial-a {
background: radial-gradient(circle at 50% 50%, var(--center-a) 0%, var(--edge-a) 65%);
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; color: transparent;
}
.tg-14__radial-b {
background: radial-gradient(ellipse at 40% 60%, var(--center-b) 0%, var(--edge-b) 75%);
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; color: transparent;
}
.tg-14__radial-c {
background: radial-gradient(circle at 50% 40%, var(--center-c) 0%, var(--edge-c) 80%);
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; color: transparent;
}
.tg-14__radial-d {
background: radial-gradient(circle at 50% 40%, var(--center-d) 0%, var(--edge-d) 80%);
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; color: transparent;
}
.tg-14__big {
font-size: clamp(4rem, 12vw, 7rem);
font-weight: 900;
letter-spacing: -.05em;
line-height: 1;
margin-bottom: 8px;
}
.tg-14__med {
font-size: clamp(1.5rem, 5vw, 2.75rem);
font-weight: 700;
letter-spacing: -.03em;
margin-bottom: 32px;
}
.tg-14__card-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 14px;
margin-bottom: 24px;
text-align: left;
}
.tg-14__card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px;
}
.tg-14__card-h { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.tg-14__card p { font-size: .825rem; color: var(--muted); line-height: 1.6; }
.tg-14__code-hint { font-size: .8rem; color: var(--muted); }
.tg-14__code-hint code {
background: rgba(255,255,255,.06);
padding: 3px 8px;
border-radius: 4px;
font-size: .78rem;
color: #c4b5fd;
}
@media (prefers-reduced-motion: reduce) {}
```
### 15. Multi Color Rainbow Text Gradient CSS
**Type:** Pure CSS
**Description:** A six-stop HSL hue-wheel gradient cycling 0°→320°, with a continuously animated version driven by background-position shifting.
**HTML:**
```html
Spectacular
Iridescent
Design
Colour
Motion
Type
Play
4+ colour stops in a linear-gradient create a true rainbow spectrum. Keep saturation high and transition through the full hue wheel (0°→360°) for the most vivid result.
```
**CSS:**
```css
.tg-15, .tg-15 *, .tg-15 *::before, .tg-15 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-15 ::selection { background:#ec4899; color:#fff; }
.tg-15 {
--bg: #06030c;
--text: #e2e8f0;
--muted: #64748b;
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 24px;
}
.tg-15__scene { max-width: 640px; width: 100%; text-align: center; }
/* Full-spectrum rainbow: 6 stops cycling through hsl hues */
.tg-15__rainbow {
background: linear-gradient(
90deg,
hsl(0, 100%, 60%) 0%,
hsl(45, 100%, 60%) 20%,
hsl(120, 100%, 45%) 40%,
hsl(200, 100%, 55%) 60%,
hsl(270, 100%, 65%) 80%,
hsl(320, 100%, 60%) 100%
);
background-size: 200% 100%;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
font-weight: 900;
letter-spacing: -.04em;
line-height: 1;
display: block;
}
.tg-15__rainbow:first-child { font-size: clamp(3rem, 10vw, 5.5rem); margin-bottom: 6px; }
.tg-15__rainbow.tg-15__anim {
font-size: clamp(1.8rem, 6vw, 3.5rem);
background: linear-gradient(
90deg,
hsl(200, 100%, 60%) 0%,
hsl(270, 100%, 65%) 16%,
hsl(320, 100%, 60%) 33%,
hsl(0, 100%, 60%) 50%,
hsl(45, 100%, 60%) 66%,
hsl(120, 100%, 45%) 83%,
hsl(200, 100%, 60%) 100%
);
background-size: 200% 100%;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
animation: tg-15-shift 3s linear infinite;
margin-bottom: 32px;
}
@keyframes tg-15-shift {
0% { background-position: 0% 0%; }
100% { background-position: 200% 0%; }
}
.tg-15__tag-cloud { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.tg-15__tag {
font-size: .85rem;
font-weight: 700;
padding: 6px 16px;
border-radius: 99px;
border: 1.5px solid transparent;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
position: relative;
}
.tg-15__tag::before {
content: '';
position: absolute;
inset: 0;
border-radius: 99px;
border: 1.5px solid currentColor;
opacity: .3;
}
/* background-image (not shorthand) — shorthand resets background-clip
to border-box and the .tg-15__tag text clipping silently fails. */
.tg-15__t1 { background-image: linear-gradient(90deg,hsl(0,90%,60%),hsl(30,90%,60%)); }
.tg-15__t2 { background-image: linear-gradient(90deg,hsl(60,90%,50%),hsl(120,90%,45%)); }
.tg-15__t3 { background-image: linear-gradient(90deg,hsl(160,90%,45%),hsl(200,90%,55%)); }
.tg-15__t4 { background-image: linear-gradient(90deg,hsl(240,90%,65%),hsl(280,90%,65%)); }
.tg-15__t5 { background-image: linear-gradient(90deg,hsl(300,90%,60%),hsl(340,90%,60%)); }
.tg-15__note {
font-size: .8rem;
color: var(--muted);
line-height: 1.65;
}
.tg-15__note code {
background: rgba(255,255,255,.07);
border-radius: 3px;
padding: 1px 5px;
color: hsl(200,90%,65%);
}
@media (prefers-reduced-motion: reduce) {
.tg-15__anim { animation: none; background-position: 0% 0%; }
}
```
### 16. CSS Text Gradient with Text Stroke Outline
**Type:** Pure CSS
**Description:** Combines -webkit-text-stroke with background-clip gradient fill, demonstrating stroke-only, fill-only, and stroke-plus-fill patterns side by side.
**HTML:**
```html
COMBINING STROKE + GRADIENT FILL
OUTLINE
Gradient Fill + Stroke
Stroke only
Type
Fill only
Type
Stroke + Fill
Type
Apply -webkit-text-stroke first, then layer gradient via background-clip: text. The stroke paints on top of the clipped gradient fill.
```
**CSS:**
```css
.tg-16, .tg-16 *, .tg-16 *::before, .tg-16 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-16 ::selection { background:#0f172a; color:#e0f2fe; }
.tg-16 {
--g-a: #38bdf8;
--g-b: #818cf8;
--g-c: #e879f9;
--bg: #030609;
--text: #f1f5f9;
--muted: #475569;
--border: rgba(255,255,255,.07);
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 44px 24px;
}
.tg-16__wrapper { max-width: 640px; width: 100%; }
.tg-16__label {
font-size: .65rem;
font-weight: 700;
letter-spacing: .16em;
color: var(--muted);
margin-bottom: 16px;
}
/*
Outlined text: -webkit-text-stroke sets a stroke colour/width,
and -webkit-text-fill-color: transparent makes the fill invisible,
leaving only the outline. We can layer a gradient behind via background-clip
to colour the visible stroke area.
*/
.tg-16__outlined {
font-size: clamp(3.5rem, 12vw, 6.5rem);
font-weight: 900;
letter-spacing: .04em;
line-height: 1;
-webkit-text-stroke: 2px transparent;
/* Use background + clip to colour the stroke itself */
background: linear-gradient(90deg, var(--g-a), var(--g-b), var(--g-c));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
/* Add stroke on top via paint-order if supported */
paint-order: stroke fill;
-webkit-text-stroke: 2px rgba(56,189,248,.6);
margin-bottom: 8px;
display: block;
}
/*
Fill + stroke combined: gradient fill is applied through background-clip,
then -webkit-text-stroke paints over it. Use a semi-transparent or
complementary stroke colour to preserve the gradient beneath.
*/
.tg-16__stroked {
font-size: clamp(1.6rem, 5vw, 2.8rem);
font-weight: 800;
letter-spacing: -.02em;
line-height: 1.1;
background: linear-gradient(90deg, var(--g-a) 0%, var(--g-b) 50%, var(--g-c) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-text-stroke: 1px rgba(232,121,249,.45);
display: block;
margin-bottom: 32px;
}
.tg-16__grid {
display: flex;
gap: 20px;
flex-wrap: wrap;
margin-bottom: 28px;
}
.tg-16__example {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
}
.tg-16__ex-lbl {
font-size: .7rem;
color: var(--muted);
letter-spacing: .06em;
}
.tg-16__stroke-only {
font-size: 3rem;
font-weight: 900;
-webkit-text-stroke: 2px var(--g-a);
-webkit-text-fill-color: transparent;
color: transparent;
}
.tg-16__fill-only {
font-size: 3rem;
font-weight: 900;
background: linear-gradient(90deg, var(--g-b), var(--g-c));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
.tg-16__both {
font-size: 3rem;
font-weight: 900;
background: linear-gradient(90deg, var(--g-a), var(--g-b), var(--g-c));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
-webkit-text-stroke: 1.5px rgba(255,255,255,.35);
}
.tg-16__note {
font-size: .8rem;
color: var(--muted);
line-height: 1.65;
}
.tg-16__note code {
background: rgba(255,255,255,.07);
border-radius: 3px;
padding: 1px 5px;
color: var(--g-a);
font-size: .78em;
}
@media (prefers-reduced-motion: reduce) {}
```
### 17. CSS Text Gradient Fallback for Older Browsers
**Type:** Pure CSS
**Description:** A layered fallback reference with three tiers: plain color, @supports-guarded gradient, and the complete pattern for cross-browser safety.
**HTML:**
```html
Browser Compatibility Strategy
A layered fallback ensures gradient text looks great in modern browsers and degrades gracefully in older ones — no JavaScript required.
Layer 1
Solid color fallback
Set a plain color first. Browsers that don't support background-clip: text will render this.
Solid Fallback
Layer 2
@supports guard
Wrap gradient text rules in @supports (-webkit-background-clip: text) to scope them to capable browsers only.
Guarded Gradient
Layer 3
Result in all engines
Modern browsers get the gradient; IE/old Android fall back to the solid color — readable in both cases.
Final Output
```
**CSS:**
```css
.tg-17, .tg-17 *, .tg-17 *::before, .tg-17 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-17 ::selection { background:#3b82f6; color:#fff; }
.tg-17 {
/* Picked endpoints far apart on the spectrum (cobalt → magenta) so
the gradient transition is obvious — adjacent-hue gradients
(e.g. blue→violet) read as a flat colour at smaller sizes. */
--g-a: #2563eb;
--g-b: #ec4899;
--bg: #f8fafc;
--text: #0f172a;
--muted: #64748b;
--border: #e2e8f0;
--surface: #ffffff;
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
padding: 44px 28px;
display: flex;
align-items: flex-start;
justify-content: center;
}
.tg-17__doc { max-width: 640px; width: 100%; }
.tg-17__h {
font-size: 1.5rem;
font-weight: 800;
color: var(--text);
letter-spacing: -.02em;
margin-bottom: 10px;
}
.tg-17__intro {
color: var(--muted);
font-size: .9rem;
line-height: 1.7;
margin-bottom: 28px;
max-width: 540px;
}
.tg-17__layer-list { display: flex; flex-direction: column; gap: 14px; }
.tg-17__layer {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px 20px 20px 16px;
display: flex;
gap: 16px;
align-items: flex-start;
}
.tg-17__layer strong { display: block; font-size: .9375rem; color: var(--text); margin-bottom: 4px; }
.tg-17__layer p { font-size: .8125rem; color: var(--muted); line-height: 1.55; margin-bottom: 10px; }
.tg-17__layer code {
background: #f1f5f9;
border-radius: 3px;
padding: 1px 5px;
font-size: .78em;
color: var(--g-b);
}
.tg-17__badge {
display: inline-flex;
align-items: center;
justify-content: center;
font-size: .65rem;
font-weight: 700;
letter-spacing: .06em;
border-radius: 6px;
padding: 4px 8px;
flex-shrink: 0;
margin-top: 2px;
white-space: nowrap;
}
.tg-17__badge--1 { background: #fef9c3; color: #854d0e; }
.tg-17__badge--2 { background: #dbeafe; color: #1e40af; }
.tg-17__badge--3 { background: #f3e8ff; color: #6b21a8; }
/* Demo text: Layer 1 — solid fallback colour only */
.tg-17__solid {
font-size: 2.2rem;
font-weight: 800;
color: var(--g-a); /* Fallback: plain colour */
display: block;
letter-spacing: -.02em;
}
/* Layer 2 — @supports guard */
.tg-17__guarded {
font-size: 2.2rem;
font-weight: 800;
color: var(--g-b); /* Fallback */
display: block;
letter-spacing: -.02em;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
.tg-17__guarded {
/* Use background-image (not the shorthand) so background-clip
below survives. The shorthand would reset background-clip to
border-box. */
background-image: linear-gradient(90deg, var(--g-a), var(--g-b));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
display: inline-block;
padding: 0 .05em .1em;
}
}
/* Layer 3 — complete pattern with @supports */
.tg-17__final {
font-size: 2.2rem;
font-weight: 800;
color: var(--g-a);
display: block;
letter-spacing: -.02em;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
.tg-17__final {
background-image: linear-gradient(90deg, var(--g-a) 0%, var(--g-b) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
display: inline-block;
padding: 0 .05em .1em;
}
}
@media (prefers-reduced-motion: reduce) {}
```
### 18. Tailwind CSS Text Gradient Utility Classes
**Type:** Pure CSS
**Description:** A mapping table and live recreation of Tailwind's bg-clip-text, bg-gradient-to-*, from-*, and text-transparent utility patterns using native CSS.
**HTML:**
```html
Tailwind CSS Text GradientUtility Classes
Tailwind achieves gradient text by composing three utility classes. Here's how the framework classes map to raw CSS properties.
Tailwind Class CSS Property
bg-gradient-to-rbackground-image: linear-gradient(to right, …)
from-indigo-500--tw-gradient-from: #6366f1
to-purple-600--tw-gradient-to: #9333ea
bg-clip-text-webkit-background-clip: text; background-clip: text
text-transparentcolor: transparent; -webkit-text-fill-color: transparent
Result — native CSS recreation of the Tailwind output:
bg-gradient-to-r from-cyan-400 to-blue-600
bg-gradient-to-br from-rose-400 via-fuchsia-500 to-indigo-500
bg-gradient-to-r from-emerald-400 to-teal-600
```
**CSS:**
```css
.tg-18, .tg-18 *, .tg-18 *::before, .tg-18 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-18 ::selection { background:#6366f1; color:#fff; }
.tg-18 {
--g-a: #6366f1;
--g-b: #9333ea;
--bg: #ffffff;
--surface: #f8fafc;
--text: #0f172a;
--muted: #64748b;
--border: #e2e8f0;
--head-bg: #f1f5f9;
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
padding: 40px 24px;
display: flex;
justify-content: center;
}
.tg-18__doc { max-width: 660px; width: 100%; }
.tg-18__heading {
font-size: clamp(1.4rem, 4vw, 2rem);
font-weight: 800;
color: var(--text);
letter-spacing: -.03em;
line-height: 1.15;
margin-bottom: 12px;
}
.tg-18__grad {
background: linear-gradient(90deg, var(--g-a), var(--g-b));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
.tg-18__sub {
font-size: .9rem;
color: var(--muted);
line-height: 1.65;
margin-bottom: 24px;
max-width: 520px;
}
.tg-18__table-wrap {
overflow-x: auto;
border: 1px solid var(--border);
border-radius: 10px;
margin-bottom: 24px;
}
.tg-18__table {
width: 100%;
border-collapse: collapse;
font-size: .825rem;
}
.tg-18__table thead { background: var(--head-bg); }
.tg-18__table th {
text-align: left;
padding: 10px 16px;
font-size: .75rem;
font-weight: 700;
letter-spacing: .07em;
color: var(--muted);
border-bottom: 1px solid var(--border);
}
.tg-18__table td {
padding: 10px 16px;
border-bottom: 1px solid var(--border);
color: var(--text);
}
.tg-18__table tr:last-child td { border-bottom: none; }
.tg-18__table code {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 4px;
padding: 2px 6px;
font-size: .775em;
color: var(--g-a);
white-space: nowrap;
}
.tg-18__preview {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
padding: 20px;
}
.tg-18__prev-lbl { font-size: .72rem; font-weight: 700; letter-spacing: .09em; color: var(--muted); margin-bottom: 12px; }
/* Native CSS recreating Tailwind gradient-text utilities */
.tg-18__demo-a {
font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em;
background: linear-gradient(to right, #22d3ee, #2563eb);
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; color: transparent;
margin-bottom: 4px;
}
.tg-18__demo-b {
font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em;
background: linear-gradient(to bottom right, #fb7185, #d946ef, #6366f1);
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; color: transparent;
margin-bottom: 4px;
}
.tg-18__demo-c {
font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em;
background: linear-gradient(to right, #34d399, #0d9488);
-webkit-background-clip: text; background-clip: text;
-webkit-text-fill-color: transparent; color: transparent;
}
@media (prefers-reduced-motion: reduce) {}
```
### 19. CSS Text Gradient on Multiline Paragraph
**Type:** Pure CSS
**Description:** An editorial article demonstrating how background-clip text gradients behave across line-wrapped headings and multiline blockquote elements.
**HTML:**
```html
TECHNIQUE SPOTLIGHT
Design is not just what it looks like— it's how it works.
When a gradient is applied to a multiline element, the background-size covers the full bounding box of the element. This means each line samples a different horizontal section of the gradient, creating a natural shift from top to bottom.
The bounding box of a multiline element spans all its lines. A linear-gradient(to right) stretches across the full width of the widest line — narrower lines sample only part of it, which is why short lines at the end appear different in hue.
Tip: Use display: block or display: inline-block rather than display: inline to ensure the bounding box wraps all lines uniformly.
```
**CSS:**
```css
.tg-19, .tg-19 *, .tg-19 *::before, .tg-19 *::after { margin:0; padding:0; box-sizing:border-box; }
.tg-19 ::selection { background:#4338ca; color:#e0e7ff; }
.tg-19 {
--g-a: #4338ca;
--g-b: #7c3aed;
--g-c: #a21caf;
--bg: #fafaf9;
--text: #1c1917;
--muted: #78716c;
--border: #e7e5e4;
font-family: Georgia, 'Times New Roman', serif;
background: var(--bg);
min-height: 100vh;
padding: 0;
display: flex;
align-items: flex-start;
justify-content: center;
}
.tg-19__article { max-width: 660px; width: 100%; padding: 44px 28px; }
.tg-19__kicker {
font-family: system-ui, sans-serif;
font-size: .7rem;
font-weight: 700;
letter-spacing: .14em;
color: var(--muted);
margin-bottom: 16px;
}
/*
Multiline gradient headline: `display: block` is key — it ensures the
bounding box spans the full container width. The gradient then stretches
across that box and clips to each character.
*/
.tg-19__grad {
display: block;
background: linear-gradient(110deg, var(--g-a) 0%, var(--g-b) 50%, var(--g-c) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
.tg-19__headline {
font-size: clamp(1.8rem, 5vw, 2.75rem);
font-weight: 700;
line-height: 1.25;
letter-spacing: -.02em;
margin-bottom: 24px;
}
.tg-19__body {
font-family: system-ui, sans-serif;
font-size: .9rem;
color: var(--muted);
line-height: 1.75;
margin-bottom: 20px;
}
.tg-19__body code, .tg-19__note code {
font-family: monospace;
font-size: .82em;
background: #f0eee8;
border-radius: 3px;
padding: 1px 5px;
color: var(--g-b);
}
/* Paragraph-level gradient: works well on body text when used sparingly */
.tg-19__grad-para {
display: block;
background: linear-gradient(110deg, var(--g-a) 0%, var(--g-b) 60%, var(--g-c) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
.tg-19__quote {
font-size: 1.05rem;
line-height: 1.7;
border-left: 3px solid;
border-image: linear-gradient(to bottom, var(--g-a), var(--g-c)) 1;
padding-left: 20px;
margin: 0 0 20px;
font-style: italic;
}
.tg-19__quote code {
font-family: monospace;
font-size: .82em;
background: rgba(67,56,202,.08);
border-radius: 3px;
padding: 1px 5px;
-webkit-text-fill-color: var(--g-b);
font-style: normal;
}
.tg-19__note {
font-family: system-ui, sans-serif;
font-size: .8rem;
color: var(--muted);
line-height: 1.6;
}
@media (prefers-reduced-motion: reduce) {}
```
### 20. Dark Mode vs Light Mode CSS Text Gradient
**Type:** CSS + JS
**Description:** A toggle-enabled card that switches between vivid neon gradients (dark) and rich jewel-tone gradients (light) via CSS variables and a JS class swap.
**HTML:**
```html
Adaptive Colour for Every Context
Gradient variables swap automatically between light and dark schemes via prefers-color-scheme and a JS toggle. Vivid saturated gradients work on dark backgrounds; softer, deeper tones on light.
Dark: vivid neon
Light: rich jewel
```
**CSS:**
```css
.tg-20, .tg-20 *, .tg-20 *::before, .tg-20 *::after { margin:0; padding:0; box-sizing:border-box; }
/* Dark defaults */
.tg-20 {
/* Dark-mode gradient: vivid, high-saturation */
--grad: linear-gradient(110deg, #f0abfc 0%, #818cf8 50%, #38bdf8 100%);
--grad-alt: linear-gradient(110deg, #34d399 0%, #06b6d4 100%);
--bg: #06030f;
--surface: #10101a;
--text: #f0e7ff;
--muted: rgba(240,231,255,.5);
--border: rgba(255,255,255,.08);
--toggle-bg: rgba(255,255,255,.07);
--moon-op: 1;
--sun-op: 0;
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 44px 24px;
transition: background .3s, color .3s;
}
/* Light-mode override via media query */
@media (prefers-color-scheme: light) {
.tg-20:not(.tg-20--force-dark) {
--grad: linear-gradient(110deg, #4f46e5 0%, #7c3aed 55%, #a21caf 100%);
--grad-alt: linear-gradient(110deg, #0f766e 0%, #0284c7 100%);
--bg: #f8fafc;
--surface: #ffffff;
--text: #0f172a;
--muted: #64748b;
--border: #e2e8f0;
--toggle-bg: #e2e8f0;
--moon-op: 0;
--sun-op: 1;
}
}
/* JS-toggled light class */
.tg-20--light {
--grad: linear-gradient(110deg, #4f46e5 0%, #7c3aed 55%, #a21caf 100%);
--grad-alt: linear-gradient(110deg, #0f766e 0%, #0284c7 100%);
--bg: #f8fafc;
--surface: #ffffff;
--text: #0f172a;
--muted: #64748b;
--border: #e2e8f0;
--toggle-bg: #e2e8f0;
--moon-op: 0;
--sun-op: 1;
}
.tg-20__card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 18px;
padding: 36px 32px;
max-width: 520px;
width: 100%;
transition: background .3s, border-color .3s;
}
.tg-20__header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 28px;
}
.tg-20__brand { display: flex; align-items: center; gap: 8px; }
.tg-20__icon {
font-size: 1.3rem;
background: var(--grad);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
.tg-20__brand-name { font-size: 1.25rem; font-weight: 800; }
/* Reusable gradient text — driven by --grad variable */
.tg-20__grad {
background: var(--grad);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
.tg-20__grad-text {
background: var(--grad);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
.tg-20__grad-text-alt {
background: var(--grad-alt);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
.tg-20__toggle {
background: var(--toggle-bg);
border: 1px solid var(--border);
border-radius: 8px;
padding: 8px 12px;
cursor: pointer;
transition: background .2s;
position: relative;
width: 44px;
height: 36px;
}
.tg-20__toggle-icon {
position: absolute;
top: 50%; left: 50%;
transform: translate(-50%,-50%);
font-size: 1rem;
transition: opacity .25s;
}
.tg-20__moon { opacity: var(--moon-op); }
.tg-20__sun { opacity: var(--sun-op); }
.tg-20__title {
font-size: clamp(1.6rem, 5vw, 2.5rem);
font-weight: 800;
line-height: 1.15;
letter-spacing: -.03em;
color: var(--text);
margin-bottom: 16px;
transition: color .3s;
}
.tg-20__body {
font-size: .875rem;
color: var(--muted);
line-height: 1.7;
margin-bottom: 22px;
transition: color .3s;
}
.tg-20__body code {
font-size: .8em;
background: var(--border);
border-radius: 3px;
padding: 1px 5px;
color: inherit;
filter: brightness(1.5);
}
.tg-20__chips { display: flex; gap: 10px; flex-wrap: wrap; }
.tg-20__chip {
font-size: .8rem;
font-weight: 700;
padding: 5px 14px;
border-radius: 99px;
border: 1px solid var(--border);
}
@media (prefers-reduced-motion: reduce) {
.tg-20, .tg-20__card, .tg-20__title, .tg-20__body, .tg-20__toggle { transition: none; }
}
```
**JS:**
```js
(function(){
var root = document.getElementById('tg-20-root');
var btn = document.getElementById('tg-20-toggle');
var light = false;
btn.addEventListener('click', function(){
light = !light;
root.classList.toggle('tg-20--light', light);
root.classList.toggle('tg-20--force-dark', !light);
});
})();
```
---
## 24 CSS Timeline Layouts
URL: https://codefronts.com/layouts/css-timelines/
Description: 24 hand-coded CSS timeline layouts — six field-study aesthetics (archaeological dig, concert tour stubs, surgical vitals trace, cinema reel, mission control terminal, fermentation jar calendar), twelve chronological patterns (thread, accordion, filmstrip, nature trail, terminal log, art deco, vertical centered, horizontal scroll, neon rail, editorial, stacked progress, brutalist grid), and six documentation layouts (changelog ticker, editorial spine, split-screen CV, railroad stations, film-strip portfolio, audit ledger). Copy-paste ready.
Demo count: 24
### 01. Stratigraphy Timeline
**Type:** Pure CSS
**Description:** Vertical hover-expand archaeological cross-section. Each layer is a geological era — flex-grow reveals finds when hovered, with a depth ruler on the left and an artifact card panel on the right. Built for museum dig reports, geological surveys, and historical site catalogues.
**HTML:**
```html
0.0m
1.0m
2.5m
3.8m
5.0m
6.4m
Topsoil & Ottoman
CE 1453 – present · 0.0–1.0m
Plowed agricultural soil mixed with glazed Iznik shards, a worn copper para from the reign of Selim II, and clay pipe fragments. Heavy modern disturbance; treat all surface finds as out of context.
Byzantine Habitation
CE 330 – 1200 · 1.0–2.5m
Compacted clay floors of a small basilica, three intact storage amphorae, a hoard of 47 bronze folles, and bone styluses. Evidence of fire damage in the eastern quadrant suggests abandonment by the late 12th century.
Roman Provincial
63 BCE – CE 330 · 2.5–3.8m
Hypocaust tile system, fragment of a tessellated mosaic depicting a stag, two terra sigillata bowls stamped with the maker's mark CAESIVS. Coin of Hadrian recovered at 3.2m.
Hellenistic
323 – 63 BCE · 3.8–4.6m
Lower courses of an ashlar wall (probable agora boundary). Fine black-glaze pottery from Pergamon, three iron arrowheads, and a sealed cache of 12 silver tetradrachms of Eumenes II.
Late Bronze
1600 – 1200 BCE · 4.6–5.6m
Hittite-period storage pithoi in situ, cuneiform tablet fragment (administrative, grain inventory), bronze fibula. Burn layer at 5.4m correlates with the regional collapse horizon documented at Boğazköy.
Neolithic
7000 – 5000 BCE · 5.6–6.4m
Mudbrick platform, obsidian blades sourced to Göllü Dağ, animal bone assemblage (caprines dominant), and the partial remains of a clay figurine — seated female, headless. Sterile soil at 6.4m.
Featured Finds · Season 04
Tetradrachm of Eumenes II
CAT. K7-H-0042 · Layer 4
Silver, 17.1g. Obverse: diademed head of Philetairos. Reverse: seated Athena with shield. Mint of Pergamon, c. 180 BCE.
Cuneiform Inventory Tablet
CAT. K7-B-0117 · Layer 5
Unfired clay, fragmentary. Ten lines of Hittite syllabic script recording wheat (ZÍZ) quantities. Awaiting full transliteration by Eren & Tunç.
Mosaic Stag Fragment
CAT. K7-R-0008 · Layer 3
Tesserae in limestone and smalti, 38×42cm. Likely from the threshold of a peristyle court. Provincial workshop, late 2nd c. CE.
Obsidian Blade Cache
CAT. K7-N-0156 · Layer 6
Six pressure-flaked prismatic blades. XRF analysis confirms Göllü Dağ source, ~270km southeast. Trade evidence for early Neolithic exchange networks.
```
**CSS:**
```css
.tl1-wrap {
background: #1a1410;
color: #e8dfc8;
font-family: 'IBM Plex Mono', ui-monospace, monospace;
padding: 2.5rem 2rem 3rem;
}
.tl1-head {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2.5rem;
margin-bottom: 2rem;
}
.tl1-title {
font-family: 'Cormorant Garamond', Georgia, serif;
font-weight: 400;
font-size: clamp(1.75rem, 4vw, 3rem);
line-height: 0.95;
color: #f0e5cc;
margin: 0;
}
.tl1-title em { font-style: italic; color: #c89860; }
.tl1-meta {
font-size: 11px;
line-height: 1.7;
color: #a89570;
border-left: 1px solid #5a4830;
padding-left: 1rem;
align-self: end;
}
.tl1-meta strong { color: #e8dfc8; display: block; margin-bottom: 0.25rem; }
.tl1-dig {
display: grid;
grid-template-columns: 60px 1fr 260px;
gap: 0;
}
.tl1-ruler {
display: flex;
flex-direction: column;
font-size: 10px;
color: #8a7550;
border-right: 1px solid #5a4830;
}
.tl1-tick {
flex: 1;
padding: 0.5rem 0.5rem 0 0;
text-align: right;
border-top: 1px dashed rgba(138,117,80,0.3);
letter-spacing: 0.1em;
}
.tl1-stack { display: flex; flex-direction: column; }
.tl1-layer {
flex: 1;
min-height: 110px;
padding: 1.25rem 1.5rem;
position: relative;
border-bottom: 2px solid rgba(0,0,0,0.4);
cursor: pointer;
transition: flex 0.6s cubic-bezier(0.7, 0, 0.2, 1);
overflow: hidden;
}
.tl1-layer::before {
content: '';
position: absolute;
inset: 0;
opacity: 0.6;
mix-blend-mode: overlay;
pointer-events: none;
}
.tl1-l1 { background: linear-gradient(180deg, #6b5840, #574332); }
.tl1-l1::before { background: repeating-linear-gradient(45deg, transparent 0 8px, rgba(0,0,0,0.1) 8px 9px); }
.tl1-l2 { background: linear-gradient(180deg, #8a6840, #6e5232); }
.tl1-l2::before { background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0 3px, transparent 3px), radial-gradient(circle at 70% 80%, rgba(0,0,0,0.2) 0 4px, transparent 4px); background-size: 40px 40px, 60px 60px; }
.tl1-l3 { background: linear-gradient(180deg, #a47a48, #80582e); }
.tl1-l3::before { background: repeating-linear-gradient(90deg, transparent 0 20px, rgba(0,0,0,0.08) 20px 22px); }
.tl1-l4 { background: linear-gradient(180deg, #c08850, #9a6638); }
.tl1-l4::before { background: radial-gradient(ellipse at 50% 50%, rgba(255,200,120,0.2), transparent 70%); }
.tl1-l5 { background: linear-gradient(180deg, #7a5a3a, #4e3820); }
.tl1-l5::before { background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(255,255,255,0.04) 4px 5px); }
.tl1-l6 { background: linear-gradient(180deg, #3a2818, #1a1008); }
.tl1-layer:hover { flex: 3; }
.tl1-layer:hover .tl1-find { opacity: 1; transform: translateX(0); }
.tl1-era {
font-family: 'Cormorant Garamond', Georgia, serif;
font-style: italic;
font-size: 1.1rem;
color: #f5ecd1;
text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.tl1-years {
font-size: 10px;
color: rgba(245,236,209,0.7);
letter-spacing: 0.15em;
margin-top: 0.25rem;
}
.tl1-find {
margin-top: 0.75rem;
font-size: 11px;
line-height: 1.6;
color: rgba(245,236,209,0.85);
max-width: 500px;
opacity: 0;
transform: translateX(-20px);
transition: opacity 0.5s 0.2s, transform 0.5s 0.2s;
}
.tl1-artifacts {
border-left: 1px solid #5a4830;
padding: 0 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.tl1-art-title {
font-size: 10px;
letter-spacing: 0.3em;
color: #8a7550;
text-transform: uppercase;
padding-bottom: 0.5rem;
border-bottom: 1px solid #5a4830;
margin: 0 0 0.5rem;
}
.tl1-card {
padding: 0.5rem 0;
border-bottom: 1px dashed rgba(138,117,80,0.3);
}
.tl1-card-name {
font-family: 'Cormorant Garamond', Georgia, serif;
font-size: 1rem;
font-style: italic;
color: #c89860;
}
.tl1-card-id {
font-size: 9px;
color: #8a7550;
letter-spacing: 0.15em;
margin: 0.25rem 0;
}
.tl1-card-desc {
font-size: 10.5px;
line-height: 1.5;
color: #a89570;
}
@media (max-width: 720px) {
.tl1-head { grid-template-columns: 1fr; gap: 1.25rem; }
.tl1-dig { grid-template-columns: 50px 1fr; }
.tl1-artifacts { grid-column: 1 / -1; border-left: none; border-top: 1px solid #5a4830; padding: 1rem 0 0; margin-top: 1rem; }
}
```
### 02. Tour Stub Timeline
**Type:** Pure CSS
**Description:** Horizontal snap-scroll strip of concert ticket stubs. Each card carries a city, venue, set list, and a hand-stamped seal — slightly rotated, with dashed tear-perforations and offset shadows. Built for tour archives, festival lineups, and any event-driven brand history.
**HTML:**
```html
14 · FEB · 2026 · FRI
Reykjavík
Harpa Concert Hall
SET LIST
Northern Static
Glacier Song
Bone Radio
Encore: Aurora
Sold Out
22 · FEB · 2026 · SAT
Berlin
Tempodrom · Kreuzberg
SET LIST
U-Bahn Hymn
Brutalist Love
Concrete Dawn
Encore: Static (live edit)
Few Left
06 · MAR · 2026 · FRI
Marrakech
Jardin Majorelle
SET LIST
Blue Garden
Souk Static
Atlas Lullaby
Encore: Mint Tea
Sold Out
19 · MAR · 2026 · THU
Lagos
Terra Kulture Arena
SET LIST
Harmattan
Static Pt. II
Yellow Bus
Encore: Lagos After Dark
Tix Live
04 · APR · 2026 · SAT
Mexico City
Foro Sol
SET LIST
Xochimilco
Smog Romance
Tláloc
Encore: Mezcal Static
Sold Out
02 · MAY · 2026 · SAT
Tokyo
Nippon Budokan
SET LIST
Shibuya Static
Sakura Loop
Train at 3am
Encore: Hanami Hymn
Few Left
```
**CSS:**
```css
.tl2-wrap {
background: #f4ed47;
color: #1a1a1a;
font-family: 'Archivo', system-ui, sans-serif;
padding: 2rem 0 2.5rem;
position: relative;
overflow: hidden;
}
.tl2-wrap::before {
content: '';
position: absolute;
inset: 0;
background-image: radial-gradient(circle, #1a1a1a 1px, transparent 1.5px);
background-size: 8px 8px;
opacity: 0.08;
pointer-events: none;
}
.tl2-head {
padding: 1rem 2rem 2rem;
display: grid;
grid-template-columns: 1fr auto;
align-items: end;
gap: 1.5rem;
position: relative;
}
.tl2-title {
font-family: 'Anton', 'Archivo', sans-serif;
font-weight: 400;
font-size: clamp(2.25rem, 9vw, 5.5rem);
line-height: 0.85;
letter-spacing: -0.02em;
text-transform: uppercase;
color: #1a1a1a;
margin: 0;
}
.tl2-title-alt {
display: block;
color: #ff2d72;
-webkit-text-stroke: 2px #1a1a1a;
}
.tl2-credits {
font-weight: 900;
font-size: 11px;
line-height: 1.4;
text-transform: uppercase;
letter-spacing: 0.05em;
text-align: right;
border: 3px solid #1a1a1a;
padding: 0.75rem;
background: #f4ed47;
transform: rotate(2deg);
box-shadow: 5px 5px 0 #1a1a1a;
}
.tl2-strip {
display: flex;
gap: 1rem;
padding: 1rem 2rem 2rem;
overflow-x: auto;
scroll-snap-type: x mandatory;
scrollbar-width: thin;
scrollbar-color: #1a1a1a #f4ed47;
position: relative;
}
.tl2-strip::-webkit-scrollbar { height: 6px; }
.tl2-strip::-webkit-scrollbar-thumb { background: #1a1a1a; }
.tl2-stub {
flex: 0 0 270px;
min-height: 400px;
background: #fff;
border: 3px solid #1a1a1a;
box-shadow: 7px 7px 0 #1a1a1a;
position: relative;
scroll-snap-align: start;
transform: rotate(-1deg);
transition: transform 0.35s, box-shadow 0.35s;
display: flex;
flex-direction: column;
cursor: pointer;
}
.tl2-stub:nth-child(odd) { transform: rotate(1.5deg); }
.tl2-stub:nth-child(3n) { transform: rotate(-2deg); }
.tl2-stub:nth-child(5n) { transform: rotate(0.5deg); }
.tl2-stub:hover {
transform: rotate(0deg) translateY(-6px);
box-shadow: 10px 10px 0 #ff2d72;
}
.tl2-stub::before {
content: '';
position: absolute;
left: 0; right: 0;
top: 35%;
border-top: 2px dashed #1a1a1a;
}
.tl2-stub::after {
content: '';
position: absolute;
left: -8px;
top: calc(35% - 8px);
width: 16px; height: 16px;
background: #f4ed47;
border: 3px solid #1a1a1a;
border-radius: 50%;
}
.tl2-top {
padding: 1rem;
flex: 0 0 35%;
background: #fff;
}
.tl2-date {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.15em;
}
.tl2-city {
font-family: 'Anton', 'Archivo', sans-serif;
font-size: 2rem;
line-height: 0.9;
text-transform: uppercase;
margin-top: 0.5rem;
}
.tl2-venue {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.1em;
margin-top: 0.4rem;
color: #555;
}
.tl2-bot {
padding: 1.5rem 1rem 1rem;
flex: 1;
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.tl2-list-head {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 9px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #777;
margin: 0 0 0.5rem;
}
.tl2-setlist {
list-style: none;
padding: 0;
margin: 0;
font-size: 12px;
font-weight: 700;
line-height: 1.5;
counter-reset: tl2-set-num;
}
.tl2-setlist li {
padding: 2px 0;
border-bottom: 1px dotted #ddd;
}
.tl2-setlist li::before {
content: counter(tl2-set-num, decimal-leading-zero) ' · ';
counter-increment: tl2-set-num;
color: #ff2d72;
}
.tl2-seal {
position: absolute;
bottom: 14px;
right: 14px;
width: 54px; height: 54px;
border: 2px solid #ff2d72;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-family: 'Anton', 'Archivo', sans-serif;
font-size: 10px;
color: #ff2d72;
line-height: 1.1;
transform: rotate(-15deg);
text-transform: uppercase;
}
.tl2-sold-out .tl2-seal {
color: #1a1a1a;
border-color: #1a1a1a;
background: #ff2d72;
transform: rotate(-15deg) scale(1.05);
}
@media (max-width: 720px) {
.tl2-head { grid-template-columns: 1fr; }
.tl2-credits { justify-self: start; }
}
```
### 03. Vitals Timeline
**Type:** Pure CSS
**Description:** Clinical procedural timeline with a live EKG SVG trace, four colour-coded readouts (HR, SpO₂, BP, temp), and alert pulses on critical events. Built for surgical case logs, anaesthesia records, and incident retrospectives in healthcare environments.
**HTML:**
```html
07:42T−00:32
Pre-op briefing & timeout
Patient identity, procedure, and site confirmed by surgical team per WHO checklist. Blood products on standby (2u PRBC, 2u FFP). Cardiac echo reviewed.
CHECKLIST CLEAR ECHO ✓
08:14T+00:00
Induction & intubation
Propofol 200mg / fentanyl 200mcg / rocuronium 50mg. ETT 8.0 placed without difficulty, confirmed by capnography and bilateral breath sounds. Arterial line right radial.
AIRWAY ✓ A-LINE R RADIAL
08:46T+00:32
Median sternotomy
Skin incision and sternal split with oscillating saw. Retractor placed. Pericardium opened in inverted-T fashion, sutured to drapes. Heparin 30,000u administered.
ACT pending HEMOSTASIS
09:11T+00:57
Transient hypotension on aortic cannulation
MAP fell to 52 momentarily during cannulation; corrected with 100mcg phenylephrine bolus and 250ml volume. ACT now 480s, on bypass within 90 seconds.
ALERT · MAP 52 CORRECTED CPB INITIATED
09:24T+01:10
Cross-clamp & cardioplegia
Aortic cross-clamp applied. Antegrade cold blood cardioplegia delivered, asystole achieved within 60s. Cooling to 32°C systemic.
XCL 09:24 ARREST CONFIRMED
10:02T+01:48
Triangular resection + annuloplasty ring
P2 segment resected and reapproximated with 4-0 prolene. Cosgrove 32mm annuloplasty band placed with interrupted 2-0 ethibond. Saline test: no regurgitation.
REPAIR ✓ SALINE TEST DRY
10:34T+02:20
Wean from bypass · TEE confirms
Cross-clamp off, spontaneous sinus rhythm. Weaning slow with low-dose epi (0.03 mcg/kg/min). TEE shows trace MR, mean gradient 3mmHg. Sternum closed in standard fashion.
OFF BYPASS TEE: TRACE MR EPI 0.03
```
**CSS:**
```css
.tl3-wrap {
background: #0d1612;
color: #d4e8e0;
font-family: 'JetBrains Mono', ui-monospace, monospace;
padding: 2rem;
}
.tl3-head {
display: flex;
justify-content: space-between;
align-items: end;
margin-bottom: 1.5rem;
border-bottom: 1px solid #2a4038;
padding-bottom: 1rem;
gap: 1.5rem;
}
.tl3-title {
font-family: Georgia, serif;
font-weight: 400;
font-size: clamp(1.5rem, 4vw, 2.5rem);
line-height: 1;
color: #fff;
letter-spacing: -0.02em;
margin: 0;
}
.tl3-title em { font-style: italic; color: #4fc88f; }
.tl3-patient {
font-size: 10.5px;
line-height: 1.6;
text-align: right;
color: #8aaaa0;
}
.tl3-patient strong { color: #fff; }
.tl3-monitor {
background: #060d0a;
border: 1px solid #2a4038;
border-radius: 4px;
padding: 1.25rem;
margin-bottom: 1.25rem;
position: relative;
overflow: hidden;
}
.tl3-monitor::before {
content: '';
position: absolute;
inset: 0;
background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(79,200,143,0.03) 3px 4px);
pointer-events: none;
}
.tl3-readouts {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1.25rem;
margin-bottom: 0.75rem;
}
.tl3-readout { border-left: 2px solid; padding-left: 0.75rem; }
.tl3-hr { border-color: #ff4d6d; }
.tl3-sp { border-color: #4fc88f; }
.tl3-bp { border-color: #ffa726; }
.tl3-tp { border-color: #4dc4ff; }
.tl3-lbl {
font-size: 9px;
letter-spacing: 0.2em;
color: #8aaaa0;
text-transform: uppercase;
}
.tl3-val {
font-size: 1.75rem;
font-weight: 700;
line-height: 1;
margin-top: 0.25rem;
}
.tl3-hr .tl3-val { color: #ff4d6d; }
.tl3-sp .tl3-val { color: #4fc88f; }
.tl3-bp .tl3-val { color: #ffa726; }
.tl3-tp .tl3-val { color: #4dc4ff; }
.tl3-unit {
font-size: 10px;
color: #8aaaa0;
margin-left: 4px;
font-weight: 400;
}
.tl3-ekg { height: 70px; width: 100%; position: relative; }
.tl3-ekg svg { width: 100%; height: 100%; display: block; }
.tl3-trace {
stroke: #4fc88f;
stroke-width: 1.5;
fill: none;
stroke-dasharray: 3000;
stroke-dashoffset: 3000;
animation: tl3-ekg 4s linear infinite;
filter: drop-shadow(0 0 4px rgba(79,200,143,0.6));
}
@keyframes tl3-ekg { to { stroke-dashoffset: 0; } }
.tl3-timeline {
position: relative;
padding: 1rem 0;
}
.tl3-timeline::before {
content: '';
position: absolute;
left: 24px;
top: 0; bottom: 0;
width: 1px;
background: linear-gradient(180deg, #2a4038, #4fc88f, #2a4038);
}
.tl3-step {
display: grid;
grid-template-columns: 90px 1fr;
gap: 1.5rem;
padding: 0.75rem 0 1.25rem;
position: relative;
}
.tl3-time {
font-size: 12px;
font-weight: 700;
color: #4fc88f;
letter-spacing: 0.05em;
text-align: right;
}
.tl3-elapsed {
display: block;
font-size: 9px;
color: #8aaaa0;
letter-spacing: 0.15em;
margin-top: 2px;
font-weight: 400;
}
.tl3-step::after {
content: '';
position: absolute;
left: 19px;
top: 18px;
width: 11px; height: 11px;
background: #0d1612;
border: 2px solid #4fc88f;
border-radius: 50%;
transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
}
.tl3-step:hover::after {
background: #4fc88f;
transform: scale(1.4);
box-shadow: 0 0 12px rgba(79,200,143,0.8);
}
.tl3-step-title {
font-family: Georgia, serif;
font-weight: 700;
font-size: 1.1rem;
color: #fff;
margin: 0 0 0.35rem;
}
.tl3-step-body {
font-size: 11.5px;
line-height: 1.6;
color: #a8c0b8;
max-width: 700px;
margin: 0;
}
.tl3-tags {
display: flex;
gap: 0.5rem;
margin-top: 0.5rem;
flex-wrap: wrap;
}
.tl3-tag {
font-size: 9px;
letter-spacing: 0.15em;
text-transform: uppercase;
padding: 3px 8px;
border: 1px solid #2a4038;
color: #8aaaa0;
}
.tl3-tag.tl3-crit { color: #ff4d6d; border-color: #ff4d6d; }
.tl3-tag.tl3-ok { color: #4fc88f; border-color: #4fc88f; }
.tl3-alert::after {
border-color: #ff4d6d;
animation: tl3-pulse-alert 1.5s infinite;
}
.tl3-alert .tl3-step-title { color: #ff4d6d; }
@keyframes tl3-pulse-alert {
0%, 100% { box-shadow: 0 0 0 0 rgba(255,77,109,0.6); }
50% { box-shadow: 0 0 0 8px rgba(255,77,109,0); }
}
@media (max-width: 720px) {
.tl3-head { flex-direction: column; align-items: flex-start; }
.tl3-patient { text-align: left; }
.tl3-readouts { grid-template-columns: repeat(2, 1fr); }
}
```
### 04. Film Reel Timeline
**Type:** Pure CSS
**Description:** Vertical cinema reel with sprocket-hole borders top and bottom, three-column frames (frame number, scene still, director notes), and an Italianate Playfair display headline. Built for production diaries, film festival retrospectives, and any project broken into named phases.
**HTML:**
```html
Phase · Development
The script arrives in seventeen drafts, each quieter than the last.
FEB 2024 — SEP 2024 · 7 months
Vance options the Carrigan novella in February. By May, the first treatment removes nearly all dialogue from Act II. Greenlit at $4.2M.
"I want it to feel like the audience is also a guest at the lighthouse, unsure if they should be there." — H.V., production notes
Phase · Pre-production
A coastline is chosen for its refusal to behave .
OCT 2024 — JAN 2025 · 4 months
Location scouting along the Orkney archipelago. Eilean Mòr cleared with Trust for Scotland after three rejections. Cast: McTavish, Okwukwe, Andersson.
"The lighthouse keeps its own counsel. We adjust to it." — Production designer Imani Royle
Phase · Principal Photography
Forty-two days, nineteen of which are unusable for weather .
FEB 2025 — APR 2025 · 60 days scheduled
Generator failure on day 8 destroys eight reels of magic-hour exterior. Reshot under impossibly similar light on day 31 — a small miracle credited to gaffer J. Sallows.
"Day 31 was a gift. We do not deserve day 31." — H.V., daily journal
Phase · Post-production
Six months of cutting silence .
MAY 2025 — OCT 2025 · 6 months
First assembly runs 187 minutes. Final cut at 104. Sound designer L. Mbeki records 38 distinct varieties of wind on a custom rig.
"You don't edit toward a runtime. You edit toward a heartbeat." — Editor Sofia Larsen
Phase · Scoring
A composer who promises almost no notes .
AUG 2025 — NOV 2025 · 4 months overlap
Hildur Stefánsdóttir records with 14 strings and a single bass clarinet. Final score is 31 minutes against a 104-minute film. The silence is the score's instrument too.
"Most films use music to fill. We use it to make the silence audible." — H.S.
Phase · Release
A premiere in October light .
11 OCT 2025 · London Film Festival
World premiere at the BFI Southbank. Standing ovation: 9 minutes. Picked up by A24 for North American distribution within the week.
"For two hours, the audience was a fourth keeper at the lighthouse." — Variety review
```
**CSS:**
```css
.tl4-wrap {
background: #1c0e08;
color: #e8d8b8;
font-family: 'Special Elite', ui-monospace, monospace;
padding: 2.5rem 2rem 4rem;
}
.tl4-head {
margin-bottom: 2.5rem;
text-align: center;
}
.tl4-overline {
font-size: 11px;
letter-spacing: 0.4em;
color: #d4a574;
text-transform: uppercase;
margin-bottom: 1rem;
}
.tl4-title {
font-family: 'Playfair Display', Georgia, serif;
font-style: italic;
font-weight: 400;
font-size: clamp(2rem, 6vw, 4rem);
line-height: 1;
color: #f0dfb8;
margin: 0;
}
.tl4-title strong {
font-style: normal;
font-weight: 900;
display: block;
color: #c4391f;
letter-spacing: -0.02em;
text-transform: uppercase;
-webkit-text-stroke: 1px #f0dfb8;
}
.tl4-credits {
font-size: 10px;
color: #a08770;
margin-top: 1rem;
letter-spacing: 0.15em;
}
.tl4-reel {
position: relative;
max-width: 1000px;
margin: 0 auto;
background: #0d0604;
border-top: 22px solid #2a1810;
border-bottom: 22px solid #2a1810;
box-shadow:
inset 0 26px 50px rgba(0,0,0,0.6),
0 24px 60px rgba(0,0,0,0.8);
}
.tl4-reel::before, .tl4-reel::after {
content: '';
position: absolute;
left: 0; right: 0;
height: 22px;
background-image: radial-gradient(circle at 14px center, #f0dfb8 0 5px, transparent 6px);
background-size: 28px 22px;
background-repeat: repeat-x;
}
.tl4-reel::before { top: -22px; }
.tl4-reel::after { bottom: -22px; }
.tl4-frame {
display: grid;
grid-template-columns: 70px 1fr 1fr;
border-bottom: 1px solid #2a1810;
min-height: 180px;
position: relative;
transition: background 0.4s;
cursor: pointer;
}
.tl4-frame:last-child { border-bottom: none; }
.tl4-frame:hover { background: rgba(196,57,31,0.08); }
.tl4-num {
border-right: 1px solid #2a1810;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 1.25rem 0;
background: #0a0402;
color: #d4a574;
}
.tl4-n {
font-family: 'Playfair Display', Georgia, serif;
font-style: italic;
font-size: 2rem;
line-height: 1;
color: #f0dfb8;
}
.tl4-num-lbl {
font-size: 9px;
letter-spacing: 0.25em;
margin-top: 0.75rem;
text-transform: uppercase;
color: #a08770;
writing-mode: vertical-rl;
}
.tl4-still {
border-right: 1px solid #2a1810;
padding: 1.25rem;
background: linear-gradient(135deg, #1a0c06, #0d0604);
display: flex;
flex-direction: column;
justify-content: space-between;
}
.tl4-scene {
font-family: 'Playfair Display', Georgia, serif;
font-style: italic;
font-size: 1.25rem;
line-height: 1.2;
color: #f0dfb8;
}
.tl4-phase {
font-style: normal;
font-weight: 900;
text-transform: uppercase;
color: #c4391f;
font-size: 12px;
display: block;
letter-spacing: 0.1em;
margin-bottom: 0.5rem;
}
.tl4-slate {
font-size: 10px;
color: #a08770;
letter-spacing: 0.15em;
text-transform: uppercase;
border-top: 1px dashed #5a4030;
padding-top: 0.5rem;
}
.tl4-notes {
padding: 1.25rem;
font-size: 11.5px;
line-height: 1.7;
color: #c4b090;
}
.tl4-notes p { margin: 0 0 0.5rem; }
.tl4-director {
font-family: 'Playfair Display', Georgia, serif;
font-style: italic;
font-size: 12.5px;
color: #d4a574;
border-left: 2px solid #c4391f;
padding-left: 0.75rem;
margin-top: 0.75rem;
}
@media (max-width: 720px) {
.tl4-frame { grid-template-columns: 50px 1fr; }
.tl4-notes { grid-column: 1 / -1; border-top: 1px solid #2a1810; }
}
```
### 05. Mission Control Timeline
**Type:** Pure CSS
**Description:** Space-program terminal aesthetic with T-minus countdown, telemetry rows, status pills (GO, HOLD, CRIT) and per-event gauge bars driven by --g custom properties. CRT scanlines and phosphor glow give a Cape Canaveral readout feel. Built for launch logs, deploy timelines, and ops postmortems.
**HTML:**
```html
T-Time
Stat
Event
Telem
T−14h
GO
WET DRESS REHEARSAL Tanking sequence completed. LOX/RP-1 propellant load confirmed at 100%. All vent valves cycled.
100%
T−02h
GO
RANGE GREEN Eastern Range clear. Air traffic and maritime traffic confirmed outside exclusion zone. Wx 76% favorable.
76%
T−45m
HOLD
TANKING HOLD · LH2 Upper-stage LH2 fill pressure 2.3 PSI above nominal. Bleed valve cycling. Recovery in progress.
HOLD
T−42m
RESUME
HOLD RELEASED LH2 fill pressure nominal at 14.8 PSI. Count resumed. Loss-of-window risk: low.
98%
T−10m
GO
TERMINAL COUNT FTS armed. APU spin-up complete. Launch director polls all stations: GO for launch.
99%
T+00:00
LIFT
IGNITION & LIFTOFF 27 Merlin engines at 100% throttle. Tower cleared at T+7. Pitch program initiated at T+9.
7.6M LBF
T+01:08
NOM
MAX-Q Vehicle passes maximum dynamic pressure at 11.2 km altitude. Throttle-down complete, throttling back up.
Q=33
T+02:42
SEP
BECO & STAGE SEP Boost engine cutoff. Side cores separate cleanly. Upper stage MVac ignition confirmed.
+147km
T+08:34
CRIT
UPPER STAGE ANOMALY Telemetry dropout on FCC-2. Backup channel active. Crew safe; redundancy nominal but logged for review.
REDX
T+12:18
ORB
ORBITAL INSERTION Parking orbit confirmed: 185 × 192 km @ 28.5°. TLI burn scheduled for T+02:14:00.
ORBIT✓
ALT187km
VEL7.79km/s
DOWNRANGE2,140km
ΔV LEFT3,148m/s
SIGNAL−104dBm
CREWN/A
```
**CSS:**
```css
.tl5-wrap {
background: #000;
color: #00ff88;
font-family: 'JetBrains Mono', ui-monospace, monospace;
padding: 2rem;
position: relative;
overflow: hidden;
}
.tl5-wrap::before {
content: '';
position: absolute;
inset: 0;
background:
radial-gradient(ellipse at 50% 50%, rgba(0,255,136,0.06), transparent 60%),
repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,255,136,0.02) 2px 3px);
pointer-events: none;
z-index: 1;
}
.tl5-wrap > * { position: relative; z-index: 2; }
.tl5-head {
margin-bottom: 1.5rem;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 1.25rem;
border-bottom: 1px solid #006633;
padding-bottom: 1.25rem;
}
.tl5-title {
font-family: 'Major Mono Display', 'JetBrains Mono', ui-monospace, monospace;
font-size: clamp(1.25rem, 3vw, 2rem);
color: #00ff88;
line-height: 1;
text-shadow: 0 0 12px rgba(0,255,136,0.5);
letter-spacing: -0.02em;
margin: 0;
}
.tl5-sub {
display: block;
font-size: 0.5em;
color: #ffaa00;
margin-top: 0.5rem;
text-shadow: 0 0 8px rgba(255,170,0,0.5);
}
.tl5-telemetry {
font-size: 10.5px;
line-height: 1.7;
color: #00cc6a;
}
.tl5-row {
display: flex;
justify-content: space-between;
border-bottom: 1px dashed #003322;
padding: 2px 0;
}
.tl5-row span:last-child { color: #00ff88; }
.tl5-countdown { text-align: right; }
.tl5-cd-label {
font-size: 10px;
letter-spacing: 0.3em;
color: #ffaa00;
}
.tl5-clock {
font-family: 'VT323', 'JetBrains Mono', ui-monospace, monospace;
font-size: 3rem;
line-height: 1;
color: #ff3355;
text-shadow: 0 0 14px rgba(255,51,85,0.7);
margin-top: 0.25rem;
}
.tl5-blink { animation: tl5-blink 1s steps(2) infinite; }
@keyframes tl5-blink { 50% { opacity: 0; } }
.tl5-log {
border: 1px solid #006633;
background: rgba(0,20,12,0.6);
}
.tl5-log-head {
display: grid;
grid-template-columns: 90px 60px 1fr 80px;
gap: 1rem;
padding: 0.6rem 1.25rem;
background: #003322;
font-size: 9px;
letter-spacing: 0.3em;
text-transform: uppercase;
color: #00cc6a;
border-bottom: 1px solid #006633;
}
.tl5-event {
display: grid;
grid-template-columns: 90px 60px 1fr 80px;
gap: 1rem;
padding: 0.85rem 1.25rem;
border-bottom: 1px dashed #003322;
align-items: center;
transition: background 0.2s;
cursor: pointer;
}
.tl5-event:hover { background: rgba(0,255,136,0.06); }
.tl5-tmin { font-size: 13px; color: #ffaa00; font-weight: 700; }
.tl5-stat {
font-size: 9.5px;
letter-spacing: 0.15em;
text-align: center;
padding: 2px 6px;
border: 1px solid;
}
.tl5-stat.tl5-go { color: #00ff88; border-color: #00ff88; }
.tl5-stat.tl5-hold { color: #ffaa00; border-color: #ffaa00; }
.tl5-stat.tl5-nom { color: #00cc6a; border-color: #00cc6a; }
.tl5-stat.tl5-crit {
color: #ff3355;
border-color: #ff3355;
animation: tl5-blink 0.8s infinite;
}
.tl5-msg { font-size: 12px; color: #d4ffe8; line-height: 1.4; }
.tl5-msg strong { color: #00ff88; display: inline-block; margin-right: 0.5rem; }
.tl5-gauge {
font-family: 'VT323', 'JetBrains Mono', ui-monospace, monospace;
font-size: 14px;
color: #00cc6a;
text-align: right;
}
.tl5-bar {
display: block;
height: 4px;
margin-top: 2px;
background: #003322;
position: relative;
}
.tl5-bar::after {
content: '';
position: absolute;
left: 0; top: 0; bottom: 0;
width: var(--g, 50%);
background: #00ff88;
box-shadow: 0 0 6px #00ff88;
}
.tl5-bar-hold::after { background: #ffaa00; box-shadow: 0 0 6px #ffaa00; }
.tl5-bar-crit::after { background: #ff3355; box-shadow: 0 0 6px #ff3355; }
.tl5-status-bar {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 0.75rem;
margin-top: 1.25rem;
padding-top: 1.25rem;
border-top: 1px solid #006633;
font-size: 9.5px;
letter-spacing: 0.15em;
text-transform: uppercase;
}
.tl5-item {
padding: 0.5rem;
border: 1px solid #006633;
text-align: center;
}
.tl5-item .tl5-v {
display: block;
font-family: 'VT323', 'JetBrains Mono', ui-monospace, monospace;
font-size: 20px;
color: #00ff88;
margin-top: 2px;
text-shadow: 0 0 6px rgba(0,255,136,0.5);
}
@media (max-width: 720px) {
.tl5-head, .tl5-log-head, .tl5-event { grid-template-columns: 1fr; gap: 0.5rem; }
.tl5-status-bar { grid-template-columns: repeat(3, 1fr); }
.tl5-countdown { text-align: left; }
}
```
### 06. Fermentation Calendar
**Type:** Pure CSS
**Description:** Hand-drawn 21-day grid where each day is a glass jar SVG with rising bubble animations and an activity bar. Soft EB Garamond + Caveat typography on cream paper. Peak days are highlighted in terracotta. Built for time-lapse projects, recipe diaries, and any patient process measured by days.
**HTML:**
```html
Sourdough Starter A 21-day Diary
before you begin —
You need almost nothing. A glass jar, a wooden spoon, room around 22°C, and the patience of someone who has never been in a hurry.
— rye flour, room-temp water, a kitchen with a window
mon
tue
wed
thu
fri
sat
sun
day 3 — first acid
tasting note
Sharp, almost like green apple peel. Bubbles smaller than a poppy seed. You will think it has failed. It has not.
day 10 — peak one
tasting note
Yogurt and warm wheat. Doubles in four hours. The smell will rearrange your kitchen — in a good way.
day 21 — the bread
tasting note
Crust like old porcelain, crumb the color of evening light. A faint sweetness underneath the sour. Now you have a friend for life.
```
**CSS:**
```css
.tl6-wrap {
background: #f5ecd9;
color: #3a2a1a;
font-family: Georgia, serif;
padding: 2.5rem 2rem 3rem;
position: relative;
overflow: hidden;
}
.tl6-wrap::before {
content: '';
position: absolute;
inset: 0;
background-image:
radial-gradient(circle at 20% 30%, rgba(184, 92, 56, 0.04) 0 80px, transparent 80px),
radial-gradient(circle at 80% 70%, rgba(106, 130, 90, 0.06) 0 100px, transparent 100px),
radial-gradient(circle at 50% 50%, rgba(146, 89, 130, 0.03) 0 60px, transparent 60px);
pointer-events: none;
}
.tl6-wrap > * { position: relative; }
.tl6-head {
margin-bottom: 2rem;
display: grid;
grid-template-columns: 1fr 340px;
gap: 2rem;
align-items: end;
}
.tl6-title {
font-family: Georgia, serif;
font-style: italic;
font-weight: 400;
font-size: clamp(1.75rem, 5vw, 3rem);
line-height: 0.95;
color: #3a2a1a;
margin: 0;
}
.tl6-swash {
font-family: Georgia, cursive;
color: #b85c38;
font-weight: 700;
font-style: normal;
display: block;
font-size: 1.2em;
transform: rotate(-2deg) translateX(20px);
}
.tl6-recipe {
background: #fff8e8;
border: 1px solid #c4ab85;
padding: 1rem;
transform: rotate(1deg);
box-shadow: 4px 4px 0 rgba(58,42,26,0.1);
position: relative;
}
.tl6-recipe::before {
content: '';
position: absolute;
top: -10px; left: 50%;
width: 60px; height: 16px;
background: rgba(184, 92, 56, 0.3);
transform: translateX(-50%) rotate(-3deg);
}
.tl6-recipe-head {
font-family: cursive;
font-size: 1.35rem;
color: #b85c38;
margin: 0 0 0.5rem;
font-weight: 700;
}
.tl6-recipe p {
font-size: 13px;
line-height: 1.5;
color: #5a3e2a;
margin: 0 0 0.5rem;
}
.tl6-ing {
font-family: cursive;
font-size: 1rem !important;
color: #6a4a3a !important;
}
.tl6-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 0.75rem;
}
.tl6-day-label {
font-family: cursive;
font-size: 1.15rem;
color: #b85c38;
text-align: center;
padding-bottom: 0.5rem;
border-bottom: 1.5px dashed #c4ab85;
}
.tl6-day {
aspect-ratio: 1;
background: #fff8e8;
border: 1.5px solid #c4ab85;
padding: 0.5rem;
display: flex;
flex-direction: column;
cursor: pointer;
transition: transform 0.3s, box-shadow 0.3s;
overflow: hidden;
}
.tl6-day:hover {
transform: translateY(-4px) rotate(-1deg);
box-shadow: 4px 6px 0 rgba(58,42,26,0.15);
z-index: 3;
}
.tl6-num {
font-family: Georgia, serif;
font-style: italic;
font-size: 13px;
color: #6a4a3a;
}
.tl6-stage {
font-family: cursive;
font-size: 0.9rem;
line-height: 1.1;
color: #3a2a1a;
margin-top: auto;
}
.tl6-jar {
width: 44px;
height: 54px;
margin: 4px auto;
}
.tl6-jar svg { width: 100%; height: 100%; }
.tl6-bubble {
fill: rgba(255,255,255,0.6);
animation: tl6-rise 3s ease-in infinite;
}
@keyframes tl6-rise {
0% { transform: translateY(0); opacity: 0; }
20% { opacity: 1; }
100% { transform: translateY(-30px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
.tl6-bubble { animation: none; opacity: 0.6; }
}
.tl6-peak { background: #ffe9c4; border-color: #b85c38; }
.tl6-peak .tl6-stage { color: #b85c38; font-weight: 700; }
.tl6-act {
height: 4px;
background: rgba(196,171,133,0.3);
margin-top: 4px;
position: relative;
}
.tl6-act::after {
content: '';
position: absolute;
inset: 0;
width: var(--act, 0%);
background: linear-gradient(90deg, #6a825a, #b85c38);
}
.tl6-tasting {
margin-top: 2rem;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 1.25rem;
padding-top: 1.5rem;
border-top: 1px solid #c4ab85;
}
.tl6-note {
font-style: italic;
font-size: 14px;
line-height: 1.6;
color: #5a3e2a;
padding-left: 1rem;
border-left: 2px solid #b85c38;
}
.tl6-note-head {
font-family: cursive;
font-style: normal;
font-size: 1.25rem;
color: #b85c38;
margin: 0 0 0.25rem;
font-weight: 700;
}
.tl6-note-day {
font-style: normal;
font-size: 10px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #6a4a3a;
margin-bottom: 0.5rem;
}
@media (max-width: 720px) {
.tl6-head { grid-template-columns: 1fr; gap: 1.25rem; }
.tl6-grid { grid-template-columns: repeat(4, 1fr); }
.tl6-tasting { grid-template-columns: 1fr; }
}
```
### 07. Thread Timeline
**Type:** Pure CSS
**Description:** Conversational thread format where each moment reads like a message. Tight left-aligned thread line with chat-bubble entries and system-event dividers. Perfect for healthcare patient histories, support ticket logs, or onboarding checklists that tell a human story step by step.
**HTML:**
```html
●
Patient record opened · Case #PT-20419 · Admitted 08 Jan 2025
DR
Dr. Ananya Rao — Attending
Initial assessment complete. Patient presents with persistent fatigue and elevated markers. Ordering full metabolic panel and chest imaging. Suspect autoimmune involvement — referring to rheumatology.
08 Jan 2025 · 09:14
LB
Lab Results — Pathology
ANA titre: 1:320 (positive). Anti-dsDNA elevated at 48 IU/mL. ESR 72 mm/hr. Results forwarded to rheumatology and attending physician.
10 Jan 2025 · 14:32
RH
Dr. Marcos Lima — Rheumatology
Based on clinical picture and serology, diagnosis consistent with SLE. Initiating hydroxychloroquine 400mg daily. Scheduling follow-up in 6 weeks. Patient counselled on sun avoidance and flare recognition.
15 Jan 2025 · 11:05
✓
Medication dispensed · Pharmacy confirmed · Insurance pre-auth approved
NS
Nurse Yuki Tanaka — Follow-up
6-week check-in completed. Patient reports reduced fatigue, joint pain improved significantly. No adverse drug reactions noted. Labs trending in right direction — ESR down to 41 mm/hr.
26 Feb 2025 · 10:20
```
**CSS:**
```css
.tl7-wrap {
--tl7-bg: #0c1117;
--tl7-a: #00e5c8;
background: var(--tl7-bg);
padding: 2.5rem 1.75rem;
max-width: 600px;
margin: 0 auto;
position: relative;
font-family: 'Inter', system-ui, sans-serif;
}
.tl7-thread {
position: absolute;
left: calc(1.75rem + 19px);
top: 2.5rem;
bottom: 2.5rem;
width: 1px;
background: linear-gradient(to bottom, var(--tl7-a), rgba(0,229,200,0.05));
}
.tl7-entry {
display: flex;
gap: 1.25rem;
align-items: flex-start;
margin-bottom: 1.5rem;
position: relative;
}
.tl7-entry:last-child { margin-bottom: 0; }
.tl7-avatar {
width: 38px;
height: 38px;
border-radius: 50%;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.5px;
color: var(--tl7-a);
position: relative;
z-index: 2;
border: 1px solid rgba(0,229,200,0.3);
background: rgba(0,229,200,0.08);
box-shadow: 0 0 0 3px var(--tl7-bg);
}
.tl7-bubble {
flex: 1;
background: rgba(255,255,255,0.04);
border: 1px solid rgba(255,255,255,0.07);
border-radius: 4px 16px 16px 16px;
padding: 0.85rem 1rem;
transition: border-color 0.2s, background 0.2s;
}
.tl7-bubble:hover {
background: rgba(0,229,200,0.05);
border-color: rgba(0,229,200,0.2);
}
.tl7-who {
font-family: ui-monospace, monospace;
font-size: 11px;
color: var(--tl7-a);
letter-spacing: 0.5px;
margin-bottom: 0.3rem;
}
.tl7-msg {
font-size: 13.5px;
color: rgba(255,255,255,0.78);
line-height: 1.6;
}
.tl7-ts {
display: block;
font-family: ui-monospace, monospace;
font-size: 10px;
color: rgba(255,255,255,0.3);
margin-top: 0.5rem;
}
.tl7-system .tl7-bubble {
background: transparent;
border-style: dashed;
border-color: rgba(255,255,255,0.08);
border-radius: 8px;
text-align: center;
}
.tl7-system .tl7-msg {
font-family: ui-monospace, monospace;
font-size: 11px;
color: rgba(255,255,255,0.4);
letter-spacing: 0.5px;
text-transform: uppercase;
}
.tl7-avatar-ok {
background: rgba(0,229,200,0.12);
border-color: rgba(0,229,200,0.3);
color: var(--tl7-a);
}
.tl7-bubble-ok {
border-color: rgba(0,229,200,0.2) !important;
background: rgba(0,229,200,0.04) !important;
}
@media (max-width: 480px) {
.tl7-wrap { padding: 1.5rem 1rem; }
.tl7-thread { left: calc(1rem + 19px); }
}
```
### 08. Accordion Timeline
**Type:** Pure CSS + tiny JS
**Description:** Collapsible year-rows that expand to reveal structured detail panels. Built for legislation history, contract amendments, compliance records — anywhere dense information must be scannable before it is readable. The accordion uses a small onclick handler so only one row stays open at a time.
**HTML:**
```html
1998
Data Protection Act Enacted
▾
Jurisdiction
United Kingdom. Replaced the 1984 Act. Implemented the EC Data Protection Directive 95/46/EC into domestic law.
Key Provisions
Eight data protection principles governing fair processing, purpose limitation, data accuracy, and subject access rights.
2002
Privacy & Electronic Comms Enacted
▾
Scope
Regulated direct marketing, cookies, and electronic communications. First major regulation to address unsolicited email.
Amendment (2011)
Cookie consent requirements strengthened following EU pressure. Opt-in became mandatory for non-essential tracking.
2018
GDPR / DPA 2018 Enacted
▾
Scale
EU-wide regulation with extraterritorial effect. Maximum fines of €20M or 4% of global annual turnover, whichever is higher.
New Rights
Right to erasure, data portability, and objection to automated decision-making formally enshrined for the first time.
2022
UK GDPR Post-Brexit Amended
▾
Divergence
UK retained GDPR principles but began diverging from EU text. Government proposed reforms to reduce compliance burden for SMEs.
Adequacy Decision
EU granted UK adequacy status until 2025, permitting data flows. Subject to ongoing review as UK law evolves independently.
```
**CSS:**
```css
.tl8-wrap {
--tl8-bg: #faf7f2;
--tl8-a: #b5451b;
--tl8-ink: #1a1209;
background: var(--tl8-bg);
padding: 2rem 1.5rem;
max-width: 780px;
margin: 0 auto;
font-family: 'Inter', system-ui, sans-serif;
border-top: 2px solid var(--tl8-ink);
}
.tl8-row {
border-bottom: 1px solid rgba(26,18,9,0.12);
}
.tl8-head {
display: grid;
grid-template-columns: 90px 1fr 28px;
gap: 1.5rem;
align-items: center;
padding: 1.1rem 0;
cursor: pointer;
transition: padding 0.15s;
}
.tl8-head:hover {
padding-left: 0.5rem;
}
.tl8-year {
font-family: Georgia, 'Times New Roman', serif;
font-size: 1.35rem;
font-weight: 600;
color: var(--tl8-ink);
}
.tl8-summary {
font-family: Georgia, 'Times New Roman', serif;
font-size: 0.95rem;
color: var(--tl8-ink);
}
.tl8-arrow {
width: 28px;
height: 28px;
border: 1px solid rgba(26,18,9,0.25);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
color: var(--tl8-ink);
transition: transform 0.3s, background 0.2s, color 0.2s;
flex-shrink: 0;
}
.tl8-row.tl8-open .tl8-arrow {
transform: rotate(180deg);
background: var(--tl8-ink);
color: var(--tl8-bg);
}
.tl8-body {
overflow: hidden;
max-height: 0;
transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
}
.tl8-row.tl8-open .tl8-body {
max-height: 400px;
}
.tl8-body-inner {
padding: 0 0 1.5rem 6rem;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.25rem;
}
.tl8-detail {
background: #fff;
border: 1px solid rgba(26,18,9,0.1);
padding: 0.9rem 1rem;
border-radius: 2px;
}
.tl8-detail-label {
font-family: ui-monospace, monospace;
font-size: 10.5px;
letter-spacing: 1.5px;
text-transform: uppercase;
color: var(--tl8-a);
margin-bottom: 0.4rem;
}
.tl8-detail-text {
font-family: Georgia, 'Times New Roman', serif;
font-size: 13.5px;
color: rgba(26,18,9,0.65);
line-height: 1.6;
}
.tl8-badge {
display: inline-block;
font-family: ui-monospace, monospace;
font-size: 10px;
letter-spacing: 0.5px;
padding: 0.15rem 0.5rem;
border-radius: 2px;
margin-left: 0.5rem;
vertical-align: middle;
}
.tl8-badge-en {
background: rgba(27,67,50,0.12);
color: #1b4332;
}
.tl8-badge-am {
background: rgba(181,69,27,0.1);
color: var(--tl8-a);
}
@media (max-width: 600px) {
.tl8-head { grid-template-columns: 70px 1fr 28px; gap: 0.75rem; }
.tl8-body-inner { padding-left: 0; grid-template-columns: 1fr; }
}
```
**JS:**
```js
// Click any year-row header to toggle that row open. Only one row
// stays open at a time — clicking another collapses the previous one.
// Wired via inline onclick="toggleTl2(this)" in the HTML markup.
function toggleTl2(headEl) {
const row = headEl.closest('.tl8-row');
const isOpen = row.classList.contains('tl8-open');
document.querySelectorAll('.tl8-row.tl8-open').forEach(r => r.classList.remove('tl8-open'));
if (!isOpen) row.classList.add('tl8-open');
}
```
### 09. Cinematic Filmstrip
**Type:** CSS + drag scroll
**Description:** Horizontal film reel you drag to explore. Sprocket holes, warm amber type, and frame numbers give it a physical celluloid feel — ideal for film studies, festival histories, or any media company timeline that wants to read as cinema rather than spreadsheet.
**HTML:**
```html
1927
The Jazz Singer
The first feature-length film with synchronized dialogue. Warner Bros gambled on a dying studio — and changed cinema forever.
Sound Era
Warner Bros
1941
Citizen Kane
Welles' debut redefined visual storytelling. Deep focus, unconventional structure, and narrative fragmentation became a new grammar.
RKO
Welles
1960
La Dolce Vita
Fellini's freewheeling portrait of Roman high society. Coined a word, launched a visual culture, and bewildered critics for decades.
Nouvelle Vague
Fellini
1972
The Godfather
Coppola transforms pulp crime fiction into Shakespearean tragedy. The American New Wave at its most commercially ruthless.
New Hollywood
Paramount
1994
Pulp Fiction
Tarantino's fractured chronology, pop-culture saturation, and explosive dialogue reset independent cinema's ambitions globally.
Indie
Tarantino
2019
Parasite
Bong Joon-ho's genre-shifting class satire became the first non-English film to win the Academy Award for Best Picture.
CJ ENM
Palme d'Or
↔ DRAG TO SCROLL ↔
```
**CSS:**
```css
.tl9-stripwrap {
--tl9-bg: #13111a;
--tl9-a: #f0c040;
background: var(--tl9-bg);
padding: 2rem 0 1.5rem;
font-family: 'Inter', system-ui, sans-serif;
overflow: hidden;
}
.tl9-sprockets {
height: 36px;
display: flex;
align-items: center;
padding: 0 1.5rem;
border-top: 2px solid rgba(240,192,64,0.15);
border-bottom: 2px solid rgba(240,192,64,0.15);
gap: 2.5rem;
overflow: hidden;
}
.tl9-hole {
width: 12px;
height: 18px;
border-radius: 3px;
border: 1.5px solid rgba(240,192,64,0.28);
flex-shrink: 0;
}
.tl9-frames {
display: flex;
overflow-x: auto;
scrollbar-width: none;
cursor: grab;
border-top: 3px solid rgba(240,192,64,0.22);
border-bottom: 3px solid rgba(240,192,64,0.22);
}
.tl9-frames::-webkit-scrollbar { display: none; }
.tl9-frame {
flex-shrink: 0;
width: 240px;
border-right: 2px solid rgba(240,192,64,0.1);
padding: 1.75rem 1.5rem;
position: relative;
transition: background 0.25s;
}
.tl9-frame:hover {
background: rgba(240,192,64,0.04);
}
.tl9-frame::before {
content: attr(data-n);
position: absolute;
top: 0.6rem;
right: 0.85rem;
font-family: ui-monospace, monospace;
font-size: 10px;
color: rgba(240,192,64,0.25);
}
.tl9-year {
font-family: 'Inter', sans-serif;
font-size: 2.2rem;
font-weight: 800;
color: var(--tl9-a);
line-height: 1;
margin-bottom: 0.5rem;
text-shadow: 0 0 30px rgba(240,192,64,0.3);
}
.tl9-title {
font-family: Georgia, 'Times New Roman', serif;
font-size: 1.05rem;
color: #fff;
margin: 0 0 0.5rem;
line-height: 1.25;
}
.tl9-desc {
font-size: 12.5px;
color: rgba(255,255,255,0.45);
line-height: 1.6;
margin-bottom: 1rem;
}
.tl9-meta {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
.tl9-chip {
font-family: ui-monospace, monospace;
font-size: 10px;
letter-spacing: 0.5px;
padding: 0.2rem 0.55rem;
border: 1px solid rgba(240,192,64,0.25);
border-radius: 3px;
color: rgba(240,192,64,0.7);
}
.tl9-hint {
margin: 1.5rem 0 0;
text-align: center;
font-family: ui-monospace, monospace;
font-size: 10px;
color: rgba(240,192,64,0.35);
letter-spacing: 2px;
}
```
**JS:**
```js
// Drag-to-scroll the horizontal filmstrip. Mouse handlers wire
// up grab/release; touch handlers do the same for mobile. Wrapped
// in an IIFE so the element handle, state vars, and listeners stay
// scoped. Runs once per page load since the gallery dedupes
// identical js strings before emitting script tags.
(function() {
const el = document.getElementById('tl9-frames');
if (!el) return;
let down = false, sx = 0, sl = 0;
el.addEventListener('mousedown', e => {
down = true; sx = e.pageX - el.offsetLeft; sl = el.scrollLeft;
el.style.cursor = 'grabbing'; el.style.userSelect = 'none';
});
document.addEventListener('mouseup', () => { down = false; el.style.cursor = 'grab'; });
el.addEventListener('mousemove', e => {
if (!down) return; e.preventDefault();
el.scrollLeft = sl - (e.pageX - el.offsetLeft - sx) * 1.3;
});
let tx = 0;
el.addEventListener('touchstart', e => { tx = e.touches[0].pageX; sl = el.scrollLeft; }, { passive: true });
el.addEventListener('touchmove', e => { el.scrollLeft = sl - (e.touches[0].pageX - tx); }, { passive: true });
})();
```
### 10. Nature Trail
**Type:** Pure CSS
**Description:** Stepping stones along a dashed path. Each milestone is anchored by an icon gem, a year marker, and impact tags. Earthy greens, alternating left/right layout, and an organic visual rhythm — made for environmental reports, ESG storytelling, and brand sustainability journeys.
**HTML:**
```html
Phase 01
Baseline Assessment
Comprehensive scope 1, 2, and 3 emissions audit completed across all 14 operational sites. The first honest look at our footprint — and it was confronting.
Carbon Audit
14 Sites
🌍
⚡
Phase 02
Renewable Transition
Switched 80% of grid electricity to wind and solar PPAs. On-site solar installed at 6 warehouses. Energy costs fell 22% in year one.
−42% Scope 2
PPA Contracts
Phase 03
Supply Chain Engagement
Rolled out supplier sustainability scorecard to 340 vendors. 82% have committed to science-based targets. Phased out three high-impact suppliers.
340 Vendors
SBTi Aligned
🌱
🎯
Phase 04
Net Zero Certified
Achieved verified net zero status across scopes 1 and 2. Scope 3 on target for 2028. B Corp certification under review. The hardest work is still ahead.
Net Zero S1+S2
B Corp Pending
2028 Target
```
**CSS:**
```css
.tl10-wrap {
--tl10-bg: #f2f4f0;
--tl10-a: #1b4332;
--tl10-ink: #0d1f16;
background: var(--tl10-bg);
padding: 2.5rem 1.5rem;
max-width: 860px;
margin: 0 auto;
position: relative;
font-family: 'Inter', system-ui, sans-serif;
}
.tl10-path {
position: absolute;
left: 50%;
top: 2.5rem;
bottom: 2.5rem;
width: 2px;
background: repeating-linear-gradient(
to bottom,
rgba(27,67,50,0.3) 0 8px,
transparent 8px 16px
);
transform: translateX(-50%);
}
.tl10-stone {
display: grid;
grid-template-columns: 1fr 80px 1fr;
align-items: center;
margin-bottom: 3rem;
position: relative;
}
.tl10-last { margin-bottom: 0; }
.tl10-flip .tl10-text { grid-column: 3; }
.tl10-flip .tl10-img { grid-column: 1; }
.tl10-text { padding: 0 1.5rem; }
.tl10-flip .tl10-text { text-align: left; }
.tl10-stone:not(.tl10-flip) .tl10-text { text-align: right; }
.tl10-center {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
z-index: 2;
grid-column: 2;
}
.tl10-gem {
width: 56px;
height: 56px;
border-radius: 50%;
background: #fff;
border: 2px solid rgba(27,67,50,0.25);
box-shadow: 0 4px 16px rgba(27,67,50,0.12);
display: flex;
align-items: center;
justify-content: center;
font-size: 22px;
color: var(--tl10-a);
transition: transform 0.3s, box-shadow 0.3s;
}
.tl10-stone:hover .tl10-gem {
transform: scale(1.1);
box-shadow: 0 8px 24px rgba(27,67,50,0.2);
}
.tl10-year {
font-family: ui-monospace, monospace;
font-size: 11px;
letter-spacing: 1.5px;
color: var(--tl10-a);
}
.tl10-phase {
font-family: ui-monospace, monospace;
font-size: 11px;
letter-spacing: 1.5px;
text-transform: uppercase;
color: rgba(27,67,50,0.45);
margin-bottom: 0.35rem;
}
.tl10-name {
font-family: Georgia, 'Times New Roman', serif;
font-size: 1.25rem;
color: var(--tl10-ink);
margin: 0 0 0.4rem;
line-height: 1.25;
}
.tl10-desc {
font-size: 13.5px;
color: rgba(13,31,22,0.55);
line-height: 1.7;
margin: 0 0 0.7rem;
}
.tl10-tags {
display: flex;
gap: 0.4rem;
flex-wrap: wrap;
}
.tl10-stone:not(.tl10-flip) .tl10-tags { justify-content: flex-end; }
.tl10-tag {
font-family: ui-monospace, monospace;
font-size: 10.5px;
padding: 0.2rem 0.6rem;
background: rgba(27,67,50,0.08);
border-radius: 99px;
color: var(--tl10-a);
}
.tl10-img {
aspect-ratio: 5 / 4;
max-width: 220px;
border-radius: 12px;
background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
display: flex;
align-items: center;
justify-content: center;
font-size: 2.8rem;
box-shadow: 0 4px 20px rgba(27,67,50,0.12);
}
@media (max-width: 720px) {
.tl10-path { left: 28px; }
.tl10-stone, .tl10-flip {
grid-template-columns: 56px 1fr;
gap: 0.75rem;
text-align: left;
}
.tl10-flip .tl10-text,
.tl10-stone:not(.tl10-flip) .tl10-text { text-align: left; grid-column: 2; padding: 0; }
.tl10-center { grid-column: 1; align-self: flex-start; }
.tl10-img { display: none; }
.tl10-stone:not(.tl10-flip) .tl10-tags { justify-content: flex-start; }
}
```
### 11. Terminal Log
**Type:** Pure CSS
**Description:** Terminal-style incident timeline. Each log line carries a timestamp, severity level, and event detail. Scanlines, mono fonts, and blinking critical alerts create genuine operational tension. Built for incident reports, security audits, deployment postmortems.
**HTML:**
```html
incident-report-2025-03-14.log — Production / US-EAST-1
── INCIDENT INC-4471 · Severity P1 · Duration 4h 17m ──
03-14 02:13:07
WARN
Latency spike detected on api-gateway-prod-3 . P99: 1,840ms (threshold 500ms). Auto-scaling triggered.
03-14 02:19:44
ERROR
DB connection pool exhausted on rds-primary-east . 4,200 queued . New connections rejected.
03-14 02:21:02
CRIT
ALERT FIRED: Error rate exceeded 18.7% . PagerDuty escalated. Checkout flow DEGRADED .
03-14 02:28:15
INFO
SRE @chen_wei acknowledged. War room opened in #inc-4471 . Status page updated to "Investigating".
03-14 02:45:33
INFO
Root cause: unoptimised query in release v4.12.1 causing full table scans. Rollback initiated.
03-14 03:02:09
WARN
Rollback to v4.11.9 complete. Queue depth: 812 . Error rate falling → 3.2% .
03-14 03:18:51
OK
All services nominal. Error rate 0.04% . P99 182ms . Status: "Resolved".
03-14 06:30:00
INFO
Postmortem created. Action items: query review gate in CI, pool alerting at 60% capacity, blue/green for DB migrations.
── END OF INCIDENT · 3,847 users affected · $14,200 est. revenue loss ──
```
**CSS:**
```css
.tl11-wrap {
--tl11-bg: #080810;
--tl11-a: #ff3860;
background: var(--tl11-bg);
padding: 2rem 1.5rem;
position: relative;
font-family: ui-monospace, 'Menlo', 'Consolas', monospace;
overflow: hidden;
}
.tl11-scanlines {
position: absolute;
inset: 0;
pointer-events: none;
background: repeating-linear-gradient(
to bottom,
rgba(0,0,0,0.04) 0 1px,
transparent 1px 3px
);
}
.tl11-term {
max-width: 800px;
margin: 0 auto;
border: 1px solid rgba(255,56,96,0.18);
border-radius: 8px;
overflow: hidden;
position: relative;
}
.tl11-topbar {
background: rgba(255,56,96,0.08);
border-bottom: 1px solid rgba(255,56,96,0.18);
padding: 0.55rem 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.tl11-dot {
width: 10px;
height: 10px;
border-radius: 50%;
}
.tl11-r { background: #ff5f57; }
.tl11-y { background: #febc2e; }
.tl11-g { background: #28c840; }
.tl11-tlabel {
font-size: 11px;
color: rgba(255,255,255,0.35);
margin-left: 0.65rem;
}
.tl11-body {
padding: 1.25rem 1rem;
}
.tl11-sep {
font-size: 10.5px;
color: rgba(255,255,255,0.12);
letter-spacing: 1.5px;
padding: 0.4rem 0;
}
.tl11-line {
padding: 0.55rem 0;
border-bottom: 1px solid rgba(255,255,255,0.04);
display: flex;
gap: 1rem;
align-items: baseline;
}
.tl11-line:last-of-type { border-bottom: 0; }
.tl11-ts {
font-size: 10.5px;
color: rgba(255,255,255,0.22);
white-space: nowrap;
flex-shrink: 0;
}
.tl11-lvl {
font-size: 10.5px;
letter-spacing: 0.5px;
padding: 0.1rem 0.45rem;
border-radius: 3px;
flex-shrink: 0;
min-width: 50px;
text-align: center;
}
.tl11-info { background: rgba(30,120,255,0.18); color: #4da6ff; }
.tl11-warn { background: rgba(255,180,0,0.18); color: #fbbf24; }
.tl11-err { background: rgba(255,56,96,0.22); color: var(--tl11-a); }
.tl11-ok { background: rgba(40,200,64,0.18); color: #4ade80; }
.tl11-crit {
background: rgba(255,56,96,0.4);
color: #fff;
animation: tl11-blink 1s step-end infinite;
}
@keyframes tl11-blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
.tl11-text {
font-size: 12.5px;
color: rgba(255,255,255,0.6);
line-height: 1.55;
flex: 1;
word-break: break-word;
}
.tl11-text strong { color: #fff; font-weight: 600; }
.tl11-hl { color: var(--tl11-a); }
@media (max-width: 600px) {
.tl11-line { flex-direction: column; gap: 0.25rem; }
}
@media (prefers-reduced-motion: reduce) {
.tl11-crit { animation: none; }
}
```
### 12. Art Deco Steps
**Type:** Pure CSS
**Description:** Gallery-wall layout with geometric ornamentation, italic serif eras, and curated work tags. Indigo on cream with diamond decorations and serif grandeur — for museums, heritage brands, artist retrospectives, and any institution whose history should feel like a permanent collection.
**HTML:**
```html
The Impressionist Foundation
Rooted in the tradition of plein-air painting, the early works capture fleeting light and emotional atmosphere rather than documentary precision. Critics were hostile; collectors were entranced.
Haystacks at Dusk
The Seine in November
Portrait of Madeleine
The Cubist Rupture
Exposure to Picasso and Braque in Paris fractured the picture plane. The artist began dissecting familiar forms — faces, furniture, cityscapes — into interlocking geometric shards of simultaneous viewpoints.
Decomposition No. 7
Woman at the Table
Three Guitars
Abstraction & Silence
The war years stripped away decoration. Large canvases of near-monochromatic fields emerged — radical reductions that anticipated Abstract Expressionism. The late works are the quietest and the most demanding.
Blue Field Study I
Nocturne for V.
The Last Interior
```
**CSS:**
```css
.tl12-wrap {
--tl12-bg: #fff8f0;
--tl12-a: #2d3a8c;
--tl12-ink: #0d0d20;
background: var(--tl12-bg);
padding: 2.5rem 1.5rem;
max-width: 880px;
margin: 0 auto;
font-family: 'Inter', system-ui, sans-serif;
}
.tl12-ornament {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 3rem;
}
.tl12-rule {
flex: 1;
height: 1px;
background: rgba(45,58,140,0.22);
}
.tl12-diamond {
width: 8px;
height: 8px;
background: var(--tl12-a);
transform: rotate(45deg);
flex-shrink: 0;
}
.tl12-label {
font-family: Georgia, 'Times New Roman', serif;
font-style: italic;
font-size: 0.85rem;
color: rgba(45,58,140,0.5);
white-space: nowrap;
}
.tl12-entry {
margin-bottom: 3rem;
}
.tl12-last { margin-bottom: 0; }
.tl12-inner {
display: grid;
grid-template-columns: 150px 1fr;
border-left: 2px solid rgba(45,58,140,0.18);
}
.tl12-left {
padding: 0 1.75rem 0 0;
text-align: right;
position: relative;
}
.tl12-left::after {
content: '';
position: absolute;
right: -7px;
top: 1rem;
width: 12px;
height: 12px;
border-radius: 50%;
background: var(--tl12-bg);
border: 2px solid var(--tl12-a);
}
.tl12-era {
font-family: Georgia, 'Times New Roman', serif;
font-size: 1.6rem;
font-style: italic;
color: var(--tl12-a);
line-height: 1;
}
.tl12-span {
font-family: ui-monospace, monospace;
font-size: 10.5px;
color: rgba(13,13,32,0.35);
letter-spacing: 0.5px;
margin-top: 0.25rem;
}
.tl12-right {
padding: 0 0 0 1.75rem;
}
.tl12-title {
font-family: Georgia, 'Times New Roman', serif;
font-size: 1.4rem;
color: var(--tl12-ink);
margin: 0 0 0.5rem;
line-height: 1.2;
}
.tl12-body {
font-family: Georgia, 'Times New Roman', serif;
font-size: 14px;
color: rgba(13,13,32,0.6);
line-height: 1.75;
margin: 0 0 0.9rem;
}
.tl12-works {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
.tl12-work {
font-family: Georgia, 'Times New Roman', serif;
font-style: italic;
font-size: 12.5px;
padding: 0.3rem 0.7rem;
border: 1px solid rgba(45,58,140,0.22);
border-radius: 2px;
color: var(--tl12-a);
background: rgba(45,58,140,0.04);
transition: background 0.2s, color 0.2s;
cursor: default;
}
.tl12-work:hover {
background: var(--tl12-a);
color: var(--tl12-bg);
}
@media (max-width: 600px) {
.tl12-inner { grid-template-columns: 1fr; border-left: 0; }
.tl12-left {
padding: 0 0 1rem;
text-align: left;
border-left: 2px solid rgba(45,58,140,0.18);
padding-left: 1rem;
}
.tl12-left::after { left: -7px; right: auto; }
.tl12-right { padding-left: 1rem; border-left: 2px solid rgba(45,58,140,0.18); }
}
```
### 13. Vertical Centered
**Type:** Pure CSS
**Description:** Classic alternating layout with a glowing red center spine and editorial dot markers. Items zigzag left and right along a vertical line — the most recognizable timeline pattern, refined with bold serif type and a moody dark canvas.
**HTML:**
```html
2018
First Contact
A small prototype quietly changed everything. What started as a weekend project became the foundation for something much larger.
Origin
2019
First Funding Round
Series A closed at $4.2M. The team grew from 3 to 18 people over the following six months, fueling rapid product development.
Growth
2021
Global Expansion
Operations extended to 12 countries. Localization teams established in EMEA, APAC, and LATAM markets.
Scale
2023
Product V3 Launch
A full platform rearchitecture delivered 10× performance improvements and unlocked an entirely new category of enterprise clients.
Milestone
2025
IPO Filed
With $120M ARR and 94% NRR, the company filed S-1 with an initial valuation range between $1.4B and $1.9B.
Today
```
**CSS:**
```css
.tl13-wrap {
--tl13-bg: #0a0a0a;
--tl13-accent: #c8423a;
background: var(--tl13-bg);
padding: 2.5rem 1.5rem;
max-width: 900px;
margin: 0 auto;
position: relative;
font-family: 'Inter', system-ui, sans-serif;
}
.tl13-line {
position: absolute;
left: 50%;
top: 2.5rem;
bottom: 2.5rem;
width: 1px;
background: linear-gradient(
to bottom,
transparent,
rgba(200,66,58,0.6) 10%,
rgba(200,66,58,0.6) 90%,
transparent
);
transform: translateX(-50%);
}
.tl13-item {
display: grid;
grid-template-columns: 1fr 60px 1fr;
gap: 0;
align-items: start;
margin-bottom: 3rem;
}
.tl13-item:last-child { margin-bottom: 0; }
.tl13-item:nth-child(odd of .tl13-item) .tl13-content { grid-column: 1; text-align: right; }
.tl13-item:nth-child(odd of .tl13-item) .tl13-empty { grid-column: 3; }
.tl13-item:nth-child(even of .tl13-item) .tl13-empty { grid-column: 1; }
.tl13-item:nth-child(even of .tl13-item) .tl13-content { grid-column: 3; text-align: left; }
.tl13-dot-col {
grid-column: 2;
display: flex;
justify-content: center;
padding-top: 0.6rem;
}
.tl13-dot {
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--tl13-accent);
box-shadow:
0 0 0 4px rgba(200,66,58,0.2),
0 0 16px rgba(200,66,58,0.5);
}
.tl13-content { padding: 0 1.5rem; }
.tl13-year {
font-family: ui-monospace, monospace;
font-size: 11px;
letter-spacing: 2px;
color: var(--tl13-accent);
text-transform: uppercase;
margin-bottom: 0.4rem;
}
.tl13-heading {
font-family: Georgia, 'Times New Roman', serif;
font-size: 1.2rem;
font-weight: 700;
color: #fff;
margin: 0 0 0.5rem;
line-height: 1.25;
}
.tl13-body {
font-size: 13px;
color: rgba(255,255,255,0.5);
line-height: 1.65;
margin: 0;
}
.tl13-tag {
display: inline-block;
margin-top: 0.7rem;
font-family: ui-monospace, monospace;
font-size: 10.5px;
letter-spacing: 1px;
padding: 0.2rem 0.55rem;
border: 1px solid rgba(200,66,58,0.4);
border-radius: 4px;
color: var(--tl13-accent);
}
@media (max-width: 600px) {
.tl13-line { left: 22px; }
.tl13-item,
.tl13-item:nth-child(odd of .tl13-item),
.tl13-item:nth-child(even of .tl13-item) {
grid-template-columns: 44px 1fr;
}
.tl13-item:nth-child(odd of .tl13-item) .tl13-content,
.tl13-item:nth-child(even of .tl13-item) .tl13-content {
grid-column: 2;
text-align: left;
padding: 0 0 0 0.5rem;
}
.tl13-dot-col { grid-column: 1; justify-content: flex-start; padding-left: 14px; }
.tl13-empty { display: none; }
}
```
### 14. Horizontal Scroll
**Type:** CSS + drag scroll
**Description:** A draggable horizontal ribbon of era cards above a ruled line. Each card gets its own accent color, building a rainbow chronology you can scroll left-to-right. Made for tech histories, product evolution, brand decades.
**HTML:**
```html
1980 — 1990
The Mainframe Decade
Computing power was centralized and access was controlled. The seeds of distributed thinking were being planted.
1990 — 2000
The Internet Awakens
HTML, browsers, and dial-up modems stitched the world together. A new kind of publishing was born.
2000 — 2010
Social & Mobile
Platforms, smartphones, and the always-on web reshaped every aspect of daily communication and commerce.
2010 — 2018
Cloud Dominance
Infrastructure became invisible. AWS, Azure, and GCP abstracted away hardware, enabling new kinds of scale.
2018 — 2023
Machine Learning Era
Transformers, foundation models, and generative AI moved from research papers to everyday products at breakneck speed.
2023 — Now
Ambient Intelligence
AI is embedded into every layer of the stack. The interface is dissolving into conversation, context, and intent.
↔ DRAG TO SCROLL ↔
```
**CSS:**
```css
.tl14-scene {
--tl14-paper: #f7f4ef;
--tl14-ink: #0d0d0d;
--tl14-c1: #0d0d0d;
--tl14-c2: #c8423a;
--tl14-c3: #2b6cb0;
--tl14-c4: #d4a017;
--tl14-c5: #1a7a4a;
--tl14-c6: #7c3aed;
background: var(--tl14-paper);
padding: 2rem 0;
overflow: hidden;
font-family: 'Inter', system-ui, sans-serif;
}
.tl14-rail-wrap {
overflow-x: auto;
overflow-y: visible;
scrollbar-width: none;
padding: 1.5rem 2rem 2rem;
cursor: grab;
}
.tl14-rail-wrap::-webkit-scrollbar { display: none; }
.tl14-rail {
display: flex;
gap: 60px;
min-width: max-content;
align-items: flex-start;
position: relative;
}
.tl14-rail::before {
content: '';
position: absolute;
top: 28px;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(
90deg,
transparent,
var(--tl14-ink) 5%,
var(--tl14-ink) 95%,
transparent
);
}
.tl14-card {
width: 220px;
flex-shrink: 0;
position: relative;
padding-top: 70px;
}
.tl14-node {
position: absolute;
top: 16px;
left: 50%;
transform: translateX(-50%);
width: 24px;
height: 24px;
border-radius: 50%;
background: var(--tl14-ink);
border: 3px solid var(--tl14-paper);
box-shadow: 0 0 0 2px var(--tl14-ink);
z-index: 2;
}
.tl14-c2 .tl14-node { background: var(--tl14-c2); box-shadow: 0 0 0 2px var(--tl14-c2); }
.tl14-c3 .tl14-node { background: var(--tl14-c3); box-shadow: 0 0 0 2px var(--tl14-c3); }
.tl14-c4 .tl14-node { background: var(--tl14-c4); box-shadow: 0 0 0 2px var(--tl14-c4); }
.tl14-c5 .tl14-node { background: var(--tl14-c5); box-shadow: 0 0 0 2px var(--tl14-c5); }
.tl14-c6 .tl14-node { background: var(--tl14-c6); box-shadow: 0 0 0 2px var(--tl14-c6); }
.tl14-inner {
background: #fff;
border: 1px solid rgba(13,13,13,0.1);
padding: 1.1rem 1.1rem 1.3rem;
border-radius: 4px;
box-shadow: 4px 4px 0 rgba(13,13,13,0.08);
transition: transform 0.2s, box-shadow 0.2s;
}
.tl14-inner:hover {
transform: translateY(-4px);
box-shadow: 4px 8px 0 rgba(13,13,13,0.12);
}
.tl14-period {
font-family: ui-monospace, monospace;
font-size: 10.5px;
letter-spacing: 1.5px;
color: rgba(13,13,13,0.4);
text-transform: uppercase;
margin: 0 0 0.5rem;
}
.tl14-title {
font-family: Georgia, 'Times New Roman', serif;
font-size: 15px;
font-weight: 700;
color: var(--tl14-ink);
margin: 0 0 0.5rem;
line-height: 1.25;
}
.tl14-desc {
font-size: 12.5px;
color: rgba(13,13,13,0.5);
line-height: 1.55;
margin: 0;
}
.tl14-bar {
height: 3px;
border-radius: 2px;
margin-top: 0.9rem;
background: var(--tl14-ink);
}
.tl14-c2 .tl14-bar { background: var(--tl14-c2); }
.tl14-c3 .tl14-bar { background: var(--tl14-c3); }
.tl14-c4 .tl14-bar { background: var(--tl14-c4); }
.tl14-c5 .tl14-bar { background: var(--tl14-c5); }
.tl14-c6 .tl14-bar { background: var(--tl14-c6); }
.tl14-hint {
margin: 1rem 0 0;
text-align: center;
font-family: ui-monospace, monospace;
font-size: 10px;
color: rgba(13,13,13,0.35);
letter-spacing: 2px;
}
```
**JS:**
```js
// Drag-to-scroll the horizontal ribbon. Same pattern as the
// filmstrip demo; IIFE keeps state and listeners scoped per page.
(function() {
const rail = document.getElementById('tl14-rail-wrap');
if (!rail) return;
let down = false, sx = 0, sl = 0;
rail.addEventListener('mousedown', e => {
down = true;
sx = e.pageX - rail.offsetLeft;
sl = rail.scrollLeft;
rail.style.cursor = 'grabbing';
rail.style.userSelect = 'none';
});
document.addEventListener('mouseup', () => { down = false; rail.style.cursor = 'grab'; });
rail.addEventListener('mousemove', e => {
if (!down) return;
e.preventDefault();
rail.scrollLeft = sl - (e.pageX - rail.offsetLeft - sx) * 1.2;
});
let tx = 0;
rail.addEventListener('touchstart', e => { tx = e.touches[0].pageX; sl = rail.scrollLeft; }, { passive: true });
rail.addEventListener('touchmove', e => { rail.scrollLeft = sl - (e.touches[0].pageX - tx); }, { passive: true });
})();
```
### 15. Neon Left Rail
**Type:** Pure CSS
**Description:** A glowing purple spine anchors event icons to detailed metric cards. Dark, dense, and data-forward — built for engineering dashboards, mission logs, and product announcements where every event needs numbers attached.
**HTML:**
```html
◉
Jan 2022
Launch
Mission Alpha Initiated
Initial deployment of the orbital logistics platform. Four units synchronized across three continents within the first 72 hours of operation.
4 Units
72h Deploy
99.2% Uptime
⚡
Sep 2022
Upgrade
Propulsion Overhaul
Second-generation ion drives installed across the fleet, cutting fuel consumption by 38% and extending operational range by nearly 2,000km.
⚠
Mar 2024
Critical
Communication Relay Failure
Ground station Echo suffered a 14-hour blackout. Autonomous recovery protocols activated; manual override restored full comms within 6 hours ahead of schedule.
★
Nov 2025
Milestone
Global Coverage Achieved
The 24th satellite placed the network in geosynchronous alignment. Full polar coverage now enables sub-50ms latency for any point on Earth.
24 Satellites
<50ms Latency
100% Coverage
```
**CSS:**
```css
.tl15-scene {
--tl15-bg: #08081a;
--tl15-accent: #7c3aed;
--tl15-accent-soft: #a78bfa;
background: var(--tl15-bg);
padding: 2.5rem 1.5rem;
font-family: 'Inter', system-ui, sans-serif;
}
.tl15-wrap {
max-width: 720px;
margin: 0 auto;
border-left: 1px solid rgba(124,58,237,0.3);
}
.tl15-item {
position: relative;
padding: 0 0 3rem 3rem;
}
.tl15-item:last-child { padding-bottom: 0; }
.tl15-item::before {
content: '';
position: absolute;
left: -1px;
top: 0;
height: 100%;
width: 1px;
background: linear-gradient(
to bottom,
rgba(124,58,237,0.8),
rgba(124,58,237,0.1)
);
}
.tl15-icon {
position: absolute;
left: -22px;
top: 0;
width: 44px;
height: 44px;
border-radius: 50%;
background: rgba(124,58,237,0.15);
border: 1px solid rgba(124,58,237,0.5);
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
color: var(--tl15-accent-soft);
box-shadow: 0 0 20px rgba(124,58,237,0.3);
}
.tl15-meta {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 0.7rem;
}
.tl15-date {
font-family: ui-monospace, monospace;
font-size: 11px;
letter-spacing: 1.5px;
color: var(--tl15-accent);
text-transform: uppercase;
}
.tl15-badge {
font-family: ui-monospace, monospace;
font-size: 10px;
letter-spacing: 0.5px;
padding: 0.15rem 0.5rem;
background: rgba(124,58,237,0.15);
border: 1px solid rgba(124,58,237,0.3);
border-radius: 3px;
color: var(--tl15-accent-soft);
}
.tl15-title {
font-family: 'Inter', sans-serif;
font-size: 1.05rem;
font-weight: 700;
color: #fff;
margin: 0 0 0.5rem;
}
.tl15-body {
font-size: 13px;
color: rgba(255,255,255,0.45);
line-height: 1.7;
margin: 0 0 0.9rem;
}
.tl15-stats {
display: flex;
gap: 1.5rem;
flex-wrap: wrap;
}
.tl15-stat {
display: flex;
flex-direction: column;
gap: 0.15rem;
}
.tl15-stat-val {
font-family: ui-monospace, monospace;
font-size: 15px;
font-weight: 500;
color: var(--tl15-accent-soft);
}
.tl15-stat-label {
font-size: 10px;
color: rgba(255,255,255,0.3);
letter-spacing: 0.5px;
text-transform: uppercase;
}
```
### 16. Editorial
**Type:** Pure CSS
**Description:** Magazine-style two-column alternating layout with large gradient visuals, italic serif headings, and pull quotes. Refined type on warm paper — built for retrospectives, brand histories, and long-read feature articles.
**HTML:**
```html
01
1940 — 1960
The Atomic Age
Nuclear fission unlocked both promise and peril. Nations raced to harness what was once thought to be nature's most fundamental secret.
"We have unleashed a force that will reshape civilization itself."
02
1960 — 1980
The Space Race
Earthbound dreams took flight. Rockets carried humans beyond the atmosphere, reframing humanity's sense of its own place in the cosmos.
"The Moon is not so far when you decide you must go there."
03
1980 — 2000
The Digital Revolution
Personal computers arrived in homes. Software became the new architecture, and those who wrote it found themselves as the architects of the century ahead.
"Software is eating the world — and it's hungry."
04
2000 — Present
The Intelligence Age
Data became the substrate of decision. Machines learned from patterns invisible to human eyes, and the boundary between tool and collaborator began to blur.
"We are no longer just using intelligence; we are growing it."
```
**CSS:**
```css
.tl16-scene {
--tl16-paper: #f0ece4;
--tl16-ink: #0d0d0d;
background: var(--tl16-paper);
padding: 3rem 1.5rem;
font-family: 'Inter', system-ui, sans-serif;
}
.tl16-wrap {
max-width: 900px;
margin: 0 auto;
}
.tl16-entry {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2rem 3rem;
margin-bottom: 3rem;
padding-bottom: 3rem;
align-items: center;
border-bottom: 1px solid rgba(13,13,13,0.1);
}
.tl16-last { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.tl16-entry:nth-child(even) .tl16-text { order: 2; }
.tl16-entry:nth-child(even) .tl16-visual { order: 1; }
.tl16-visual {
aspect-ratio: 4 / 3;
border-radius: 3px;
overflow: hidden;
position: relative;
}
.tl16-visual-inner {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Inter Tight', 'Inter', sans-serif;
font-weight: 800;
font-size: 4rem;
letter-spacing: 2px;
color: rgba(255,255,255,0.9);
position: relative;
}
.tl16-visual-inner::after {
content: attr(data-label);
position: absolute;
bottom: 1rem;
right: 1rem;
font-family: ui-monospace, monospace;
font-size: 10px;
letter-spacing: 1.5px;
color: rgba(255,255,255,0.55);
text-transform: uppercase;
font-weight: 400;
}
.tl16-v1 { background: linear-gradient(135deg, #1a1a2e, #c8423a); }
.tl16-v2 { background: linear-gradient(135deg, #0a3d62, #2980b9); }
.tl16-v3 { background: linear-gradient(135deg, #1a3a1a, #2ecc71); }
.tl16-v4 { background: linear-gradient(135deg, #3d2000, #d4a017); }
.tl16-number {
font-family: Georgia, 'Times New Roman', serif;
font-size: 3.5rem;
font-weight: 300;
color: rgba(13,13,13,0.1);
line-height: 1;
margin: 0 0 -0.5rem;
}
.tl16-decade {
font-family: ui-monospace, monospace;
font-size: 11px;
letter-spacing: 2px;
color: rgba(13,13,13,0.4);
text-transform: uppercase;
margin: 0 0 0.7rem;
}
.tl16-heading {
font-family: Georgia, 'Times New Roman', serif;
font-style: italic;
font-size: 1.5rem;
font-weight: 700;
color: var(--tl16-ink);
margin: 0 0 0.7rem;
line-height: 1.2;
}
.tl16-body {
font-size: 13.5px;
color: rgba(13,13,13,0.6);
line-height: 1.75;
margin: 0;
}
.tl16-pullquote {
margin-top: 1rem;
padding-left: 1rem;
border-left: 2px solid var(--tl16-ink);
font-family: Georgia, 'Times New Roman', serif;
font-style: italic;
font-size: 14px;
color: rgba(13,13,13,0.65);
line-height: 1.6;
}
@media (max-width: 600px) {
.tl16-entry,
.tl16-entry:nth-child(even) { grid-template-columns: 1fr; gap: 1.25rem; }
.tl16-entry:nth-child(even) .tl16-text,
.tl16-entry:nth-child(even) .tl16-visual { order: unset; }
}
```
### 17. Stacked Progress
**Type:** Pure CSS
**Description:** Left-anchored trail with per-card progress bars and status pills. Built for product roadmaps, quarterly OKRs, and milestone trackers where each step carries a percentage and a "done / in progress / planned" state.
**HTML:**
```html
Jan — Mar 2025
Complete
Core Infrastructure
Database sharding, API gateway redesign, and global CDN rollout completed 12 days ahead of schedule.
Infrastructure 100%
Apr — Jun 2025
Complete
Mobile Application
iOS and Android apps launched simultaneously. 4.8-star App Store rating within the first month of public availability.
Mobile 100%
Jul — Sep 2025
In Progress
AI Integration Layer
Embedding the new intelligence pipeline into all major product surfaces. Search, recommendations, and auto-summarization on track.
AI Layer 67%
Oct — Dec 2025
Planned
Enterprise Platform
SSO, audit logging, custom data residency, and dedicated onboarding for Fortune 500 accounts entering the pipeline.
Enterprise 12%
Jan — Mar 2026
Planned
Global Expansion
Localization into 14 new markets, regional data centers in Southeast Asia and South America, and a dedicated partner ecosystem.
Expansion 0%
```
**CSS:**
```css
.tl17-scene {
--tl17-bg: #0d0d10;
--tl17-accent: #e05c1a;
background: var(--tl17-bg);
padding: 2.5rem 1.5rem;
font-family: 'Inter', system-ui, sans-serif;
}
.tl17-wrap {
max-width: 720px;
margin: 0 auto;
position: relative;
}
.tl17-track {
position: absolute;
left: 24px;
top: 0;
bottom: 0;
width: 2px;
background: rgba(255,255,255,0.06);
}
.tl17-track-fill {
position: absolute;
top: 0;
left: 0;
right: 0;
background: linear-gradient(to bottom, var(--tl17-accent), rgba(224,92,26,0));
animation: tl17-track 2s ease forwards;
}
@keyframes tl17-track {
from { height: 0; }
to { height: 85%; }
}
.tl17-row {
display: flex;
gap: 1.5rem;
align-items: flex-start;
position: relative;
}
.tl17-aside {
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 1rem;
}
.tl17-circle {
width: 48px;
height: 48px;
border-radius: 50%;
background: rgba(224,92,26,0.12);
border: 1px solid rgba(224,92,26,0.3);
display: flex;
align-items: center;
justify-content: center;
font-family: ui-monospace, monospace;
font-size: 12.5px;
font-weight: 500;
color: var(--tl17-accent);
flex-shrink: 0;
position: relative;
z-index: 2;
transition: background 0.3s, box-shadow 0.3s;
}
.tl17-row:hover .tl17-circle {
background: rgba(224,92,26,0.25);
box-shadow: 0 0 20px rgba(224,92,26,0.3);
}
.tl17-connector {
width: 2px;
flex: 1;
background: linear-gradient(to bottom, rgba(224,92,26,0.3), transparent);
min-height: 30px;
}
.tl17-card {
flex: 1;
margin-bottom: 1.5rem;
background: rgba(255,255,255,0.04);
border: 1px solid rgba(255,255,255,0.07);
border-radius: 12px;
padding: 1.25rem;
transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.tl17-row:hover .tl17-card {
background: rgba(255,255,255,0.07);
border-color: rgba(224,92,26,0.25);
transform: translateX(4px);
}
.tl17-last .tl17-card { margin-bottom: 0; }
.tl17-top {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 0.5rem;
margin-bottom: 0.7rem;
}
.tl17-when {
font-family: ui-monospace, monospace;
font-size: 10.5px;
letter-spacing: 1.5px;
color: var(--tl17-accent);
text-transform: uppercase;
}
.tl17-status {
font-size: 10px;
font-weight: 600;
letter-spacing: 0.5px;
text-transform: uppercase;
padding: 0.2rem 0.55rem;
border-radius: 99px;
white-space: nowrap;
}
.tl17-done { background: rgba(26,122,74,0.2); color: #4ade80; border: 1px solid rgba(74,222,128,0.25); }
.tl17-active { background: rgba(224,92,26,0.2); color: var(--tl17-accent); border: 1px solid rgba(224,92,26,0.3); }
.tl17-plan { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.08); }
.tl17-name {
font-size: 1rem;
font-weight: 700;
color: #fff;
margin: 0 0 0.4rem;
}
.tl17-text {
font-size: 12.5px;
color: rgba(255,255,255,0.45);
line-height: 1.65;
margin: 0 0 0.9rem;
}
.tl17-progress-label {
display: flex;
justify-content: space-between;
font-family: ui-monospace, monospace;
font-size: 10px;
color: rgba(255,255,255,0.3);
margin-bottom: 0.35rem;
}
.tl17-progress-bar {
height: 3px;
background: rgba(255,255,255,0.07);
border-radius: 2px;
overflow: hidden;
}
.tl17-progress-fill {
height: 100%;
border-radius: 2px;
background: linear-gradient(90deg, var(--tl17-accent), #f97316);
transition: width 1s ease;
}
@media (prefers-reduced-motion: reduce) {
.tl17-track-fill { animation: none; height: 85%; }
}
```
### 18. Brutalist Grid
**Type:** Pure CSS
**Description:** Raw borders, offset shadows, and a rigid year-column grid. Vertical year labels in the left rail; two-up event blocks in the right rail. No softness — just structure, contrast, and impact. For brand histories that want to read as built, not designed.
**HTML:**
```html
1995
Foundation
Company Founded
Three engineers left to build what they believed the industry was missing. Bootstrapped, no external capital.
Product
First Beta Released
200 early access users signed on in the first week. Feedback was brutal. It improved everything.
2002
Finance
Series B Raised
$22M from Sequoia and Index Ventures. Valuation crossed $100M for the first time.
Crisis
CEO Replaced
Board-led transition. Incoming leadership brought an operations background that proved transformative.
2011
Milestone
1M Users
The platform crossed one million active accounts. A full-page ad in the New York Times marked the occasion.
Tech
V4 Architecture
Complete rewrite of the core engine. Moved to a distributed microservices model running on commodity hardware.
2026
Now
Market Leader
42% category share. $340M ARR. Operations in 58 countries. The original engineers are still writing code.
Future
What's Next
Autonomous workflows, embedded AI, and a marketplace launching later this year. The best chapter hasn't been written yet.
```
**CSS:**
```css
.tl18-scene {
--tl18-paper: #f5f0e8;
--tl18-ink: #0d0d0d;
--tl18-red: #c8423a;
background: var(--tl18-paper);
padding: 3rem 1.5rem;
font-family: 'Inter', system-ui, sans-serif;
}
.tl18-grid {
max-width: 1000px;
margin: 0 auto;
display: grid;
grid-template-columns: 100px 1fr;
gap: 0;
border-top: 3px solid var(--tl18-ink);
border-bottom: 3px solid var(--tl18-ink);
}
.tl18-row {
display: contents;
}
.tl18-year-cell {
padding: 1.5rem 1rem 1.5rem 0;
border-right: 3px solid var(--tl18-ink);
border-bottom: 1px solid rgba(13,13,13,0.12);
display: flex;
align-items: flex-start;
justify-content: flex-end;
}
.tl18-last .tl18-year-cell { border-bottom: 0; }
.tl18-yr {
font-family: 'Inter Tight', 'Inter', sans-serif;
font-weight: 800;
font-size: 1.8rem;
letter-spacing: 2px;
color: var(--tl18-ink);
writing-mode: vertical-rl;
text-orientation: mixed;
transform: rotate(180deg);
line-height: 1;
}
.tl18-content-cell {
padding: 1.5rem 0 1.5rem 1.5rem;
border-bottom: 1px solid rgba(13,13,13,0.12);
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.25rem;
}
.tl18-last .tl18-content-cell { border-bottom: 0; }
/* Brutalist offset shadow is intentionally hard-edged — no blur, just
a solid ink-colored block peeking out behind the card. Built with
box-shadow rather than a ::before pseudo because pseudos with
z-index: -1 get hidden behind the parent's background when the
parent gets its own stacking context (any transform creates one),
making the card's text invisible on hover. */
.tl18-event {
position: relative;
padding: 1rem;
border: 1.5px solid var(--tl18-ink);
background: #fff;
box-shadow: 4px 4px 0 0 var(--tl18-ink);
transition: transform 0.2s, box-shadow 0.2s;
}
.tl18-event:hover {
transform: translate(-2px, -2px);
box-shadow: 6px 6px 0 0 var(--tl18-ink);
}
.tl18-cat {
font-family: ui-monospace, monospace;
font-size: 10px;
letter-spacing: 1.5px;
text-transform: uppercase;
color: rgba(13,13,13,0.45);
margin: 0 0 0.5rem;
}
.tl18-ev-title {
font-family: 'Inter Tight', 'Inter', sans-serif;
font-size: 15px;
font-weight: 700;
color: var(--tl18-ink);
margin: 0 0 0.35rem;
line-height: 1.2;
}
.tl18-ev-body {
font-size: 12.5px;
color: rgba(13,13,13,0.55);
line-height: 1.55;
margin: 0;
}
.tl18-highlight { background: var(--tl18-ink); }
.tl18-highlight .tl18-cat { color: rgba(255,255,255,0.4); }
.tl18-highlight .tl18-ev-title { color: #fff; }
.tl18-highlight .tl18-ev-body { color: rgba(255,255,255,0.5); }
.tl18-highlight::before { background: rgba(255,255,255,0.3); }
.tl18-accent { border-color: var(--tl18-red); }
.tl18-accent::before { background: var(--tl18-red); }
.tl18-accent .tl18-ev-title { color: var(--tl18-red); }
@media (max-width: 700px) {
.tl18-grid { grid-template-columns: 60px 1fr; }
.tl18-yr { font-size: 1.4rem; }
.tl18-content-cell { grid-template-columns: 1fr; padding-left: 1rem; }
}
```
### 19. Ticker Tape Changelog
**Type:** Pure CSS
**Description:** Horizontal snap-scroll changelog with giant ghost version numerals behind each card and colour-coded tags (Feature / Fix / Breaking / Perf). Built for software release notes, version histories, and product update streams.
**HTML:**
```html
v3.2.0
14 May 2026
Streaming response latency reduced by 40%
Perf
v3.1.4
02 May 2026
Fixed race condition in auth token refresh
Fix
v3.0.0
18 Apr 2026
New plugin architecture — breaking API changes
Breaking
v2.9.1
01 Apr 2026
Dark mode system preference detection
Feature
v2.8.0
12 Mar 2026
Keyboard shortcut manager added
Feature
v2.7.2
28 Feb 2026
Memory leak in observer pattern patched
Fix
← scroll →
```
**CSS:**
```css
.tl19-wrap {
background: #111;
border: 1px solid #222;
border-radius: 2px;
overflow: hidden;
padding: 2rem 0;
font-family: 'IBM Plex Sans', system-ui, sans-serif;
}
.tl19-track {
display: flex;
gap: 0;
overflow-x: auto;
scrollbar-width: none;
padding: 0 2rem;
scroll-snap-type: x mandatory;
}
.tl19-track::-webkit-scrollbar { display: none; }
.tl19-item {
flex: 0 0 250px;
padding: 1.5rem 2rem 1.5rem 1.5rem;
border-right: 1px solid #2a2a2a;
margin-right: 1rem;
scroll-snap-align: start;
position: relative;
}
.tl19-item::before {
content: attr(data-v);
font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
font-size: 3.5rem;
color: #1e1e1e;
position: absolute;
right: 1.5rem;
bottom: 1rem;
line-height: 1;
pointer-events: none;
}
.tl19-ver {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.65rem;
letter-spacing: 0.2em;
color: #c8ff00;
text-transform: uppercase;
margin-bottom: 0.5rem;
}
.tl19-date {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.6rem;
color: #444;
margin-bottom: 0.8rem;
}
.tl19-headline {
font-family: 'Syne', 'Inter Tight', sans-serif;
font-size: 1rem;
font-weight: 700;
line-height: 1.3;
margin-bottom: 0.6rem;
color: #e8e5e0;
}
.tl19-tag {
display: inline-block;
padding: 0.2rem 0.5rem;
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.55rem;
letter-spacing: 0.1em;
border-radius: 2px;
text-transform: uppercase;
}
.tl19-tag-feat { background: #1a2e00; color: #c8ff00; }
.tl19-tag-fix { background: #2e0000; color: #ff6b6b; }
.tl19-tag-break { background: #2e1a00; color: #ffaa00; }
.tl19-tag-perf { background: #00182e; color: #00b4d8; }
.tl19-hint {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.6rem;
color: #444;
text-align: right;
padding: 0.5rem 1.5rem 0;
letter-spacing: 0.1em;
}
```
### 20. Editorial Spine
**Type:** Pure CSS
**Description:** Magazine-style vertical with italic display years on the left of a hairline gold rule, kicker labels, Instrument Serif titles, and Crimson Pro italic body copy on warm paper. Built for company histories, personal biographies, and long-read editorial features.
**HTML:**
```html
2018
Origin
Founded in a rented loft, Shoreditch
Three designers with one shared monitor and an unhealthy obsession with kerning. The first project was a brand identity for a local coffee importer.
2020
Pivot
Shifted to digital-first products
The pandemic reshaped our practice. We dissolved our print retainer clients and rebuilt around software, motion, and interactive design systems.
2023
Recognition
D&AD Wood Pencil, Digital Design
Our data-journalism work for a climate NGO earned the studio's first major award and opened a new chapter of purpose-led commissions.
Now
Present
Eight people, four time zones
A deliberately small studio that treats craft as a non-negotiable. Currently booking for Q4 2026.
```
**CSS:**
```css
.tl20-wrap {
background: #faf6ef;
color: #1a1a1a;
padding: 2.5rem 2rem;
border-radius: 2px;
max-width: 680px;
font-family: 'IBM Plex Sans', system-ui, sans-serif;
}
.tl20-header {
display: flex;
align-items: baseline;
gap: 1.5rem;
margin-bottom: 2.5rem;
border-bottom: 2px solid #1a1a1a;
padding-bottom: 0.75rem;
}
.tl20-header-title {
font-family: Georgia, serif;
font-style: italic;
font-size: 1.85rem;
font-weight: 300;
color: #1a1a1a;
}
.tl20-header-sub {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.6rem;
color: #999;
letter-spacing: 0.2em;
text-transform: uppercase;
}
.tl20-entry {
display: grid;
grid-template-columns: 6ch 1px 1fr;
gap: 0 1.5rem;
margin-bottom: 2.25rem;
animation: tl20-fade-up 0.4s ease both;
}
@keyframes tl20-fade-up {
from { opacity: 0; transform: translateY(12px); }
to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
.tl20-entry { animation: none; }
}
.tl20-year {
font-family: 'Playfair Display', Georgia, serif;
font-style: italic;
font-size: 1.5rem;
color: #c8a96e;
text-align: right;
padding-top: 0.1rem;
}
.tl20-rule {
width: 1px;
background: #ddd;
position: relative;
}
.tl20-rule::before {
content: '';
width: 7px;
height: 7px;
border: 1.5px solid #c8a96e;
border-radius: 50%;
background: #faf6ef;
position: absolute;
top: 0.35rem;
left: 50%;
transform: translateX(-50%);
}
.tl20-kicker {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.6rem;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #999;
margin-bottom: 0.3rem;
}
.tl20-title-main {
font-family: 'Instrument Serif', 'Playfair Display', Georgia, serif;
font-size: 1.25rem;
color: #1a1a1a;
margin-bottom: 0.4rem;
line-height: 1.3;
}
.tl20-text {
font-family: 'Crimson Pro', Georgia, serif;
font-size: 0.95rem;
color: #555;
line-height: 1.6;
font-style: italic;
}
```
### 21. Split Screen Timeline
**Type:** Pure CSS
**Description:** Dark alternating left/right layout with a faded center spine and ringed dot markers. Each entry carries a date, two-line heading, body copy, and a discipline pill. Built for career histories, CVs, and project milestone retrospectives.
**HTML:**
```html
Jan 2022
Lead Product Designer Vercel
Oversaw the redesign of the dashboard, reducing time-to-deploy by 30% through progressive disclosure patterns.
Product · Systems
Mar 2020
Senior UX Engineer Linear
Built the keyboard-first interaction model that became Linear's defining differentiator in the project management space.
Interaction · Eng
Jun 2018
Design Systems Lead Stripe
Created and maintained Stripe's internal component library across 12 product teams and three platform surfaces.
Tokens · Figma
Sep 2016
UI Designer Intercom
Early product hire. Shaped the visual language for the Messenger product from v1 through to its first major rebrand.
Visual · Branding
```
**CSS:**
```css
.tl21-wrap {
position: relative;
max-width: 760px;
margin: 0 auto;
padding: 1.5rem 0;
background: #0c0c0c;
color: #f0ede8;
font-family: 'IBM Plex Sans', system-ui, sans-serif;
}
.tl21-spine {
position: absolute;
left: 50%;
top: 0;
bottom: 0;
width: 1px;
background: linear-gradient(to bottom, transparent, #333 5%, #333 95%, transparent);
transform: translateX(-50%);
}
.tl21-entry {
display: grid;
grid-template-columns: 1fr 1fr;
min-height: 120px;
position: relative;
}
.tl21-entry:nth-child(odd) .tl21-content {
grid-column: 1;
text-align: right;
padding: 1.5rem 2.5rem 1.5rem 0;
}
.tl21-entry:nth-child(even) .tl21-content {
grid-column: 2;
text-align: left;
padding: 1.5rem 0 1.5rem 2.5rem;
}
.tl21-entry:nth-child(odd) .tl21-spacer { grid-column: 2; }
.tl21-entry:nth-child(even) .tl21-spacer { grid-column: 1; }
.tl21-dot {
position: absolute;
left: 50%;
top: 1.6rem;
width: 10px;
height: 10px;
background: #f0ede8;
border-radius: 50%;
transform: translateX(-50%);
box-shadow: 0 0 0 3px #0c0c0c, 0 0 0 4px #444;
}
.tl21-date {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.6rem;
color: #555;
letter-spacing: 0.15em;
text-transform: uppercase;
margin-bottom: 0.4rem;
}
.tl21-heading {
font-family: 'Syne', 'Inter Tight', sans-serif;
font-size: 1rem;
font-weight: 700;
color: #e8e5e0;
margin-bottom: 0.4rem;
line-height: 1.25;
}
.tl21-body {
font-size: 0.8rem;
color: #666;
line-height: 1.5;
}
.tl21-pill {
display: inline-block;
padding: 0.15rem 0.6rem;
border: 1px solid #333;
border-radius: 99px;
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.55rem;
color: #555;
letter-spacing: 0.1em;
text-transform: uppercase;
margin-top: 0.5rem;
}
@media (max-width: 600px) {
.tl21-entry { grid-template-columns: 1fr; }
.tl21-entry:nth-child(odd) .tl21-content,
.tl21-entry:nth-child(even) .tl21-content {
grid-column: 1;
text-align: left;
padding: 1.5rem 0 1.5rem 2rem;
}
.tl21-spine { left: 0.5rem; transform: none; }
.tl21-dot { left: 0.5rem; transform: translateX(-50%); }
}
```
### 22. Railroad Stations
**Type:** Pure CSS
**Description:** Horizontal stations on a dashed track with one active station glowing cyan. Each station has a status header (Archived / Current / Planned / Concept), year, name, and sub-line. Built for product roadmaps, technology evolution, and API version maps.
**HTML:**
```html
ARCHIVED
2019
REST API v1
Deprecated
ARCHIVED
2021
GraphQL Gateway
Replaced 2024
CURRENT
2024
Edge Runtime
Live · 99.98% uptime
PLANNED
Q3 2026
WASM Runtime
In development
CONCEPT
2027+
Zero-latency Mesh
Research phase
```
**CSS:**
```css
.tl22-wrap {
background: #0d0f14;
border-radius: 4px;
padding: 2.5rem;
overflow-x: auto;
font-family: 'IBM Plex Sans', system-ui, sans-serif;
}
.tl22-track {
display: flex;
align-items: flex-start;
gap: 0;
min-width: 700px;
position: relative;
padding-top: 3rem;
}
.tl22-track::before {
content: '';
position: absolute;
top: calc(3rem + 16px);
left: 0;
right: 0;
height: 4px;
background: repeating-linear-gradient(
90deg,
#1e2530 0px, #1e2530 8px,
#2a3340 8px, #2a3340 12px
);
}
.tl22-station {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
}
.tl22-node {
width: 36px;
height: 36px;
border-radius: 50%;
background: #0d0f14;
border: 3px solid #3a4a5c;
display: flex;
align-items: center;
justify-content: center;
position: relative;
z-index: 1;
transition: border-color 0.2s, box-shadow 0.2s;
}
.tl22-node::after {
content: '';
width: 8px;
height: 8px;
border-radius: 50%;
background: #3a4a5c;
transition: background 0.2s;
}
.tl22-active .tl22-node {
border-color: #00e5ff;
box-shadow: 0 0 20px rgba(0,229,255,0.3);
}
.tl22-active .tl22-node::after {
background: #00e5ff;
width: 10px;
height: 10px;
}
.tl22-label {
margin-top: 0.8rem;
text-align: center;
}
.tl22-year {
font-family: 'Space Mono', ui-monospace, monospace;
font-size: 0.7rem;
color: #3a4a5c;
letter-spacing: 0.1em;
margin-bottom: 0.2rem;
}
.tl22-active .tl22-year { color: #00e5ff; }
.tl22-name {
font-family: 'Syne', 'Inter Tight', sans-serif;
font-size: 0.75rem;
font-weight: 700;
color: #8899aa;
line-height: 1.3;
max-width: 90px;
}
.tl22-active .tl22-name { color: #ccd6e0; }
.tl22-sub {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.55rem;
color: #3a4a5c;
margin-top: 0.2rem;
max-width: 90px;
line-height: 1.4;
}
.tl22-active .tl22-sub { color: #5a7a8c; }
.tl22-top {
position: absolute;
top: -3rem;
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.55rem;
color: #2a3340;
letter-spacing: 0.1em;
white-space: nowrap;
}
.tl22-active .tl22-top { color: #4a6070; }
```
### 23. Film Strip Portfolio
**Type:** Pure CSS
**Description:** Horizontal portfolio reel with sprocket holes top and bottom, gradient project tiles with year stickers, role line, and tech-stack chips. Built for design portfolios, case-study indexes, and creative project galleries.
**HTML:**
```html
001 ▸
Nova Design System
Lead Designer
Figma Tokens React
002 ▸
Atlas Data Viz
UX + Dev
D3.js WebGL SVG
003 ▸
Orbit Mobile App
Product Design
iOS Swift Haptics
004 ▸
Dune Brand Identity
Brand + Motion
After Effects AI
005 ▸
Loop CMS Platform
Full-stack Design
Next.js CMS
```
**CSS:**
```css
.tl23-wrap {
background: #111;
position: relative;
padding: 0;
overflow: hidden;
border-radius: 3px;
font-family: 'IBM Plex Sans', system-ui, sans-serif;
}
.tl23-holes {
display: flex;
gap: 1rem;
padding: 0.4rem 1rem;
background: #111;
}
.tl23-hole {
width: 18px;
height: 12px;
background: #0c0c0c;
border-radius: 2px;
flex-shrink: 0;
}
.tl23-strip {
display: flex;
gap: 2px;
overflow-x: auto;
scrollbar-width: none;
background: #000;
}
.tl23-strip::-webkit-scrollbar { display: none; }
.tl23-frame {
flex: 0 0 220px;
padding: 1.5rem 1rem;
background: #141414;
border-right: 2px solid #000;
position: relative;
transition: background 0.2s;
}
.tl23-frame:hover { background: #1a1a1a; }
.tl23-num {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.55rem;
color: #333;
letter-spacing: 0.2em;
margin-bottom: 0.75rem;
}
.tl23-img {
width: 100%;
aspect-ratio: 16/10;
background: #1e1e1e;
border-radius: 2px;
margin-bottom: 0.75rem;
overflow: hidden;
position: relative;
}
.tl23-img-inner {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
font-size: 2.5rem;
opacity: 0.18;
letter-spacing: 0.1em;
color: #fff;
}
.tl23-year-tag {
position: absolute;
top: 0.4rem;
right: 0.4rem;
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.5rem;
background: rgba(0,0,0,0.7);
color: #888;
padding: 0.1rem 0.35rem;
border-radius: 2px;
letter-spacing: 0.1em;
}
.tl23-title {
font-family: 'Syne', 'Inter Tight', sans-serif;
font-size: 0.85rem;
font-weight: 700;
color: #d4d0cb;
margin-bottom: 0.2rem;
line-height: 1.2;
}
.tl23-role {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.55rem;
color: #555;
letter-spacing: 0.1em;
text-transform: uppercase;
}
.tl23-tech {
margin-top: 0.6rem;
display: flex;
flex-wrap: wrap;
gap: 0.3rem;
}
.tl23-tech span {
font-family: 'DM Mono', ui-monospace, monospace;
font-size: 0.5rem;
color: #444;
border: 1px solid #2a2a2a;
padding: 0.1rem 0.35rem;
border-radius: 2px;
letter-spacing: 0.05em;
}
```
### 24. Ledger Audit Log
**Type:** Pure CSS
**Description:** Financial-grade audit log table with a dark masthead, column ruling, status badges (Done / Pending / Critical / Archived), and a gold left-edge marker on milestone rows. Built for database migration history, compliance records, and incident logs.
**HTML:**
```html
Date
Description
Reference
Status
2024-01-08
Initial schema migration v4 → v5
Postgres 14 → 16 · 3.2M rows
MIG-001
Archived
2024-03-22
Added composite index on events table
Resolved P1 query timeout · Ticket #4421
IDX-007
Archived
2025-07-14
Backfilled NULL values in user_meta
GDPR remediation · 88k rows affected
REM-034
Done
2025-11-01
Schema migration v5 → v6 — new billing model
Zero-downtime · Blue/green deployment
MIG-002
Done
2026-02-19
Incident: replication lag exceeded 45s
RCA complete · Failover triggered
INC-012
Critical
2026-05-08
Schema migration v6 → v7 in progress
Estimated completion 2026-05-22
MIG-003
Pending
```
**CSS:**
```css
.tl24-wrap {
background: #f8f5f0;
color: #1a1a1a;
padding: 0;
border-radius: 2px;
overflow: hidden;
font-family: 'Space Mono', ui-monospace, monospace;
border: 1px solid #ddd;
}
.tl24-header {
padding: 1.5rem 2rem;
background: #1a1a1a;
color: #f8f5f0;
display: flex;
justify-content: space-between;
align-items: baseline;
}
.tl24-title-lbl {
font-size: 0.55rem;
letter-spacing: 0.3em;
text-transform: uppercase;
color: #666;
margin-bottom: 0.25rem;
}
.tl24-title-name {
font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
font-size: 1.8rem;
letter-spacing: 0.1em;
color: #f8f5f0;
}
.tl24-period {
font-size: 0.6rem;
color: #888;
text-align: right;
line-height: 1.5;
}
.tl24-cols {
display: grid;
grid-template-columns: 8ch 1fr 10ch 8ch;
gap: 0 1.5rem;
padding: 0.5rem 2rem;
background: #eee;
font-size: 0.55rem;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #999;
border-bottom: 1px solid #ddd;
}
.tl24-row {
display: grid;
grid-template-columns: 8ch 1fr 10ch 8ch;
gap: 0 1.5rem;
padding: 0.8rem 2rem;
border-bottom: 1px solid #ebe8e2;
align-items: center;
transition: background 0.15s;
position: relative;
}
.tl24-row:hover { background: #f0ece6; }
.tl24-milestone { background: #fffbf2; }
.tl24-milestone::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 3px;
background: #c8a96e;
}
.tl24-dt {
font-size: 0.65rem;
color: #999;
white-space: nowrap;
}
.tl24-desc {
font-size: 0.7rem;
color: #333;
line-height: 1.3;
}
.tl24-desc small {
display: block;
font-size: 0.55rem;
color: #aaa;
margin-top: 0.15rem;
}
.tl24-ref {
font-size: 0.6rem;
color: #bbb;
text-align: right;
}
.tl24-status { text-align: right; }
.tl24-badge {
display: inline-block;
font-size: 0.5rem;
padding: 0.15rem 0.5rem;
border-radius: 2px;
letter-spacing: 0.1em;
text-transform: uppercase;
}
.tl24-done { background: #e8f5e9; color: #2e7d32; }
.tl24-pend { background: #fff3e0; color: #e65100; }
.tl24-arch { background: #f5f5f5; color: #999; }
.tl24-crit { background: #fce4ec; color: #c62828; }
.tl24-footer {
padding: 1rem 2rem;
background: #f0ece6;
display: flex;
justify-content: space-between;
align-items: center;
border-top: 2px solid #ddd;
}
.tl24-footer-note {
font-size: 0.55rem;
color: #aaa;
letter-spacing: 0.1em;
text-transform: uppercase;
}
.tl24-footer-count {
font-size: 0.65rem;
color: #666;
}
@media (max-width: 600px) {
.tl24-cols, .tl24-row { grid-template-columns: 1fr; gap: 0.25rem; padding: 0.5rem 1rem; }
.tl24-cols { display: none; }
.tl24-ref, .tl24-status { text-align: left; }
}
```
---
## 20 Pure CSS Toggles & Switches
URL: https://codefronts.com/components/css-toggles-switches/
Description: 20 hand-coded CSS toggle switches with live demos — haptic keys, waveform, timed countdown, biometric scan, split-flap board, permission stack, iOS, Material Design, skeuomorphic, neon, brutalist, day/night, flip card, sliding pill, glassmorphism, rotary knob, iOS light, outline, bouncy pebble, and industrial rocker. Pure CSS, fully accessible, copy-paste ready.
Demo count: 20
### 01. Haptic Keys
**Type:** Pure CSS
**Description:** Chunky square key with a 3D press-depth shadow and a glowing accent ring on activate. Pressing literally sinks the button 3px while the hard bottom shadow collapses — pure tactile button metaphor for tactile UI trends.
**HTML:**
```html
Notify
```
**CSS:**
```css
.tg-hap {
--tg-hap-rim: #14141e;
--tg-hap-wire: #1e1e2e;
--tg-hap-edge: #020205;
--tg-hap-accent: #39d353;
display: inline-flex;
align-items: center;
gap: 18px;
cursor: pointer;
font-family: "Inter", "Segoe UI", system-ui, sans-serif;
font-size: 14px;
color: #1a1a2e;
user-select: none;
}
.tg-hap-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-hap-btn {
position: relative;
display: inline-flex;
width: 56px;
height: 56px;
border-radius: 16px;
background: var(--tg-hap-rim);
border: 1px solid var(--tg-hap-wire);
align-items: center;
justify-content: center;
box-shadow:
0 6px 0 var(--tg-hap-edge),
0 8px 16px rgba(0,0,0,0.5);
transition:
box-shadow 0.1s ease,
transform 0.1s ease,
background 0.3s ease,
border-color 0.3s ease;
}
.tg-hap-icon {
width: 22px;
height: 22px;
color: #3a3a52;
filter: grayscale(1) brightness(0.6);
position: relative;
z-index: 1;
transition: color 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}
.tg-hap-ring {
position: absolute;
inset: -4px;
border-radius: 20px;
border: 2px solid transparent;
transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
/* Press effect — clicking the label sinks the button.
Using the label's :active so the whole hit-area drives the press. */
.tg-hap:active .tg-hap-btn {
box-shadow:
0 2px 0 var(--tg-hap-edge),
0 3px 8px rgba(0,0,0,0.5);
transform: translateY(3px);
}
.tg-hap-input:checked ~ .tg-hap-btn {
background: #0f1a0f;
border-color: rgba(57,211,83,0.3);
box-shadow:
0 6px 0 var(--tg-hap-edge),
0 8px 16px rgba(0,0,0,0.5),
0 0 20px rgba(57,211,83,0.15);
}
.tg-hap-input:checked ~ .tg-hap-btn .tg-hap-icon {
color: var(--tg-hap-accent);
filter: none;
transform: scale(1.15);
}
.tg-hap-input:checked ~ .tg-hap-btn .tg-hap-ring {
border-color: var(--tg-hap-accent);
box-shadow: 0 0 12px rgba(57,211,83,0.3);
}
.tg-hap-input:focus-visible ~ .tg-hap-btn {
outline: 2px solid var(--tg-hap-accent);
outline-offset: 6px;
}
@media (prefers-reduced-motion: reduce) {
.tg-hap-btn,
.tg-hap-icon,
.tg-hap-ring { transition: none; }
}
```
### 02. Waveform Toggle
**Type:** Pure CSS
**Description:** Static audio bars spring to life with staggered breathing animations when toggled on. The track border and indicator dot pulse with an ice-cyan glow. Audio-visual data physicality — toggle = sound on/off.
**HTML:**
```html
Microphone
```
**CSS:**
```css
.tg-wav {
--tg-wav-rim: #14141e;
--tg-wav-wire: #1e1e2e;
--tg-wav-fog: #3a3a52;
--tg-wav-ash: #7a7a98;
--tg-wav-ice: #00e5ff;
display: inline-block;
cursor: pointer;
font-family: "Inter", "Segoe UI", system-ui, sans-serif;
font-size: 14px;
user-select: none;
}
.tg-wav-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-wav-body {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 14px;
border-radius: 12px;
background: var(--tg-wav-rim);
border: 1px solid var(--tg-wav-wire);
min-width: 240px;
transition: border-color 0.3s ease, background 0.3s ease;
}
.tg-wav-bars {
display: flex;
align-items: center;
gap: 2.5px;
height: 28px;
}
.tg-wav-bars span {
display: block;
width: 3px;
border-radius: 2px;
background: var(--tg-wav-fog);
transition: background 0.3s ease, height 0.3s ease;
}
/* Static heights (off state) — each bar has its own resting height. */
.tg-wav-bars span:nth-child(1) { height: 8px; }
.tg-wav-bars span:nth-child(2) { height: 14px; }
.tg-wav-bars span:nth-child(3) { height: 20px; }
.tg-wav-bars span:nth-child(4) { height: 26px; }
.tg-wav-bars span:nth-child(5) { height: 18px; }
.tg-wav-bars span:nth-child(6) { height: 24px; }
.tg-wav-bars span:nth-child(7) { height: 12px; }
.tg-wav-bars span:nth-child(8) { height: 20px; }
.tg-wav-bars span:nth-child(9) { height: 8px; }
.tg-wav-text {
font-size: 13px;
color: var(--tg-wav-ash);
transition: color 0.3s ease;
}
.tg-wav-dot {
width: 8px; height: 8px;
border-radius: 50%;
background: var(--tg-wav-wire);
margin-left: auto;
flex-shrink: 0;
transition: background 0.3s ease, box-shadow 0.3s ease;
}
/* Each bar oscillates between its resting height and ~30% of it. The
varied durations + delays keep the pattern from looking robotic. */
@keyframes tg-wav-breathe {
0%, 100% { height: var(--tg-wav-h); }
50% { height: calc(var(--tg-wav-h) * 0.3 + 4px); }
}
.tg-wav-input:checked ~ .tg-wav-body {
border-color: rgba(0,229,255,0.3);
background: rgba(0,229,255,0.04);
}
.tg-wav-input:checked ~ .tg-wav-body .tg-wav-bars span {
background: var(--tg-wav-ice);
}
.tg-wav-input:checked ~ .tg-wav-body .tg-wav-bars span:nth-child(1) { animation: tg-wav-breathe 0.9s ease-in-out infinite; --tg-wav-h: 8px; }
.tg-wav-input:checked ~ .tg-wav-body .tg-wav-bars span:nth-child(2) { animation: tg-wav-breathe 0.7s ease-in-out 0.1s infinite; --tg-wav-h: 14px; }
.tg-wav-input:checked ~ .tg-wav-body .tg-wav-bars span:nth-child(3) { animation: tg-wav-breathe 1.1s ease-in-out 0.2s infinite; --tg-wav-h: 20px; }
.tg-wav-input:checked ~ .tg-wav-body .tg-wav-bars span:nth-child(4) { animation: tg-wav-breathe 0.8s ease-in-out 0.05s infinite; --tg-wav-h: 26px; }
.tg-wav-input:checked ~ .tg-wav-body .tg-wav-bars span:nth-child(5) { animation: tg-wav-breathe 1.0s ease-in-out 0.15s infinite; --tg-wav-h: 18px; }
.tg-wav-input:checked ~ .tg-wav-body .tg-wav-bars span:nth-child(6) { animation: tg-wav-breathe 0.6s ease-in-out 0.25s infinite; --tg-wav-h: 24px; }
.tg-wav-input:checked ~ .tg-wav-body .tg-wav-bars span:nth-child(7) { animation: tg-wav-breathe 0.9s ease-in-out 0.08s infinite; --tg-wav-h: 12px; }
.tg-wav-input:checked ~ .tg-wav-body .tg-wav-bars span:nth-child(8) { animation: tg-wav-breathe 1.2s ease-in-out 0.18s infinite; --tg-wav-h: 20px; }
.tg-wav-input:checked ~ .tg-wav-body .tg-wav-bars span:nth-child(9) { animation: tg-wav-breathe 0.75s ease-in-out 0.3s infinite; --tg-wav-h: 8px; }
.tg-wav-input:checked ~ .tg-wav-body .tg-wav-text { color: var(--tg-wav-ice); }
.tg-wav-input:checked ~ .tg-wav-body .tg-wav-dot {
background: var(--tg-wav-ice);
box-shadow: 0 0 8px var(--tg-wav-ice);
}
.tg-wav-input:focus-visible ~ .tg-wav-body {
outline: 2px solid var(--tg-wav-ice);
outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
.tg-wav-body,
.tg-wav-bars span,
.tg-wav-dot,
.tg-wav-text { transition: none; }
.tg-wav-input:checked ~ .tg-wav-body .tg-wav-bars span { animation: none; }
}
```
### 03. Timed Toggle
**Type:** Pure CSS
**Description:** An SVG arc fills around a circle when the toggle activates, visualising session time. Temporal UI for progress-aware states — users see state over time, not just on/off. The ember glow signals an active countdown.
**HTML:**
```html
15 min · active
```
**CSS:**
```css
.tg-time {
--tg-time-rim: #14141e;
--tg-time-wire: #1e1e2e;
--tg-time-fog: #3a3a52;
--tg-time-ash: #7a7a98;
--tg-time-ember: #ff6b35;
display: inline-block;
cursor: pointer;
font-family: "Inter", "Segoe UI", system-ui, sans-serif;
font-size: 14px;
user-select: none;
}
.tg-time-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-time-body {
display: inline-flex;
align-items: center;
gap: 14px;
padding: 10px 16px;
border-radius: 100px;
background: var(--tg-time-rim);
border: 1px solid var(--tg-time-wire);
transition: border-color 0.3s ease, background 0.3s ease;
}
.tg-time-arc {
position: relative;
width: 32px;
height: 32px;
flex-shrink: 0;
}
.tg-time-arc svg {
width: 100%;
height: 100%;
transform: rotate(-90deg);
}
.tg-time-bg {
fill: none;
stroke: var(--tg-time-wire);
stroke-width: 3;
}
/* circumference at r=11 is 2*pi*11 ~= 69. We use 82 as the dasharray
so the fill animates from "empty" (offset 82) to "nearly full" (offset
20) — leaving a small gap signals it's still counting down, not done. */
.tg-time-prog {
fill: none;
stroke: var(--tg-time-ember);
stroke-width: 3;
stroke-linecap: round;
stroke-dasharray: 82;
stroke-dashoffset: 82;
transition: stroke-dashoffset 0.4s ease;
}
.tg-time-dot {
position: absolute;
top: 50%; left: 50%;
width: 8px; height: 8px;
transform: translate(-50%, -50%);
border-radius: 50%;
background: var(--tg-time-fog);
transition: background 0.3s ease, box-shadow 0.3s ease;
}
.tg-time-text {
font-size: 13px;
letter-spacing: 0.04em;
color: var(--tg-time-ash);
transition: color 0.3s ease;
}
.tg-time-input:checked ~ .tg-time-body {
border-color: rgba(255,107,53,0.4);
background: rgba(255,107,53,0.05);
}
.tg-time-input:checked ~ .tg-time-body .tg-time-prog {
stroke-dashoffset: 20;
}
.tg-time-input:checked ~ .tg-time-body .tg-time-dot {
background: var(--tg-time-ember);
box-shadow: 0 0 6px var(--tg-time-ember);
}
.tg-time-input:checked ~ .tg-time-body .tg-time-text {
color: var(--tg-time-ember);
}
.tg-time-input:focus-visible ~ .tg-time-body {
outline: 2px solid var(--tg-time-ember);
outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
.tg-time-body,
.tg-time-prog,
.tg-time-dot,
.tg-time-text { transition: none; }
}
```
### 04. Biometric Scan
**Type:** Pure CSS
**Description:** A scanline sweeps top-to-bottom, corner brackets glow lilac, and the icon ring lights up when activated. Identity-first UI for auth flows — the toggle becomes a scan target instead of a switch.
**HTML:**
```html
Touch ID · scanning
```
**CSS:**
```css
.tg-bio {
--tg-bio-rim: #14141e;
--tg-bio-wire: #1e1e2e;
--tg-bio-ash: #7a7a98;
--tg-bio-lilac: #c084fc;
display: inline-block;
cursor: pointer;
font-family: "Inter", "Segoe UI", system-ui, sans-serif;
font-size: 14px;
user-select: none;
}
.tg-bio-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-bio-frame {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
gap: 14px;
width: 180px;
padding: 20px;
border-radius: 16px;
background: var(--tg-bio-rim);
border: 1px solid var(--tg-bio-wire);
overflow: hidden;
transition: border-color 0.5s ease, background 0.5s ease;
}
.tg-bio-scanline {
position: absolute;
left: 0;
right: 0;
top: 0;
height: 2px;
background: linear-gradient(90deg, transparent, var(--tg-bio-lilac), transparent);
opacity: 0;
transition: opacity 0.3s ease;
}
.tg-bio-corners {
position: absolute;
inset: 12px;
pointer-events: none;
}
.tg-bio-corners::before,
.tg-bio-corners::after {
content: "";
position: absolute;
width: 14px;
height: 14px;
border-color: var(--tg-bio-wire);
border-style: solid;
transition: border-color 0.4s ease;
}
.tg-bio-corners::before {
top: 0; left: 0;
border-width: 2px 0 0 2px;
border-radius: 3px 0 0 0;
}
.tg-bio-corners::after {
bottom: 0; right: 0;
border-width: 0 2px 2px 0;
border-radius: 0 0 3px 0;
}
.tg-bio-icon-wrap {
position: relative;
width: 56px;
height: 56px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
border: 1.5px solid var(--tg-bio-wire);
color: var(--tg-bio-ash);
transition: border-color 0.4s ease, color 0.4s ease;
}
.tg-bio-icon {
width: 28px;
height: 28px;
}
/* Two concentric outer rings that light up on scan. The :before adds
a second ring so we get the layered radar look without extra DOM. */
.tg-bio-rings {
position: absolute;
inset: -8px;
border-radius: 50%;
border: 1px solid transparent;
transition: border-color 0.4s ease;
}
.tg-bio-rings::before {
content: "";
position: absolute;
inset: -8px;
border-radius: 50%;
border: 1px solid transparent;
transition: border-color 0.4s ease;
}
.tg-bio-status {
font-size: 12px;
letter-spacing: 0.06em;
color: var(--tg-bio-ash);
transition: color 0.4s ease;
}
@keyframes tg-bio-scan {
0% { top: 0; }
100% { top: 100%; }
}
.tg-bio-input:checked ~ .tg-bio-frame {
border-color: rgba(192,132,252,0.4);
background: rgba(192,132,252,0.05);
}
.tg-bio-input:checked ~ .tg-bio-frame .tg-bio-scanline {
opacity: 1;
animation: tg-bio-scan 1.8s ease-in-out infinite;
}
.tg-bio-input:checked ~ .tg-bio-frame .tg-bio-icon-wrap {
border-color: var(--tg-bio-lilac);
color: var(--tg-bio-lilac);
}
.tg-bio-input:checked ~ .tg-bio-frame .tg-bio-rings {
border-color: rgba(192,132,252,0.3);
}
.tg-bio-input:checked ~ .tg-bio-frame .tg-bio-rings::before {
border-color: rgba(192,132,252,0.15);
}
.tg-bio-input:checked ~ .tg-bio-frame .tg-bio-status {
color: var(--tg-bio-lilac);
}
.tg-bio-input:checked ~ .tg-bio-frame .tg-bio-corners::before,
.tg-bio-input:checked ~ .tg-bio-frame .tg-bio-corners::after {
border-color: var(--tg-bio-lilac);
}
.tg-bio-input:focus-visible ~ .tg-bio-frame {
outline: 2px solid var(--tg-bio-lilac);
outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
.tg-bio-frame,
.tg-bio-icon-wrap,
.tg-bio-rings,
.tg-bio-status,
.tg-bio-corners::before,
.tg-bio-corners::after { transition: none; }
.tg-bio-input:checked ~ .tg-bio-frame .tg-bio-scanline { animation: none; }
}
```
### 05. Split-Flap Board
**Type:** Pure CSS
**Description:** A retro-mechanical airport departure board built from CSS-only rotateX flips. Toggling cycles both rows simultaneously — OFFLINE flips to ONLINE, STANDBY flips to ACTIVE — with each character flipping in sequence for the cascading split-flap feel.
**HTML:**
```html
Status
Mode
```
**CSS:**
```css
.tg-flap {
--tg-flap-bg: #0a0a12;
--tg-flap-border: #1a1a28;
--tg-flap-ash: #7a7a98;
--tg-flap-volt: #e0ff00;
--tg-flap-ice: #00e5ff;
--tg-flap-flip: 0.5s;
display: inline-block;
cursor: pointer;
font-family: "Inconsolata", "Roboto Mono", ui-monospace, monospace;
user-select: none;
}
.tg-flap-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-flap-stage {
display: flex;
flex-direction: column;
gap: 10px;
}
.tg-flap-row {
display: flex;
align-items: center;
gap: 10px;
}
.tg-flap-lbl {
min-width: 56px;
font-size: 12px;
color: var(--tg-flap-ash);
letter-spacing: 0.08em;
text-transform: uppercase;
}
.tg-flap-board {
display: flex;
gap: 4px;
}
/* Each char is a black tile with a horizontal seam down the middle and
a CSS-only flip. The letter is rendered via data-off/data-on attrs in
a pseudo, so toggling swaps which attr is shown. */
.tg-flap-char {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 38px;
border-radius: 5px;
background: var(--tg-flap-bg);
border: 1px solid var(--tg-flap-border);
font-size: 18px;
font-weight: 500;
color: var(--tg-flap-ash);
box-shadow:
inset 0 1px 0 rgba(255,255,255,0.04),
inset 0 -1px 0 rgba(0,0,0,0.3);
overflow: hidden;
transform-style: preserve-3d;
perspective: 400px;
transition: color var(--tg-flap-flip) ease;
}
/* Seam across the middle of every char tile. */
.tg-flap-char::after {
content: "";
position: absolute;
left: 0; right: 0;
top: 50%;
height: 1px;
background: rgba(0,0,0,0.6);
z-index: 2;
pointer-events: none;
}
/* The letter itself lives in ::before so we can flip it independently
of the tile chrome. Default shows the off character. */
.tg-flap-char::before {
content: attr(data-off);
display: inline-block;
transform-origin: center;
animation: tg-flap-off var(--tg-flap-flip) ease both;
}
@keyframes tg-flap-off {
0% { transform: rotateX(-90deg); }
50% { content: attr(data-off); }
100% { transform: rotateX(0); }
}
@keyframes tg-flap-on {
0% { transform: rotateX(0); }
50% { transform: rotateX(-90deg); }
51% { transform: rotateX(90deg); }
100% { transform: rotateX(0); }
}
/* Stagger — each char is delayed 80ms further than the previous so the
board cascades. Both rows share the same stagger pattern. */
.tg-flap-board .tg-flap-char:nth-child(1) { animation-delay: 0ms; }
.tg-flap-board .tg-flap-char:nth-child(2) { animation-delay: 80ms; }
.tg-flap-board .tg-flap-char:nth-child(3) { animation-delay: 160ms; }
.tg-flap-board .tg-flap-char:nth-child(4) { animation-delay: 240ms; }
.tg-flap-board .tg-flap-char:nth-child(5) { animation-delay: 320ms; }
.tg-flap-board .tg-flap-char:nth-child(6) { animation-delay: 400ms; }
.tg-flap-board .tg-flap-char:nth-child(7) { animation-delay: 480ms; }
.tg-flap-input:checked ~ .tg-flap-stage .tg-flap-char {
color: var(--tg-flap-volt);
}
.tg-flap-input:checked ~ .tg-flap-stage .tg-flap-row:nth-child(2) .tg-flap-char {
color: var(--tg-flap-ice);
}
.tg-flap-input:checked ~ .tg-flap-stage .tg-flap-char::before {
content: attr(data-on);
animation: tg-flap-on var(--tg-flap-flip) ease both;
animation-delay: inherit;
}
.tg-flap-input:checked ~ .tg-flap-stage .tg-flap-board .tg-flap-char:nth-child(1) { animation-delay: 0ms; }
.tg-flap-input:checked ~ .tg-flap-stage .tg-flap-board .tg-flap-char:nth-child(2) { animation-delay: 80ms; }
.tg-flap-input:checked ~ .tg-flap-stage .tg-flap-board .tg-flap-char:nth-child(3) { animation-delay: 160ms; }
.tg-flap-input:checked ~ .tg-flap-stage .tg-flap-board .tg-flap-char:nth-child(4) { animation-delay: 240ms; }
.tg-flap-input:checked ~ .tg-flap-stage .tg-flap-board .tg-flap-char:nth-child(5) { animation-delay: 320ms; }
.tg-flap-input:checked ~ .tg-flap-stage .tg-flap-board .tg-flap-char:nth-child(6) { animation-delay: 400ms; }
.tg-flap-input:checked ~ .tg-flap-stage .tg-flap-board .tg-flap-char:nth-child(7) { animation-delay: 480ms; }
.tg-flap-input:focus-visible ~ .tg-flap-stage {
outline: 2px solid var(--tg-flap-volt);
outline-offset: 6px;
border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
.tg-flap-char,
.tg-flap-char::before { animation: none; transition: none; }
.tg-flap-char::before { content: attr(data-off); }
.tg-flap-input:checked ~ .tg-flap-stage .tg-flap-char::before { content: attr(data-on); }
}
```
### 06. Permission Stack
**Type:** Pure CSS
**Description:** Grouped consent UI with mini pill toggles inside stacked bordered rows. Each row independently grants or revokes a permission — the icon and label brighten and the pill switches to brand-green when granted. The dominant trust-first UI pattern replacing modal popups.
**HTML:**
```html
```
**CSS:**
```css
.tg-perm {
--tg-perm-bg: #08080f;
--tg-perm-rim: #14141e;
--tg-perm-wire: #1e1e2e;
--tg-perm-fog: #3a3a52;
--tg-perm-ash: #7a7a98;
--tg-perm-snow: #f0f0fa;
--tg-perm-volt: #e0ff00;
--tg-perm-void: #04040a;
display: flex;
flex-direction: column;
gap: 0;
width: 280px;
font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}
.tg-perm-item {
display: flex;
align-items: center;
gap: 12px;
padding: 14px 16px;
border: 1px solid var(--tg-perm-wire);
margin-top: -1px;
background: var(--tg-perm-bg);
cursor: pointer;
transition: background 0.2s ease;
}
.tg-perm-item:first-child { border-radius: 12px 12px 0 0; }
.tg-perm-item:last-child { border-radius: 0 0 12px 12px; }
.tg-perm-item:hover { background: var(--tg-perm-rim); }
.tg-perm-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-perm-icon {
width: 18px;
height: 18px;
flex-shrink: 0;
color: var(--tg-perm-ash);
opacity: 0.4;
transition: opacity 0.3s ease, color 0.3s ease;
}
.tg-perm-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}
.tg-perm-name {
font-size: 13px;
letter-spacing: 0.02em;
color: var(--tg-perm-snow);
opacity: 0.5;
transition: opacity 0.3s ease;
}
.tg-perm-desc {
font-size: 11px;
color: var(--tg-perm-ash);
}
/* Mini pill toggle on the right of each row. */
.tg-perm-pill {
position: relative;
width: 38px;
height: 20px;
flex-shrink: 0;
border-radius: 10px;
background: var(--tg-perm-wire);
border: 1px solid var(--tg-perm-fog);
transition: background 0.3s ease, border-color 0.3s ease;
}
.tg-perm-thumb {
position: absolute;
top: 2px;
left: 2px;
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--tg-perm-fog);
transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), background 0.3s ease;
}
.tg-perm-input:checked ~ .tg-perm-icon { opacity: 1; color: var(--tg-perm-volt); }
.tg-perm-input:checked ~ .tg-perm-info .tg-perm-name { opacity: 1; }
.tg-perm-input:checked ~ .tg-perm-pill {
background: var(--tg-perm-volt);
border-color: var(--tg-perm-volt);
}
.tg-perm-input:checked ~ .tg-perm-pill .tg-perm-thumb {
transform: translateX(18px);
background: var(--tg-perm-void);
}
.tg-perm-input:focus-visible ~ .tg-perm-pill {
outline: 2px solid var(--tg-perm-volt);
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.tg-perm-item,
.tg-perm-icon,
.tg-perm-name,
.tg-perm-pill,
.tg-perm-thumb { transition: none; }
}
```
### 07. iOS
**Type:** Pure CSS
**Description:** The reference iOS-style pill toggle — translucent track, white thumb with a subtle drop shadow, smooth slide on toggle. Honors prefers-reduced-motion.
**HTML:**
```html
Wi-Fi
```
**CSS:**
```css
.tg-ios {
display: inline-flex;
align-items: center;
gap: 12px;
cursor: pointer;
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
font-size: 15px;
color: #f0eeff;
user-select: none;
}
.tg-ios-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-ios-track {
position: relative;
width: 51px;
height: 31px;
background: rgba(120,120,128,0.32);
border-radius: 999px;
transition: background 0.25s ease;
}
.tg-ios-thumb {
position: absolute;
top: 2px; left: 2px;
width: 27px; height: 27px;
border-radius: 50%;
background: #ffffff;
/* Tighter shadow than real iOS — on iOS the shadow casts onto the
screen background; here the toggle sits on a card and a softer
shadow keeps the thumb visually contained within the track. */
box-shadow:
0 1px 2px rgba(0,0,0,0.18),
0 0 1px rgba(0,0,0,0.08);
transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.tg-ios-input:checked ~ .tg-ios-track {
background: #34c759;
}
.tg-ios-input:checked ~ .tg-ios-track .tg-ios-thumb {
transform: translateX(20px);
}
.tg-ios-input:focus-visible ~ .tg-ios-track {
outline: 2px solid #0a84ff;
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.tg-ios-track,
.tg-ios-thumb { transition: none; }
}
```
### 08. Material Design
**Type:** Pure CSS
**Description:** Google Material Design 3 switch — track with rounded thumb that lifts and changes colour on toggle. Active state shows a filled icon-style indicator.
**HTML:**
```html
Notifications
```
**CSS:**
```css
.tg-md {
display: inline-flex;
align-items: center;
gap: 14px;
cursor: pointer;
font-family: "Roboto", "Google Sans", sans-serif;
font-size: 14px;
color: #e6e0e9;
user-select: none;
}
.tg-md-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-md-track {
position: relative;
width: 52px;
height: 32px;
background: #49454f;
border: 2px solid #79747e;
border-radius: 999px;
transition: background 0.2s ease, border-color 0.2s ease;
box-sizing: border-box;
}
.tg-md-thumb {
position: absolute;
top: 50%;
left: 6px;
width: 16px;
height: 16px;
border-radius: 50%;
background: #cac4d0;
transform: translateY(-50%);
transition: left 0.2s cubic-bezier(0.4, 0, 0.2, 1),
width 0.15s ease,
height 0.15s ease,
background 0.2s ease;
}
.tg-md-input:checked ~ .tg-md-track {
background: #d0bcff;
border-color: #d0bcff;
}
.tg-md-input:checked ~ .tg-md-track .tg-md-thumb {
/* Inner width is 48px (52 - 2px border × 2). Thumb grows to 24px
on-state, so max left value that keeps the thumb fully inside the
border is 48 - 24 = 24px, minus 2px breathing room = 22px. */
left: 22px;
width: 24px;
height: 24px;
background: #381e72;
}
.tg-md-input:focus-visible ~ .tg-md-track {
outline: 2px solid #d0bcff;
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.tg-md-track,
.tg-md-thumb { transition: none; }
}
```
### 09. Skeuomorphic Light Switch
**Type:** Pure CSS
**Description:** A physical rocker light switch — brushed metal bezel, plastic rocker that tilts on toggle, subtle shadow that deepens when pressed. Heavy realism, satisfying click.
**HTML:**
```html
Power
```
**CSS:**
```css
.tg-skeo {
display: inline-flex;
align-items: center;
gap: 14px;
cursor: pointer;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: #d8d4dc;
user-select: none;
}
.tg-skeo-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-skeo-bezel {
position: relative;
width: 56px;
height: 44px;
background: linear-gradient(180deg, #4a4a52 0%, #2a2a30 100%);
border-radius: 6px;
padding: 4px;
box-shadow:
inset 0 1px 1px rgba(255,255,255,0.18),
inset 0 -1px 1px rgba(0,0,0,0.5),
0 2px 4px rgba(0,0,0,0.3);
display: flex;
align-items: center;
justify-content: center;
}
.tg-skeo-rocker {
position: relative;
width: 100%;
height: 100%;
background: linear-gradient(180deg, #f4f1ec 0%, #d8d2c6 100%);
border-radius: 3px;
box-shadow:
inset 0 1px 0 rgba(255,255,255,0.8),
inset 0 -1px 0 rgba(0,0,0,0.15);
transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1),
box-shadow 0.18s ease;
transform-origin: center;
}
.tg-skeo-mark {
position: absolute;
top: 6px; left: 50%;
width: 14px; height: 3px;
background: #2a2a30;
border-radius: 2px;
transform: translateX(-50%);
transition: top 0.18s ease, bottom 0.18s ease;
}
.tg-skeo-input:checked ~ .tg-skeo-bezel .tg-skeo-rocker {
transform: rotateX(0deg);
box-shadow:
inset 0 -1px 0 rgba(255,255,255,0.8),
inset 0 1px 0 rgba(0,0,0,0.15);
}
.tg-skeo-input:checked ~ .tg-skeo-bezel .tg-skeo-mark {
top: auto;
bottom: 6px;
background: #d04f4f;
}
.tg-skeo-input:not(:checked) ~ .tg-skeo-bezel .tg-skeo-rocker {
transform: rotateX(180deg);
}
.tg-skeo-input:focus-visible ~ .tg-skeo-bezel {
outline: 2px solid #6b9eff;
outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
.tg-skeo-rocker,
.tg-skeo-mark { transition: none; }
}
```
### 10. Neon Cyber
**Type:** Pure CSS
**Description:** A glowing neon outline toggle — dark track with a cyan thumb that pulses with a soft glow when active. Futuristic dashboard aesthetic.
**HTML:**
```html
Shields
```
**CSS:**
```css
.tg-neon {
display: inline-flex;
align-items: center;
gap: 14px;
cursor: pointer;
font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.18em;
text-transform: uppercase;
color: #b8e8f0;
user-select: none;
}
.tg-neon-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-neon-track {
position: relative;
width: 54px;
height: 26px;
background: #0a1320;
border: 1px solid rgba(0, 220, 255, 0.3);
border-radius: 999px;
transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.tg-neon-thumb {
position: absolute;
top: 50%;
left: 3px;
width: 18px; height: 18px;
border-radius: 50%;
background: radial-gradient(circle at 30% 30%, #6be8ff 0%, #0a90b8 100%);
transform: translateY(-50%);
box-shadow:
0 0 6px rgba(0, 220, 255, 0.4),
inset 0 1px 1px rgba(255,255,255,0.4);
transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1),
box-shadow 0.25s ease;
}
.tg-neon-input:checked ~ .tg-neon-track {
border-color: rgba(0, 220, 255, 0.9);
box-shadow:
0 0 12px rgba(0, 220, 255, 0.5),
inset 0 0 8px rgba(0, 220, 255, 0.15);
}
.tg-neon-input:checked ~ .tg-neon-track .tg-neon-thumb {
left: 33px;
box-shadow:
0 0 14px rgba(0, 220, 255, 0.9),
inset 0 1px 1px rgba(255,255,255,0.5);
}
.tg-neon-input:focus-visible ~ .tg-neon-track {
outline: 2px solid #6be8ff;
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.tg-neon-track,
.tg-neon-thumb { transition: none; }
}
```
### 11. Brutalist
**Type:** Pure CSS
**Description:** Hard edges, no shadows, monospace label, raw markup feel. The track and thumb are pure rectangles. A counterpoint to polished SaaS-style toggles.
**HTML:**
```html
Tracking
```
**CSS:**
```css
.tg-brut {
display: inline-flex;
align-items: center;
gap: 12px;
cursor: pointer;
font-family: "Courier New", ui-monospace, monospace;
font-size: 13px;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
color: #f0eeff;
user-select: none;
}
.tg-brut-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-brut-track {
/* Outer 60×28; with 2px border, inner space is 56×24. Thumb is a
24×24 white block that slides inside that inner space. Track
stays dark in both states — the thumb's position is the signal,
not a color inversion, so the state is readable at a glance even
in a static preview. */
position: relative;
width: 60px;
height: 28px;
background: #1a1a1a;
border: 2px solid #f0eeff;
border-radius: 0;
transition: background 0.1s linear;
box-sizing: border-box;
}
.tg-brut-thumb {
position: absolute;
top: 0;
left: 0;
width: 24px;
height: 100%;
background: #f0eeff;
border-radius: 0;
transition: left 0.1s linear;
}
.tg-brut-input:checked ~ .tg-brut-track .tg-brut-thumb {
/* Inner width is 56px, thumb width 24px → 32px is the rightmost
position that keeps the thumb fully inside the border. The track
stays dark in both states — the thumb's position is the only
state signal. Pure brutalist: stark contrast, no decoration. */
left: 32px;
}
.tg-brut-input:focus-visible ~ .tg-brut-track {
outline: 2px solid #ff6c8a;
outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
.tg-brut-track,
.tg-brut-thumb { transition: none; }
}
```
### 12. Day / Night
**Type:** Pure CSS
**Description:** A dark-mode toggle that morphs from a sun in a sky-blue track to a crescent moon over a deep night track. The most "what does this control" pattern in the bunch.
**HTML:**
```html
```
**CSS:**
```css
.tg-dn {
display: inline-flex;
cursor: pointer;
user-select: none;
}
.tg-dn-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-dn-track {
position: relative;
width: 72px;
height: 36px;
background: linear-gradient(180deg, #87ceeb 0%, #4a90c2 100%);
border-radius: 999px;
overflow: hidden;
transition: background 0.4s ease;
box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.tg-dn-thumb {
position: absolute;
top: 3px;
left: 3px;
width: 30px; height: 30px;
border-radius: 50%;
background: radial-gradient(circle at 35% 35%, #ffe066 0%, #f5a623 90%);
box-shadow: 0 0 14px rgba(255, 224, 102, 0.7);
transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1),
background 0.4s ease,
box-shadow 0.4s ease;
}
.tg-dn-crater {
position: absolute;
border-radius: 50%;
background: #2a2a30;
opacity: 0;
transition: opacity 0.4s ease;
}
.tg-dn-c1 { top: 6px; left: 8px; width: 6px; height: 6px; }
.tg-dn-c2 { top: 14px; left: 18px; width: 4px; height: 4px; }
.tg-dn-c3 { top: 20px; left: 6px; width: 5px; height: 5px; }
.tg-dn-star {
position: absolute;
width: 2px; height: 2px;
background: #fff;
border-radius: 50%;
opacity: 0;
transition: opacity 0.4s ease;
}
.tg-dn-s1 { top: 8px; left: 14px; }
.tg-dn-s2 { top: 18px; left: 24px; width: 1.5px; height: 1.5px; }
.tg-dn-s3 { top: 10px; left: 28px; }
.tg-dn-input:not(:checked) ~ .tg-dn-track {
background: linear-gradient(180deg, #0a1322 0%, #1c2540 100%);
}
.tg-dn-input:not(:checked) ~ .tg-dn-track .tg-dn-thumb {
left: 39px;
background: radial-gradient(circle at 35% 35%, #e8e6f0 0%, #a8a5bb 90%);
box-shadow: 0 0 12px rgba(168, 165, 187, 0.5);
}
.tg-dn-input:not(:checked) ~ .tg-dn-track .tg-dn-crater { opacity: 0.5; }
.tg-dn-input:not(:checked) ~ .tg-dn-track .tg-dn-star { opacity: 0.85; }
.tg-dn-input:focus-visible ~ .tg-dn-track {
outline: 2px solid #ffe066;
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.tg-dn-track,
.tg-dn-thumb,
.tg-dn-crater,
.tg-dn-star { transition: none; }
}
```
### 13. Flip Card
**Type:** Pure CSS
**Description:** A 3D flip toggle — front face shows OFF, back face shows ON. Rotates around the Y axis on toggle. Showcases transform-style: preserve-3d.
**HTML:**
```html
ON
OFF
Auto-save
```
**CSS:**
```css
.tg-flip {
display: inline-flex;
align-items: center;
gap: 14px;
cursor: pointer;
font-family: "Inter", "Segoe UI", system-ui, sans-serif;
font-size: 14px;
color: #f0eeff;
user-select: none;
perspective: 400px;
}
.tg-flip-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-flip-card {
position: relative;
width: 56px;
height: 30px;
transform-style: preserve-3d;
transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.tg-flip-face {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.1em;
border-radius: 6px;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
.tg-flip-on {
background: linear-gradient(135deg, #2eb88a 0%, #1d9c70 100%);
color: #fff;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.tg-flip-off {
background: linear-gradient(135deg, #4a4a52 0%, #2a2a30 100%);
color: #b8b6d4;
transform: rotateY(180deg);
box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.tg-flip-input:not(:checked) ~ .tg-flip-card {
transform: rotateY(180deg);
}
.tg-flip-input:focus-visible ~ .tg-flip-card {
outline: 2px solid #7c6cff;
outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
.tg-flip-card { transition: none; }
}
```
### 14. Sliding Pill with Label
**Type:** Pure CSS
**Description:** A track containing both labels (ON / OFF) with a thumb that slides over the active one. Common SaaS-dashboard pattern — the label IS the indicator.
**HTML:**
```html
ON
OFF
Public profile
```
**CSS:**
```css
.tg-pill {
display: inline-flex;
align-items: center;
gap: 12px;
cursor: pointer;
font-family: "Inter", "Segoe UI", system-ui, sans-serif;
font-size: 14px;
color: #f0eeff;
user-select: none;
}
.tg-pill-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-pill-track {
position: relative;
width: 76px;
height: 28px;
background: #2a2a30;
border-radius: 999px;
display: grid;
grid-template-columns: 1fr 1fr;
align-items: center;
font-size: 10px;
font-weight: 700;
letter-spacing: 0.08em;
transition: background 0.25s ease;
}
.tg-pill-text {
position: relative;
z-index: 2;
text-align: center;
transition: color 0.25s ease;
pointer-events: none;
}
.tg-pill-on { color: #7c6cff; }
.tg-pill-off { color: #6a6a7a; }
.tg-pill-thumb {
position: absolute;
top: 2px;
left: 2px;
width: calc(50% - 2px);
height: calc(100% - 4px);
background: #f0eeff;
border-radius: 999px;
z-index: 1;
transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.tg-pill-input:checked ~ .tg-pill-track .tg-pill-on { color: #1a1a1a; }
.tg-pill-input:checked ~ .tg-pill-track .tg-pill-off { color: #6a6a7a; }
.tg-pill-input:not(:checked) ~ .tg-pill-track .tg-pill-on { color: #6a6a7a; }
.tg-pill-input:not(:checked) ~ .tg-pill-track .tg-pill-off { color: #1a1a1a; }
.tg-pill-input:not(:checked) ~ .tg-pill-track .tg-pill-thumb {
left: 50%;
}
.tg-pill-input:focus-visible ~ .tg-pill-track {
outline: 2px solid #7c6cff;
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.tg-pill-thumb,
.tg-pill-text,
.tg-pill-track { transition: none; }
}
```
### 15. Glassmorphism
**Type:** Pure CSS
**Description:** A frosted-glass pill with a backdrop-blurred thumb. The colored backdrop tints the glass; the thumb floats above it. Modern dark-mode aesthetic.
**HTML:**
```html
Focus mode
```
**CSS:**
```css
.tg-glass {
/* A subtle colored backdrop behind the track makes the backdrop-filter
blur visible. Without a non-flat background the glass effect has
nothing to refract. */
display: inline-flex;
align-items: center;
gap: 14px;
cursor: pointer;
font-family: "Inter", "Segoe UI", system-ui, sans-serif;
font-size: 14px;
color: #f0eeff;
user-select: none;
padding: 16px 18px;
border-radius: 12px;
background: linear-gradient(135deg, rgba(124,108,255,0.18), rgba(255,108,138,0.12));
}
.tg-glass-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-glass-track {
position: relative;
width: 56px;
height: 30px;
background: rgba(255,255,255,0.08);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(255,255,255,0.18);
border-radius: 999px;
transition: background 0.3s ease, border-color 0.3s ease;
box-sizing: border-box;
}
.tg-glass-thumb {
position: absolute;
top: 2px;
left: 2px;
width: 24px; height: 24px;
border-radius: 50%;
background: rgba(255,255,255,0.85);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
box-shadow:
inset 0 1px 0 rgba(255,255,255,0.6),
0 2px 6px rgba(0,0,0,0.18);
transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
background 0.3s ease;
}
.tg-glass-input:checked ~ .tg-glass-track {
background: rgba(124,108,255,0.32);
border-color: rgba(124,108,255,0.55);
}
.tg-glass-input:checked ~ .tg-glass-track .tg-glass-thumb {
/* Inner width: 56 - 2 = 54. Thumb 24. Max left to stay inside: 54-24-2 = 28. */
left: 28px;
background: rgba(255,255,255,0.95);
}
.tg-glass-input:focus-visible ~ .tg-glass-track {
outline: 2px solid rgba(255,255,255,0.7);
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.tg-glass-track,
.tg-glass-thumb { transition: none; }
}
```
### 16. Skeuomorphic Knob
**Type:** Pure CSS
**Description:** A brushed-metal rotary knob that physically rotates 90 degrees on toggle. Different motion type from the sliding switches — rotation as the state signal. Tick marks anchor the dial.
**HTML:**
```html
OFF
ON
Power
```
**CSS:**
```css
.tg-knob {
display: inline-flex;
align-items: center;
gap: 16px;
cursor: pointer;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
font-weight: 600;
color: #d8d4dc;
user-select: none;
}
.tg-knob-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-knob-stage {
position: relative;
width: 60px;
height: 60px;
}
.tg-knob-tick {
position: absolute;
font-family: ui-monospace, "Fira Code", monospace;
font-size: 8px;
letter-spacing: 0.1em;
color: #6a6a7a;
}
.tg-knob-t-off { top: 4px; left: 0; }
.tg-knob-t-on { top: 4px; right: 0; }
.tg-knob-dial {
position: absolute;
top: 12px; left: 6px;
width: 48px; height: 48px;
border-radius: 50%;
background:
radial-gradient(circle at 30% 30%, #f0e8d8 0%, #6a5a30 90%);
box-shadow:
inset 0 1px 1px rgba(255,255,255,0.4),
inset 0 -2px 4px rgba(0,0,0,0.3),
0 2px 6px rgba(0,0,0,0.4);
transform: rotate(-45deg);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tg-knob-indicator {
position: absolute;
top: 4px; left: 50%;
width: 3px; height: 14px;
background: #2a1d0e;
border-radius: 2px;
transform: translateX(-50%);
}
.tg-knob-input:checked ~ .tg-knob-stage .tg-knob-dial {
transform: rotate(45deg);
}
.tg-knob-input:checked ~ .tg-knob-stage .tg-knob-t-on { color: #d8b66e; }
.tg-knob-input:not(:checked) ~ .tg-knob-stage .tg-knob-t-off { color: #d8b66e; }
.tg-knob-input:focus-visible ~ .tg-knob-stage .tg-knob-dial {
outline: 2px solid #d8b66e;
outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
.tg-knob-dial { transition: none; }
}
```
### 17. iOS Light Mode
**Type:** Pure CSS
**Description:** The iOS toggle in its light-theme presentation — clean white card backdrop, soft gray off-state, signature green on-state. Counterpart to demo 1.
**HTML:**
```html
Bluetooth
```
**CSS:**
```css
.tg-iosl {
/* Wrapped in a light-card backdrop because the gallery stage is dark.
This is exactly how you'd ship this in a real light-mode app —
surrounded by a white surface. */
display: inline-flex;
align-items: center;
gap: 12px;
cursor: pointer;
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
font-size: 15px;
color: #1a1a1f;
user-select: none;
padding: 14px 18px;
background: #ffffff;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.tg-iosl-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-iosl-track {
position: relative;
width: 51px;
height: 31px;
background: #e5e5ea;
border-radius: 999px;
transition: background 0.25s ease;
}
.tg-iosl-thumb {
position: absolute;
top: 2px; left: 2px;
width: 27px; height: 27px;
border-radius: 50%;
background: #ffffff;
box-shadow:
0 1px 2px rgba(0,0,0,0.18),
0 0 1px rgba(0,0,0,0.08);
transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.tg-iosl-input:checked ~ .tg-iosl-track {
background: #34c759;
}
.tg-iosl-input:checked ~ .tg-iosl-track .tg-iosl-thumb {
transform: translateX(20px);
}
.tg-iosl-input:focus-visible ~ .tg-iosl-track {
outline: 2px solid #0a84ff;
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.tg-iosl-track,
.tg-iosl-thumb { transition: none; }
}
```
### 18. Outline
**Type:** Pure CSS
**Description:** A pure-stroke toggle — track and thumb are outlines only, no fills. When toggled on, the thumb fills with brand color. Minimalist; pairs with the brutalist demo.
**HTML:**
```html
Sync
```
**CSS:**
```css
.tg-out {
display: inline-flex;
align-items: center;
gap: 12px;
cursor: pointer;
font-family: "Inter", "Segoe UI", system-ui, sans-serif;
font-size: 14px;
color: #f0eeff;
user-select: none;
}
.tg-out-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-out-track {
position: relative;
width: 56px;
height: 28px;
background: transparent;
border: 1px solid #6a6a7a;
border-radius: 999px;
transition: border-color 0.2s ease;
box-sizing: border-box;
}
.tg-out-thumb {
position: absolute;
top: 50%;
left: 3px;
width: 20px; height: 20px;
border-radius: 50%;
background: transparent;
border: 1px solid #6a6a7a;
transform: translateY(-50%);
transition: left 0.2s cubic-bezier(0.4, 0, 0.2, 1),
background 0.2s ease,
border-color 0.2s ease;
}
.tg-out-input:checked ~ .tg-out-track {
border-color: #7c6cff;
}
.tg-out-input:checked ~ .tg-out-track .tg-out-thumb {
/* Inner width: 56 - 2 = 54. Thumb 20. Max left: 54-20-3 = 31. */
left: 31px;
background: #7c6cff;
border-color: #7c6cff;
}
.tg-out-input:focus-visible ~ .tg-out-track {
outline: 2px solid #7c6cff;
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.tg-out-track,
.tg-out-thumb { transition: none; }
}
```
### 19. Bouncy Pebble
**Type:** Pure CSS
**Description:** A chunky outlined toggle with an organic "pebble" thumb shape built from 8-value border-radius syntax. Bouncy springy transition with anticipation + overshoot. Track and thumb swap colors on each state. The reference for hand-crafted, designer-drawn toggles — distinctive from every other demo in the collection.
**HTML:**
```html
Theme: butter
```
**CSS:**
```css
.tg-bp {
display: inline-flex;
align-items: center;
gap: 16px;
cursor: pointer;
font-family: "Inter", "Segoe UI", system-ui, sans-serif;
font-size: 14px;
color: #f0eeff;
user-select: none;
}
.tg-bp-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
.tg-bp-track {
position: relative;
width: 150px;
height: 74px;
background: #f3f3f3;
border-radius: 999px;
box-shadow:
inset 0 0 0 3px #2a2a2a,
0 10px 20px rgba(0,0,0,0.35);
transition: background 0.35s ease;
}
.tg-bp-thumb {
position: absolute;
top: 50%;
left: 10px;
width: 48px;
height: 48px;
background: #f4df72;
border: 3px solid #2b2b2b;
box-shadow: 0 5px 10px rgba(0,0,0,0.25);
/* 8-value border-radius (horizontal × vertical radii per corner)
creates the organic asymmetric pebble shape: fuller left, tighter
right, subtle diagonal tension. The -2deg tilt adds hand-crafted
irregularity. The cubic-bezier easing has anticipation (negative
control point) and overshoot (>1 control point) — the thumb
pulls back slightly before sliding, then overshoots the
destination before settling. */
border-radius: 52% 38% 42% 58% / 52% 42% 58% 48%;
transform: translateY(-50%) rotate(-2deg);
transition: all 0.35s cubic-bezier(0.68, -0.4, 0.27, 1.4);
}
.tg-bp-input:checked ~ .tg-bp-track {
background: #f4df72;
}
.tg-bp-input:checked ~ .tg-bp-track .tg-bp-thumb {
/* Slides to right edge. Track is 150px wide, thumb is 48px + 3px×2
border = 54px total. left: calc(100% - 64px) gives 10px from the
right edge, mirroring the 10px from the left in the off state. */
left: calc(100% - 64px);
background: #f5f5f5;
/* Mirrored border-radius — horizontal asymmetry flips. The "fuller"
side is now the right (the direction the thumb just came from). */
border-radius: 38% 52% 58% 42% / 42% 52% 48% 58%;
transform: translateY(-50%) rotate(2deg);
}
.tg-bp-input:focus-visible ~ .tg-bp-track {
outline: 3px solid #7c6cff;
outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
.tg-bp-track,
.tg-bp-thumb { transition: none; }
}
```
### 20. Industrial Rocker
**Type:** Pure CSS
**Description:** A chunky industrial rocker switch with twin indicator lights, rotating "teeth" along the rail, and a color-shifting metallic thumb. The off-light glows red; the on-light glows brand purple. Inspired by heavy-duty equipment power switches.
**HTML:**
```html
Power
```
**CSS:**
```css
@property --tg-rock-shine {
syntax: "";
initial-value: #f50000;
inherits: false;
}
.tg-rock {
--tg-rock-sz: 8px;
--tg-rock-off: #f50000;
--tg-rock-on: #7c6cff;
display: inline-flex;
align-items: center;
gap: 18px;
cursor: pointer;
font-family: "Inter", "Segoe UI", system-ui, sans-serif;
font-size: 14px;
color: #1a1a2e;
user-select: none;
}
.tg-rock-input {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0);
white-space: nowrap; border: 0;
}
/* Body proportions: 28×sz wide, 18×sz tall.
Layout regions stacked vertically:
row 1 (top): lights row, ~3×sz tall
row 2: top track teeth, ~1.5×sz tall
row 3: rail + thumb, ~7×sz tall (the main switch)
row 4: bottom track teeth, ~1.5×sz tall */
.tg-rock-body {
position: relative;
display: inline-block;
width: calc(var(--tg-rock-sz) * 28);
height: calc(var(--tg-rock-sz) * 18);
}
.tg-rock-lights {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: calc(var(--tg-rock-sz) * 2);
}
.tg-rock-light {
width: calc(var(--tg-rock-sz) * 1.4);
height: calc(var(--tg-rock-sz) * 1.4);
border-radius: 50%;
background: radial-gradient(circle at 35% 35%, #4a4a52, #1a1a1f);
box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
transition: all 0.5s ease;
}
/* Rail spans the full body width, vertically centered. */
.tg-rock-rail {
position: absolute;
top: 50%;
left: 0;
width: 100%;
height: calc(var(--tg-rock-sz) * 7);
transform: translateY(-50%);
background: linear-gradient(180deg, #2a2a30, #0a0a0e);
border-radius: calc(var(--tg-rock-sz) * 0.8);
box-shadow:
inset 0 2px 6px rgba(0,0,0,0.8),
inset 0 -1px 2px rgba(255,255,255,0.05),
0 2px 4px rgba(0,0,0,0.3);
}
/* Thumb: ~12×sz wide (almost half the body), 6×sz tall, sits on the rail. */
.tg-rock-thumb {
position: absolute;
top: 50%;
left: calc(var(--tg-rock-sz) * 1);
width: calc(var(--tg-rock-sz) * 12);
height: calc(var(--tg-rock-sz) * 5.5);
transform: translateY(-50%);
background: linear-gradient(180deg, #c0c0c8 0%, #8a8a92 45%, #4a4a52 100%);
border-radius: calc(var(--tg-rock-sz) * 0.6);
box-shadow:
inset 0 1px 0 rgba(255,255,255,0.5),
inset 0 -2px 4px rgba(0,0,0,0.5),
0 3px 6px rgba(0,0,0,0.5),
0 0 calc(var(--tg-rock-sz) * 1.8) var(--tg-rock-shine);
transition: left 0.5s ease, --tg-rock-shine 0.5s ease;
}
/* Grip lines: three horizontal bars across the thumb face. */
.tg-rock-thumb::before {
content: "";
position: absolute;
top: 50%;
left: 25%;
right: 25%;
height: 1px;
transform: translateY(-50%);
background: rgba(0,0,0,0.55);
box-shadow:
0 calc(var(--tg-rock-sz) * 0.6) 0 rgba(0,0,0,0.55),
0 calc(var(--tg-rock-sz) * -0.6) 0 rgba(0,0,0,0.55);
}
.tg-rock-track-top,
.tg-rock-track-bot {
position: absolute;
left: 0;
right: 0;
display: flex;
justify-content: space-between;
padding: 0 calc(var(--tg-rock-sz) * 1);
}
.tg-rock-track-top { top: calc(var(--tg-rock-sz) * 3); }
.tg-rock-track-bot { bottom: calc(var(--tg-rock-sz) * 0); }
.tg-rock-track-top span,
.tg-rock-track-bot span {
width: calc(var(--tg-rock-sz) * 1);
height: calc(var(--tg-rock-sz) * 1);
background: #3a3a42;
border-radius: 1px;
transition: transform 0.5s ease;
}
/* Off state — left light glows red. */
.tg-rock-light-off {
background: radial-gradient(circle at 35% 35%, #ff7575, var(--tg-rock-off));
box-shadow:
inset 0 1px 1px rgba(255,255,255,0.3),
0 0 calc(var(--tg-rock-sz) * 1.2) var(--tg-rock-off);
}
/* On state — left dims, right lights up purple, thumb slides right. */
.tg-rock-input:checked ~ .tg-rock-body .tg-rock-light-off {
background: radial-gradient(circle at 35% 35%, #4a4a52, #1a1a1f);
box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
}
.tg-rock-input:checked ~ .tg-rock-body .tg-rock-light-on {
background: radial-gradient(circle at 35% 35%, #b5a8ff, var(--tg-rock-on));
box-shadow:
inset 0 1px 1px rgba(255,255,255,0.3),
0 0 calc(var(--tg-rock-sz) * 1.2) var(--tg-rock-on);
}
.tg-rock-input:checked ~ .tg-rock-body .tg-rock-thumb {
left: calc(100% - var(--tg-rock-sz) * 13);
--tg-rock-shine: #7c6cff;
}
.tg-rock-input:checked ~ .tg-rock-body .tg-rock-track-top span {
transform: rotate(20deg);
}
.tg-rock-input:checked ~ .tg-rock-body .tg-rock-track-bot span {
transform: rotate(-20deg);
}
.tg-rock-input:focus-visible ~ .tg-rock-body .tg-rock-rail {
outline: 2px solid #7c6cff;
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.tg-rock-thumb,
.tg-rock-light,
.tg-rock-track-top span,
.tg-rock-track-bot span { transition: none; }
}
```
---
## 21 CSS Tooltips
URL: https://codefronts.com/snippets/css-tooltips/
Description: 21 hand-coded CSS tooltips spanning icon toolbars, form-field help, code docs, editorial footnotes, profile cards, schematics, inventories, keyboard shortcuts, glossary words, status dots, table cells, content tags, departures boards, recipe ingredients, constellation maps, periodic-table elements, photo EXIF cards, org charts, and event timelines.
Demo count: 21
### 01. Schematic Hotspot
**Type:** Pure CSS
**Description:** For product diagrams and exploded views. Four pulsing red dots dot a wireframe drawing; hover any one and a leader line draws itself to a numbered callout box with part name, description, and a tiny spec table. The whole annotation reads like a CAD title block.
**HTML:**
```html
DWG-0142-A · CAMERA / EXPLODED VIEW
SCALE 1:1 · REV 04 14.MAY.2026
142mm
01
— Optical Assembly
35mm f/1.4 prime
Twelve-element design across nine groups. Aspherical front and rear, two ED elements mid-stack.
Glass 12 / 9
Coating Nano-V
Weight 410g
02
— Shutter Dial
Mechanical command dial
Detented brass with knurled edge. Range 1/8000s to 30s plus bulb. Locks with a quarter-press.
Steps 1/3 EV
Travel 300°
Cycles 500k
03
— Accessory Port
ISO 518 hot shoe
Standard mount with X-sync at 1/250s. Center pin plus four data contacts for TTL flash control.
Sync 1/250s
Pins 1+4
Hot 12V
04
— Hand Grip
Magnesium undergrip
Cast magnesium core wrapped in pressed cowhide. Conceals battery, card slot, and focus-recall trigger.
Wrap Cowhide
Core MgAl
Battery 7.4 Wh
```
**CSS:**
```css
.schem-stage-wrap {
background: #f4f3ee;
padding: 32px 24px;
background-image:
linear-gradient(rgba(28, 35, 48, 0.06) 1px, transparent 1px),
linear-gradient(90deg, rgba(28, 35, 48, 0.06) 1px, transparent 1px);
background-size: 24px 24px;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Inter', system-ui, sans-serif;
color: #1c2330;
/* Force full width of the stage. .cf-stage uses align-items: center
which collapses children to their content-min-width when they
don't declare an explicit width. Without this, .schem-paper's
width: 100% resolves against a collapsed parent and produces the
tiny-square + content-overflow we saw. */
width: 100%;
box-sizing: border-box;
}
.schem-paper {
position: relative;
width: 100%;
max-width: 760px;
aspect-ratio: 16 / 10;
background: #fbfaf6;
border: 1px solid rgba(28, 35, 48, 0.2);
overflow: visible;
}
.schem-paper::before {
content: '';
position: absolute; inset: 0;
background-image:
linear-gradient(rgba(28, 35, 48, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(28, 35, 48, 0.05) 1px, transparent 1px);
background-size: 18px 18px;
pointer-events: none;
}
.schem-meta {
position: absolute;
top: 12px;
left: 16px;
right: 16px;
display: flex;
justify-content: space-between;
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 9.5px;
letter-spacing: 0.15em;
text-transform: uppercase;
color: rgba(28, 35, 48, 0.55);
z-index: 2;
}
.schem-right { text-align: right; line-height: 1.6; }
.schem-corner {
position: absolute;
width: 12px; height: 12px;
border: 1px solid rgba(28, 35, 48, 0.4);
}
.schem-tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.schem-tr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.schem-bl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.schem-br { bottom: 6px; right: 6px; border-left: none; border-top: none; }
.schem-object {
position: absolute;
inset: 50px 60px 50px 60px;
display: flex;
align-items: center;
justify-content: center;
}
.schem-svg { width: 100%; height: 100%; overflow: visible; }
.schem-hot {
position: absolute;
width: 16px; height: 16px;
margin: -8px;
border-radius: 50%;
cursor: help;
z-index: 5;
}
.schem-hot::before {
content: '';
position: absolute;
inset: 5px;
background: #c1422c;
border-radius: 50%;
}
.schem-hot::after {
content: '';
position: absolute;
inset: 0;
border: 1px solid #c1422c;
border-radius: 50%;
animation: schem-pulse 2.4s ease-out infinite;
}
@keyframes schem-pulse {
0% { transform: scale(0.6); opacity: 0.8; }
100% { transform: scale(2); opacity: 0; }
}
.schem-hot-1 { top: 56%; left: 56.25%; }
.schem-hot-2 { top: 25%; left: 32.5%; }
.schem-hot-3 { top: 30%; left: 47.5%; }
.schem-hot-4 { top: 56%; left: 22.5%; }
/* Leader lines hidden — they were stylish but only worked with the
original off-paper annotation positions. Now that notes are clamped
to the paper's four corners (so .cf-stage doesn't clip them), drawing
a line from each hotspot to its corner would require per-hotspot
trig that's not worth the complexity. Keeping the SVG markup in
place so the adjacent-sibling selector chain
(.schem-hot:hover + .schem-leader + .schem-note) still resolves. */
.schem-leader { display: none; }
.schem-note {
position: absolute;
width: 190px;
background: #fbfaf6;
border: 1px solid #1c2330;
padding: 11px 13px;
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 10.5px;
line-height: 1.6;
color: #1c2330;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s, visibility 0s linear 0.3s;
pointer-events: none;
z-index: 10;
box-shadow: 4px 4px 0 rgba(28, 35, 48, 0.08);
}
.schem-hot:hover + .schem-leader + .schem-note {
opacity: 1;
visibility: visible;
transition-delay: 0.12s;
}
/* Annotations positioned in each corner of the schematic object's
coordinate space — kept inside the paper bounds so they don't get
clipped by .cf-stage's overflow:hidden. Hotspot 1 (lens) lower-right,
note in upper-right; hotspot 2 (top dial) upper-left, note upper-left;
hotspot 3 (hot shoe) top-center, note top-right; hotspot 4 (grip)
lower-left, note lower-left. */
.schem-note-1 { top: 4%; right: 0; left: auto; }
.schem-note-2 { top: 4%; left: 0; }
.schem-note-3 { top: 4%; left: 50%; }
.schem-note-4 { bottom: 4%; left: 0; top: auto; }
.schem-num {
display: inline-block;
font-family: Georgia, serif;
font-weight: 500;
font-style: italic;
color: #c1422c;
font-size: 20px;
line-height: 1;
margin-bottom: 3px;
}
.schem-label {
font-size: 9.5px;
letter-spacing: 0.15em;
text-transform: uppercase;
color: rgba(28, 35, 48, 0.6);
margin-bottom: 6px;
}
.schem-part {
font-family: Georgia, serif;
font-size: 15px;
font-weight: 500;
line-height: 1.2;
margin-bottom: 6px;
color: #1c2330;
}
.schem-part em { font-style: italic; color: #c1422c; }
.schem-desc {
font-family: 'Inter', system-ui, sans-serif;
font-size: 10.5px;
color: rgba(28, 35, 48, 0.75);
line-height: 1.5;
}
.schem-spec {
margin-top: 8px;
padding-top: 6px;
border-top: 1px dashed rgba(28, 35, 48, 0.3);
display: grid;
grid-template-columns: 54px 1fr;
gap: 3px 8px;
font-size: 9.5px;
}
.schem-k { color: rgba(28, 35, 48, 0.5); }
.schem-v { color: #c1422c; }
```
### 02. Keyboard Shortcut Hint
**Type:** Pure CSS
**Description:** A compact label-plus-keycap pill for productivity apps. Each tooltip wears its shortcut as little 3D keycaps that depress on a loop while the tooltip is shown — the closest pure-CSS can get to communicating "this is a real chord, try it." A 400ms delay keeps it out of the way on quick mouse passes.
**HTML:**
```html
Untitled Document — Composer
The cursor as a finger.
Hover any toolbar button to see its keycap; the keys depress on a loop, the way a real chord would feel if you held the gesture just long enough to second-guess it.
```
**CSS:**
```css
.kbd-stage {
background: #f5f5f3;
/* Top room for the small keycap tooltips popping up from each
toolbar button. ~130px is enough since these tips are compact. */
padding: 130px 28px 60px;
display: flex;
align-items: flex-start;
justify-content: center;
font-family: 'Inter', system-ui, sans-serif;
color: #1a1a1a;
}
.kbd-shell {
width: 100%;
max-width: 600px;
background: #fff;
border: 1px solid rgba(0, 0, 0, 0.08);
border-radius: 10px;
overflow: visible;
box-shadow: 0 20px 48px -16px rgba(0, 0, 0, 0.15);
}
.kbd-titlebar {
height: 34px;
background: #fafaf8;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
display: flex;
align-items: center;
padding: 0 12px;
gap: 7px;
border-radius: 10px 10px 0 0;
}
.kbd-tdot {
width: 10px; height: 10px;
border-radius: 50%;
background: #e2e2de;
}
.kbd-ttitle {
flex: 1;
text-align: center;
font-family: 'Inter', system-ui, sans-serif;
font-size: 11.5px;
color: rgba(0, 0, 0, 0.5);
letter-spacing: 0.02em;
}
.kbd-toolbar {
display: flex;
align-items: center;
padding: 10px 12px;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
gap: 4px;
overflow: visible;
flex-wrap: wrap;
}
.kbd-group {
display: flex;
gap: 2px;
padding: 0 6px;
border-right: 1px solid rgba(0, 0, 0, 0.08);
}
.kbd-group:last-child { border-right: none; }
.kbd-btn {
width: 34px; height: 34px;
border-radius: 7px;
background: transparent;
border: none;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
position: relative;
color: #444;
transition: background 0.15s, color 0.15s;
font-family: 'Inter', system-ui, sans-serif;
padding: 0;
}
.kbd-btn:hover { background: #f0f0ec; color: #111; }
.kbd-btn-active { background: #e8e8e4; color: #111; }
.kbd-btn svg { width: 17px; height: 17px; }
.kbd-tip {
position: absolute;
bottom: calc(100% + 10px);
left: 50%;
transform: translateX(-50%) translateY(4px);
background: #1a1a1a;
color: #fff;
padding: 7px 10px;
border-radius: 7px;
font-family: 'Inter', system-ui, sans-serif;
font-size: 11.5px;
white-space: nowrap;
display: flex;
align-items: center;
gap: 9px;
opacity: 0;
visibility: hidden;
transition:
opacity 0.2s,
transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear 0.2s;
z-index: 50;
pointer-events: none;
box-shadow:
0 6px 18px -4px rgba(0, 0, 0, 0.3),
0 2px 6px -2px rgba(0, 0, 0, 0.2);
}
.kbd-btn:hover .kbd-tip {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
transition-delay: 0.4s, 0.4s, 0s;
}
.kbd-tip::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translate(-50%, -50%) rotate(45deg);
width: 7px; height: 7px;
background: #1a1a1a;
}
.kbd-tip-label { font-weight: 500; letter-spacing: 0.01em; }
.kbd-tip-keys { display: flex; gap: 3px; }
.kbd-key {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 20px;
height: 20px;
padding: 0 5px;
background: linear-gradient(180deg, #3d3d3d 0%, #2a2a2a 100%);
border: 1px solid #4a4a4a;
border-bottom-width: 2px;
border-radius: 4px;
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 10px;
color: #f5f5f3;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
transition: transform 0.1s, border-bottom-width 0.1s, box-shadow 0.1s;
}
.kbd-btn:hover .kbd-key {
animation: kbd-press 1.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.kbd-btn:hover .kbd-key:nth-child(2) { animation-delay: 0.1s; }
.kbd-btn:hover .kbd-key:nth-child(3) { animation-delay: 0.2s; }
@keyframes kbd-press {
0%, 50%, 100% { transform: translateY(0); border-bottom-width: 2px; }
25% { transform: translateY(1px); border-bottom-width: 1px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
}
.kbd-tip-ext {
padding: 10px 12px;
flex-direction: column;
align-items: flex-start;
gap: 7px;
white-space: normal;
width: 200px;
text-align: left;
}
.kbd-tip-row {
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
gap: 10px;
}
.kbd-tip-desc {
font-size: 10.5px;
color: rgba(255, 255, 255, 0.6);
line-height: 1.5;
padding-top: 5px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
width: 100%;
}
.kbd-content {
padding: 28px 36px 36px;
font-family: 'Inter', system-ui, sans-serif;
color: rgba(0, 0, 0, 0.6);
font-size: 13px;
line-height: 1.7;
}
.kbd-h {
font-family: Georgia, serif;
font-weight: 400;
font-size: 24px;
color: #111;
margin: 0 0 10px;
letter-spacing: -0.01em;
}
.kbd-p { max-width: 480px; margin: 0; }
.kbd-p em {
color: #2d6a4f;
font-family: Georgia, serif;
font-style: italic;
font-weight: 500;
}
```
### 03. IDE Function Hover
**Type:** Pure CSS
**Description:** A typed-signature documentation popover for code editors. Hover the underlined function call to reveal a stacked card — badge, namespace path, signature, prose description, parameter rows, and a docs-shortcut footer — the kind of tooltip every IDE wishes it shipped by default.
**HTML:**
```html
orchestrator.ts
// pipeline assembled at boot
import { createScheduler } from "./scheduler" ;
const queue = createScheduler
FUNCTION
core › scheduler › createScheduler
function createScheduler <T >( opts : SchedulerOptions <T > ): Queue <T >
Creates a back-pressured task queue with concurrency control. Items are processed in FIFO order; failing jobs surface to the dead-letter sink.
concurrency Max parallel jobs. Default 4.
retries Per-task retry budget. Default 3.
onDrain Fires once when the queue empties.
({
concurrency : 8 ,
retries : 3 ,
});
```
**CSS:**
```css
/* No @import here. Demos use Inter + JetBrains Mono (from
BaseLayout) and Georgia / cursive system fallbacks for the rest.
See top-of-file Fonts comment for the why. */
.ide-stage {
background: #0d1117;
/* Top padding sized so the tooltip (~280px tall, pops up from the
symbol) fully renders inside the gallery card. Without this the
card's overflow:hidden clips the top of the tip. The bottom needs
less room since the editor is anchored to flex-start. */
padding: 300px 28px 48px;
display: flex;
align-items: flex-start;
justify-content: center;
font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.ide-editor {
background: #161b22;
border: 1px solid #30363d;
border-radius: 8px;
width: 100%;
max-width: 560px;
box-shadow: 0 18px 50px -16px rgba(0, 0, 0, 0.7);
}
.ide-tabs {
background: #0d1117;
border-bottom: 1px solid #30363d;
display: flex;
align-items: center;
padding: 0 14px;
height: 32px;
gap: 4px;
border-radius: 8px 8px 0 0;
}
.ide-dot {
width: 9px; height: 9px; border-radius: 50%;
background: #30363d;
}
.ide-dot:nth-child(1) { background: #ff5f57; }
.ide-dot:nth-child(2) { background: #febc2e; }
.ide-dot:nth-child(3) { background: #28c840; }
.ide-tab {
margin-left: 18px;
padding: 5px 12px;
background: #161b22;
border-radius: 6px 6px 0 0;
font-size: 11px;
color: #c9d1d9;
display: inline-flex;
align-items: center;
gap: 7px;
}
.ide-tab::before {
content: ''; width: 4px; height: 4px; border-radius: 50%;
background: #58a6ff;
}
.ide-body {
padding: 18px 0;
font-size: 13px;
/* Use a pixel line-height so the gutter and code columns advance at
the same rate — em-based line-height (1.85) combined with two
different font-sizes drifted them apart by ~2px per row and the
gutter numbers no longer matched their code lines. */
line-height: 22px;
display: flex;
color: #c9d1d9;
}
.ide-gutter {
width: 44px;
text-align: right;
padding-right: 12px;
color: #484f58;
user-select: none;
border-right: 1px solid #21262d;
/* Same font-size as the code column so digits ride the 22px baseline
in step with the code. */
font-size: 13px;
}
.ide-code { padding: 0 16px; flex: 1; min-width: 0; }
/* No white-space: pre on .ide-line. The line uses for visible
indentation, which works under white-space: normal. Setting pre
would honor the source newlines between sibling spans (especially
inside the .ide-symbol that nests the multi-line tooltip markup),
breaking each token onto its own visual row in the try-it iframe. */
.ide-line {}
.ide-kw { color: #ff7b72; }
.ide-fn { color: #d2a8ff; }
.ide-str { color: #a5d6ff; }
.ide-num { color: #79c0ff; }
.ide-cmt { color: #8b949e; font-style: italic; }
.ide-var { color: #79c0ff; }
.ide-param { color: #ffa657; }
.ide-symbol {
position: relative;
cursor: help;
/* Visible-at-rest affordance: a dashed blue underline tells users
"this token has a hover" without needing them to land on it first.
The original (transparent until hover) was a discovery failure —
users had no signal the demo had a hover tooltip at all. */
border-bottom: 1px dashed rgba(88, 166, 255, 0.55);
transition: border-color 0.2s, background 0.2s;
border-radius: 2px;
padding: 0 2px;
}
.ide-symbol::after {
/* Small info dot to the right of the symbol — second discovery cue
in case the underline gets lost in syntax highlighting. */
content: 'ⓘ';
display: inline-block;
font-size: 9px;
color: rgba(88, 166, 255, 0.6);
vertical-align: middle;
margin-left: 3px;
transition: color 0.2s;
}
.ide-symbol:hover {
border-color: #58a6ff;
background: rgba(88, 166, 255, 0.08);
}
.ide-symbol:hover::after {
color: #58a6ff;
}
.ide-tip {
position: absolute;
bottom: calc(100% + 14px);
left: -20px;
width: 380px;
background: linear-gradient(180deg, #1c2128 0%, #161b22 100%);
border: 1px solid #30363d;
border-radius: 6px;
box-shadow:
0 18px 50px -8px rgba(0, 0, 0, 0.75),
0 0 0 1px rgba(88, 166, 255, 0.06),
inset 0 1px 0 rgba(255, 255, 255, 0.04);
opacity: 0;
visibility: hidden;
transform: translateY(8px);
transition:
opacity 0.22s ease,
transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear 0.22s;
z-index: 10;
font-family: 'JetBrains Mono', ui-monospace, monospace;
pointer-events: none;
display: block;
/* Reset two properties the tip inherits from the .ide-line ancestor:
white-space: pre (which would render the source newlines between
spans as visible whitespace inside the tip) and line-height: 1.85
(the editor's loose line-height — fine for code, way too tall
inside the tooltip's prose). */
white-space: normal;
line-height: 1.5;
text-align: left;
}
.ide-symbol:hover .ide-tip {
opacity: 1;
visibility: visible;
transform: translateY(0);
transition-delay: 0s;
}
.ide-tip::after {
content: '';
position: absolute;
top: 100%;
left: 32px;
width: 10px; height: 10px;
background: #161b22;
border-right: 1px solid #30363d;
border-bottom: 1px solid #30363d;
transform: translateY(-50%) rotate(45deg);
}
.ide-tip-head {
padding: 10px 14px 9px;
border-bottom: 1px solid #21262d;
display: flex;
align-items: center;
gap: 10px;
font-size: 11px;
}
.ide-tip-badge {
background: rgba(88, 166, 255, 0.15);
color: #58a6ff;
padding: 2px 7px;
border-radius: 10px;
font-size: 9.5px;
font-weight: 600;
letter-spacing: 0.05em;
}
.ide-tip-path { color: #8b949e; font-size: 11px; }
.ide-sep { color: #484f58; margin: 0 4px; }
.ide-tip-sig {
padding: 12px 14px;
font-size: 12px;
line-height: 1.6;
border-bottom: 1px solid #21262d;
display: block;
/* Re-enable pre here so the multi-line function signature keeps its
indent. The outer .ide-tip reset this to normal so the prose
blocks (description, params, footer) don't render the source-
formatting whitespace between sibling spans. */
white-space: pre;
}
.ide-tip-desc {
padding: 12px 14px;
font-family: 'Inter', system-ui, sans-serif;
font-size: 12px;
line-height: 1.65;
color: #c9d1d9;
border-bottom: 1px solid #21262d;
display: block;
}
.ide-tip-code {
font-family: 'JetBrains Mono', ui-monospace, monospace;
background: rgba(110, 118, 129, 0.2);
color: #ffa657;
padding: 1px 5px;
border-radius: 3px;
font-size: 11px;
}
.ide-tip-params {
padding: 10px 14px;
border-bottom: 1px solid #21262d;
display: block;
}
.ide-tip-param-row {
display: grid;
grid-template-columns: 90px 1fr;
gap: 10px;
font-size: 11.5px;
padding: 3px 0;
line-height: 1.5;
}
.ide-pname { color: #ffa657; }
.ide-pdesc { color: #8b949e; font-family: 'Inter', system-ui, sans-serif; font-size: 11.5px; }
.ide-tip-foot {
padding: 9px 14px;
font-size: 10px;
color: #6e7681;
display: flex;
justify-content: space-between;
align-items: center;
}
.ide-kbd-key {
background: #21262d;
border: 1px solid #30363d;
border-bottom-width: 2px;
color: #c9d1d9;
padding: 1px 6px;
border-radius: 4px;
font-size: 10px;
margin: 0 2px;
display: inline-block;
}
```
### 04. Editorial Footnote
**Type:** Pure CSS
**Description:** A sidenote for longform reading. The source word grows an underline on hover; a paper-card with a deckle clip-path drops down on a hairline tether, holds the body of the note in italic Garamond, and closes with a small all-caps citation. Made for essays, not interfaces.
**HTML:**
```html
An essay · No. XII
14 May 2026
T he interface is a place where reading becomes touch. We rarely talk about the cursor as a finger, but it is — it brushes against language, and language flinches back. A tooltip is what happens when a word
decides to answer1
1.
The phrase belongs to Robin Sloan, who described hover states as "the part of the web that whispers back." Most of us, of course, have settled for the part that mumbles.
— Sloan, 2019, p. 84
. Once it could only do so in gray boxes, a meek municipal voice; now it can do almost anything, and so the question is no longer whether it speaks but what register it speaks in.
Consider the
marginalia of medieval readers2
2.
In the manuscript tradition, glosses were often longer than the texts they served. The Vulgate, the Talmud, the Glossa Ordinaria — these are pages where the footnote ate the page and called it home.
— de Hamel, 2016, ch. 4
, who wrote louder than the books they read. Their pages were tooltips made of ink, hovering forever — annotations that became canon because the original was lonely without them.
```
**CSS:**
```css
.edn-stage {
background: #f3eee3;
/* Generous bottom room — footnote tips drop down from each anchor. */
padding: 40px 40px 220px;
position: relative;
display: flex;
align-items: flex-start;
justify-content: center;
}
.edn-stage::before {
content: '';
position: absolute; inset: 0;
background-image: url("data:image/svg+xml;utf8, ");
pointer-events: none;
opacity: 0.5;
}
.edn-essay {
max-width: 560px;
font-family: Georgia, serif;
font-size: 18px;
line-height: 1.65;
color: #2a1f17;
position: relative;
z-index: 1;
}
.edn-byline {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 9.5px;
letter-spacing: 0.25em;
text-transform: uppercase;
color: #8a2c1c;
margin-bottom: 22px;
border-bottom: 1px solid rgba(138, 44, 28, 0.3);
padding-bottom: 12px;
display: flex;
justify-content: space-between;
}
.edn-essay p {
margin-bottom: 18px;
text-align: justify;
hyphens: auto;
}
.edn-dropcap {
float: left;
font-family: Georgia, serif;
font-weight: 500;
font-size: 76px;
line-height: 0.85;
margin: 4px 10px 0 0;
color: #8a2c1c;
}
.edn-anchor {
position: relative;
display: inline;
color: #8a2c1c;
cursor: help;
font-family: Georgia, serif;
font-style: italic;
font-weight: 500;
background-image: linear-gradient(to right, #8a2c1c 0%, #8a2c1c 100%);
background-size: 0 1px;
background-repeat: no-repeat;
background-position: 0 100%;
transition: background-size 0.5s cubic-bezier(0.65, 0, 0.35, 1);
padding-bottom: 2px;
}
.edn-anchor:hover { background-size: 100% 1px; }
.edn-sup {
font-size: 0.65em;
vertical-align: super;
color: #8a2c1c;
font-weight: 600;
margin-left: 1px;
}
.edn-tip {
position: absolute;
top: calc(100% + 14px);
left: 50%;
transform: translate(-50%, -8px) rotate(-0.4deg);
width: 300px;
background: #faf5ea;
color: #2a1f17;
padding: 16px 20px 18px;
box-shadow:
0 1px 0 rgba(0, 0, 0, 0.05),
0 10px 26px -6px rgba(75, 40, 20, 0.25),
0 2px 5px -1px rgba(75, 40, 20, 0.15);
opacity: 0;
visibility: hidden;
transition:
opacity 0.3s,
transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear 0.3s;
z-index: 20;
font-family: Georgia, serif;
font-size: 14px;
line-height: 1.55;
pointer-events: none;
text-align: left;
display: block;
clip-path: polygon(
0% 4%, 2% 1%, 6% 3%, 12% 0%, 22% 2%, 35% 0%, 48% 2%, 62% 0%,
78% 2%, 90% 0%, 96% 3%, 100% 1%,
100% 96%, 98% 99%, 90% 97%, 78% 100%, 60% 98%, 42% 100%, 24% 98%,
10% 100%, 4% 97%, 0% 99%
);
}
.edn-anchor:hover .edn-tip {
opacity: 1;
visibility: visible;
transform: translate(-50%, 0) rotate(-0.4deg);
transition-delay: 0s;
}
.edn-tip::before {
content: '';
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
width: 1px;
height: 14px;
background: #8a2c1c;
opacity: 0.4;
}
.edn-tip-num {
display: inline-block;
font-family: Georgia, serif;
font-style: italic;
font-weight: 500;
color: #8a2c1c;
font-size: 20px;
line-height: 1;
margin-right: 6px;
vertical-align: -2px;
}
.edn-tip-body {
font-style: italic;
display: inline;
}
.edn-tip-cite {
display: block;
margin-top: 10px;
padding-top: 8px;
border-top: 1px dotted rgba(138, 44, 28, 0.4);
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 9px;
letter-spacing: 0.1em;
text-transform: uppercase;
color: #8a2c1c;
font-style: normal;
}
```
### 05. Profile Card
**Type:** Pure CSS
**Description:** A rich hover-card for mentions, comments, and team rosters. Internal elements stagger in: hero glow, then portrait, then name and tagline, then stats — so the card unfolds rather than flicking on. Hover any avatar in the roster below.
**HTML:**
```html
Editorial Team · Vol XII
3 active
M
Editor-in-Chief
M
Mira Vance
"Words first; everything else negotiated after."
A
Design Director
A
Adesh Kothari
"Restraint is also a flourish, if you commit to it."
J
June Lacroix
@junelacroix
Photo Editor
J
June Lacroix
"A photograph is the slowest sentence a magazine can run."
```
**CSS:**
```css
.pc-stage {
background: #14110d;
/* Generous bottom room — profile cards drop down from roster rows
and are ~360px tall, so the gallery card needs room below the
visible roster for them to render in full. */
padding: 36px 28px 400px;
display: flex;
align-items: flex-start;
justify-content: center;
font-family: 'Inter', system-ui, sans-serif;
}
.pc-roster {
width: 100%;
max-width: 560px;
background: rgba(255, 255, 255, 0.02);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 2px;
}
.pc-head {
padding: 12px 20px;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
display: flex;
justify-content: space-between;
align-items: center;
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 9.5px;
letter-spacing: 0.2em;
text-transform: uppercase;
color: rgba(239, 236, 230, 0.5);
}
.pc-row {
padding: 14px 20px;
display: grid;
grid-template-columns: 40px 1fr auto auto;
align-items: center;
gap: 14px;
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
position: relative;
color: #efece6;
}
.pc-row:last-child { border-bottom: none; }
.pc-row:hover { background: rgba(255, 255, 255, 0.025); }
.pc-avatar-trigger {
width: 36px; height: 36px;
border-radius: 50%;
position: relative;
cursor: pointer;
flex-shrink: 0;
overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.1);
transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.pc-avatar-trigger:hover { transform: scale(1.08); }
.pc-avatar-svg {
width: 100%; height: 100%;
border-radius: 50%;
display: block;
}
.pc-name-row {
font-family: Georgia, serif;
font-size: 17px;
font-weight: 400;
}
.pc-name-row em { font-style: italic; color: #f7d18e; font-weight: 300; }
.pc-handle {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 10.5px;
color: rgba(239, 236, 230, 0.4);
margin-top: 2px;
}
.pc-role {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 9.5px;
letter-spacing: 0.15em;
text-transform: uppercase;
color: rgba(239, 236, 230, 0.5);
}
.pc-status {
width: 6px; height: 6px;
border-radius: 50%;
background: #6fcf97;
box-shadow: 0 0 8px rgba(111, 207, 151, 0.6);
}
.pc-status-away { background: #f7d18e; box-shadow: 0 0 8px rgba(247, 209, 142, 0.6); }
.pc-card {
position: absolute;
top: calc(100% + 12px);
left: 20px;
width: 320px;
background: linear-gradient(180deg, #1f1a14 0%, #14110d 100%);
border: 1px solid rgba(247, 209, 142, 0.15);
border-radius: 2px;
box-shadow:
0 25px 60px -16px rgba(0, 0, 0, 0.8),
0 0 0 1px rgba(247, 209, 142, 0.05),
inset 0 1px 0 rgba(247, 209, 142, 0.08);
opacity: 0;
visibility: hidden;
transform: translateY(8px);
transition:
opacity 0.3s,
transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear 0.3s;
z-index: 30;
pointer-events: none;
overflow: hidden;
}
.pc-row:hover .pc-card,
.pc-avatar-trigger:hover .pc-card {
opacity: 1;
visibility: visible;
transform: translateY(0);
transition-delay: 0s;
}
.pc-card::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 1px;
background: linear-gradient(90deg, transparent, #f7d18e, transparent);
opacity: 0.5;
}
.pc-hero {
height: 76px;
background:
radial-gradient(circle at 30% 60%, rgba(193, 66, 44, 0.4), transparent 50%),
radial-gradient(circle at 80% 40%, rgba(247, 209, 142, 0.3), transparent 50%),
linear-gradient(135deg, #2a201a 0%, #14110d 100%);
position: relative;
overflow: hidden;
}
.pc-hero-green {
background:
radial-gradient(circle at 30% 60%, rgba(45, 74, 62, 0.5), transparent 50%),
radial-gradient(circle at 80% 40%, rgba(247, 209, 142, 0.3), transparent 50%),
linear-gradient(135deg, #1a2a23 0%, #14110d 100%);
}
.pc-hero-amber {
background:
radial-gradient(circle at 30% 60%, rgba(107, 66, 38, 0.5), transparent 50%),
radial-gradient(circle at 80% 40%, rgba(247, 209, 142, 0.25), transparent 50%),
linear-gradient(135deg, #2a201a 0%, #14110d 100%);
}
.pc-hero::after {
content: '';
position: absolute;
inset: 0;
background-image:
repeating-linear-gradient(45deg, transparent 0, transparent 6px, rgba(247, 209, 142, 0.04) 6px, rgba(247, 209, 142, 0.04) 7px);
}
.pc-body { padding: 0 18px 16px; position: relative; }
.pc-photo {
width: 56px; height: 56px;
border-radius: 50%;
margin-top: -28px;
border: 2px solid #14110d;
box-shadow: 0 0 0 1px rgba(247, 209, 142, 0.3);
position: relative;
overflow: hidden;
background: #2a201a;
}
.pc-display-name {
margin-top: 12px;
font-family: Georgia, serif;
font-size: 22px;
font-weight: 400;
line-height: 1.15;
color: #efece6;
}
.pc-display-name em { font-style: italic; color: #f7d18e; font-weight: 300; }
.pc-tagline {
margin-top: 6px;
font-family: Georgia, serif;
font-size: 13px;
font-style: italic;
color: rgba(239, 236, 230, 0.65);
line-height: 1.4;
}
.pc-stats {
margin-top: 14px;
padding-top: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.06);
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
}
.pc-stat-num {
font-family: Georgia, serif;
font-size: 18px;
font-weight: 500;
color: #f7d18e;
}
.pc-stat-label {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 8.5px;
letter-spacing: 0.15em;
text-transform: uppercase;
color: rgba(239, 236, 230, 0.4);
margin-top: 2px;
}
.pc-stagger > * {
opacity: 0;
transform: translateY(6px);
transition: opacity 0.4s, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.pc-row:hover .pc-stagger > *,
.pc-avatar-trigger:hover .pc-stagger > * {
opacity: 1;
transform: translateY(0);
}
.pc-row:hover .pc-stagger > *:nth-child(1) { transition-delay: 0.05s; }
.pc-row:hover .pc-stagger > *:nth-child(2) { transition-delay: 0.18s; }
```
### 06. Inventory Tooltip
**Type:** Pure CSS
**Description:** A rarity-tinted tooltip for games, achievements, and collectibles. Each rarity tier (common → legendary) glows its own color through the border, the stat list, and the pulsing outline. Italic flavor text closes every card the way a good item description should.
**HTML:**
```html
Sunburst Talisman
Legendary · Amulet
Spell Power +84
Critical Strike +12%
Movement −4%
"It does not warm — it only insists that warmth was once here."
Voidshard Pendant
Epic · Pendant
Intellect +62
Shadow Mastery +9%
"Cool to the touch. Then colder. Then it whispers your name in a voice that almost is."
Ranger's Compass
Rare · Trinket
Agility +34
Stealth +7%
"True north is whichever direction the deer have not yet noticed you."
Verdant Tonic
Uncommon · Consumable
Restores +1,200 HP
Over 8 sec
"Tastes like the smell of a greenhouse in winter."
Iron Lockbox
Common · Container
Slots +6
"Heavy enough to be honest about what it contains."
```
**CSS:**
```css
.rpg-stage {
background: radial-gradient(ellipse at top, #1a1410 0%, #0a0806 100%);
/* Generous top room — rpg tooltips pop UP from each slot, ~300px
tall. The inventory grid sits low so the tip has room above. */
padding: 320px 28px 60px;
display: flex;
align-items: flex-end;
justify-content: center;
}
.rpg-inv {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 8px;
width: 100%;
max-width: 520px;
padding: 16px;
background:
linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
border: 1px solid rgba(212, 175, 55, 0.2);
box-shadow:
0 0 0 1px rgba(0, 0, 0, 0.5),
0 0 50px rgba(212, 175, 55, 0.08),
inset 0 1px 0 rgba(212, 175, 55, 0.1);
position: relative;
}
.rpg-inv::before {
content: 'INVENTORY';
position: absolute;
top: -24px;
left: 50%;
transform: translateX(-50%);
font-family: Georgia, serif;
font-size: 11px;
letter-spacing: 0.3em;
color: #d4af37;
background: #1a1410;
padding: 0 14px;
}
.rpg-slot {
aspect-ratio: 1;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.4));
border: 1px solid rgba(212, 175, 55, 0.15);
position: relative;
cursor: pointer;
transition: transform 0.25s, border-color 0.25s;
display: flex;
align-items: center;
justify-content: center;
}
.rpg-slot:hover {
border-color: rgba(212, 175, 55, 0.5);
transform: translateY(-2px);
}
.rpg-icon {
width: 60%; height: 60%;
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.rpg-slot::after {
content: '';
position: absolute;
bottom: 0; right: 0;
width: 0; height: 0;
border-style: solid;
border-width: 0 0 10px 10px;
border-color: transparent;
}
.rpg-r-common { --rpg-color: #b8b8b8; --rpg-glow: rgba(180, 180, 180, 0.15); }
.rpg-r-uncommon { --rpg-color: #4ade80; --rpg-glow: rgba(74, 222, 128, 0.20); }
.rpg-r-rare { --rpg-color: #60a5fa; --rpg-glow: rgba(96, 165, 250, 0.25); }
.rpg-r-epic { --rpg-color: #c084fc; --rpg-glow: rgba(192, 132, 252, 0.30); }
.rpg-r-legend { --rpg-color: #fbbf24; --rpg-glow: rgba(251, 191, 36, 0.35); }
.rpg-r-common::after { border-bottom-color: #aaa; }
.rpg-r-uncommon::after { border-bottom-color: #4caf50; }
.rpg-r-rare::after { border-bottom-color: #5cb3ff; }
.rpg-r-epic::after { border-bottom-color: #b366f2; }
.rpg-r-legend::after { border-bottom-color: #ffb83d; }
.rpg-tip {
position: absolute;
bottom: calc(100% + 14px);
left: 50%;
transform: translateX(-50%) translateY(8px) scale(0.95);
width: 240px;
background: linear-gradient(180deg, #1a1410 0%, #0e0a07 100%);
border: 1px solid var(--rpg-color, #888);
padding: 12px 13px;
font-family: 'Inter', system-ui, sans-serif;
color: #d4c5a9;
opacity: 0;
visibility: hidden;
transition:
opacity 0.2s,
transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
visibility 0s linear 0.2s;
z-index: 30;
pointer-events: none;
box-shadow:
0 0 0 1px rgba(0, 0, 0, 0.8),
0 0 26px var(--rpg-glow, rgba(255, 255, 255, 0.1)),
0 18px 36px -10px rgba(0, 0, 0, 0.8);
text-align: left;
}
.rpg-slot:hover .rpg-tip {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0) scale(1);
transition-delay: 0s;
}
.rpg-tip::before {
content: '';
position: absolute;
inset: -1px;
border: 1px solid var(--rpg-color, #888);
opacity: 0.3;
pointer-events: none;
animation: rpg-glow 2s ease-in-out infinite;
}
@keyframes rpg-glow {
0%, 100% { opacity: 0.2; }
50% { opacity: 0.5; }
}
.rpg-tip-name {
font-family: Georgia, serif;
font-weight: 700;
font-size: 15px;
color: var(--rpg-color, #fff);
line-height: 1.2;
margin-bottom: 2px;
letter-spacing: 0.02em;
}
.rpg-tip-type {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 9.5px;
color: rgba(212, 197, 169, 0.6);
text-transform: uppercase;
letter-spacing: 0.15em;
margin-bottom: 10px;
}
.rpg-tip-stat {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 11px;
padding: 3px 0;
color: #d4c5a9;
}
.rpg-v { color: #6fd09b; font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 600; }
.rpg-neg { color: #f06b5c; }
.rpg-tip-bar {
margin-top: 8px;
margin-bottom: 4px;
font-size: 9.5px;
color: rgba(212, 197, 169, 0.5);
}
.rpg-tip-bar-track {
margin-top: 3px;
height: 4px;
background: rgba(0, 0, 0, 0.5);
border: 1px solid rgba(212, 197, 169, 0.15);
position: relative;
}
.rpg-tip-bar-fill {
height: 100%;
background: var(--rpg-color, #888);
}
.rpg-tip-divider {
margin: 10px 0 8px;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(212, 197, 169, 0.2), transparent);
}
.rpg-tip-flavor {
font-family: Georgia, serif;
font-style: italic;
font-size: 12px;
color: rgba(212, 197, 169, 0.75);
line-height: 1.4;
}
.rpg-tip-foot {
margin-top: 8px;
padding-top: 6px;
border-top: 1px dashed rgba(212, 197, 169, 0.15);
display: flex;
justify-content: space-between;
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 9.5px;
color: rgba(212, 197, 169, 0.5);
}
```
### 07. Glossary Word Card
**Type:** Pure CSS
**Description:** Dotted-underlined words in a paragraph that pop out a rich dictionary card on hover — part-of-speech tag, headword, IPA pronunciation, etymology, italic definition, usage quotation, and a row of synonym pills. Built for longform articles, language-learning sites, encyclopedias.
**HTML:**
```html
There is a word for the smell of rain on dry earth —
petrichor
noun · meteorology
petrichor
/ˈpɛtrɪkɔːr/
Origin: Greek petra (stone) + ichor (the ethereal fluid said to flow through the veins of gods). Coined 1964 by Bear & Thomas.
The pleasant, earthy scent that arises when rain falls on dry soil, produced by geosmin released from actinobacteria.
In use
"The petrichor that rose from the cracked earth was the first sign that the long drought had broken."
geosmin
earthy scent
rain smell
— a sensation so specific it once had no name. Equally unnamed was
sonder
noun · neologism
sonder
/ˈsɒndər/
Origin: Coined by John Koenig in The Dictionary of Obscure Sorrows (2012). Likely influenced by French sonder (to probe, to fathom).
The sudden realization that every passerby is living a life as vivid and complex as one's own — filled with ambitions, fears, and an intricate private world.
In use
"Staring out the train window, she was struck by sonder — each lit window a whole life she'd never know."
empathy
weltanschauung
,
the act of registering that strangers have entire interior worlds. We live in
liminal
adjective · anthropology
liminal
/ˈlɪmɪnəl/
Origin: Latin limen (threshold). Popularised by anthropologist Arnold van Gennep (1909) to describe transitional ritual phases.
Occupying a position at, or on both sides of, a threshold or boundary; relating to a transitional or initial stage of a process.
In use
"The airport is the most liminal of spaces — everyone passing through on the way to somewhere else."
transitional
threshold
interstitial
spaces more than we realise.
```
**CSS:**
```css
.gloss-stage {
background: #fdf9f3;
/* Top room for the dictionary card (~280px tall) popping up from
dotted-underlined words. Glossary words can be anywhere on the
line, so generous top is the safest choice. */
padding: 300px 28px 40px;
font-family: Georgia, serif;
}
.gloss-inner {
max-width: 560px;
margin: 0 auto;
}
.gloss-text {
font-size: 18px;
line-height: 1.85;
color: #2c2416;
margin: 0;
}
.gloss-t {
position: relative;
display: inline-block;
}
.gloss-word {
cursor: help;
border-bottom: 1.5px dotted #a08050;
color: #6a4820;
transition: color .15s, border-color .15s;
}
.gloss-t:hover .gloss-word {
color: #3a2010;
border-bottom-color: #3a2010;
}
.gloss-tip {
position: absolute;
bottom: calc(100% + 10px);
left: 50%;
transform: translateX(-50%) translateY(4px);
width: 320px;
background: #fff;
border-radius: 10px;
border: 1px solid rgba(160, 128, 80, 0.2);
box-shadow:
0 8px 36px rgba(60, 40, 10, 0.13),
0 2px 8px rgba(60, 40, 10, 0.06);
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity .2s,
transform .2s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .2s;
z-index: 30;
overflow: hidden;
font-family: Georgia, serif;
text-align: left;
display: block;
white-space: normal;
}
.gloss-t:hover .gloss-tip {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
transition-delay: 0s;
}
.gloss-top {
display: block;
padding: 16px 18px 12px;
background: #faf6ef;
border-bottom: 1px solid rgba(160, 128, 80, 0.12);
}
.gloss-pos {
display: block;
font-size: 10px;
font-family: 'Inter', system-ui, sans-serif;
font-weight: 500;
letter-spacing: 0.1em;
text-transform: uppercase;
color: #b09060;
margin-bottom: 5px;
}
.gloss-head {
display: block;
font-size: 24px;
font-weight: 500;
color: #1a1008;
line-height: 1;
margin-bottom: 4px;
}
.gloss-ipa {
display: block;
font-size: 12px;
color: #a09070;
font-style: italic;
}
.gloss-origin {
display: block;
padding: 11px 18px;
border-bottom: 1px solid rgba(160, 128, 80, 0.1);
font-size: 11px;
font-family: 'Inter', system-ui, sans-serif;
color: #9a8060;
line-height: 1.5;
}
.gloss-origin strong { color: #6a5030; font-weight: 500; }
.gloss-def {
display: block;
padding: 13px 18px;
font-size: 13px;
color: #3c2c14;
line-height: 1.65;
border-bottom: 1px solid rgba(160, 128, 80, 0.1);
font-style: italic;
}
.gloss-ex {
display: block;
padding: 11px 18px 13px;
font-size: 12px;
font-family: 'Inter', system-ui, sans-serif;
color: #8a7050;
}
.gloss-ex-label {
display: block;
font-size: 9px;
letter-spacing: 0.1em;
text-transform: uppercase;
color: #c0a878;
margin-bottom: 5px;
}
.gloss-ex-quote {
display: block;
color: #5a4020;
line-height: 1.5;
font-family: Georgia, serif;
font-style: italic;
font-size: 13px;
}
.gloss-syn {
display: flex;
flex-wrap: wrap;
gap: 5px;
padding: 9px 18px 13px;
border-top: 1px solid rgba(160, 128, 80, 0.1);
}
.gloss-syn-pill {
font-size: 10px;
font-family: 'Inter', system-ui, sans-serif;
padding: 3px 8px;
border-radius: 20px;
background: rgba(160, 128, 80, 0.08);
color: #8a6840;
border: 1px solid rgba(160, 128, 80, 0.18);
}
```
### 08. Service Status Dots
**Type:** Pure CSS
**Description:** A status-page list where each colored dot pulses with its service state — hovering any row reveals an uptime bar history (30 days, color-coded), live metrics (uptime, latency, throughput), and the most recent incident summary. Built for SaaS status pages, infrastructure dashboards, on-call surfaces.
**HTML:**
```html
API Gateway
99.98%
API Gateway
Operational
30-day uptime
Uptime 99.98%
p95 latency 38ms
Req/min 12.4k
Last incident: Feb 14 · 18 min partial degradation — elevated error rates on /auth endpoints. Resolved.
Auth Service
100.00%
Auth Service
Operational
30-day uptime
Uptime 100%
p95 latency 18ms
Token/min 84k
No incidents in the last 90 days.
PostgreSQL Primary
99.94%
PostgreSQL Primary
Operational
30-day uptime
Uptime 99.94%
p95 latency 6ms
Conns 142/500
Last incident: Mar 2 · 34 min outage — connection pool exhaustion during traffic spike. Failover to replica triggered.
Email Delivery
98.42%
Email Delivery
Degraded
30-day uptime
Uptime 98.42%
Delivery 91.3%
Avg delay 340ms
Active: Elevated bounce rates on Gmail / Yahoo — IP reputation issue with third-party relay. Investigation ongoing since May 11.
```
**CSS:**
```css
.svc-stage {
background: #0d1117;
/* Right room — status detail tooltip pops to the RIGHT of each row,
~280px wide. Without big right padding the tip would be cut off
by .cf-stage's overflow:hidden on the gallery card. */
padding: 36px 320px 36px 28px;
font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.svc-inner {
max-width: 440px;
margin: 0 auto;
}
.svc-row-wrap {
position: relative;
}
.svc-row {
display: flex;
align-items: center;
gap: 12px;
padding: 11px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
cursor: help;
}
.svc-row-wrap:last-child .svc-row { border-bottom: none; }
.svc-dot {
width: 9px;
height: 9px;
border-radius: 50%;
flex-shrink: 0;
}
.svc-ok { background: #3fb950; box-shadow: 0 0 6px rgba(63, 185, 80, 0.5); }
.svc-warn { background: #d29922; box-shadow: 0 0 6px rgba(210, 153, 34, 0.5); }
.svc-down { background: #f85149; box-shadow: 0 0 6px rgba(248, 81, 73, 0.5); }
.svc-pulse { animation: svc-pulse-anim 2.5s ease-in-out infinite; }
@keyframes svc-pulse-anim {
0%, 100% { box-shadow: 0 0 6px rgba(63, 185, 80, 0.5); }
50% { box-shadow: 0 0 14px rgba(63, 185, 80, 0.8); }
}
.svc-name {
font-size: 12.5px;
color: rgba(255, 255, 255, 0.7);
flex: 1;
letter-spacing: 0.02em;
}
.svc-pct {
font-size: 11px;
color: rgba(255, 255, 255, 0.25);
}
.svc-tip {
position: absolute;
left: calc(100% + 14px);
top: 50%;
transform: translateY(-50%) translateX(6px);
width: 280px;
background: #161b22;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 9px;
box-shadow: 0 16px 44px rgba(0, 0, 0, 0.8);
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity .2s,
transform .2s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .2s;
z-index: 30;
overflow: hidden;
display: block;
text-align: left;
}
.svc-row-wrap:hover .svc-tip {
opacity: 1;
visibility: visible;
transform: translateY(-50%) translateX(0);
transition-delay: 0s;
}
.svc-tip-head {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 14px 10px;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.svc-tip-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
.svc-tip-name {
font-size: 12.5px;
color: rgba(255, 255, 255, 0.85);
flex: 1;
}
.svc-badge {
font-size: 9px;
padding: 2px 7px;
border-radius: 20px;
letter-spacing: 0.06em;
font-weight: 500;
}
.svc-badge-ok { background: rgba(63, 185, 80, 0.15); color: #3fb950; border: 1px solid rgba(63, 185, 80, 0.25); }
.svc-badge-warn { background: rgba(210, 153, 34, 0.15); color: #d29922; border: 1px solid rgba(210, 153, 34, 0.25); }
.svc-badge-down { background: rgba(248, 81, 73, 0.15); color: #f85149; border: 1px solid rgba(248, 81, 73, 0.25); }
.svc-bars-label {
display: block;
padding: 10px 14px 5px;
font-size: 8px;
color: rgba(255, 255, 255, 0.2);
letter-spacing: 0.1em;
text-transform: uppercase;
}
.svc-bars {
display: flex;
gap: 2px;
align-items: flex-end;
height: 34px;
padding: 0 14px 10px;
}
.svc-bar {
flex: 1;
border-radius: 1px;
min-height: 4px;
display: block;
}
.svc-metrics {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.svc-met {
display: block;
padding: 10px 13px;
border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.svc-met:last-child { border-right: none; }
.svc-met-label {
display: block;
font-size: 7px;
color: rgba(255, 255, 255, 0.2);
letter-spacing: 0.1em;
text-transform: uppercase;
margin-bottom: 4px;
}
.svc-met-val {
display: block;
font-size: 12.5px;
color: rgba(255, 255, 255, 0.7);
}
.svc-met-ok { color: #3fb950; }
.svc-met-warn { color: #d29922; }
.svc-met-down { color: #f85149; }
.svc-incident {
display: block;
padding: 9px 14px;
border-top: 1px solid rgba(255, 255, 255, 0.06);
font-size: 10px;
color: rgba(255, 255, 255, 0.25);
line-height: 1.5;
font-family: 'Inter', system-ui, sans-serif;
}
.svc-incident strong {
color: rgba(255, 255, 255, 0.55);
font-weight: 500;
}
```
### 09. Team Avatar Card
**Type:** Pure CSS
**Description:** Initials-only avatar circles in a row that lift slightly on hover and pop out a full profile card — gradient hero band, larger avatar with shadow ring, role + presence dot + bio + three-stat row + Message / View Profile buttons. Built for team rosters, mention popovers, comment hovers.
**HTML:**
```html
SL
Sarah Lindqvist
CEO · Executive
Active now
Former Stripe PM. Building the next layer of financial infrastructure for SMBs.
MW
Marcus Webb
CTO · Engineering
Active now
Ex-Google infra. Obsessed with distributed systems and making things fast at scale.
ER
Elena Russo
CMO · Marketing
Away · 2h ago
Brand strategist. Grew Notion's Europe presence 3×. London-based, GMT+1.
AP
Aisha Patel
Growth Lead · Marketing
Offline
Data-driven growth. 0 → 100k users in 18 months. Runs the acquisition engine.
```
**CSS:**
```css
.avt-stage {
background: #ffffff;
/* Top room for the profile card (~280px tall) popping up from each
avatar circle. */
padding: 300px 28px 40px;
display: flex;
align-items: flex-end;
justify-content: center;
font-family: 'Inter', system-ui, sans-serif;
}
.avt-inner {
display: flex;
gap: 14px;
flex-wrap: wrap;
justify-content: center;
}
.avt-t {
position: relative;
cursor: help;
}
.avt-circle {
width: 48px;
height: 48px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
font-weight: 600;
color: rgba(255, 255, 255, 0.9);
letter-spacing: 0.03em;
transition: transform .15s, box-shadow .15s;
}
.avt-t:hover .avt-circle {
transform: scale(1.1) translateY(-3px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.avt-tip {
position: absolute;
bottom: calc(100% + 12px);
left: 50%;
transform: translateX(-50%) translateY(4px);
width: 240px;
background: #fff;
border-radius: 12px;
border: 1px solid rgba(0, 0, 0, 0.07);
box-shadow:
0 12px 36px rgba(0, 0, 0, 0.12),
0 2px 8px rgba(0, 0, 0, 0.06);
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity .25s,
transform .25s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .25s;
z-index: 30;
overflow: hidden;
text-align: left;
}
.avt-t:hover .avt-tip {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
transition-delay: 0s;
}
.avt-hero {
height: 56px;
position: relative;
}
.avt-photo {
width: 48px;
height: 48px;
border-radius: 50%;
border: 3px solid #fff;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
position: absolute;
left: 14px;
bottom: -14px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: 700;
color: rgba(255, 255, 255, 0.92);
}
.avt-body {
padding: 20px 14px 12px;
}
.avt-name {
font-size: 14px;
font-weight: 600;
color: #111;
}
.avt-role {
font-size: 10.5px;
color: #888;
margin-top: 2px;
}
.avt-online {
display: flex;
align-items: center;
gap: 5px;
font-size: 10px;
color: #888;
margin-top: 6px;
}
.avt-online-dot {
width: 6px;
height: 6px;
border-radius: 50%;
}
.avt-bio {
font-size: 11.5px;
color: #555;
margin-top: 8px;
line-height: 1.5;
}
.avt-stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
margin-top: 12px;
padding-top: 11px;
border-top: 1px solid #f0f0f0;
text-align: center;
}
.avt-stat-n {
font-size: 15px;
font-weight: 700;
color: #111;
}
.avt-stat-l {
font-size: 8px;
color: #bbb;
text-transform: uppercase;
letter-spacing: 0.08em;
margin-top: 1px;
}
.avt-foot {
padding: 9px 14px;
border-top: 1px solid #f0f0f0;
display: flex;
gap: 6px;
}
.avt-btn {
flex: 1;
padding: 6px 0;
border-radius: 6px;
font-size: 11px;
font-weight: 500;
text-align: center;
border: 1px solid #e8e8e8;
color: #444;
background: #fafafa;
cursor: pointer;
}
.avt-btn-prim {
background: #111;
border-color: #111;
color: #fff;
}
```
### 10. Keyboard Shortcut Card
**Type:** Pure CSS
**Description:** A list of shortcuts where each row pops out a full reference card — large action title, big keycaps, plain-English description, three "when to use" bullets, and a related-shortcuts pill row. A richer companion to the compact keycap-pill demo earlier in this collection.
**HTML:**
```html
Save file
⌘ + S
Saves the current file to disk immediately. If the file has never been saved, opens a Save As dialog to choose a name and location.
When to use
After every meaningful change to preserve work
Before switching branches or running tests
Before closing the editor or tab
Undo
⌘ + Z
Reverses the last editing action, stepping backwards through the undo history one action at a time. History is preserved across saves.
When to use
After accidentally deleting or overwriting text
To compare before/after a refactor
To recover from an unwanted auto-format
Command palette
⌘ + ⇧ + P
Opens a searchable list of every editor command, extension action, and setting. The fastest way to trigger any feature without memorising its location.
When to use
To find any command without digging through menus
To run a formatter, linter, or task
To change settings quickly by name
Find in file
⌘ + F
Opens an inline search bar. Supports plain text, regular expressions, and case-sensitive matching. Highlights all occurrences inside the active file.
When to use
To locate a variable, function, or string in the file
To count occurrences of a term before refactoring
With regex to find patterns (e.g. unused imports)
Toggle comment
⌘ + /
Toggles line comments on the current line or all selected lines. Uses the correct comment syntax for the file's language automatically.
When to use
To temporarily disable a block of code for debugging
To add an explanatory comment above a function
To comment multiple lines at once (select first)
```
**CSS:**
```css
.kchord-stage {
background: #111116;
/* Left room — kchord tips pop to the LEFT of each shortcut row,
~260px wide. */
padding: 36px 28px 36px 320px;
font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.kchord-inner {
max-width: 480px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 2px;
}
.kchord-t {
position: relative;
}
.kchord-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 12px;
border-radius: 6px;
cursor: help;
transition: background .12s;
}
.kchord-t:hover .kchord-row {
background: rgba(255, 255, 255, 0.04);
}
.kchord-label {
font-size: 12.5px;
color: rgba(255, 255, 255, 0.5);
}
.kchord-keys {
display: flex;
gap: 4px;
align-items: center;
}
.kchord-key {
display: inline-flex;
align-items: center;
padding: 3px 7px;
border-radius: 4px;
font-size: 10.5px;
font-weight: 500;
color: rgba(255, 255, 255, 0.7);
background: rgba(255, 255, 255, 0.07);
border: 1px solid rgba(255, 255, 255, 0.12);
border-bottom: 2px solid rgba(255, 255, 255, 0.18);
line-height: 1;
letter-spacing: 0.02em;
}
.kchord-plus {
font-size: 9px;
color: rgba(255, 255, 255, 0.2);
}
.kchord-tip {
position: absolute;
right: calc(100% + 12px);
top: 50%;
transform: translateY(-50%) translateX(-6px);
width: 260px;
background: #1c1c24;
border: 1px solid rgba(255, 255, 255, 0.09);
border-radius: 11px;
box-shadow: 0 16px 44px rgba(0, 0, 0, 0.85);
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity .2s,
transform .2s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .2s;
z-index: 30;
overflow: hidden;
text-align: left;
}
.kchord-t:hover .kchord-tip {
opacity: 1;
visibility: visible;
transform: translateY(-50%) translateX(0);
transition-delay: 0s;
}
.kchord-top {
padding: 14px 14px 11px;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.kchord-action {
font-size: 15px;
font-weight: 600;
color: rgba(255, 255, 255, 0.88);
margin-bottom: 7px;
}
.kchord-keys-big {
display: flex;
gap: 5px;
align-items: center;
}
.kchord-key-big {
padding: 4px 10px;
border-radius: 5px;
font-size: 11.5px;
font-weight: 600;
color: rgba(255, 255, 255, 0.8);
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.14);
border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}
.kchord-plus-big {
color: rgba(255, 255, 255, 0.2);
font-size: 11px;
}
.kchord-desc {
padding: 11px 14px;
font-size: 11.5px;
color: rgba(255, 255, 255, 0.45);
line-height: 1.55;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
font-family: 'Inter', system-ui, sans-serif;
}
.kchord-when {
padding: 10px 14px;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.kchord-when-label {
font-size: 8px;
color: rgba(255, 255, 255, 0.2);
letter-spacing: 0.1em;
text-transform: uppercase;
margin-bottom: 6px;
}
.kchord-when-item {
font-size: 10.5px;
color: rgba(255, 255, 255, 0.42);
margin-bottom: 4px;
padding-left: 10px;
position: relative;
font-family: 'Inter', system-ui, sans-serif;
line-height: 1.4;
}
.kchord-when-item::before {
content: '›';
position: absolute;
left: 0;
color: rgba(255, 255, 255, 0.25);
font-size: 11px;
top: -1px;
}
.kchord-related {
padding: 10px 14px;
display: flex;
gap: 6px;
flex-wrap: wrap;
}
.kchord-rel-label {
font-size: 8px;
color: rgba(255, 255, 255, 0.2);
letter-spacing: 0.1em;
text-transform: uppercase;
width: 100%;
margin-bottom: 2px;
}
.kchord-rel-pill {
font-size: 9.5px;
padding: 2px 7px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.08);
color: rgba(255, 255, 255, 0.4);
}
```
### 11. Data Table Cell
**Type:** Pure CSS
**Description:** A quarterly metrics table where each plain number is a hover target. The popover shows the metric name, large value, change-vs-prior quarter, a three-bar segment breakdown (e.g. SMB / Mid / Enterprise), and a two-piece footer with delta and aggregate context. For analytics dashboards, BI reports, KPI surfaces.
**HTML:**
```html
Q1 Q2 Q3 Q4
Revenue
$2.1M
Revenue · Q1
$2.1M ↑ +18% vs Q4
By segment
SMB 62%
Mid 28%
Ent. 10%
$2.8M
Revenue · Q2
$2.8M ↑ +33% vs Q1
By segment
SMB 55%
Mid 33%
Ent. 12%
$3.4M
Revenue · Q3
$3.4M ↑ +21% vs Q2
By segment
SMB 48%
Mid 38%
Ent. 14%
$4.2M
Revenue · Q4
$4.2M ↑ +24% vs Q3
By segment
SMB 42%
Mid 38%
Ent. 20%
Active Users
12.4K
Active Users · Q1
12.4K ↑ +22%
By plan
Free 58%
Pro 32%
Ent. 10%
18.9K
Active Users · Q2
18.9K ↑ +52%
By plan
Free 54%
Pro 36%
Ent. 10%
24.1K
Active Users · Q3
24.1K ↑ +28%
By plan
Free 50%
Pro 38%
Ent. 12%
31.8K
Active Users · Q4
31.8K ↑ +32%
By plan
Free 44%
Pro 40%
Ent. 16%
Churn
2.8% Monthly Churn · Q1 2.8% ↓ +0.4pp worse Reason Price 42% Feat. 31% Other 27%
2.4% Monthly Churn · Q2 2.4% ↑ −0.4pp better Reason Price 38% Feat. 34% Other 28%
2.1% Monthly Churn · Q3 2.1% ↑ −0.3pp better Reason Price 32% Feat. 38% Other 30%
1.8% Monthly Churn · Q4 1.8% ↑ −0.3pp better Reason Price 28% Feat. 40% Other 32%
```
**CSS:**
```css
.tcell-stage {
background: #f8f9fa;
/* Top room — table cell tips pop UP from each value (~220px tall). */
padding: 240px 28px 36px;
font-family: 'Inter', system-ui, sans-serif;
}
.tcell-inner {
max-width: 520px;
margin: 0 auto;
}
.tcell-table {
width: 100%;
border-collapse: collapse;
}
.tcell-table thead th {
font-size: 9.5px;
letter-spacing: 0.1em;
text-transform: uppercase;
color: #aaa;
font-weight: 500;
padding: 0 14px 11px;
text-align: right;
}
.tcell-table thead th:first-child { text-align: left; }
.tcell-table tbody tr { border-top: 1px solid #eee; }
.tcell-table tbody tr:hover { background: rgba(0, 0, 0, 0.015); }
.tcell-table tbody td {
padding: 12px 14px;
font-size: 12.5px;
color: #333;
text-align: right;
white-space: nowrap;
}
.tcell-row-label {
color: #777 !important;
font-size: 11px !important;
text-align: left !important;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.tcell-t {
position: relative;
display: inline-block;
cursor: help;
}
.tcell-val {
border-bottom: 1px dashed transparent;
transition: border-color .15s, color .15s;
}
.tcell-t:hover .tcell-val {
border-bottom-color: #aaa;
color: #111;
}
.tcell-tip {
position: absolute;
bottom: calc(100% + 9px);
left: 50%;
transform: translateX(-50%) translateY(4px);
width: 240px;
background: #fff;
border-radius: 9px;
border: 1px solid rgba(0, 0, 0, 0.08);
box-shadow:
0 12px 36px rgba(0, 0, 0, 0.11),
0 2px 8px rgba(0, 0, 0, 0.05);
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity .2s,
transform .2s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .2s;
z-index: 30;
overflow: hidden;
display: block;
text-align: left;
white-space: normal;
}
.tcell-t:hover .tcell-tip {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
transition-delay: 0s;
}
.tcell-head {
display: block;
padding: 12px 13px 9px;
border-bottom: 1px solid #f0f0f0;
}
.tcell-metric {
display: block;
font-size: 9.5px;
color: #aaa;
text-transform: uppercase;
letter-spacing: 0.09em;
margin-bottom: 5px;
}
.tcell-big-row {
display: flex;
align-items: baseline;
gap: 8px;
}
.tcell-big {
font-size: 22px;
font-weight: 700;
color: #111;
}
.tcell-change {
font-size: 11px;
font-weight: 600;
}
.tcell-up { color: #16a34a; }
.tcell-dn { color: #dc2626; }
.tcell-bars {
display: block;
padding: 11px 13px 7px;
border-bottom: 1px solid #f0f0f0;
}
.tcell-bars-label {
display: block;
font-size: 7.5px;
color: #bbb;
letter-spacing: 0.1em;
text-transform: uppercase;
margin-bottom: 7px;
}
.tcell-bar-row {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 5px;
}
.tcell-bar-name {
font-size: 9.5px;
color: #999;
width: 32px;
text-align: right;
flex-shrink: 0;
}
.tcell-bar-track {
flex: 1;
height: 5px;
background: #f0f0f0;
border-radius: 3px;
overflow: hidden;
display: block;
}
.tcell-bar-fill {
height: 100%;
border-radius: 3px;
display: block;
}
.tcell-bar-pct {
font-size: 9.5px;
color: #bbb;
width: 28px;
flex-shrink: 0;
text-align: right;
}
.tcell-foot {
display: flex;
justify-content: space-between;
padding: 10px 13px;
font-size: 10.5px;
color: #bbb;
}
.tcell-foot strong {
color: #555;
font-weight: 600;
}
```
### 12. Content Tag Card
**Type:** Pure CSS
**Description:** Colored pill labels (Machine Learning, DevOps, Security) that lift on hover and reveal a tag-detail card — colored icon block, article count, description, popularity-this-month bar with trend, related-tag pills, and the top three articles in this tag. For blog tag clouds, knowledge bases, content discovery surfaces.
**HTML:**
```html
Machine Learning
ML
Machine Learning
1,284 articles
Algorithms that enable systems to learn from data without explicit programming. Covers supervised, unsupervised, and reinforcement learning.
Popularity this month
↑ trending +14% vs last month
Related
Deep Learning Neural Nets PyTorch
Top articles
Fine-tuning LLMs on custom datasets
Understanding transformer attention
Gradient descent, explained visually
Open Source
OS
Open Source
2,941 articles
Software with source code available for anyone to use, inspect, modify, and distribute. Covers licensing, contributing, and ecosystem news.
Popularity this month
↑ all-time high +22% vs last month
Related
GitHub Linux Licensing
Top articles
How to write a great README
OSS licensing: MIT vs Apache vs GPL
First PR tips for new contributors
System Design
SD
System Design
876 articles
The process of defining the architecture, components, and interfaces of a system to satisfy specified requirements at scale.
Popularity this month
→ stable +3% vs last month
Related
Distributed CAP Theorem Databases
Top articles
Designing a rate limiter from scratch
When to use a message queue
Read replicas and write-ahead logs
Career
Advice on navigating tech careers — from first job to staff engineer, negotiation, interviews, and switching roles.
Popularity this month
↑ trending +9% vs last month
Related
Interviews Salary Remote work
Top articles
The staff engineer path, explained
How to negotiate a competing offer
Writing your first performance review
Security
Application security, cryptography, threat modelling, vulnerability research, and secure development practices for engineers.
Popularity this month
↑ trending +18% vs last month
Top articles
SQL injection prevention in 2024
JWT vs sessions: which to use
Zero-trust architecture basics
DevOps
Practices and tools that unify software development and IT operations — CI/CD, containerisation, infrastructure as code, monitoring.
Popularity this month
→ stable +2% vs last month
Related
Docker Kubernetes Terraform
Top articles
Building zero-downtime deploys
Helm charts for beginners
Observability vs. monitoring
Performance
Techniques for optimising speed, throughput, and resource efficiency — from query tuning to Core Web Vitals.
Popularity this month
→ stable +1% vs last month
Related
Profiling Caching Web Vitals
Top articles
N+1 queries and how to fix them
React re-renders: a visual guide
Redis caching patterns in production
Architecture
Software architecture patterns, trade-offs, and design decisions — microservices, monoliths, event-driven, hexagonal, and beyond.
Popularity this month
↓ slight dip −3% vs last month
Related
DDD Microservices Clean Code
Top articles
Monolith first: the case for starting simple
CQRS and event sourcing, explained
When to break up a microservice
```
**CSS:**
```css
.ctag-stage {
background: #fff;
/* Top room — content-tag cards pop UP from each pill (~300px tall). */
padding: 320px 28px 36px;
font-family: 'Inter', system-ui, sans-serif;
}
.ctag-inner {
max-width: 560px;
margin: 0 auto;
}
.ctag-list {
display: flex;
flex-wrap: wrap;
gap: 9px;
justify-content: center;
}
.ctag-t {
position: relative;
}
.ctag-pill {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
border-radius: 20px;
font-size: 12.5px;
font-weight: 500;
border: 1px solid transparent;
cursor: help;
transition: transform .15s, box-shadow .15s;
}
.ctag-t:hover .ctag-pill {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.ctag-dot {
width: 6px;
height: 6px;
border-radius: 50%;
flex-shrink: 0;
}
.ctag-tip {
position: absolute;
bottom: calc(100% + 9px);
left: 50%;
transform: translateX(-50%) translateY(4px);
width: 260px;
background: #fff;
border-radius: 11px;
border: 1px solid rgba(0, 0, 0, 0.07);
box-shadow:
0 12px 36px rgba(0, 0, 0, 0.11),
0 2px 8px rgba(0, 0, 0, 0.05);
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity .2s,
transform .2s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .2s;
z-index: 30;
overflow: hidden;
text-align: left;
}
.ctag-t:hover .ctag-tip {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
transition-delay: 0s;
}
.ctag-head {
padding: 13px 14px 11px;
border-bottom: 1px solid #f4f4f4;
}
.ctag-head-row {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 8px;
}
.ctag-icon {
width: 30px;
height: 30px;
border-radius: 7px;
display: flex;
align-items: center;
justify-content: center;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.04em;
flex-shrink: 0;
}
.ctag-name {
font-size: 14px;
font-weight: 700;
color: #111;
line-height: 1.2;
}
.ctag-count {
font-size: 10px;
color: #bbb;
margin-top: 1px;
}
.ctag-desc {
font-size: 11.5px;
color: #666;
line-height: 1.55;
}
.ctag-pop {
padding: 10px 14px;
border-bottom: 1px solid #f4f4f4;
}
.ctag-pop-label {
font-size: 7.5px;
color: #ccc;
letter-spacing: 0.1em;
text-transform: uppercase;
margin-bottom: 6px;
}
.ctag-track {
height: 5px;
background: #f0f0f0;
border-radius: 3px;
overflow: hidden;
margin-bottom: 5px;
}
.ctag-fill {
height: 100%;
border-radius: 3px;
}
.ctag-trend {
font-size: 10px;
color: #bbb;
display: flex;
justify-content: space-between;
}
.ctag-trend-left strong {
color: #555;
font-weight: 600;
}
.ctag-rel {
padding: 10px 14px;
border-bottom: 1px solid #f4f4f4;
}
.ctag-rel-label {
font-size: 7.5px;
color: #ccc;
letter-spacing: 0.1em;
text-transform: uppercase;
margin-bottom: 6px;
}
.ctag-rel-pills {
display: flex;
flex-wrap: wrap;
gap: 5px;
}
.ctag-rel-pill {
font-size: 9.5px;
padding: 2px 7px;
border-radius: 10px;
background: #f4f4f6;
color: #888;
border: 1px solid #eee;
}
.ctag-ex {
padding: 10px 14px 12px;
}
.ctag-ex-label {
font-size: 7.5px;
color: #ccc;
letter-spacing: 0.1em;
text-transform: uppercase;
margin-bottom: 6px;
}
.ctag-ex-item {
font-size: 10.5px;
color: #777;
margin-bottom: 4px;
padding-left: 9px;
position: relative;
line-height: 1.4;
}
.ctag-ex-item::before {
content: '·';
position: absolute;
left: 2px;
color: #ccc;
}
```
### 13. Airport Departures Board
**Type:** Pure CSS
**Description:** A Solari-flap inspired departures board — amber-on-charcoal monospace rows for six flights. Hover any row to reveal the flight detail card: airline, route with duration, aircraft, seats, class, plus a status pill that pulses when a flight is boarding. For travel apps, status pages, and ops dashboards.
**HTML:**
```html
Time Flight Destination Term Gate Status
06:15
AA 2847
New York JFK
T3
B12
Departed
07:40
UA 5512
Chicago ORD
T7
C04
On Time
08:20
DL 8831
London LHR
TB
A22
Boarding
10:30
SQ 7736
Singapore SIN
TB
B44
Delayed 45m
Singapore Airlines
SQ 7736
Delayed 45m
```
**CSS:**
```css
.depart-stage {
background: #111111;
/* Bottom room — flight detail cards drop down from each row, ~280px
tall. The board sits high so the tooltips render inside the card. */
padding: 36px 28px 320px;
font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.depart-board {
max-width: 720px;
margin: 0 auto;
background: #181818;
border: 1px solid #2a2a2a;
border-radius: 4px;
}
.depart-headrow {
display: grid;
grid-template-columns: 60px 90px 1fr 50px 50px 90px;
padding: 10px 18px;
border-bottom: 1px solid #222;
font-size: 9px;
letter-spacing: 0.14em;
text-transform: uppercase;
color: #3a3a3a;
gap: 12px;
}
.depart-row {
display: grid;
grid-template-columns: 60px 90px 1fr 50px 50px 90px;
align-items: center;
padding: 13px 18px;
border-bottom: 1px solid #1d1d1d;
gap: 12px;
cursor: help;
position: relative;
transition: background 0.12s;
}
.depart-row:last-child { border-bottom: none; }
.depart-row:hover { background: rgba(255, 255, 255, 0.025); }
.depart-time {
font-size: 16px;
font-weight: 500;
color: #e8a020;
letter-spacing: 0.06em;
}
.depart-num { font-size: 12px; color: #8a8a8a; }
.depart-dest { font-size: 13px; color: #e0e0e0; letter-spacing: 0.02em; }
.depart-dest small { font-size: 10px; color: #444; margin-left: 6px; }
.depart-term { font-size: 12px; color: #6a6a6a; }
.depart-gate { font-size: 13px; font-weight: 500; color: #c08010; }
.depart-status { font-size: 10px; font-weight: 500; letter-spacing: 0.05em; }
.depart-ontime { color: #30b860; }
.depart-boarding { color: #e8a020; animation: depart-blink 1.2s ease-in-out infinite; }
.depart-delayed { color: #e05030; }
.depart-departed { color: #404040; }
@keyframes depart-blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
.depart-tip {
position: absolute;
left: 50%;
top: calc(100% + 8px);
transform: translateX(-50%) translateY(6px);
z-index: 100;
width: 360px;
background: #1c1c1c;
border: 1px solid #2e2e2e;
border-radius: 8px;
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity .2s,
transform .2s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .2s;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
overflow: hidden;
}
.depart-row:hover .depart-tip {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
transition-delay: 0s;
}
.depart-tip-head {
background: #222;
padding: 13px 16px;
display: flex;
justify-content: space-between;
align-items: flex-start;
border-bottom: 1px solid #2a2a2a;
}
.depart-airline { font-size: 10px; color: #5a5a5a; letter-spacing: 0.08em; }
.depart-flightnum {
font-size: 18px;
font-weight: 500;
color: #e8a020;
margin-top: 2px;
}
.depart-badge {
font-size: 9.5px;
padding: 3px 9px;
border-radius: 3px;
letter-spacing: 0.08em;
font-weight: 500;
}
.depart-badge-ontime { background: rgba(48, 184, 96, 0.12); color: #30b860; border: 1px solid rgba(48, 184, 96, 0.2); }
.depart-badge-boarding { background: rgba(232, 160, 32, 0.12); color: #e8a020; border: 1px solid rgba(232, 160, 32, 0.2); }
.depart-badge-delayed { background: rgba(224, 80, 48, 0.12); color: #e05030; border: 1px solid rgba(224, 80, 48, 0.2); }
.depart-badge-departed { background: rgba(80, 80, 80, 0.1); color: #505050; border: 1px solid #282828; }
.depart-route {
padding: 14px 16px;
display: flex;
align-items: center;
gap: 12px;
border-bottom: 1px solid #242424;
}
.depart-airport { text-align: center; }
.depart-code { font-size: 20px; font-weight: 500; color: #c0c0c0; letter-spacing: 0.04em; }
.depart-city { font-size: 8.5px; color: #444; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 3px; }
.depart-arrow {
flex: 1;
display: flex;
align-items: center;
position: relative;
}
.depart-arrow-line {
height: 1px;
flex: 1;
background: linear-gradient(to right, #2a2a2a, #3a3a3a, #2a2a2a);
position: relative;
}
.depart-duration {
font-size: 8.5px;
color: #404040;
text-align: center;
position: absolute;
top: -13px;
width: 100%;
letter-spacing: 0.08em;
}
.depart-plane { font-size: 13px; color: #505050; flex-shrink: 0; }
.depart-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
border-bottom: 1px solid #242424;
}
.depart-cell {
padding: 9px 14px;
border-right: 1px solid #242424;
}
.depart-cell:last-child { border-right: none; }
.depart-cell-label {
font-size: 7.5px;
color: #383838;
letter-spacing: 0.1em;
text-transform: uppercase;
margin-bottom: 4px;
}
.depart-cell-val { font-size: 11.5px; color: #808080; }
.depart-foot {
padding: 9px 16px;
font-size: 8.5px;
color: #303030;
display: flex;
justify-content: space-between;
letter-spacing: 0.06em;
}
```
### 14. Recipe Ingredient Card
**Type:** Pure CSS
**Description:** A warm cookbook page where ingredient names carry dotted underlines. Hover one and a side card lifts in with nutrition facts, substitution suggestions, and a sourcing note — designed for recipe sites, meal-plan apps, food databases.
**HTML:**
```html
Roasted Lemon Herb Chicken
French Country · Serves 4
Ingredients
1 whole (3–4 lb)
free-range chicken
Free-Range Chicken
Poultry · whole bird
Per 100g (roasted, no skin)
Calories 165 kcal
Protein 31g
Iron 1.1mg (14% DV)
Substitutions
Cornish game hens (halve cook time)
Bone-in chicken pieces
Look for air-chilled, free-range birds — less water retention gives crispier skin.
2 whole heads
garlic
Per 3 cloves (9g)
Calories 13 kcal
Allicin high (antimicrobial)
Vit C 9% DV
Substitutions
Roasted garlic paste (2 tbsp)
Shallots (milder flavour)
Do not peel — roasted whole heads caramelize beautifully.
2 medium
lemons, zested and halved
Lemon
Citrus fruit · fresh
Per 1 medium lemon (84g)
Calories 22 kcal
Vitamin C 51mg (56% DV)
Citric acid tenderises meat
Substitutions
Meyer lemons (sweeter)
1½ limes + ½ orange
Microplane the zest before cutting — releases essential oils lost once sliced.
¼ cup, fresh
thyme and rosemary
Fresh Herbs
Lamiaceae · aromatic
Per tbsp fresh thyme (2.4g)
Thymol antimicrobial terpene
Iron 1.7mg (10% DV)
Rosmarinic antioxidant
Substitutions
Dried herbs (use ⅓ the quantity)
Herbes de Provence (1 tbsp)
Slide whole sprigs under the skin — the fat bastes the herbs during roasting.
4 tbsp, softened
unsalted butter
Unsalted Butter
Dairy · fat
Per tbsp (14g)
Calories 102 kcal
Saturated 7.3g
Vitamin A 7% DV
Substitutions
Ghee (higher smoke point)
Olive oil (dairy-free)
Unsalted lets you control seasoning. European-style (84%+ fat) gives richer results.
```
**CSS:**
```css
.ringd-stage {
background: #fdf8f0;
/* Right room — ingredient cards pop to the RIGHT of each name,
~280px wide. The recipe card is centered with extra right space. */
padding: 40px 320px 40px 28px;
font-family: Georgia, serif;
}
.ringd-card {
max-width: 480px;
margin: 0 auto;
background: #fff;
border: 1px solid rgba(180, 160, 120, 0.25);
border-radius: 2px;
padding: 32px 36px;
box-shadow:
0 2px 22px rgba(100, 80, 40, 0.08),
0 0 0 4px rgba(180, 160, 120, 0.06);
}
.ringd-title {
font-family: Georgia, serif;
font-size: 26px;
font-style: italic;
color: #2c2010;
margin-bottom: 4px;
line-height: 1.2;
}
.ringd-subtitle {
font-size: 12px;
color: #a09070;
letter-spacing: 0.08em;
text-transform: uppercase;
margin-bottom: 20px;
}
.ringd-meta {
display: flex;
gap: 20px;
margin-bottom: 22px;
padding-bottom: 16px;
border-bottom: 1px solid rgba(180, 160, 120, 0.2);
flex-wrap: wrap;
}
.ringd-meta-label {
font-size: 8.5px;
color: #b0a080;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.ringd-meta-val {
font-size: 13px;
color: #5a4828;
font-style: italic;
margin-top: 1px;
}
.ringd-section-head {
font-family: Georgia, serif;
font-size: 12px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: #8a7050;
margin-bottom: 12px;
font-weight: 400;
}
.ringd-list {
list-style: none;
margin: 0;
padding: 0;
}
.ringd-list li {
font-size: 15px;
color: #3a2c18;
line-height: 1.9;
border-bottom: 1px dashed rgba(180, 160, 120, 0.15);
display: flex;
align-items: baseline;
gap: 6px;
}
.ringd-list li:last-child { border-bottom: none; }
.ringd-qty {
color: #a09070;
font-size: 13px;
font-style: italic;
min-width: 110px;
flex-shrink: 0;
}
.ringd-t {
position: relative;
display: inline-block;
cursor: help;
}
.ringd-name {
border-bottom: 1px dotted rgba(140, 100, 40, 0.4);
transition: color .15s, border-color .15s;
color: #3a2c18;
}
.ringd-t:hover .ringd-name {
color: #8a5020;
border-bottom-color: rgba(138, 80, 32, 0.6);
}
.ringd-tip {
position: absolute;
left: calc(100% + 14px);
top: 50%;
transform: translateY(-50%) translateX(6px);
z-index: 200;
width: 240px;
background: #fff;
border: 1px solid rgba(180, 160, 120, 0.3);
border-radius: 4px;
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity .2s,
transform .2s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .2s;
box-shadow: 4px 6px 22px rgba(80, 60, 20, 0.15);
overflow: hidden;
text-align: left;
font-family: 'Inter', system-ui, sans-serif;
}
.ringd-t:hover .ringd-tip {
opacity: 1;
visibility: visible;
transform: translateY(-50%) translateX(0);
transition-delay: 0s;
}
.ringd-tip-head {
background: #f8f2e6;
padding: 11px 13px;
border-bottom: 1px solid rgba(180, 160, 120, 0.2);
}
.ringd-ing-name {
font-family: Georgia, serif;
font-size: 14px;
font-style: italic;
color: #3a2c18;
margin-bottom: 2px;
}
.ringd-ing-type {
font-size: 9.5px;
color: #a09070;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.ringd-nutrition {
padding: 10px 13px;
border-bottom: 1px solid rgba(180, 160, 120, 0.12);
}
.ringd-nut-title {
font-size: 8.5px;
color: #b0a080;
letter-spacing: 0.1em;
text-transform: uppercase;
margin-bottom: 6px;
}
.ringd-nut-row {
display: flex;
justify-content: space-between;
margin-bottom: 3px;
font-size: 10.5px;
}
.ringd-nut-name { color: #7a6a50; }
.ringd-nut-val {
color: #5a4828;
font-family: Georgia, serif;
font-style: italic;
}
.ringd-bar-wrap {
height: 2px;
background: rgba(180, 160, 120, 0.15);
border-radius: 1px;
margin: 2px 0 6px;
overflow: hidden;
}
.ringd-bar {
height: 100%;
border-radius: 1px;
background: linear-gradient(to right, #c8a060, #e8c080);
}
.ringd-subs {
padding: 10px 13px;
border-bottom: 1px solid rgba(180, 160, 120, 0.12);
}
.ringd-subs-title {
font-size: 8.5px;
color: #b0a080;
letter-spacing: 0.1em;
text-transform: uppercase;
margin-bottom: 6px;
}
.ringd-sub {
font-size: 10.5px;
color: #7a6a50;
margin-bottom: 4px;
padding-left: 9px;
position: relative;
}
.ringd-sub::before {
content: '→';
position: absolute;
left: 0;
color: #c8a060;
font-size: 9px;
}
.ringd-note {
padding: 10px 13px;
font-size: 9.5px;
font-style: italic;
color: #9a8a68;
line-height: 1.5;
font-family: Georgia, serif;
}
```
### 15. Orion Constellation Chart
**Type:** Pure CSS
**Description:** A starfield rendering of the Orion constellation with six labeled star hotspots — Rigel, Betelgeuse, Bellatrix, Alnilam, Saiph, Meissa. Each star pops a card with real astronomical data: Bayer designation, distance, magnitude, luminosity, and a five-star brightness gauge.
**HTML:**
```html
α Orionis
Betelgeuse
Orion · Upper left shoulder
M1–2 Iaab · Red Supergiant
Distance 700 ly
App. mag 0.42 (variable)
Luminosity ~126,000 L☉
Radius ~700 R☉
Brightness ★ ★ ★ ★ ★
β Orionis
Rigel
Orion · Lower right
B8 Ia · Blue Supergiant
Distance 860 ly
App. mag 0.13 (brightest)
Luminosity ~120,000 L☉
Temp 12,100 K
Brightness ★ ★ ★ ★ ★
γ Orionis
Bellatrix
Orion · Upper right shoulder
B2 III · Blue Giant
Distance 250 ly
App. mag 1.64
Luminosity ~6,400 L☉
Temp 22,000 K
Brightness ★ ★ ★ ★ ★
ε Orionis
Alnilam
Orion · Belt, central star
B0 Ia · Blue Supergiant
Distance 2,000 ly
App. mag 1.69
Luminosity ~375,000 L☉
Temp 27,500 K
λ Orionis
Meissa
Orion · Head
O8 III · Blue-White Giant
Distance 1,100 ly
App. mag 3.39
Luminosity ~28,000 L☉
Temp 35,000 K
κ Orionis
Saiph
Orion · Lower left
B0.5 Ia · Blue Supergiant
Distance 720 ly
App. mag 2.07
Luminosity ~57,500 L☉
Temp 26,500 K
```
**CSS:**
```css
.orion-stage {
background: #04060e;
/* Side room — star cards pop to the right (Betelgeuse, Alnilam,
Meissa, Saiph) or left (Rigel, Bellatrix). 260px each side. */
padding: 40px 280px;
font-family: 'JetBrains Mono', ui-monospace, monospace;
display: flex;
align-items: center;
justify-content: center;
}
.orion-chart {
position: relative;
width: 400px;
height: 400px;
flex-shrink: 0;
}
.orion-chart svg { width: 100%; height: 100%; display: block; }
.orion-spot {
position: absolute;
transform: translate(-50%, -50%);
cursor: help;
z-index: 10;
}
.orion-hit {
width: 22px;
height: 22px;
border-radius: 50%;
position: relative;
}
.orion-hit::after {
content: '';
position: absolute;
inset: 0;
border-radius: 50%;
background: rgba(180, 200, 255, 0);
transition: background .2s;
}
.orion-spot:hover .orion-hit::after {
background: rgba(180, 200, 255, 0.08);
box-shadow: 0 0 18px 6px rgba(160, 180, 255, 0.12);
}
.orion-card {
position: absolute;
left: calc(100% + 14px);
top: 50%;
transform: translateY(-50%) translateX(6px);
z-index: 200;
width: 230px;
background: rgba(8, 12, 28, 0.96);
border: 1px solid rgba(100, 120, 200, 0.2);
border-radius: 8px;
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity .2s,
transform .2s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .2s;
box-shadow:
0 12px 38px rgba(0, 0, 0, 0.9),
0 0 0 1px rgba(100, 120, 200, 0.06);
overflow: hidden;
text-align: left;
}
.orion-spot:hover .orion-card {
opacity: 1;
visibility: visible;
transform: translateY(-50%) translateX(0);
transition-delay: 0s;
}
.orion-card-left {
left: auto;
right: calc(100% + 14px);
transform: translateY(-50%) translateX(-6px);
}
.orion-spot:hover .orion-card-left {
transform: translateY(-50%) translateX(0);
}
.orion-top {
padding: 12px 13px 10px;
border-bottom: 1px solid rgba(100, 120, 200, 0.1);
}
.orion-bayer {
font-size: 9px;
color: rgba(140, 160, 255, 0.4);
letter-spacing: 0.1em;
margin-bottom: 3px;
}
.orion-name {
font-size: 15px;
font-weight: 500;
color: rgba(220, 230, 255, 0.92);
margin-bottom: 1px;
}
.orion-const {
font-size: 9.5px;
color: rgba(100, 120, 180, 0.6);
}
.orion-pill {
display: inline-block;
font-size: 8.5px;
padding: 2px 7px;
border-radius: 3px;
margin-top: 6px;
letter-spacing: 0.06em;
border: 1px solid rgba(100, 120, 200, 0.2);
color: rgba(140, 160, 220, 0.7);
}
.orion-data { padding: 10px 13px; }
.orion-row {
display: flex;
justify-content: space-between;
margin-bottom: 5px;
}
.orion-key {
font-size: 8.5px;
color: rgba(60, 80, 140, 0.7);
letter-spacing: 0.08em;
}
.orion-val {
font-size: 9.5px;
color: rgba(160, 180, 240, 0.75);
}
.orion-mag {
display: flex;
align-items: center;
gap: 8px;
margin-top: 8px;
padding-top: 8px;
border-top: 1px solid rgba(100, 120, 200, 0.06);
}
.orion-mag-label {
font-size: 7.5px;
color: rgba(60, 80, 140, 0.5);
letter-spacing: 0.08em;
}
.orion-mag-stars {
display: flex;
gap: 2px;
}
.orion-mag-star {
font-size: 9.5px;
color: rgba(255, 220, 80, 0.7);
}
.orion-mag-dim {
color: rgba(60, 80, 140, 0.3);
}
```
### 16. Periodic Table Element
**Type:** Pure CSS
**Description:** Periodic-table tiles for the first three periods, color-coded by element category (nonmetal, alkali, halogen, noble, metalloid, etc.). Hover any tile and a card lifts in with atomic number, mass, electron configuration, melting/boiling points, and discovery credit.
**HTML:**
```html
2
He
Helium
4.003
Atomic No. 2
Atomic Mass 4.003 u
Config 1s²
Boiling pt. −268.9 °C
Discovered 1895 · Ramsey, Clève, Langlet
3
Li
Lithium
6.941
Atomic No. 3
Config [He] 2s¹
Melting pt. 180.5 °C
Use Batteries, ceramics
Discovered 1817 · J. A. Arfwedson
4
Be
Beryllium
9.012
Be
Beryllium
Alkaline Earth
Atomic No. 4
Config [He] 2s²
Melting pt. 1,287 °C
Note Highly toxic dust
Discovered 1798 · L.-N. Vauquelin
9
F
Fluorine
19.00
Config [He] 2s² 2p⁵
Electronegativity 3.98 (highest)
Boiling pt. −188 °C
Isolated 1886 · Henri Moissan
10
Ne
Neon
20.18
Config [He] 2s² 2p⁶
Boiling pt. −246.1 °C
Emission Red-orange glow
Discovered 1898 · Ramsay & Travers
```
**CSS:**
```css
.elm-stage {
background: #0d0d10;
/* Top room — element cards pop UP from each tile, ~240px tall. */
padding: 260px 28px 40px;
font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.elm-grid {
max-width: 660px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 5px;
align-items: center;
}
.elm-row {
display: flex;
gap: 5px;
}
.elm-tile {
position: relative;
width: 56px;
height: 56px;
border-radius: 4px;
padding: 5px 6px;
cursor: help;
transition: transform .15s;
border: 1px solid transparent;
flex-shrink: 0;
}
.elm-tile:hover {
transform: scale(1.08) translateY(-2px);
z-index: 10;
}
.elm-nonmetal { background: rgba(40, 80, 40, 0.3); border-color: rgba(60, 160, 60, 0.25); }
.elm-alkali { background: rgba(80, 20, 20, 0.3); border-color: rgba(200, 60, 40, 0.25); }
.elm-alkaline { background: rgba(80, 50, 0, 0.3); border-color: rgba(200, 140, 0, 0.25); }
.elm-metalloid { background: rgba(20, 60, 80, 0.3); border-color: rgba(40, 160, 200, 0.25); }
.elm-noble { background: rgba(60, 20, 80, 0.3); border-color: rgba(160, 60, 200, 0.25); }
.elm-halogen { background: rgba(60, 60, 0, 0.3); border-color: rgba(180, 180, 20, 0.25); }
.elm-gap { height: 56px; flex-shrink: 0; }
.elm-num { font-size: 7.5px; color: rgba(255, 255, 255, 0.25); }
.elm-sym {
font-size: 19px;
font-weight: 600;
color: rgba(255, 255, 255, 0.88);
line-height: 1;
margin: 1px 0 2px;
}
.elm-name {
font-size: 7px;
color: rgba(255, 255, 255, 0.35);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.elm-mass {
font-size: 6.5px;
color: rgba(255, 255, 255, 0.2);
margin-top: 1px;
}
.elm-card {
position: absolute;
bottom: calc(100% + 10px);
left: 50%;
transform: translateX(-50%) translateY(-6px);
z-index: 300;
width: 220px;
background: #141418;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 8px;
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity .2s,
transform .2s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .2s;
box-shadow: 0 16px 44px rgba(0, 0, 0, 0.95);
overflow: hidden;
text-align: left;
}
.elm-tile:hover .elm-card {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
transition-delay: 0s;
}
.elm-card-top {
padding: 11px 13px 9px;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.elm-card-sym {
font-size: 24px;
font-weight: 600;
color: rgba(255, 255, 255, 0.9);
line-height: 1;
}
.elm-card-name {
font-size: 13px;
color: rgba(255, 255, 255, 0.55);
margin-top: 2px;
}
.elm-cat {
display: inline-block;
font-size: 7.5px;
padding: 2px 6px;
border-radius: 3px;
margin-top: 6px;
letter-spacing: 0.07em;
text-transform: uppercase;
}
.elm-cat-nonmetal { background: rgba(60, 160, 60, 0.15); color: #60c060; border: 1px solid rgba(60, 160, 60, 0.2); }
.elm-cat-alkali { background: rgba(180, 40, 20, 0.15); color: #e06050; border: 1px solid rgba(180, 40, 20, 0.2); }
.elm-cat-alkaline { background: rgba(160, 100, 0, 0.15); color: #c09020; border: 1px solid rgba(160, 100, 0, 0.2); }
.elm-cat-metalloid { background: rgba(20, 100, 140, 0.15); color: #40c0e0; border: 1px solid rgba(20, 100, 140, 0.2); }
.elm-cat-noble { background: rgba(120, 40, 160, 0.15); color: #a060e0; border: 1px solid rgba(120, 40, 160, 0.2); }
.elm-cat-halogen { background: rgba(140, 140, 0, 0.15); color: #c0c020; border: 1px solid rgba(140, 140, 0, 0.2); }
.elm-card-data { padding: 9px 13px; }
.elm-card-row {
display: flex;
justify-content: space-between;
margin-bottom: 5px;
}
.elm-card-key {
font-size: 7.5px;
color: rgba(255, 255, 255, 0.2);
letter-spacing: 0.08em;
}
.elm-card-val {
font-size: 9px;
color: rgba(255, 255, 255, 0.55);
font-style: italic;
}
.elm-card-econfig {
font-size: 8px;
color: rgba(255, 255, 255, 0.35);
letter-spacing: 0.04em;
}
.elm-card-disc {
padding: 8px 13px;
border-top: 1px solid rgba(255, 255, 255, 0.04);
font-size: 8.5px;
color: rgba(255, 255, 255, 0.2);
letter-spacing: 0.04em;
}
```
### 17. Photo EXIF Grid
**Type:** Pure CSS
**Description:** A dark contact-sheet grid of eight gradient photographs. Hover any cell to lift a developer-tools-style card with full EXIF metadata — camera body, lens, aperture, shutter, ISO, focal length, white balance, and location. For photo portfolios and stock catalogs.
**HTML:**
```html
Sony A7 IV
FE 24-70mm f/2.8 GM
Mar 14, 2024
Nikon Z6 III
NIKKOR Z 85mm f/1.8 S
Jan 8, 2024
Fujifilm X-T5
XF 16-80mm f/4 R
Feb 22, 2024
Canon EOS R5
RF 24-105mm f/4L IS
Apr 5, 2024
Sony A7 IV
FE 50mm f/1.4 GM
Dec 18, 2023
Hasselblad X2D
XCD 45mm f/3.5
Nov 3, 2023
Leica M11
Summicron 50mm f/2
Oct 14, 2023
Nikon Z6 III
NIKKOR Z 14-30mm f/4 S
Sep 27, 2023
```
**CSS:**
```css
.exif-stage {
background: #080808;
/* Top room — EXIF cards pop UP from each photo, ~180px tall. */
padding: 220px 28px 40px;
font-family: 'JetBrains Mono', ui-monospace, monospace;
/* Force full width of the .cf-stage flex parent. Without this, the
stage collapses to its content's min-width and the 4-column grid
inside resolves each 1fr track to ~0px, stacking all 8 photos as
one thin vertical strip. */
width: 100%;
box-sizing: border-box;
}
.exif-grid {
max-width: 600px;
margin: 0 auto;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 3px;
}
.exif-cell {
position: relative;
aspect-ratio: 3 / 2;
cursor: help;
}
.exif-img {
width: 100%;
height: 100%;
display: block;
transition: filter .2s;
}
.exif-cell:hover .exif-img {
filter: brightness(1.1);
}
.exif-tip {
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
transform: translateX(-50%) translateY(-6px);
z-index: 100;
width: 230px;
background: #111;
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 6px;
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity .2s,
transform .2s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .2s;
box-shadow: 0 16px 44px rgba(0, 0, 0, 0.98);
overflow: hidden;
text-align: left;
}
.exif-cell:hover .exif-tip {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
transition-delay: 0s;
}
.exif-tip-head {
padding: 11px 13px;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
display: flex;
justify-content: space-between;
align-items: flex-end;
}
.exif-camera {
font-size: 10.5px;
color: rgba(255, 255, 255, 0.7);
}
.exif-lens {
font-size: 8.5px;
color: rgba(255, 255, 255, 0.2);
margin-top: 2px;
}
.exif-date {
font-size: 8.5px;
color: rgba(255, 255, 255, 0.2);
}
.exif-settings {
display: grid;
grid-template-columns: repeat(3, 1fr);
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.exif-set {
padding: 9px 13px;
border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.exif-set:last-child {
border-right: none;
}
.exif-key {
font-size: 6.5px;
color: rgba(255, 255, 255, 0.2);
letter-spacing: 0.1em;
text-transform: uppercase;
margin-bottom: 2px;
}
.exif-val {
font-size: 10.5px;
color: rgba(255, 255, 255, 0.65);
}
.exif-extra {
display: flex;
justify-content: space-between;
padding: 8px 13px;
font-size: 8.5px;
color: rgba(255, 255, 255, 0.25);
gap: 6px;
}
.exif-extra strong {
color: rgba(255, 255, 255, 0.45);
font-weight: 500;
}
```
### 18. Org Chart Node
**Type:** Pure CSS
**Description:** A three-tier org chart with CEO → C-suite → leads. Hover any node to lift a profile card with gradient hero, avatar monogram, role + department pill, three stats (reports/org size/tenure), and a footer with email + timezone. For team directories, succession-planning UIs, internal wikis.
**HTML:**
```html
SL
Sarah Lindqvist
Chief Executive Officer
Executive
SL
Sarah Lindqvist
Chief Executive Officer
Executive · Board
MW
Marcus Webb
Chief Technology Officer
Engineering
MW
Marcus Webb
Chief Technology Officer
Engineering · Platform
ER
Elena Russo
Chief Marketing Officer
Marketing
ER
Elena Russo
Chief Marketing Officer
Marketing · Growth
AT
Amir Tahir
Chief Financial Officer
Finance
AT
Amir Tahir
Chief Financial Officer
Finance · Strategy
```
**CSS:**
```css
.org-stage {
background: #f7f7f9;
/* Side room — org cards pop to the right (CMO/CFO) or left (CEO/CTO). */
padding: 40px 280px;
font-family: 'Inter', system-ui, sans-serif;
display: flex;
align-items: center;
justify-content: center;
}
.org-tree {
display: flex;
flex-direction: column;
align-items: center;
gap: 0;
}
.org-level {
display: flex;
justify-content: center;
gap: 18px;
position: relative;
}
.org-conn {
width: 1px;
height: 24px;
background: #d0d0d8;
margin: 0 auto;
}
.org-node {
position: relative;
cursor: help;
}
.org-box {
background: #fff;
border: 1px solid #e0e0e8;
border-radius: 8px;
padding: 9px 12px;
width: 130px;
text-align: center;
transition: border-color .15s, box-shadow .15s;
}
.org-node:hover .org-box {
border-color: #a0a0c0;
box-shadow: 0 4px 16px rgba(0, 0, 40, 0.08);
}
.org-box-ceo {
border-color: #c0b0e0;
background: linear-gradient(135deg, #faf9ff, #fff);
}
.org-av {
width: 30px;
height: 30px;
border-radius: 50%;
margin: 0 auto 7px;
display: flex;
align-items: center;
justify-content: center;
font-size: 10.5px;
font-weight: 600;
color: rgba(255, 255, 255, 0.92);
letter-spacing: 0.03em;
}
.org-bname {
font-size: 10.5px;
font-weight: 600;
color: #1a1a2e;
}
.org-btitle {
font-size: 8.5px;
color: #909098;
margin-top: 2px;
letter-spacing: 0.04em;
}
.org-bdept {
font-size: 7.5px;
color: #c0c0cc;
margin-top: 1px;
text-transform: uppercase;
letter-spacing: 0.06em;
}
.org-card {
position: absolute;
left: calc(100% + 12px);
top: 50%;
transform: translateY(-50%) translateX(6px);
z-index: 200;
width: 230px;
background: #fff;
border: 1px solid #e4e4ee;
border-radius: 10px;
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity .2s,
transform .2s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .2s;
box-shadow:
0 8px 30px rgba(0, 0, 40, 0.12),
0 2px 8px rgba(0, 0, 40, 0.06);
overflow: hidden;
text-align: left;
}
.org-node:hover .org-card {
opacity: 1;
visibility: visible;
transform: translateY(-50%) translateX(0);
transition-delay: 0s;
}
.org-card-left {
left: auto;
right: calc(100% + 12px);
transform: translateY(-50%) translateX(-6px);
}
.org-node:hover .org-card-left {
transform: translateY(-50%) translateX(0);
}
.org-hero {
height: 50px;
position: relative;
}
.org-photo {
width: 44px;
height: 44px;
border-radius: 50%;
border: 3px solid #fff;
position: absolute;
left: 14px;
bottom: -14px;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
font-weight: 600;
color: rgba(255, 255, 255, 0.92);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.org-body {
padding: 20px 14px 11px;
}
.org-name {
font-size: 14px;
font-weight: 600;
color: #1a1a2e;
}
.org-title {
font-size: 10.5px;
color: #6060a0;
margin-top: 1px;
}
.org-pill {
display: inline-block;
font-size: 8.5px;
padding: 2px 7px;
border-radius: 4px;
background: #f0f0f8;
color: #8080b0;
margin-top: 6px;
border: 1px solid #e4e4f0;
letter-spacing: 0.04em;
}
.org-stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
margin-top: 11px;
padding-top: 10px;
border-top: 1px solid #f0f0f8;
}
.org-stat {
text-align: center;
}
.org-stat-n {
font-size: 14px;
font-weight: 600;
color: #2a2a4e;
}
.org-stat-l {
font-size: 7.5px;
color: #c0c0cc;
text-transform: uppercase;
letter-spacing: 0.08em;
margin-top: 2px;
}
.org-foot {
padding: 9px 14px;
border-top: 1px solid #f4f4fc;
font-size: 9.5px;
color: #b0b0c8;
display: flex;
justify-content: space-between;
}
```
### 19. Event Timeline
**Type:** Pure CSS
**Description:** A horizontal seven-event company timeline (seed → IPO) with alternating labels above and below the track. Hovering any dot reveals an event card with quarter, headline, body prose, and a metric badge (valuation, ARR, market cap). For about pages, investor pages, retrospectives.
**HTML:**
```html
Seed Round
2018
Q3 · 2018
Seed Funding Closed
Milestone
$2.4M raised from 12 angel investors. The round was led by two former founders from the enterprise SaaS sector, providing both capital and key industry connections.
Runway 18 months secured
Public Beta
2019
Q1 · 2019
Public Beta Launch
Product
First 1,000 paying customers acquired within 90 days. Net Promoter Score of 72 in initial surveys. Product-market fit validated across legal, healthcare, fintech.
ARR at launch $480K
Series A
2020
Q2 · 2020
Series A — $12M
Milestone
$12M Series A led by Sequoia Capital. Round closed despite pandemic uncertainty, reflecting strong retention. Funds used to double engineering headcount.
Post-money $68M
EU Expansion
2021
Q3 · 2021
100K Users · EU Launch
Growth
Crossed 100,000 active users and launched GDPR-compliant EU data centres in Frankfurt and Dublin. Opened London office with 24 hires. MRR surpassed $1M.
EU share 31% of new ARR
Series B
2022
Q1 · 2022
Series B — $45M · Profitable
Milestone
$45M Series B led by Andreessen Horowitz. Achieved first profitable quarter ahead of schedule. Capital allocated to enterprise sales infrastructure.
Valuation $320M post-money
Acquisition
2023
Q2 · 2023
Acquired Synapse Labs
M&A
Acquired Synapse Labs, a 22-person AI workflow automation startup, for $280M. The deal added Synapse's LLM orchestration layer, accelerating the roadmap.
ARR added $8.4M
IPO Filed
2024
Q3 · 2024
S-1 Filed · NASDAQ
Public Markets
Filed S-1 registration with the SEC. IPO priced at $18/share, valuing the company at $1.2B. Shares began trading on NASDAQ under the ticker SNYP, closing up 38% on day one.
Market cap $1.65B (day 1)
```
**CSS:**
```css
.tline-stage {
background: #0e0c14;
/* Top + bottom room — event cards alternate above and below the
track. Odd events flip column-reverse so the label lands above
the dot and the card pops up. Cards are ~220px tall. */
padding: 240px 24px;
font-family: 'Inter', system-ui, sans-serif;
position: relative;
overflow: hidden;
}
.tline-stage::before {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(80, 40, 120, 0.08) 0%, transparent 70%);
pointer-events: none;
}
.tline-track {
max-width: 760px;
margin: 0 auto;
position: relative;
padding: 40px 0;
}
.tline-track::before {
content: '';
position: absolute;
top: 50%;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(to right, transparent, rgba(120, 80, 200, 0.3) 10%, rgba(120, 80, 200, 0.3) 90%, transparent);
transform: translateY(-50%);
}
.tline-events {
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
}
.tline-event {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
cursor: help;
}
.tline-event:nth-child(odd) {
flex-direction: column-reverse;
}
.tline-label {
font-size: 9px;
color: rgba(180, 140, 240, 0.5);
text-align: center;
margin: 11px 0;
letter-spacing: 0.08em;
font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.tline-year {
font-size: 11px;
font-weight: 700;
color: rgba(180, 140, 240, 0.7);
text-align: center;
margin: 11px 0;
font-family: 'JetBrains Mono', ui-monospace, monospace;
letter-spacing: 0.04em;
}
.tline-dot {
width: 11px;
height: 11px;
border-radius: 50%;
background: rgba(120, 80, 200, 0.6);
border: 2px solid rgba(120, 80, 200, 0.3);
transition: background .15s, box-shadow .15s, transform .15s;
position: relative;
z-index: 2;
flex-shrink: 0;
}
.tline-event:hover .tline-dot {
background: rgba(160, 110, 240, 0.9);
box-shadow: 0 0 14px 4px rgba(120, 80, 200, 0.25);
transform: scale(1.3);
}
.tline-card {
position: absolute;
left: 50%;
transform: translateX(-50%) translateY(-6px);
z-index: 200;
width: 250px;
background: rgba(14, 12, 22, 0.97);
border: 1px solid rgba(120, 80, 200, 0.2);
border-radius: 10px;
opacity: 0;
visibility: hidden;
pointer-events: none;
transition:
opacity .2s,
transform .2s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .2s;
box-shadow:
0 16px 44px rgba(0, 0, 0, 0.9),
0 0 0 1px rgba(120, 80, 200, 0.08);
overflow: hidden;
text-align: left;
}
.tline-event:nth-child(odd) .tline-card {
bottom: calc(100% + 10px);
top: auto;
}
.tline-event:nth-child(even) .tline-card {
top: calc(100% + 10px);
bottom: auto;
}
.tline-event:hover .tline-card {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
transition-delay: 0s;
}
.tline-card-top {
padding: 12px 13px 10px;
border-bottom: 1px solid rgba(120, 80, 200, 0.1);
}
.tline-card-year {
font-size: 8.5px;
font-family: 'JetBrains Mono', ui-monospace, monospace;
color: rgba(160, 110, 240, 0.5);
letter-spacing: 0.1em;
margin-bottom: 4px;
}
.tline-card-title {
font-size: 13px;
color: rgba(255, 255, 255, 0.88);
line-height: 1.3;
font-family: Georgia, serif;
}
.tline-badge {
display: inline-block;
font-size: 7.5px;
font-family: 'JetBrains Mono', ui-monospace, monospace;
padding: 2px 7px;
border-radius: 3px;
margin-top: 7px;
letter-spacing: 0.07em;
text-transform: uppercase;
}
.tline-badge-mile { background: rgba(80, 160, 80, 0.15); color: rgba(120, 200, 120, 0.8); border: 1px solid rgba(80, 160, 80, 0.2); }
.tline-badge-prod { background: rgba(80, 120, 200, 0.15); color: rgba(120, 160, 240, 0.8); border: 1px solid rgba(80, 120, 200, 0.2); }
.tline-badge-acq { background: rgba(200, 120, 40, 0.15); color: rgba(240, 160, 80, 0.8); border: 1px solid rgba(200, 120, 40, 0.2); }
.tline-badge-ipo { background: rgba(160, 80, 200, 0.15); color: rgba(200, 120, 240, 0.8); border: 1px solid rgba(160, 80, 200, 0.2); }
.tline-body {
padding: 9px 13px;
font-size: 11px;
color: rgba(255, 255, 255, 0.5);
line-height: 1.55;
border-bottom: 1px solid rgba(120, 80, 200, 0.06);
font-style: italic;
font-family: Georgia, serif;
}
.tline-impact {
padding: 9px 13px;
display: flex;
justify-content: space-between;
font-size: 9.5px;
font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.tline-impact-label {
color: rgba(120, 80, 200, 0.5);
}
.tline-impact-val {
color: rgba(200, 160, 255, 0.7);
}
```
### 20. Icon Toolbar
**Type:** Pure CSS
**Description:** Unlabeled toolbar icons — bold, italic, link, image, code, list, settings — that reveal their action name on hover. The tooltip is a compact dark pill with a tail arrow, the workhorse pattern every desktop app ships and every web app should. For editors, design tools, dashboards.
**HTML:**
```html
B
Bold
I
Italic
U
Underline
S
Strikethrough
Insert link
Insert image
</>
Code block
Bullet list
Checklist
Preferences
```
**CSS:**
```css
.tbar-stage {
background: #141414;
/* Top room — labels pop UP from each button, ~30px tall. */
padding: 80px 28px 60px;
font-family: system-ui, -apple-system, sans-serif;
}
.tbar-wrap {
display: flex;
justify-content: center;
}
.tbar-bar {
display: inline-flex;
align-items: center;
gap: 2px;
background: #1f1f1f;
border: 1px solid #2a2a2a;
border-radius: 8px;
padding: 5px;
}
.tbar-sep {
width: 1px;
height: 20px;
background: #2e2e2e;
margin: 0 4px;
flex-shrink: 0;
display: inline-block;
}
.tbar-t {
position: relative;
display: inline-block;
}
.tbar-btn {
width: 32px;
height: 32px;
border-radius: 5px;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: help;
color: #888;
font-size: 13px;
font-weight: 600;
transition: background .12s, color .12s;
border: none;
background: transparent;
letter-spacing: 0;
font-family: inherit;
}
.tbar-btn:hover {
background: #2a2a2a;
color: #e0e0e0;
}
.tbar-btn-active {
background: #2a2a2a;
color: #fff;
}
.tbar-btn-code {
font-family: ui-monospace, monospace;
font-size: 11px;
font-weight: 700;
}
.tbar-btn svg {
width: 15px;
height: 15px;
fill: currentColor;
}
.tbar-tip {
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
transform: translateX(-50%) translateY(4px);
background: #18181b;
color: #fff;
font-size: 11.5px;
padding: 5px 10px;
border-radius: 5px;
white-space: nowrap;
pointer-events: none;
opacity: 0;
visibility: hidden;
transition:
opacity .14s,
transform .14s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .14s;
z-index: 100;
line-height: 1;
display: block;
}
.tbar-t:hover .tbar-tip {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
transition-delay: 0s;
}
.tbar-tip::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 4px solid transparent;
border-top-color: #18181b;
}
```
### 21. Form Field Help
**Type:** Pure CSS
**Description:** Small ? circles next to form labels that reveal a one-line hint on hover — username rules, email visibility, time-zone purpose. The tooltip pops to the right with a side-arrow tail so the form line stays uninterrupted. For settings panels, sign-up forms, profile editors.
**HTML:**
```html
```
**CSS:**
```css
.fhelp-stage {
background: #fff;
/* Right room — help tooltips pop to the RIGHT of each ? icon,
~280px wide single-line pills. Padding the right side gives them
room to extend without getting clipped by the gallery card. */
padding: 40px 320px 40px 28px;
font-family: system-ui, -apple-system, sans-serif;
}
.fhelp-form {
max-width: 400px;
margin: 0 auto;
}
.fhelp-field {
margin-bottom: 18px;
}
.fhelp-field-last {
margin-bottom: 0;
}
.fhelp-label {
display: flex;
align-items: center;
gap: 5px;
font-size: 12.5px;
font-weight: 500;
color: #111;
margin-bottom: 6px;
}
.fhelp-t {
position: relative;
display: inline-flex;
align-items: center;
}
.fhelp-icon {
width: 15px;
height: 15px;
border-radius: 50%;
background: #e5e7eb;
color: #9ca3af;
font-size: 9px;
font-weight: 700;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: help;
transition: background .12s, color .12s;
flex-shrink: 0;
line-height: 1;
}
.fhelp-t:hover .fhelp-icon {
background: #d1d5db;
color: #374151;
}
.fhelp-tip {
position: absolute;
top: 50%;
left: calc(100% + 8px);
transform: translateY(-50%) translateX(4px);
background: #18181b;
color: #fff;
font-size: 11.5px;
padding: 7px 11px;
border-radius: 5px;
width: 240px;
pointer-events: none;
opacity: 0;
visibility: hidden;
transition:
opacity .14s,
transform .14s cubic-bezier(0.22, 1, 0.36, 1),
visibility 0s linear .14s;
z-index: 100;
line-height: 1.4;
display: block;
}
.fhelp-t:hover .fhelp-tip {
opacity: 1;
visibility: visible;
transform: translateY(-50%) translateX(0);
transition-delay: 0s;
}
.fhelp-tip::after {
content: '';
position: absolute;
top: 50%;
right: 100%;
transform: translateY(-50%);
border: 4px solid transparent;
border-right-color: #18181b;
}
.fhelp-input {
width: 100%;
padding: 8px 11px;
border: 1px solid #e5e7eb;
border-radius: 6px;
font-size: 12.5px;
color: #374151;
background: #fafafa;
outline: none;
font-family: inherit;
}
.fhelp-input:focus {
border-color: #6366f1;
background: #fff;
}
```
---
## 22 CSS Transition Effects
URL: https://codefronts.com/motion/css-transition-designs/
Description: 22 hand-coded CSS transition effects covering every production motion pattern in 2026 — button hover transitions (9 polished variants: fill sweep, slide-up, neon glow, rotate, border draw, 3D depth, ripple, shimmer, split wipe), scroll-reveal animation, 3D flip card, text reveal with mask clip, image zoom on hover, background color crossfade, border draw animation, fade in/out, navigation menu hover, loading skeleton shimmer, modal open/close, page transitions (Next/Vue/Astro view-transition pattern), ripple effect on click, underline animation, animated number counter, 3D mousemove card tilt, glassmorphism hover, staggered IntersectionObserver list animation, cursor trail effect, magnetic button hover, split text reveal (GSAP-style), and animated progress bars. All GPU-accelerated via transform + opacity only (compositor-thread, no layout thrashing — INP-friendly), respect prefers-reduced-motion, and ship MIT-licensed with zero framework dependencies. 9 demos are 100% pure CSS; 13 use vanilla JavaScript for IntersectionObserver, mousemove, or click coordinates.
Demo count: 22
### 01. Button Hover Transitions
**Type:** Pure CSS
**Description:** Nine polished button hover effects: fill sweep, slide-up, neon glow, rotate icon, border draw, 3D depth, ripple ring, shimmer and split wipe.
**HTML:**
```html
Button Hover Transitions
9 production-ready CSS transition hover effects — hover each button
Fill Sweep
Fill sweep
Slide Up
Slide up
Neon Glow
Neon glow
⚙ Rotate
Rotate icon
Border Draw
Border draw
3D Push
3D depth
Ripple Ring
Ripple ring
Shimmer
Shimmer
Split Wipe
Split wipe
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Inter',sans-serif;background:#0a0a0f;min-height:100vh;display:flex;align-items:center;justify-content:center;padding:40px 20px}
.trn-01{width:100%;max-width:900px}
.trn-01__title{text-align:center;margin-bottom:48px}
.trn-01__title h1{font-size:clamp(2rem,5vw,3.2rem);font-weight:900;color:#fff;letter-spacing:-.03em;margin-bottom:8px}
.trn-01__title p{color:#666;font-size:1rem}
.trn-01__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:20px}
/* BASE */
.btn{font-family:'Inter';font-size:.9rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;padding:16px 32px;border:none;cursor:pointer;border-radius:4px;position:relative;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}
/* 1 — Fill sweep left-to-right */
.btn-fill{background:transparent;color:#6c63ff;border:2px solid #6c63ff;transition:color .35s ease}
.btn-fill::before{content:'';position:absolute;inset:0;background:#6c63ff;transform:scaleX(0);transform-origin:left;transition:transform .35s cubic-bezier(.7,0,.2,1)}
.btn-fill:hover::before{transform:scaleX(1)}
.btn-fill span{position:relative;z-index:1}
.btn-fill:hover{color:#fff}
/* 2 — Slide up reveal */
.btn-slide{background:#ff3c78;color:#fff;transition:transform .3s ease,box-shadow .3s ease}
.btn-slide::after{content:attr(data-text);position:absolute;inset:0;background:#ff3c78;display:flex;align-items:center;justify-content:center;transform:translateY(100%);transition:transform .3s cubic-bezier(.7,0,.2,1)}
.btn-slide:hover{box-shadow:0 20px 40px rgba(255,60,120,.4)}
.btn-slide:hover::after{transform:translateY(0)}
.btn-slide:hover span{transform:translateY(-100%)}
.btn-slide span{display:inline-block;transition:transform .3s cubic-bezier(.7,0,.2,1)}
/* 3 — Neon glow pulse */
.btn-glow{background:#0d1117;color:#00ffcc;border:2px solid #00ffcc;transition:box-shadow .4s ease,background .4s ease,color .4s ease}
.btn-glow:hover{background:#00ffcc;color:#0d1117;box-shadow:0 0 20px #00ffcc,0 0 60px rgba(0,255,204,.4),inset 0 0 20px rgba(0,255,204,.1)}
/* 4 — Rotate icon */
.btn-rotate{background:#f59e0b;color:#1c1003;transition:background .3s,box-shadow .3s}
.btn-rotate .icon{display:inline-block;transition:transform .4s cubic-bezier(.34,1.56,.64,1)}
.btn-rotate:hover .icon{transform:rotate(180deg)}
.btn-rotate:hover{background:#fbbf24;box-shadow:0 12px 30px rgba(245,158,11,.4)}
/* 5 — Border draw */
.btn-draw{background:transparent;color:#e879f9;font-weight:700}
.btn-draw::before,.btn-draw::after{content:'';position:absolute;width:0;height:2px;background:#e879f9;transition:width .3s ease}
.btn-draw .top,.btn-draw .bot{position:absolute;left:0;right:0;height:2px;background:#e879f9;transform:scaleX(0);transition:transform .3s ease}
.btn-draw .top{top:0;transform-origin:right}
.btn-draw .bot{bottom:0;transform-origin:left}
.btn-draw .lft,.btn-draw .rgt{position:absolute;top:0;bottom:0;width:2px;background:#e879f9;transform:scaleY(0);transition:transform .3s .3s ease}
.btn-draw .lft{left:0;transform-origin:bottom}
.btn-draw .rgt{right:0;transform-origin:top}
.btn-draw:hover .top{transform:scaleX(1);transform-origin:left}
.btn-draw:hover .bot{transform:scaleX(1);transform-origin:right}
.btn-draw:hover .lft{transform:scaleY(1)}
.btn-draw:hover .rgt{transform:scaleY(1)}
.btn-draw span{position:relative;z-index:1}
/* 6 — 3D push depth */
.btn-depth{background:#3b82f6;color:#fff;box-shadow:0 6px 0 #1d4ed8,0 8px 16px rgba(59,130,246,.3);transition:transform .1s,box-shadow .1s}
.btn-depth:hover{transform:translateY(3px);box-shadow:0 3px 0 #1d4ed8,0 4px 8px rgba(59,130,246,.3)}
.btn-depth:active{transform:translateY(6px);box-shadow:0 0 0 #1d4ed8,0 2px 6px rgba(59,130,246,.2)}
/* 7 — Magnetic ripple */
.btn-ripple{background:#10b981;color:#fff;transition:background .3s,box-shadow .3s}
.btn-ripple:hover{background:#059669;box-shadow:0 0 0 8px rgba(16,185,129,.15),0 0 0 16px rgba(16,185,129,.08)}
/* 8 — Text scramble shimmer */
.btn-shimmer{background:linear-gradient(135deg,#1e1b4b,#312e81);color:#c7d2fe;border:1px solid rgba(199,210,254,.2);overflow:hidden}
.btn-shimmer::before{content:'';position:absolute;top:-50%;left:-150%;width:60%;height:200%;background:linear-gradient(105deg,transparent,rgba(255,255,255,.15),transparent);transform:skewX(-15deg);transition:left .6s ease}
.btn-shimmer:hover::before{left:150%}
.btn-shimmer span{position:relative;z-index:1}
/* 9 — Split diagonal wipe */
.btn-split{background:transparent;color:#f97316;border:2px solid #f97316;overflow:hidden}
.btn-split::before,.btn-split::after{content:'';position:absolute;inset:0;background:#f97316;transform:scaleX(0);transition:transform .3s cubic-bezier(.7,0,.2,1)}
.btn-split::before{transform-origin:right;clip-path:polygon(0 0,50% 0,50% 100%,0 100%)}
.btn-split::after{transform-origin:left;clip-path:polygon(50% 0,100% 0,100% 100%,50% 100%)}
.btn-split:hover::before,.btn-split:hover::after{transform:scaleX(1)}
.btn-split:hover{color:#fff}
.btn-split span{position:relative;z-index:1;transition:color .3s}
/* labels */
.btn-label{display:block;text-align:center;margin-top:8px;font-size:.68rem;color:#555;letter-spacing:.1em;text-transform:uppercase}
@media(max-width:600px){.trn-01__grid{grid-template-columns:1fr 1fr}}
@media (prefers-reduced-motion:reduce){.btn,.btn::before,.btn::after,.btn *{transition:none !important}}
```
### 02. Slide-In Animation on Scroll
**Type:** CSS + JS
**Description:** Intersection Observer scroll reveal with six directions — left, right, bottom, top, scale-up and rotate-in — plus stagger delay classes.
**HTML:**
```html
Slide InOn Scroll
Elements animate into view as you scroll down the page — six different entrance directions, all pure CSS transitions triggered by an Intersection Observer.
Six entrance styles
01
Slide from Left Elements enter from the left edge with a smooth easing curve.
02
Slide from Right Content appears from the right, ideal for alternating layouts.
03
Slide from Bottom Classic upward reveal — the most widely used scroll animation.
04
Scale Up Items grow from 88% to 100% for a subtle but satisfying pop.
05
Rotate In A slight rotation combined with scale creates a card-flip feel.
06
Slide from Top Dropping elements downward — great for headings and badges.
Staggered delay system
Add .delay-1 through .delay-6 to children for a choreographed cascade effect. Each step adds 100ms of delay, giving groups of elements a natural rhythm.
Used by thousands
"The stagger delays make the whole page feel alive. Replaced our GSAP dependency with this pure CSS approach."
"Buttery smooth on mobile. The reduced-motion support is exactly what we needed for accessibility compliance."
"Implemented in 20 minutes. The Intersection Observer approach means zero layout jank during scroll."
MR
Marcus Reid
Frontend Architect
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=Syne+Mono&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Syne',sans-serif;background:#f5f0e8;color:#1a1a1a;overflow-x:hidden}
/* scroll reveal base */
.reveal{opacity:0;transition:opacity .7s ease,transform .7s cubic-bezier(.22,1,.36,1)}
.reveal.from-left{transform:translateX(-60px)}
.reveal.from-right{transform:translateX(60px)}
.reveal.from-bottom{transform:translateY(50px)}
.reveal.from-top{transform:translateY(-50px)}
.reveal.scale-up{transform:scale(.88)}
.reveal.rotate-in{transform:rotate(-8deg) scale(.9)}
.reveal.visible{opacity:1 !important;transform:none !important}
/* delays */
.delay-1{transition-delay:.1s}.delay-2{transition-delay:.2s}.delay-3{transition-delay:.3s}
.delay-4{transition-delay:.4s}.delay-5{transition-delay:.5s}.delay-6{transition-delay:.6s}
/* page layout */
.hero{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:40px 24px;background:linear-gradient(160deg,#0f0f1a,#1a0a2e)}
.hero h1{font-size:clamp(3rem,10vw,7rem);font-weight:800;color:#fff;letter-spacing:-.04em;line-height:.9;margin-bottom:24px}
.hero h1 em{color:#a78bfa;font-style:normal;display:block}
.hero p{color:#9ca3af;font-size:1.1rem;max-width:50ch;margin-bottom:32px}
.hero-hint{color:#6b7280;font-family:'Syne Mono';font-size:.8rem;letter-spacing:.2em;animation:trn02-bounce 2s ease-in-out infinite}
@keyframes trn02-bounce{0%,100%{transform:translateY(0)}50%{transform:translateY(8px)}}
section{padding:80px 24px;max-width:1100px;margin:0 auto}
.section-label{font-family:'Syne Mono';font-size:.75rem;letter-spacing:.3em;text-transform:uppercase;color:#a78bfa;margin-bottom:12px}
.section-title{font-size:clamp(2rem,5vw,3.5rem);font-weight:800;letter-spacing:-.03em;margin-bottom:40px;color:#1a1a1a}
/* card grid */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:24px;margin-bottom:80px}
.card{background:#fff;border-radius:20px;padding:32px;box-shadow:0 4px 24px rgba(0,0,0,.07);position:relative;overflow:hidden}
.card::before{content:'';position:absolute;top:0;left:0;right:0;height:4px;background:var(--accent,#a78bfa)}
.card .num{font-size:3.5rem;font-weight:800;color:var(--accent,#a78bfa);opacity:.15;line-height:1;margin-bottom:8px}
.card h3{font-size:1.15rem;font-weight:700;margin-bottom:8px}
.card p{font-size:.9rem;color:#666;line-height:1.6}
.card:nth-child(1){--accent:#a78bfa}
.card:nth-child(2){--accent:#34d399}
.card:nth-child(3){--accent:#f97316}
.card:nth-child(4){--accent:#f472b6}
.card:nth-child(5){--accent:#38bdf8}
.card:nth-child(6){--accent:#fbbf24}
/* feature strip */
.feature{display:grid;grid-template-columns:1fr 1fr;gap:40px;align-items:center;margin-bottom:80px;padding:48px;background:#1a0a2e;border-radius:24px;color:#fff}
@media(max-width:640px){.feature{grid-template-columns:1fr}}
.feature h2{font-size:clamp(1.8rem,4vw,2.6rem);font-weight:800;letter-spacing:-.03em;margin-bottom:16px}
.feature p{color:#9ca3af;line-height:1.7}
.feature-visual{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.fv-box{background:linear-gradient(135deg,var(--c1),var(--c2));border-radius:16px;aspect-ratio:1;display:grid;place-items:center;font-size:2rem}
.fv-box:nth-child(1){--c1:#7c3aed;--c2:#a78bfa}
.fv-box:nth-child(2){--c1:#0ea5e9;--c2:#38bdf8}
.fv-box:nth-child(3){--c1:#f97316;--c2:#fb923c}
.fv-box:nth-child(4){--c1:#10b981;--c2:#34d399}
/* testimonial row */
.testimonials{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:20px;margin-bottom:80px}
.testi{background:#1a1a1a;border-radius:16px;padding:28px;color:#fff}
.testi p{font-size:.95rem;line-height:1.6;color:#d1d5db;margin-bottom:16px}
.testi-author{display:flex;align-items:center;gap:12px}
.testi-avatar{width:36px;height:36px;border-radius:50%;background:var(--c,#a78bfa);display:grid;place-items:center;font-size:.8rem;font-weight:700}
.testi:nth-child(1) .testi-avatar{--c:#7c3aed}
.testi:nth-child(2) .testi-avatar{--c:#0ea5e9}
.testi:nth-child(3) .testi-avatar{--c:#10b981}
.testi-name{font-size:.82rem;font-weight:700;color:#f9fafb}
.testi-role{font-size:.72rem;color:#6b7280}
/* stats */
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;background:#fff;border-radius:24px;padding:40px;box-shadow:0 4px 30px rgba(0,0,0,.07)}
@media(max-width:640px){.stats{grid-template-columns:1fr 1fr}}
.stat{text-align:center}
.stat .big{font-size:clamp(2rem,5vw,3rem);font-weight:800;color:var(--c,#7c3aed)}
.stat:nth-child(1){--c:#7c3aed}
.stat:nth-child(2){--c:#0ea5e9}
.stat:nth-child(3){--c:#f97316}
.stat:nth-child(4){--c:#10b981}
.stat span{display:block;font-size:.8rem;color:#888;margin-top:4px}
@media (prefers-reduced-motion:reduce){.reveal{transition:none !important;opacity:1 !important;transform:none !important}}
```
**JS:**
```js
const observer = new IntersectionObserver(entries => {
entries.forEach(e => { if(e.isIntersecting) { e.target.classList.add('visible'); observer.unobserve(e.target); } });
}, { threshold: 0.15 });
document.querySelectorAll('.reveal').forEach(el => observer.observe(el));
// Trigger hero items which are already in view
document.querySelectorAll('.hero .reveal').forEach(el => el.classList.add('visible'));
```
### 03. Flip Card 3D Transition
**Type:** Pure CSS
**Description:** Six 3D flip cards using rotateY and rotateX variants with unique dark gradients, perspective depth and backface-visibility control.
**HTML:**
```html
CSS 3D transitions
Flip Card Effects
Hover any card to reveal the back face — built with CSS perspective and rotateY
Standard — rotateY, 700ms ease
🌊
Hover to flip →
Ocean Data Analytics
Ocean Data Analytics
Real-time monitoring of 47 ocean buoys across the Pacific, tracking temperature, salinity and current velocity at 15-minute intervals.
📊 View Dashboard →
🔥
Hover to flip →
Wildfire Risk Index
Wildfire Risk Index
ML-powered prediction model combining satellite imagery, wind patterns and fuel moisture data to forecast wildfire probability zones.
🛰️ View Model →
🧬
Hover to flip →
Genomics Pipeline
Genomics Pipeline
End-to-end DNA sequencing workflow processing 2.4TB daily, with automated QC, variant calling and clinical report generation.
🧪 Explore Pipeline →
🤖
Fast flip →
Neural Inference Engine
Neural Inference Engine
Edge-optimised transformer models with sub-10ms latency, running natively in the browser via WebAssembly and WebGPU.
⚡ Benchmark →
🌿
Flip over ↕
Carbon Offset Tracker
Carbon Offset Tracker
Monitor reforestation credits, renewable energy certificates and direct air capture projects across your entire portfolio.
🌍 Track Offsets →
📡
Flip over ↕
Satellite Telemetry
Satellite Telemetry
Low-latency uplink/downlink monitoring across 12 ground stations. Live attitude, power and comms data streams.
🛰 View Telemetry →
700ms Default duration
1000px Perspective
rotateY/X Transforms
0 JS Flip is pure CSS
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;600;700&family=DM+Serif+Display:ital@0;1&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'DM Sans',sans-serif;background:linear-gradient(135deg,#0f2027,#203a43,#2c5364);min-height:100vh;padding:60px 24px;display:flex;flex-direction:column;align-items:center}
h1{font-family:'DM Serif Display';font-size:clamp(2rem,5vw,3.2rem);color:#fff;text-align:center;margin-bottom:8px;letter-spacing:-.02em}
.subtitle{color:#7fb3c8;font-size:1rem;text-align:center;margin-bottom:60px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:32px;width:100%;max-width:1100px}
/* 3D flip core */
.flip-scene{perspective:1000px;height:300px}
.flip-card{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .7s cubic-bezier(.4,0,.2,1);cursor:pointer}
.flip-scene:hover .flip-card,.flip-scene:focus-within .flip-card{transform:rotateY(180deg)}
.flip-front,.flip-back{position:absolute;inset:0;border-radius:20px;backface-visibility:hidden;-webkit-backface-visibility:hidden;padding:32px;display:flex;flex-direction:column;justify-content:space-between}
.flip-back{transform:rotateY(180deg)}
/* card 1 — teal / dark */
.c1 .flip-front{background:linear-gradient(145deg,#1a9b9b,#0e6464);box-shadow:0 20px 60px rgba(14,100,100,.5)}
.c1 .flip-front .emoji{font-size:3.5rem;filter:drop-shadow(0 4px 12px rgba(0,0,0,.3))}
.c1 .flip-front h2{font-family:'DM Serif Display';font-size:1.6rem;color:#fff;line-height:1.1}
.c1 .flip-front .hint{font-size:.74rem;letter-spacing:.2em;color:rgba(255,255,255,.5);text-transform:uppercase}
.c1 .flip-back{background:#0d3b3b;border:1px solid rgba(26,155,155,.3);box-shadow:0 20px 60px rgba(14,100,100,.5)}
/* card 2 — amber / dark purple */
.c2 .flip-front{background:linear-gradient(145deg,#d97706,#92400e);box-shadow:0 20px 60px rgba(217,119,6,.4)}
.c2 .flip-front .emoji{font-size:3.5rem}
.c2 .flip-front h2{font-family:'DM Serif Display';font-size:1.6rem;color:#fff;line-height:1.1}
.c2 .flip-front .hint{font-size:.74rem;letter-spacing:.2em;color:rgba(255,255,255,.5);text-transform:uppercase}
.c2 .flip-back{background:#3b1a04;border:1px solid rgba(217,119,6,.3);box-shadow:0 20px 60px rgba(217,119,6,.4)}
/* card 3 — rose / dark */
.c3 .flip-front{background:linear-gradient(145deg,#e11d48,#9f1239);box-shadow:0 20px 60px rgba(225,29,72,.4)}
.c3 .flip-front .emoji{font-size:3.5rem}
.c3 .flip-front h2{font-family:'DM Serif Display';font-size:1.6rem;color:#fff;line-height:1.1}
.c3 .flip-front .hint{font-size:.74rem;letter-spacing:.2em;color:rgba(255,255,255,.5);text-transform:uppercase}
.c3 .flip-back{background:#3b0618;border:1px solid rgba(225,29,72,.3);box-shadow:0 20px 60px rgba(225,29,72,.4)}
/* card 4 — indigo */
.c4 .flip-front{background:linear-gradient(145deg,#4f46e5,#1e1b4b);box-shadow:0 20px 60px rgba(79,70,229,.4)}
.c4 .flip-front .emoji{font-size:3.5rem}
.c4 .flip-front h2{font-family:'DM Serif Display';font-size:1.6rem;color:#fff;line-height:1.1}
.c4 .flip-front .hint{font-size:.74rem;letter-spacing:.2em;color:rgba(255,255,255,.5);text-transform:uppercase}
.c4 .flip-back{background:#0d0b2e;border:1px solid rgba(79,70,229,.3);box-shadow:0 20px 60px rgba(79,70,229,.4)}
/* back side shared */
.flip-back h3{font-family:'DM Serif Display';font-size:1.3rem;color:#fff;margin-bottom:12px}
.flip-back p{font-size:.88rem;color:rgba(255,255,255,.65);line-height:1.7;margin-bottom:16px}
.flip-back .tag{display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.15);color:rgba(255,255,255,.8);font-size:.72rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;padding:6px 12px;border-radius:20px}
/* vertical flip variant */
.flip-scene.flip-x .flip-card{transition:transform .7s cubic-bezier(.4,0,.2,1)}
.flip-scene.flip-x:hover .flip-card{transform:rotateX(180deg)}
.flip-scene.flip-x .flip-back{transform:rotateX(180deg)}
/* horizontal flip with different easing */
.flip-scene.flip-fast .flip-card{transition:transform .4s cubic-bezier(.7,0,.2,1)}
/* section titles */
.section{width:100%;max-width:1100px;margin:0 0 16px}
.section h2{font-family:'DM Serif Display';font-size:1.5rem;color:rgba(255,255,255,.4);font-weight:400}
.label{display:inline-block;font-size:.68rem;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:#7fb3c8;margin-bottom:8px}
/* stats bar */
.stats{display:flex;flex-wrap:wrap;gap:24px;justify-content:center;margin-top:48px;background:rgba(255,255,255,.05);border-radius:16px;padding:24px 32px;width:100%;max-width:1100px;border:1px solid rgba(255,255,255,.08)}
.stat{text-align:center}
.stat b{display:block;font-size:1.8rem;font-weight:700;color:#fff}
.stat span{font-size:.75rem;color:#7fb3c8;letter-spacing:.12em;text-transform:uppercase}
@media (prefers-reduced-motion:reduce){.flip-card{transition:none !important}}
```
### 04. Text Reveal Animation
**Type:** Pure CSS
**Description:** Clip-path translateY hero reveal, wipe-over hover on list rows, shimmer sweep on cards and animated grain background texture.
**HTML:**
```html
Clip-mask reveals, wipe-overs and shimmer transitions for every text element on your page — zero JavaScript, pure CSS.
Reveal · Typography · Animation · CSS · Transitions · Text Motion ·
Clip Reveal · Wipe · Blur · Shimmer · Stagger · Entrance ·
Reveal · Typography · Animation · CSS · Transitions · Text Motion ·
Clip Reveal · Wipe · Blur · Shimmer · Stagger · Entrance ·
Hover wipe technique
Selected Work
01 Brand Identity Systems →
02 Editorial Typography →
03 Motion Design Reels →
04 Interactive Installations →
05 Digital Art Direction →
01
Technique
Clip-Path Reveal
translateY from 110% behind overflow:hidden — the cleanest, most performant text entrance.
02
Technique
Wipe Background
scaleX on a pseudo-element creates a horizontal colour wipe over the entire row.
03
Technique
Shimmer Sweep
A translucent gradient swept left-to-right with a left-position transition — zero opacity tricks.
04
Technique
Blur Defocus
filter:blur(8px) → blur(0) combined with opacity creates a soft focus-pull entrance for characters.
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Montserrat:wght@400;600;700;900&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Montserrat',sans-serif;background:#faf8f3;overflow-x:hidden}
/* Hero */
.hero{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:60px 24px;background:#0c0b0a;position:relative;overflow:hidden}
/* animated grain overlay */
.hero::before{content:'';position:absolute;inset:-50%;width:200%;height:200%;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");opacity:.4;animation:trn04-grain .4s steps(2) infinite}
@keyframes trn04-grain{0%{transform:translate(0)}25%{transform:translate(-2%,2%)}50%{transform:translate(3%,-1%)}75%{transform:translate(-1%,3%)}100%{transform:translate(2%,-2%)}}
/* Clip reveal — the main technique: overflow:hidden + translate */
.reveal-clip{overflow:hidden;display:block}
.reveal-clip span{display:block;transform:translateY(110%);animation:trn04-clipup .9s cubic-bezier(.22,1,.36,1) forwards}
.hero .eyebrow .reveal-clip span{animation-delay:.1s;font-size:.78rem;letter-spacing:.4em;text-transform:uppercase;color:#c9b99a}
.big-word{margin-bottom:4px}
.big-word:nth-child(2) .reveal-clip span{animation-delay:.25s}
.big-word:nth-child(3) .reveal-clip span{animation-delay:.4s}
.big-word:nth-child(4) .reveal-clip span{animation-delay:.55s}
@keyframes trn04-clipup{to{transform:translateY(0)}}
.hero h1{font-family:'Playfair Display';font-size:clamp(5rem,16vw,12rem);line-height:.85;letter-spacing:-.04em;color:#fff;font-weight:900}
.hero h1 em{color:#c9b99a;font-style:italic}
.hero .desc-wrap{overflow:hidden;margin-top:40px}
.hero .desc{color:#888;font-size:1rem;transform:translateY(60px);animation:trn04-clipup .8s .75s cubic-bezier(.22,1,.36,1) forwards;max-width:50ch;margin:0 auto}
/* Sections */
section{padding:100px 24px;max-width:1200px;margin:0 auto}
/* Wipe reveal — box-shadow wipe on hover */
.wipe-wrap{display:flex;flex-direction:column;gap:0;border-top:1px solid #e0d9cc}
.wipe-item{border-bottom:1px solid #e0d9cc;padding:24px 0;display:flex;align-items:center;gap:24px;cursor:default;position:relative;overflow:hidden;transition:padding .3s}
.wipe-item::before{content:'';position:absolute;inset:0;background:#1a1a1a;transform:scaleX(0);transform-origin:left;transition:transform .5s cubic-bezier(.7,0,.2,1);z-index:0}
.wipe-item:hover::before{transform:scaleX(1)}
.wipe-item:hover{padding-left:20px}
.wipe-num{font-size:.7rem;font-weight:700;letter-spacing:.2em;color:#c9b99a;min-width:32px;position:relative;z-index:1;transition:color .3s .1s}
.wipe-item:hover .wipe-num{color:#c9b99a}
.wipe-title{font-family:'Playfair Display';font-size:clamp(1.4rem,4vw,2.4rem);font-weight:700;position:relative;z-index:1;transition:color .3s .1s}
.wipe-item:hover .wipe-title{color:#fff}
.wipe-arrow{margin-left:auto;font-size:1.4rem;position:relative;z-index:1;transition:transform .3s .1s,color .3s .1s}
.wipe-item:hover .wipe-arrow{transform:translateX(8px) rotate(-45deg);color:#fff}
/* Scramble on hover — CSS only shimmer */
.scramble-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:2px;margin-top:64px}
.sc-card{background:#1a1a1a;padding:32px;position:relative;overflow:hidden;cursor:default}
.sc-card::after{content:'';position:absolute;top:0;left:-100%;width:60%;height:100%;background:linear-gradient(90deg,transparent,rgba(201,185,154,.12),transparent);transition:left .6s ease}
.sc-card:hover::after{left:150%}
.sc-card .sc-num{font-size:4rem;font-weight:900;color:rgba(201,185,154,.08);line-height:1;font-family:'Playfair Display'}
.sc-card .sc-label{font-size:.68rem;letter-spacing:.25em;text-transform:uppercase;color:#c9b99a;margin-bottom:8px}
.sc-card .sc-title{font-family:'Playfair Display';font-size:1.3rem;color:#fff;line-height:1.2;margin-bottom:10px}
.sc-card .sc-desc{font-size:.82rem;color:#666;line-height:1.6}
.sc-title-wrap{position:relative;z-index:1}
/* blur-in chars */
.char-reveal{display:inline-flex;flex-wrap:wrap;gap:0}
.char{display:inline-block;opacity:0;filter:blur(8px);transition:opacity .4s,filter .4s,transform .4s}
.char.visible{opacity:1;filter:blur(0);transform:none}
.char-row{overflow:hidden}
/* marquee strip */
.marquee-strip{background:#1a1a1a;overflow:hidden;padding:18px 0;display:flex;gap:0;white-space:nowrap}
.marquee-inner{display:inline-flex;gap:0;animation:trn04-marq 14s linear infinite}
@keyframes trn04-marq{to{transform:translateX(-50%)}}
.marquee-inner span{font-family:'Playfair Display';font-size:1.1rem;font-style:italic;color:rgba(201,185,154,.6);padding:0 32px}
.marquee-inner b{color:#c9b99a}
@media (prefers-reduced-motion:reduce){.reveal-clip span,.hero .desc,.hero::before,.marquee-inner,.char{animation:none !important;transform:none !important;opacity:1 !important;filter:none !important}}
```
### 05. Image Zoom Hover Transition
**Type:** Pure CSS
**Description:** Nine zoom techniques: standard, rotate-and-zoom, zoom-out, colour overlay, Ken Burns pan, 3D tilt, blur-on-zoom, desaturate and clip-path inset.
**HTML:**
```html
Image Zoom Hover Transitions
9 CSS zoom effects — hover each image to see the transition
Scale 1→1.4
Standard Zoom scale(1.4) ease
Scale + Rotate
Rotate Zoom scale(1.35) rotate(5deg)
Zoom Out
Zoom Out Starts at 1.4, shrinks to 1
Colour Overlay
Colour Tint scale(1.35) + tint
Pan Left
Ken Burns Pan scale(1.5) + translateX(-15%)
3D Tilt
Perspective Tilt rotateY(12deg) + scale(1.18)
Blur Out
Blur on Zoom scale(1.3) + blur(5px)
Desaturate
Greyscale Zoom scale(1.3) + saturate(0)
Clip Inset
Clip Reveal scale(1.35) + clip 10%
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Manrope',sans-serif;background:#111116;color:#fff;padding:60px 24px}
h1{font-size:clamp(2rem,5vw,3.4rem);font-weight:800;text-align:center;margin-bottom:8px;letter-spacing:-.03em}
.sub{text-align:center;color:#666;margin-bottom:56px;font-size:.95rem}
.label{font-size:.68rem;font-weight:700;letter-spacing:.25em;text-transform:uppercase;color:#666;margin-bottom:8px;display:block}
.section-title{font-size:1.3rem;font-weight:700;margin-bottom:24px;color:#fff}
/* IMAGE PLACEHOLDER (colored gradient as image substitute) */
.img-wrap{overflow:hidden;position:relative;border-radius:12px}
.img-fake{width:100%;aspect-ratio:4/3;display:block;transition:transform .6s cubic-bezier(.25,0,.25,1);background:var(--bg)}
/* label overlay */
.img-overlay{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;padding:20px;
background:linear-gradient(to top,rgba(0,0,0,.7) 0%,transparent 60%);
pointer-events:none}
.img-overlay h3{font-size:1rem;font-weight:700;color:#fff;line-height:1.2}
.img-overlay span{font-size:.75rem;color:rgba(255,255,255,.6);margin-top:3px}
/* 1 — Standard zoom (boosted 1.1 → 1.4 for clearly visible effect) */
.zoom-std .img-wrap:hover .img-fake{transform:scale(1.4)}
/* 2 — Zoom + rotate (boosted 1.12/2deg → 1.35/5deg) */
.zoom-rot .img-wrap:hover .img-fake{transform:scale(1.35) rotate(5deg)}
/* 3 — Zoom out on hover (boosted starting 1.12 → 1.4) */
.zoom-out .img-fake{transform:scale(1.4)}
.zoom-out .img-wrap:hover .img-fake{transform:scale(1)}
/* 4 — Zoom with colour overlay (boosted 1.1 → 1.35, overlay 0.45 → 0.55) */
.zoom-color .img-wrap::after{content:'';position:absolute;inset:0;background:rgba(129,140,248,.55);opacity:0;transition:opacity .5s}
.zoom-color .img-wrap:hover::after{opacity:1}
.zoom-color .img-wrap:hover .img-fake{transform:scale(1.35)}
/* 5 — Ken Burns pan (boosted 1.2/-8% → 1.5/-15% for dramatic pan) */
.zoom-pan .img-fake{transform:scale(1.5) translateX(0);transition:transform .8s cubic-bezier(.25,0,.25,1)}
.zoom-pan .img-wrap:hover .img-fake{transform:scale(1.5) translateX(-15%)}
/* 6 — Tilt 3D (boosted 1.06/6deg → 1.18/12deg) */
.zoom-tilt .img-wrap{perspective:800px}
.zoom-tilt .img-wrap:hover .img-fake{transform:scale(1.18) perspective(800px) rotateY(12deg)}
/* 7 — Blur to sharp (boosted 1.08/2px → 1.3/5px) */
.zoom-blur .img-fake{filter:blur(0);transition:transform .6s cubic-bezier(.25,0,.25,1),filter .6s}
.zoom-blur .img-wrap:hover .img-fake{transform:scale(1.3);filter:blur(5px)}
/* 8 — Desaturate on hover (boosted 1.08 → 1.3) */
.zoom-sat .img-fake{transition:transform .6s cubic-bezier(.25,0,.25,1),filter .6s}
.zoom-sat .img-wrap:hover .img-fake{transform:scale(1.3);filter:saturate(0) brightness(1.1)}
/* 9 — Clip zoom (boosted 1.1/6% → 1.35/10%) */
.zoom-clip .img-wrap{border-radius:0}
.zoom-clip .img-fake{clip-path:inset(0% round 0px);transition:transform .6s cubic-bezier(.25,0,.25,1),clip-path .6s cubic-bezier(.25,0,.25,1)}
.zoom-clip .img-wrap:hover .img-fake{transform:scale(1.35);clip-path:inset(10% round 16px)}
/* Grid layout */
.grid-main{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;max-width:1100px;margin:0 auto}
@media(max-width:800px){.grid-main{grid-template-columns:1fr 1fr}}
@media(max-width:500px){.grid-main{grid-template-columns:1fr}}
/* Color palettes for fake images */
.pal1{--bg:linear-gradient(135deg,#667eea,#764ba2)}
.pal2{--bg:linear-gradient(135deg,#f6d365,#fda085)}
.pal3{--bg:linear-gradient(135deg,#a18cd1,#fbc2eb)}
.pal4{--bg:linear-gradient(135deg,#4facfe,#00f2fe)}
.pal5{--bg:linear-gradient(135deg,#43e97b,#38f9d7)}
.pal6{--bg:linear-gradient(135deg,#fa709a,#fee140)}
.pal7{--bg:linear-gradient(135deg,#30cfd0,#330867)}
.pal8{--bg:linear-gradient(135deg,#a1c4fd,#c2e9fb)}
.pal9{--bg:linear-gradient(135deg,#fd7043,#e53935)}
.img-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:3.5rem;pointer-events:none;transition:opacity .3s}
.img-wrap:hover .img-icon{opacity:.3}
.technique-tag{position:absolute;top:12px;left:12px;background:rgba(0,0,0,.7);color:#fff;font-size:.62rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;padding:5px 10px;border-radius:6px;backdrop-filter:blur(8px)}
@media (prefers-reduced-motion:reduce){.img-fake,.img-wrap::after{transition:none !important}}
```
### 06. Background Color Transition
**Type:** Pure CSS
**Description:** Eight background-color techniques: smooth swap, gradient shift, left-to-right sweep, top-to-bottom fill, radial burst, diagonal shimmer, colour cycle and pricing card.
**HTML:**
```html
Background Color Transitions
8 techniques for transitioning background colors on hover — all pure CSS
Core techniques
Smooth colour swap transition: background .4s
Gradient shift linear-gradient swap
Left-to-right sweep background-position slide
Top-to-bottom fill background-position vertical
Radial burst pseudo-element scale
Diagonal shimmer translateX sweep
Colour cycle animation on hover
Navigation — background colour hover
Home
Products
Pricing
About
Blog
Contact
Pricing cards — full card bg transition
Starter $9/mo
Perfect for individuals and small projects getting off the ground.
Pro $29/mo
For growing teams who need collaboration features and advanced analytics.
Enterprise $99/mo
Unlimited seats, SSO, audit logs and dedicated support for large orgs.
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Space Grotesk',sans-serif;background:#e8f4f8;min-height:100vh;padding:60px 24px}
.wrap{max-width:1100px;margin:0 auto}
h1{font-size:clamp(2rem,5vw,3.2rem);font-weight:700;text-align:center;margin-bottom:8px;color:#0f172a;letter-spacing:-.03em}
.sub{text-align:center;color:#64748b;margin-bottom:56px}
/* 1 — Smooth colour swap */
.bg-swap{background:#e0f2fe;color:#0369a1;padding:24px 32px;border-radius:12px;font-weight:600;font-size:1.05rem;cursor:default;transition:background .4s ease,color .4s ease;display:flex;align-items:center;justify-content:space-between}
.bg-swap:hover{background:#0369a1;color:#e0f2fe}
/* 2 — Gradient shift */
.bg-grad{background:linear-gradient(135deg,#fdf4ff,#f0e6ff);color:#7c3aed;padding:24px 32px;border-radius:12px;font-weight:600;font-size:1.05rem;cursor:default;transition:background .5s ease,color .4s ease}
.bg-grad:hover{background:linear-gradient(135deg,#7c3aed,#a855f7);color:#fdf4ff}
/* 3 — Left-to-right sweep via gradient background-position */
.bg-sweep{background:linear-gradient(to right,#0f172a 50%,#fef3c7 50%);background-size:200% 100%;background-position:right;color:#0f172a;padding:24px 32px;border-radius:12px;font-weight:600;font-size:1.05rem;cursor:default;transition:background-position .5s cubic-bezier(.7,0,.2,1),color .3s .2s}
.bg-sweep:hover{background-position:left;color:#fef3c7}
/* 4 — Radial burst from center */
.bg-radial{background:#fff;color:#059669;padding:24px 32px;border-radius:12px;font-weight:600;font-size:1.05rem;cursor:default;position:relative;overflow:hidden}
.bg-radial::before{content:'';position:absolute;inset:-50%;background:radial-gradient(circle,#059669,#047857);border-radius:50%;transform:scale(0);transition:transform .6s cubic-bezier(.22,1,.36,1);z-index:0}
.bg-radial:hover::before{transform:scale(3)}
.bg-radial span{position:relative;z-index:1;transition:color .2s .2s}
.bg-radial:hover span{color:#fff}
/* 5 — Top-to-bottom fill */
.bg-fill-v{background:#fff;color:#ea580c;padding:24px 32px;border-radius:12px;font-weight:600;font-size:1.05rem;cursor:default;background:linear-gradient(to bottom,#ea580c 50%,#fff5f1 50%);background-size:100% 200%;background-position:bottom;transition:background-position .4s cubic-bezier(.7,0,.2,1),color .3s .2s}
.bg-fill-v:hover{background-position:top;color:#fff}
/* 6 — Hue rotate animation on hover */
.bg-hue{background:linear-gradient(135deg,#f43f5e,#ec4899);color:#fff;padding:24px 32px;border-radius:12px;font-weight:600;font-size:1.05rem;cursor:default;transition:filter .2s}
.bg-hue:hover{animation:trn06-huecycle 1.5s linear infinite}
@keyframes trn06-huecycle{to{filter:hue-rotate(360deg)}}
/* 7 — Multi-step colour */
.bg-multi{background:#fff;color:#0f172a;padding:24px 32px;border-radius:12px;font-weight:600;font-size:1.05rem;cursor:default;transition:background 1.2s ease,color .3s}
.bg-multi:hover{background:#38bdf8;color:#0f172a;animation:trn06-steps 2.4s ease infinite}
@keyframes trn06-steps{0%{background:#38bdf8}25%{background:#a78bfa}50%{background:#34d399}75%{background:#fb923c}100%{background:#38bdf8}}
/* 8 — Diagonal sweep */
.bg-diag{background:#1e1b4b;color:#a5b4fc;padding:24px 32px;border-radius:12px;font-weight:600;font-size:1.05rem;cursor:default;position:relative;overflow:hidden}
.bg-diag::before{content:'';position:absolute;top:-100%;left:-100%;width:300%;height:300%;background:linear-gradient(135deg,transparent 40%,#a5b4fc 50%,transparent 60%);transition:transform .6s ease}
.bg-diag:hover::before{transform:translateX(100%)}
.bg-diag span{position:relative;z-index:1}
/* section labels */
.section{margin-bottom:48px}
.section-head{font-size:.72rem;font-weight:700;letter-spacing:.25em;text-transform:uppercase;color:#94a3b8;margin-bottom:16px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px}
@media(max-width:640px){.grid-2,.grid-3{grid-template-columns:1fr}}
.tag{font-size:.7rem;color:inherit;opacity:.6;letter-spacing:.08em}
/* Navigation row demo */
.nav-demo{background:#0f172a;border-radius:16px;padding:8px;display:flex;gap:4px;flex-wrap:wrap;margin-bottom:16px}
.nav-item{padding:10px 20px;border-radius:10px;font-weight:600;font-size:.9rem;color:#94a3b8;cursor:pointer;transition:background .3s,color .3s}
.nav-item:hover,.nav-item.active{background:#1e40af;color:#fff}
.nav-item.active{background:#2563eb}
/* Pricing cards */
.pricing-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media(max-width:640px){.pricing-grid{grid-template-columns:1fr}}
.price-card{padding:32px 24px;border-radius:16px;background:#fff;box-shadow:0 2px 12px rgba(0,0,0,.06);cursor:default;transition:background .4s,color .4s,box-shadow .4s;border:2px solid transparent}
.price-card:hover{background:#0f172a;color:#fff;box-shadow:0 12px 40px rgba(0,0,0,.3);border-color:#334155}
.price-card h3{font-size:1.1rem;font-weight:700;margin-bottom:8px;transition:color .4s}
.price-card:hover h3{color:#fff}
.price-card .price{font-size:2.4rem;font-weight:700;color:#2563eb;transition:color .4s}
.price-card:hover .price{color:#93c5fd}
.price-card p{font-size:.85rem;color:#64748b;transition:color .4s;margin-top:8px}
.price-card:hover p{color:#94a3b8}
@media (prefers-reduced-motion:reduce){*{transition:none !important;animation:none !important}}
```
### 07. Border Animation Transition
**Type:** Pure CSS
**Description:** Eight border effects: clockwise draw, glow pulse, rotating gradient border, corner expand, width pulse, dashed-to-solid, colour shift, double ring plus input focus states.
**HTML:**
```html
CSS Border Animations
8 border transition techniques — hover each card to trigger the effect
Card border effects
Draw Border The border draws itself clockwise from top-left using pseudo-elements with width/height transitions.
Glow Pulse Border fades from dim to bright with a multi-layer box-shadow for the neon bloom effect.
Gradient Border gradient-border via background-clip:border-box — animates through the colour wheel on hover.
Corner Expand Corner tick marks grow to trace the full perimeter — two pseudo-elements, staggered transitions.
Width Pulse Border-width grows from 1px to 3px instantly and color brightens for a sharp attention signal.
Dashed → Solid Dashed border snaps to solid and gains a soft inset glow on hover.
Colour Shift The simplest border transition — just a color change, but well-timed it feels polished.
Double Ring Outline expands outward from the border — outline-offset creates the gap ring effect.
Input field border focus states
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Outfit:wght@400;600;700;800&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Outfit',sans-serif;background:#08090e;color:#e8eaf6;min-height:100vh;padding:60px 24px}
.wrap{max-width:1100px;margin:0 auto}
h1{font-size:clamp(2rem,5vw,3.2rem);font-weight:800;text-align:center;margin-bottom:8px;letter-spacing:-.03em}
.sub{text-align:center;color:#6b7280;margin-bottom:56px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:28px;margin-bottom:48px}
.grid-sm{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:20px;margin-bottom:48px}
.sl{font-size:.68rem;font-weight:700;letter-spacing:.25em;text-transform:uppercase;color:#6b7280;margin-bottom:12px;display:block}
h2{font-size:1.3rem;font-weight:700;margin-bottom:20px}
/* shared card base */
.bcard{padding:28px 24px;border-radius:12px;cursor:default;position:relative}
.bcard h3{font-size:1rem;font-weight:700;margin-bottom:6px}
.bcard p{font-size:.82rem;color:#9ca3af;line-height:1.5}
/* 1 — Draw border with clip-path */
.b-draw{border:2px solid transparent;transition:border-color .4s}
.b-draw::before,.b-draw::after{content:'';position:absolute;transition:width .3s ease,height .3s ease;background:#818cf8}
.b-draw::before{top:0;left:0;width:0;height:2px}
.b-draw::after{bottom:0;right:0;width:0;height:2px}
.b-draw .side-l,.b-draw .side-r{position:absolute;background:#818cf8}
.b-draw .side-l{top:0;left:0;width:2px;height:0;transition:height .3s .3s ease}
.b-draw .side-r{bottom:0;right:0;width:2px;height:0;transition:height .3s .3s ease}
.b-draw:hover::before,.b-draw:hover::after{width:100%}
.b-draw:hover .side-l,.b-draw:hover .side-r{height:100%}
/* 2 — Glow border pulse */
.b-glow{border:2px solid rgba(52,211,153,.2);background:rgba(52,211,153,.04);transition:border-color .3s,box-shadow .3s}
.b-glow:hover{border-color:#34d399;box-shadow:0 0 0 4px rgba(52,211,153,.1),0 0 20px rgba(52,211,153,.2)}
/* 3 — Gradient rotating border */
.b-rotate{border:2px solid transparent;background:linear-gradient(#0d0e14,#0d0e14) padding-box,linear-gradient(135deg,#f97316,#ec4899) border-box}
.b-rotate:hover{background:linear-gradient(#0d0e14,#0d0e14) padding-box,linear-gradient(315deg,#f97316,#ec4899,#a78bfa,#f97316) border-box;animation:trn07-spin 2s linear infinite}
@keyframes trn07-spin{to{background:linear-gradient(#0d0e14,#0d0e14) padding-box,linear-gradient(315deg,#ec4899,#a78bfa,#f97316,#ec4899) border-box}}
/* 4 — Shrink corner markers */
.b-corner{border:none;background:#0d0e14}
.b-corner::before,.b-corner::after{content:'';position:absolute;width:24px;height:24px;transition:width .3s,height .3s}
.b-corner::before{top:0;left:0;border-top:2px solid #a78bfa;border-left:2px solid #a78bfa}
.b-corner::after{bottom:0;right:0;border-bottom:2px solid #a78bfa;border-right:2px solid #a78bfa}
.b-corner:hover::before,.b-corner:hover::after{width:calc(100% - 2px);height:calc(100% - 2px)}
/* 5 — Border width pulse */
.b-pulse{border:1px solid rgba(245,158,11,.3);transition:border-width .2s,border-color .2s,box-shadow .2s}
.b-pulse:hover{border-width:3px;border-color:#f59e0b;box-shadow:inset 0 0 20px rgba(245,158,11,.08)}
/* 6 — Dotted to solid */
.b-style{border:2px dashed rgba(20,184,166,.4);transition:border-style .01s,border-color .3s,box-shadow .3s}
.b-style:hover{border-style:solid;border-color:#14b8a6;box-shadow:0 0 0 6px rgba(20,184,166,.08)}
/* 7 — Colour shift wipe */
.b-wipe{border:2px solid #334155;transition:border-color .4s}
.b-wipe:hover{border-color:#f43f5e}
/* 8 — Double border expand */
.b-double{border:2px solid rgba(99,102,241,.3);outline:2px solid transparent;outline-offset:0;transition:outline-color .3s,outline-offset .3s,border-color .3s}
.b-double:hover{border-color:#6366f1;outline-color:rgba(99,102,241,.2);outline-offset:6px}
/* Input fields with border transitions */
.inputs{display:flex;flex-direction:column;gap:16px;margin-bottom:48px}
.input-group{display:flex;flex-direction:column;gap:6px}
.input-group label{font-size:.78rem;font-weight:600;letter-spacing:.08em;color:#9ca3af}
.inp{background:#0d0e14;color:#e8eaf6;font-family:'Outfit';font-size:.95rem;padding:14px 16px;border-radius:8px;outline:none;width:100%}
.inp-1{border:2px solid #1e2030;transition:border-color .3s,box-shadow .3s}
.inp-1:focus{border-color:#818cf8;box-shadow:0 0 0 4px rgba(129,140,248,.15)}
.inp-2{border:1px solid #1e2030;border-bottom:2px solid #334155;border-radius:8px 8px 0 0;transition:border-bottom-color .3s}
.inp-2:focus{border-bottom-color:#34d399}
.inp-3{border:2px solid transparent;background-color:#0d0e14;background-image:linear-gradient(#0d0e14,#0d0e14),linear-gradient(135deg,#1e2030,#1e2030);background-clip:padding-box,border-box;background-origin:border-box;transition:background-image .4s}
.inp-3:focus{background-image:linear-gradient(#0d0e14,#0d0e14),linear-gradient(135deg,#f97316,#ec4899)}
.inputs-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px}
@media(max-width:640px){.inputs-row{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){*{transition:none !important;animation:none !important}}
```
### 08. Fade In Fade Out Transition
**Type:** CSS + JS
**Description:** Aurora hero, card crossfade overlays, JS-driven fade tabs with four panels and staggered notification stack with opacity transitions.
**HTML:**
```html
Hover to crossfade
Card fade overlays
🌊
Hover me →
Ocean Drift Opacity fade from 0 to 1 on the overlay, simultaneous 1 to 0 on the base.
☀️
Hover me →
Desert Gold Crossfade with contrasting background — both panels use the same opacity transition.
🌌
Hover me →
Nebula Deep Delayed overlay fade (.5s vs .4s) gives the entrance a fraction of lag for depth.
🌿
Hover me →
Forest Canopy The emoji silhouette fades with the base layer — children inherit the parent opacity.
Tabs — fade between panels
Tab content fades
Features
Pricing
Roadmap
Changelog
Features Powerful tools built for modern workflows. Every interaction is smooth, deliberate and accessible.
Pricing Simple, transparent pricing with no hidden fees. Scale as you grow — pay only for what you use.
Roadmap Q3 2026: multi-region sync. Q4 2026: AI-assisted workflows. 2027: real-time collaboration mode.
Changelog v4.2 — Redesigned dashboard, 40% faster load times, new API endpoints for bulk operations.
Staggered fade-in
Notification stack
✅
Deploy succeeded
Production · 2 min ago
💬
New comment on issue #418
Yuki M. · 5 min ago
⚠️
High memory on worker-3
Infra alert · 12 min ago
🔴
API latency spike detected
Monitor · 18 min ago
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,300;0,700;1,300;1,700&family=IBM+Plex+Sans:wght@300;400;600&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'IBM Plex Sans',sans-serif;background:#fafaf8;color:#1c1c1e;overflow-x:hidden}
/* hero */
.hero{background:#1c1c1e;min-height:90vh;display:flex;align-items:center;justify-content:center;padding:60px 24px;position:relative;overflow:hidden}
.hero h1{font-family:'Fraunces';font-size:clamp(3rem,10vw,7.5rem);font-weight:700;color:#fff;text-align:center;line-height:.85;letter-spacing:-.04em;position:relative;z-index:1}
.hero h1 em{font-style:italic;color:#d4a853}
/* aurora bg */
.aurora{position:absolute;inset:0;z-index:0;opacity:.3}
.aurora span{position:absolute;border-radius:50%;filter:blur(80px);animation:trn08-drift 8s ease-in-out infinite}
.aurora span:nth-child(1){width:50vw;height:50vw;background:#7c3aed;top:-10%;left:-10%;animation-duration:9s}
.aurora span:nth-child(2){width:40vw;height:40vw;background:#0ea5e9;bottom:-10%;right:-10%;animation-duration:11s;animation-delay:-3s}
.aurora span:nth-child(3){width:30vw;height:30vw;background:#d4a853;top:50%;left:50%;animation-duration:7s;animation-delay:-5s}
@keyframes trn08-drift{0%,100%{transform:translate(0,0)}50%{transform:translate(4%,6%)}}
section{padding:80px 24px;max-width:1100px;margin:0 auto}
.sl{font-size:.7rem;font-weight:600;letter-spacing:.3em;text-transform:uppercase;color:#9ca3af;margin-bottom:12px;display:block}
.sh{font-family:'Fraunces';font-size:clamp(1.8rem,4vw,2.6rem);font-weight:700;margin-bottom:36px;letter-spacing:-.03em}
/* FADE OVERLAYS on cards */
.fade-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:24px;margin-bottom:56px}
.fade-card{position:relative;height:260px;border-radius:20px;overflow:hidden;cursor:default;background:var(--bg)}
.fade-card .base{position:absolute;inset:0;display:flex;align-items:flex-end;padding:24px;transition:opacity .4s}
.fade-card .over{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;text-align:center;opacity:0;transition:opacity .5s}
.fade-card:hover .base{opacity:0}
.fade-card:hover .over{opacity:1}
.fc1{--bg:linear-gradient(145deg,#1e3a5f,#0c1a2e)}
.fc1 .base h3{color:#fff;font-size:1.1rem;font-weight:600}
.fc1 .over{background:rgba(14,165,233,.95)}
.fc1 .over h3{color:#fff;font-family:'Fraunces';font-size:1.5rem;margin-bottom:8px}
.fc1 .over p{color:rgba(255,255,255,.8);font-size:.85rem;line-height:1.5}
.fc2{--bg:linear-gradient(145deg,#3b1a08,#1c0d04)}
.fc2 .base h3{color:#d4a853;font-size:1.1rem;font-weight:600}
.fc2 .over{background:rgba(212,168,83,.95)}
.fc2 .over h3{color:#1c0d04;font-family:'Fraunces';font-size:1.5rem;margin-bottom:8px}
.fc2 .over p{color:rgba(28,13,4,.75);font-size:.85rem;line-height:1.5}
.fc3{--bg:linear-gradient(145deg,#1a1a2e,#0f0e17)}
.fc3 .base h3{color:#a78bfa;font-size:1.1rem;font-weight:600}
.fc3 .over{background:rgba(124,58,237,.95)}
.fc3 .over h3{color:#fff;font-family:'Fraunces';font-size:1.5rem;margin-bottom:8px}
.fc3 .over p{color:rgba(255,255,255,.8);font-size:.85rem;line-height:1.5}
.fc4{--bg:linear-gradient(145deg,#0a2a1f,#04140e)}
.fc4 .base h3{color:#34d399;font-size:1.1rem;font-weight:600}
.fc4 .over{background:rgba(5,150,105,.95)}
.fc4 .over h3{color:#fff;font-family:'Fraunces';font-size:1.5rem;margin-bottom:8px}
.fc4 .over p{color:rgba(255,255,255,.8);font-size:.85rem;line-height:1.5}
/* base decoration */
.fade-card .base-emoji{font-size:3rem;position:absolute;top:24px;right:24px;opacity:.3}
/* FADE tabs */
.tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px}
.tab{padding:10px 20px;border-radius:8px;font-size:.9rem;font-weight:600;cursor:pointer;border:2px solid #e5e7eb;color:#6b7280;transition:all .3s}
.tab.active,.tab:hover{background:#1c1c1e;color:#fff;border-color:#1c1c1e}
.tab-panels{position:relative;height:200px;background:#fff;border-radius:16px;border:2px solid #e5e7eb;overflow:hidden;box-shadow:0 4px 20px rgba(0,0,0,.05)}
.tab-panel{position:absolute;inset:0;padding:32px;opacity:0;transition:opacity .4s ease;pointer-events:none}
.tab-panel.active{opacity:1;pointer-events:auto}
.tab-panel h3{font-family:'Fraunces';font-size:1.4rem;margin-bottom:8px}
.tab-panel p{color:#6b7280;font-size:.9rem;line-height:1.6}
.tp1{background:linear-gradient(135deg,#eff6ff,#dbeafe)}
.tp2{background:linear-gradient(135deg,#fdf4ff,#f3e8ff)}
.tp3{background:linear-gradient(135deg,#f0fdf4,#dcfce7)}
.tp4{background:linear-gradient(135deg,#fff7ed,#fed7aa)}
/* Notification fade stack */
.notif-demo{max-width:380px;display:flex;flex-direction:column;gap:12px}
.notif{display:flex;align-items:center;gap:14px;background:#fff;border-radius:14px;padding:16px;box-shadow:0 4px 20px rgba(0,0,0,.08);border-left:4px solid var(--c);animation:trn08-fadein .5s cubic-bezier(.22,1,.36,1) both}
.notif:nth-child(1){animation-delay:.1s;--c:#3b82f6}
.notif:nth-child(2){animation-delay:.3s;--c:#10b981}
.notif:nth-child(3){animation-delay:.5s;--c:#f59e0b}
.notif:nth-child(4){animation-delay:.7s;--c:#ef4444}
@keyframes trn08-fadein{from{opacity:0;transform:translateX(30px)}}
.notif .ni{font-size:1.4rem}
.notif .nt{font-size:.88rem;font-weight:600;color:#1c1c1e}
.notif .nd{font-size:.75rem;color:#9ca3af;margin-top:2px}
@media (prefers-reduced-motion:reduce){.aurora span,.notif,.fade-card .base,.fade-card .over{animation:none !important;transition:none !important;opacity:1 !important}}
```
**JS:**
```js
document.getElementById('tabs').addEventListener('click',e=>{
const tab = e.target.closest('[data-tab]'); if(!tab) return;
document.querySelectorAll('.tab').forEach(t=>t.classList.remove('active'));
document.querySelectorAll('.tab-panel').forEach(p=>p.classList.remove('active'));
tab.classList.add('active');
document.querySelectorAll('.tab-panel')[+tab.dataset.tab].classList.add('active');
});
```
### 09. Navigation Hover Transition
**Type:** Pure CSS
**Description:** Five navigation styles: sliding pill, underline slide, diagonal wipe, translateX sidebar and mega dropdown reveal with smooth transitions.
**HTML:**
```html
Navigation Hover Transitions
5 polished CSS navigation styles — hover the links in each navbar
Style 01 — Sliding pill (light)
◈ Studio
Home
Work
About
Journal
Contact
Get started
Style 02 — Underline slide (dark)
◈ Nexus
Dashboard
Analytics
Campaigns
Audience
Settings
Style 03 — Diagonal wipe
◈ BOLD
Work
Studio
Awards
Journal
Contact
Hire us
Style 04 — Vertical sidebar with slide
Style 05 — Mega dropdown reveal
◈ Orbit
Products ▾
📊
Analytics Suite
Real-time dashboards and reports
🤖
AI Automation
Intelligent workflow automation
🔗
Integrations
Connect 200+ tools seamlessly
Solutions ▾
🏢
Enterprise
SSO, audit logs, 99.9% SLA
🚀
Startups
Ship faster, scale smarter
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Plus Jakarta Sans',sans-serif;background:#f1f5f9;color:#0f172a;min-height:100vh;padding:0}
/* page intro */
.intro{padding:60px 24px 40px;text-align:center;max-width:800px;margin:0 auto}
.intro h1{font-size:clamp(2rem,5vw,3rem);font-weight:800;margin-bottom:8px;letter-spacing:-.03em}
.intro p{color:#64748b;font-size:.95rem}
/* nav containers */
.nav-showcase{display:flex;flex-direction:column;gap:0}
.ns-label{font-size:.65rem;font-weight:700;letter-spacing:.3em;text-transform:uppercase;color:#94a3b8;padding:24px 40px 10px;background:#f1f5f9}
/* ──────────────────────── */
/* NAV 1 — Sliding pill indicator (like Apple) */
.nav1{background:#fff;padding:12px 32px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 1px 0 #e2e8f0;position:sticky;top:0;z-index:10}
.nav1-logo{font-weight:800;font-size:1.1rem;letter-spacing:-.02em}
.nav1-links{display:flex;gap:4px;background:#f8fafc;border-radius:30px;padding:4px}
.nav1-link{padding:8px 18px;border-radius:26px;font-size:.88rem;font-weight:500;color:#64748b;cursor:pointer;transition:background .25s,color .25s,box-shadow .25s;white-space:nowrap}
.nav1-link:hover,.nav1-link.active{background:#0f172a;color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.nav1-link.active{color:#fff}
.nav1-cta{background:#3b82f6;color:#fff;border-radius:20px;padding:9px 20px;font-size:.88rem;font-weight:600;cursor:pointer;border:none;font-family:inherit;transition:background .2s,transform .1s}
.nav1-cta:hover{background:#2563eb;transform:translateY(-1px)}
/* ──────────────────────── */
/* NAV 2 — Underline slide (bold agency style) */
.nav2{background:#0f172a;padding:0 40px;display:flex;align-items:center;gap:0}
.nav2-logo{font-weight:800;font-size:1.1rem;color:#fff;margin-right:auto;padding:20px 0}
.nav2-link{display:flex;align-items:center;padding:20px 20px;font-size:.9rem;font-weight:600;color:rgba(255,255,255,.5);cursor:pointer;position:relative;transition:color .3s}
.nav2-link::after{content:'';position:absolute;bottom:0;left:20px;right:20px;height:3px;background:#38bdf8;transform:scaleX(0);transform-origin:center;transition:transform .3s cubic-bezier(.7,0,.2,1)}
.nav2-link:hover{color:#fff}
.nav2-link:hover::after{transform:scaleX(1)}
.nav2-link.active{color:#fff}
.nav2-link.active::after{transform:scaleX(1)}
/* ──────────────────────── */
/* NAV 3 — Diagonal wipe (retro bold) */
.nav3{background:#18181b;padding:0 40px;display:flex;align-items:center;gap:0;overflow:hidden}
.nav3-logo{font-weight:800;font-size:1.1rem;color:#fff;margin-right:40px;padding:18px 0;letter-spacing:-.02em}
.nav3-links{display:flex;gap:0}
.nav3-link{padding:18px 22px;font-size:.9rem;font-weight:600;color:#71717a;cursor:pointer;position:relative;overflow:hidden;transition:color .3s}
.nav3-link::before{content:'';position:absolute;inset:-4px;background:#fbbf24;transform:skewX(-12deg) scaleX(0);transform-origin:right;transition:transform .35s cubic-bezier(.7,0,.2,1)}
.nav3-link:hover{color:#18181b}
.nav3-link:hover::before{transform:skewX(-12deg) scaleX(1.3);transform-origin:left}
.nav3-link span{position:relative;z-index:1}
.nav3-cta{margin-left:auto;padding:10px 22px;background:#fff;color:#18181b;font-size:.88rem;font-weight:700;border:none;font-family:inherit;cursor:pointer;transition:background .2s}
.nav3-cta:hover{background:#fbbf24}
/* ──────────────────────── */
/* NAV 4 — Vertical sidebar nav */
.layout4{display:grid;grid-template-columns:240px 1fr;min-height:300px}
.sidebar{background:#faf5ff;border-right:1px solid #e9d5ff;padding:24px 16px;display:flex;flex-direction:column;gap:4px}
.sidebar-head{font-size:.7rem;font-weight:700;letter-spacing:.2em;text-transform:uppercase;color:#a78bfa;padding:8px 12px;margin-bottom:8px}
.sidebar-link{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:10px;font-size:.9rem;font-weight:500;color:#6b21a8;cursor:pointer;transition:background .2s,color .2s,transform .15s}
.sidebar-link:hover{background:#ede9fe;transform:translateX(4px)}
.sidebar-link.active{background:#7c3aed;color:#fff}
.sidebar-link .icon{font-size:1rem;width:20px;text-align:center}
.sidebar-content{padding:32px;display:flex;align-items:center;justify-content:center;background:#fff}
.sidebar-content p{color:#94a3b8;font-size:.9rem;text-align:center}
/* ──────────────────────── */
/* NAV 5 — Mega hover dropdown */
.nav5{background:#fff;padding:0 40px;display:flex;align-items:center;border-bottom:1px solid #e2e8f0;position:relative;z-index:20}
.nav5-logo{font-weight:800;font-size:1.1rem;margin-right:40px;padding:18px 0;letter-spacing:-.02em}
.nav5-item{position:relative;padding:18px 0;margin-right:8px}
.nav5-link{display:flex;align-items:center;gap:5px;padding:6px 14px;border-radius:6px;font-size:.88rem;font-weight:500;color:#475569;cursor:pointer;transition:background .2s,color .2s}
.nav5-link:hover,.nav5-item:hover .nav5-link{background:#f1f5f9;color:#0f172a}
.nav5-link .arr{font-size:.65rem;transition:transform .2s;display:inline-block}
.nav5-item:hover .nav5-link .arr{transform:rotate(180deg)}
.nav5-drop{position:absolute;top:calc(100% - 8px);left:0;min-width:280px;background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px;box-shadow:0 20px 40px rgba(0,0,0,.1);opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;transform:translateY(-8px)}
.nav5-item:hover .nav5-drop{opacity:1;pointer-events:auto;transform:translateY(0)}
.drop-item{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:8px;cursor:pointer;transition:background .15s}
.drop-item:hover{background:#f8fafc}
.drop-icon{width:36px;height:36px;border-radius:8px;background:var(--c,#eff6ff);display:grid;place-items:center;font-size:1rem;flex:0 0 auto}
.drop-title{font-size:.88rem;font-weight:600;color:#0f172a}
.drop-desc{font-size:.75rem;color:#64748b;margin-top:1px}
@media(max-width:700px){.layout4{grid-template-columns:1fr}.nav5-drop{left:-20px;right:0;min-width:260px}}
@media(max-width:540px){.nav2,.nav3{padding:0 16px}.nav2-link,.nav3-link{padding:16px 12px;font-size:.8rem}}
@media (prefers-reduced-motion:reduce){*{transition:none !important}}
```
### 10. Loading Skeleton Transition
**Type:** CSS + JS
**Description:** Shimmer, wave and pulse skeleton variants with toggle to reveal loaded content across card grid and data table layouts.
**HTML:**
```html
CSS Loading Skeleton
Shimmer, wave and pulse skeleton screens — pure CSS, no JS for the animations
Mode:
Showing skeleton → click to load
Card skeletons — shimmer variant
🚀
M
Marcus Reid
Frontend Engineer
CSS React
🔥
A
Amara Cole
Product Designer
Figma Motion
Table skeleton — wave variant
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Nunito',sans-serif;background:#0f0f1a;color:#e2e8f0;min-height:100vh;padding:60px 24px}
.wrap{max-width:1100px;margin:0 auto}
h1{font-size:clamp(2rem,5vw,3rem);font-weight:800;text-align:center;margin-bottom:8px;letter-spacing:-.03em}
.sub{text-align:center;color:#6b7280;margin-bottom:56px}
.sl{font-size:.68rem;font-weight:700;letter-spacing:.25em;text-transform:uppercase;color:#6b7280;margin-bottom:16px;display:block}
h2{font-size:1.3rem;font-weight:700;margin-bottom:24px}
/* THE SKELETON CORE */
.skel{background:linear-gradient(90deg,#1e1e2e 25%,#2a2a40 50%,#1e1e2e 75%);background-size:200% 100%;animation:trn10-shimmer 1.4s infinite}
@keyframes trn10-shimmer{to{background-position:-200% 0}}
.skel-r{border-radius:4px}
.skel-round{border-radius:50%}
/* variant 2 — wave on dark */
.skel-wave{background:linear-gradient(90deg,#1a1a2e 25%,#252540 50%,#1a1a2e 75%);background-size:400% 100%;animation:trn10-wave 1.8s ease-in-out infinite}
@keyframes trn10-wave{0%{background-position:100% 0}100%{background-position:-100% 0}}
/* variant 3 — pulse */
.skel-pulse{animation:trn10-pulse 1.5s ease-in-out infinite}
@keyframes trn10-pulse{0%,100%{opacity:.4}50%{opacity:.9}}
/* grid */
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-bottom:48px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-bottom:48px}
@media(max-width:800px){.grid-3{grid-template-columns:1fr 1fr}}
@media(max-width:540px){.grid-3,.grid-2{grid-template-columns:1fr}}
/* SKELETON CARD */
.skel-card{background:#13132a;border-radius:16px;padding:20px;display:flex;flex-direction:column;gap:12px;border:1px solid rgba(255,255,255,.04)}
.skel-img{height:180px;border-radius:10px}
.skel-avatar{width:44px;height:44px;flex:0 0 44px}
.skel-row{display:flex;align-items:center;gap:12px}
.skel-lines{flex:1;display:flex;flex-direction:column;gap:8px}
.skel-h1{height:14px}
.skel-h2{height:12px;width:70%}
.skel-h3{height:12px;width:50%}
.skel-tag{height:24px;width:80px;border-radius:20px}
.skel-tags{display:flex;gap:8px}
.skel-btn{height:38px;border-radius:8px;width:120px}
/* ARTICLE skeleton */
.skel-article{background:#13132a;border-radius:16px;padding:28px;border:1px solid rgba(255,255,255,.04)}
.skel-title{height:28px;margin-bottom:8px}
.skel-title2{height:28px;width:70%;margin-bottom:24px}
.skel-para{height:12px;margin-bottom:8px}
.skel-para-short{height:12px;width:75%}
/* PROFILE skeleton */
.skel-profile{background:#13132a;border-radius:16px;padding:28px;display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;border:1px solid rgba(255,255,255,.04)}
.skel-avatar-lg{width:80px;height:80px;flex:0 0 80px;border-radius:50%}
.skel-name{height:18px;width:140px}
.skel-sub{height:12px;width:100px}
.skel-stat-row{display:flex;gap:24px;margin-top:8px}
.skel-stat{display:flex;flex-direction:column;align-items:center;gap:8px}
.skel-stat-n{height:22px;width:44px}
.skel-stat-l{height:10px;width:44px}
.skel-follow{height:40px;width:140px;border-radius:20px}
/* DATA TABLE skeleton */
.skel-table{background:#13132a;border-radius:16px;overflow:hidden;border:1px solid rgba(255,255,255,.04)}
.skel-thead{display:grid;grid-template-columns:44px 1.5fr 1fr 1fr 1fr 80px;gap:16px;padding:14px 20px;background:#1e1e2e;align-items:center}
.skel-tbody-row{display:grid;grid-template-columns:44px 1.5fr 1fr 1fr 1fr 80px;gap:16px;padding:14px 20px;align-items:center;border-top:1px solid rgba(255,255,255,.04)}
.skel-cell{height:12px;border-radius:4px}
.skel-cell-sm{height:12px;width:70%;border-radius:4px}
.skel-avatar-sm{width:32px;height:32px;border-radius:50%}
@media(max-width:600px){.skel-thead,.skel-tbody-row{grid-template-columns:44px 1fr 1fr}}
/* the toggle to see loaded state */
.toggle-wrap{display:flex;align-items:center;justify-content:center;gap:16px;margin-bottom:48px}
.toggle-label{font-size:.88rem;font-weight:600;color:#6b7280}
.toggle-btn{padding:10px 24px;border-radius:20px;border:none;font-family:'Nunito';font-weight:700;font-size:.88rem;cursor:pointer;transition:all .2s}
.toggle-btn.skeleton-mode{background:#7c3aed;color:#fff}
.toggle-btn.loaded-mode{background:#10b981;color:#fff}
/* loaded state cards (hidden by default) */
.loaded-card{background:#13132a;border-radius:16px;padding:20px;display:flex;flex-direction:column;gap:12px;border:1px solid rgba(255,255,255,.04);opacity:0;transition:opacity .4s}
.loaded-card.visible{opacity:1}
.lc-img{height:180px;border-radius:10px;background:var(--bg);display:grid;place-items:center;font-size:3rem}
.lc-row{display:flex;align-items:center;gap:12px}
.lc-avatar{width:44px;height:44px;border-radius:50%;background:var(--av);display:grid;place-items:center;font-size:1.2rem;flex:0 0 44px}
.lc-name{font-weight:700;font-size:.9rem}
.lc-role{font-size:.75rem;color:#9ca3af}
.lc-tags{display:flex;gap:8px;flex-wrap:wrap}
.lc-tag{font-size:.7rem;font-weight:700;padding:4px 10px;border-radius:16px;background:var(--tc);color:#fff}
.lc-title{font-weight:700;font-size:1rem;color:#f1f5f9}
.lc-desc{font-size:.82rem;color:#94a3b8;line-height:1.5}
.lc-btn{align-self:flex-start;padding:9px 20px;border-radius:8px;background:#7c3aed;color:#fff;font-family:'Nunito';font-weight:700;font-size:.82rem;border:none;cursor:pointer}
.state-panel{position:relative}
.state-panel .skeleton-state,.state-panel .loaded-state{position:absolute;inset:0;transition:opacity .4s}
.state-panel .skeleton-state{opacity:1}
.state-panel .loaded-state{opacity:0}
.state-panel.is-loaded .skeleton-state{opacity:0}
.state-panel.is-loaded .loaded-state{opacity:1}
.state-panel{min-height:280px}
@media (prefers-reduced-motion:reduce){.skel,.skel-wave,.skel-pulse{animation:none !important}}
```
**JS:**
```js
function toggleLoaded(){
const panels = document.querySelectorAll('.state-panel');
const btn = document.getElementById('toggleBtn');
const isLoaded = panels[0].classList.contains('is-loaded');
panels.forEach(p => p.classList.toggle('is-loaded', !isLoaded));
if(!isLoaded){
btn.className='toggle-btn loaded-mode';
btn.textContent='Showing loaded → click to show skeleton';
} else {
btn.className='toggle-btn skeleton-mode';
btn.textContent='Showing skeleton → click to load';
}
}
```
### 11. Modal Open Close Transition
**Type:** CSS + JS
**Description:** Six modal entrance animations: scale-in, slide-up, flip-in, bounce overshoot, slide-right and unfold, with backdrop-filter blur overlay.
**HTML:**
```html
Modal Transitions
6 CSS transition effects for opening and closing modals — click each to preview
Click any button below to open its modal variant
Open a modal
6 entrance animations
⬆ Scale in
⬆ Slide up
↻ Flip in
🎯 Bounce
→ Slide right
⬇ Unfold
✕
Scale entrance
✅
Deployment complete
Your application has been deployed to production successfully. All 4 health checks passed with zero downtime.
View deployment
Dismiss
✕
Slide up entrance
🚀
Start your free trial
Get full access to all Pro features for 14 days. No credit card required. Cancel any time.
Start free trial
Maybe later
✕
Flip entrance
ℹ️
Update available
Version 4.2.0 is ready to install. This update includes performance improvements and 3 bug fixes.
Install now
Remind later
✕
Bounce entrance
🎉
Congratulations!
You've unlocked the Pro tier. All premium features are now active on your account.
Explore features
Close
✕
Slide right entrance
⚠️
Delete this workspace?
This action cannot be undone. All projects, data and team members will be permanently removed.
Delete permanently
Cancel
✕
Unfold entrance
⚡
Usage limit approaching
You've used 89% of your monthly API quota. Upgrade to Pro to avoid service interruption.
Upgrade plan
Dismiss
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Epilogue:wght@400;600;700;800&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Epilogue',sans-serif;background:#ecfdf5;color:#0f172a;min-height:100vh;padding:60px 24px}
.wrap{max-width:1000px;margin:0 auto}
h1{font-size:clamp(2rem,5vw,3rem);font-weight:800;text-align:center;margin-bottom:8px;letter-spacing:-.03em;color:#0f172a}
.sub{text-align:center;color:#64748b;margin-bottom:56px}
.sl{font-size:.68rem;font-weight:700;letter-spacing:.25em;text-transform:uppercase;color:#10b981;margin-bottom:12px;display:block}
h2{font-size:1.15rem;font-weight:700;margin-bottom:20px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin-bottom:48px}
.trig-btn{padding:14px 24px;border-radius:10px;font-family:'Epilogue';font-weight:700;font-size:.9rem;cursor:pointer;border:none;background:var(--c,#059669);color:#fff;transition:transform .1s,filter .2s;display:flex;align-items:center;justify-content:center;gap:8px}
.trig-btn:hover{filter:brightness(1.1)}
.trig-btn:active{transform:scale(.97)}
/* OVERLAY */
.overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);backdrop-filter:blur(4px);z-index:100;display:flex;align-items:center;justify-content:center;padding:20px;
opacity:0;pointer-events:none;transition:opacity .3s}
.overlay.open{opacity:1;pointer-events:auto}
/* MODAL BASE */
.modal{background:#fff;border-radius:20px;padding:36px;width:100%;max-width:480px;position:relative;
box-shadow:0 24px 80px rgba(0,0,0,.25)}
/* Modal close btn */
.mclose{position:absolute;top:16px;right:16px;width:32px;height:32px;border-radius:50%;background:#f1f5f9;border:none;font-size:1rem;cursor:pointer;display:grid;place-items:center;color:#64748b;transition:background .2s}
.mclose:hover{background:#e2e8f0;color:#0f172a}
/* M1 — Scale in */
.m-scale{transform:scale(.85);transition:transform .35s cubic-bezier(.34,1.56,.64,1),opacity .25s}
.overlay.open .m-scale{transform:scale(1)}
.overlay:not(.open) .m-scale{transform:scale(.85)}
/* M2 — Slide up */
.m-slideup{transform:translateY(60px);opacity:0;transition:transform .4s cubic-bezier(.22,1,.36,1),opacity .3s}
.overlay.open .m-slideup{transform:translateY(0);opacity:1}
/* M3 — Flip in */
.m-flip{transform:perspective(800px) rotateX(-20deg);opacity:0;transform-origin:top;transition:transform .4s cubic-bezier(.22,1,.36,1),opacity .3s}
.overlay.open .m-flip{transform:perspective(800px) rotateX(0);opacity:1}
/* M4 — Bounce */
.m-bounce{transform:scale(.3);opacity:0;transition:transform .5s cubic-bezier(.34,1.8,.64,1),opacity .2s}
.overlay.open .m-bounce{transform:scale(1);opacity:1}
/* M5 — Slide from right */
.m-right{transform:translateX(80px);opacity:0;transition:transform .4s cubic-bezier(.22,1,.36,1),opacity .3s}
.overlay.open .m-right{transform:translateX(0);opacity:1}
/* M6 — Unfold (height expand) */
.m-unfold{max-height:0;overflow:hidden;opacity:0;transition:max-height .5s cubic-bezier(.22,1,.36,1),opacity .4s .1s;padding:0 36px}
.overlay.open .m-unfold{max-height:500px;opacity:1;padding:36px}
/* modal content shared */
.modal h3{font-size:1.25rem;font-weight:700;margin-bottom:8px}
.modal p{font-size:.9rem;color:#64748b;line-height:1.6;margin-bottom:20px}
.modal-actions{display:flex;gap:10px}
.m-primary{flex:1;padding:12px;border-radius:8px;background:#059669;color:#fff;font-family:'Epilogue';font-weight:700;font-size:.9rem;border:none;cursor:pointer;transition:background .2s}
.m-primary:hover{background:#047857}
.m-secondary{flex:1;padding:12px;border-radius:8px;background:#f1f5f9;color:#0f172a;font-family:'Epilogue';font-weight:700;font-size:.9rem;border:none;cursor:pointer;transition:background .2s}
.m-secondary:hover{background:#e2e8f0}
.modal-type{font-size:.68rem;font-weight:700;letter-spacing:.2em;text-transform:uppercase;color:#10b981;margin-bottom:12px}
.modal-icon{font-size:2.5rem;margin-bottom:12px;display:block}
/* variant colours */
.var-warn h3{color:#d97706}
.var-warn .m-primary{background:#d97706}
.var-warn .m-primary:hover{background:#b45309}
.var-warn .modal-type{color:#d97706}
.var-err h3{color:#dc2626}
.var-err .m-primary{background:#dc2626}
.var-err .m-primary:hover{background:#b91c1c}
.var-err .modal-type{color:#dc2626}
.var-info h3{color:#2563eb}
.var-info .m-primary{background:#2563eb}
.var-info .m-primary:hover{background:#1d4ed8}
.var-info .modal-type{color:#2563eb}
/* current info badge */
.anim-info{background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;padding:12px 16px;font-size:.8rem;color:#166534;margin-bottom:40px}
@media (prefers-reduced-motion:reduce){.modal,.overlay{transition:none !important;transform:none !important}}
```
**JS:**
```js
function openModal(id){
document.getElementById(id).classList.add('open');
document.getElementById('animInfo').textContent='Transition: ' + {m1:'scale(.85) → scale(1)',m2:'translateY(60px) → translateY(0)',m3:'perspective rotateX(-20deg) → rotateX(0)',m4:'scale(.3) → scale(1) with overshoot',m5:'translateX(80px) → translateX(0)',m6:'max-height 0 → 500px'}[id];
}
function closeModal(id){ document.getElementById(id).classList.remove('open'); }
document.addEventListener('keydown', e=>{ if(e.key==='Escape') document.querySelectorAll('.overlay.open').forEach(m=>m.classList.remove('open')); });
```
### 12. Page Transition Effect
**Type:** CSS + JS
**Description:** Four pages with four transition types each: horizontal wipe, curtain, circle burst and vertical-slices stagger — with type selector and dot nav.
**HTML:**
```html
Wipe
Curtain
Circle
Slices
01 / 04
Page Transitions
CSS-powered page transition effects. Choose a style above, then click Next to see it play.
Next page →
02 / 04
Smooth Moves
Four transition types: horizontal wipe, curtain open, radial circle burst, and vertical slices.
Next page →
03 / 04
Full Coverage
Each effect uses pure CSS animations on a fixed overlay that covers the viewport during the swap.
Next page →
04 / 04
Cycle Back
Click below to loop back to the start, or select a different transition type above.
Back to start →
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;600;700;800&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Lexend',sans-serif;background:#0d0d14;color:#f1f5f9;min-height:100vh;overflow:hidden}
/* page wrapper */
.page-app{width:100%;height:100vh;position:relative}
/* pages */
.page{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 24px;text-align:center;opacity:0;pointer-events:none;transition:opacity .01s 1s}
.page.active{opacity:1;pointer-events:auto;transition:opacity .01s}
.page h2{font-size:clamp(2.5rem,8vw,5rem);font-weight:800;margin-bottom:16px;letter-spacing:-.04em}
.page p{font-size:1rem;max-width:50ch;opacity:.6;line-height:1.6;margin-bottom:40px}
.page-num{font-size:.7rem;letter-spacing:.3em;text-transform:uppercase;opacity:.4;margin-bottom:16px}
.next-btn{padding:14px 36px;border-radius:30px;border:2px solid rgba(255,255,255,.2);background:transparent;color:#fff;font-family:'Lexend';font-weight:600;font-size:.9rem;cursor:pointer;transition:background .2s,border-color .2s}
.next-btn:hover{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.4)}
/* page backgrounds */
.pg1{background:linear-gradient(135deg,#0f0c29,#302b63,#24243e)}
.pg2{background:linear-gradient(135deg,#0a2e1a,#116545,#0d4a32)}
.pg3{background:linear-gradient(135deg,#2d0518,#7b0d2b,#4a0a1e)}
.pg4{background:linear-gradient(135deg,#0d1a3a,#1a3a6b,#0a2550)}
/* TRANSITION OVERLAY */
.t-overlay{position:fixed;inset:0;z-index:200;pointer-events:none}
/* Wipe variants */
.t-wipe{background:var(--c,#a78bfa)}
/* Curtain pair */
.t-curtain-l,.t-curtain-r{position:absolute;top:0;bottom:0;width:51%;background:var(--c,#f97316)}
.t-curtain-l{left:0}
.t-curtain-r{right:0}
/* Circle burst */
.t-circle{position:absolute;top:50%;left:50%;border-radius:50%;background:var(--c,#10b981);transform:translate(-50%,-50%) scale(0)}
/* Vertical slices */
.t-slices{display:flex;position:absolute;inset:0}
.t-slice{flex:1;background:var(--c,#38bdf8)}
/* ANIMATIONS triggered by .animating class */
/* 1 — horizontal wipe */
.anim-wipe.enter .t-wipe{animation:trn12-wipeEnter .5s cubic-bezier(.7,0,.2,1) forwards}
.anim-wipe.exit .t-wipe{animation:trn12-wipeExit .5s .4s cubic-bezier(.7,0,.2,1) forwards}
@keyframes trn12-wipeEnter{from{transform:translateX(-100%)}to{transform:translateX(0)}}
@keyframes trn12-wipeExit{from{transform:translateX(0)}to{transform:translateX(100%)}}
/* 2 — curtain */
.anim-curtain.enter .t-curtain-l{animation:trn12-curtLEnter .45s cubic-bezier(.7,0,.2,1) forwards}
.anim-curtain.enter .t-curtain-r{animation:trn12-curtREnter .45s .05s cubic-bezier(.7,0,.2,1) forwards}
.anim-curtain.exit .t-curtain-l{animation:trn12-curtLExit .45s .4s cubic-bezier(.7,0,.2,1) forwards}
.anim-curtain.exit .t-curtain-r{animation:trn12-curtRExit .45s .45s cubic-bezier(.7,0,.2,1) forwards}
@keyframes trn12-curtLEnter{from{transform:translateX(-100%)}to{transform:translateX(0)}}
@keyframes trn12-curtREnter{from{transform:translateX(100%)}to{transform:translateX(0)}}
@keyframes trn12-curtLExit{from{transform:translateX(0)}to{transform:translateX(-100%)}}
@keyframes trn12-curtRExit{from{transform:translateX(0)}to{transform:translateX(100%)}}
/* 3 — circle */
.anim-circle.enter .t-circle{animation:trn12-circleIn .5s cubic-bezier(.22,1,.36,1) forwards}
.anim-circle.exit .t-circle{animation:trn12-circleOut .5s .4s cubic-bezier(.7,0,.2,1) forwards;transform:translate(-50%,-50%) scale(3)}
@keyframes trn12-circleIn{from{transform:translate(-50%,-50%) scale(0)}to{transform:translate(-50%,-50%) scale(3)}}
@keyframes trn12-circleOut{from{transform:translate(-50%,-50%) scale(3)}to{transform:translate(-50%,-50%) scale(0)}}
/* 4 — slices stagger */
.anim-slices.enter .t-slice:nth-child(1){animation:trn12-sliceIn .4s cubic-bezier(.7,0,.2,1) forwards}
.anim-slices.enter .t-slice:nth-child(2){animation:trn12-sliceIn .4s .05s cubic-bezier(.7,0,.2,1) forwards}
.anim-slices.enter .t-slice:nth-child(3){animation:trn12-sliceIn .4s .1s cubic-bezier(.7,0,.2,1) forwards}
.anim-slices.enter .t-slice:nth-child(4){animation:trn12-sliceIn .4s .15s cubic-bezier(.7,0,.2,1) forwards}
.anim-slices.enter .t-slice:nth-child(5){animation:trn12-sliceIn .4s .2s cubic-bezier(.7,0,.2,1) forwards}
.anim-slices.exit .t-slice:nth-child(1){animation:trn12-sliceOut .4s .4s cubic-bezier(.7,0,.2,1) forwards}
.anim-slices.exit .t-slice:nth-child(2){animation:trn12-sliceOut .4s .45s cubic-bezier(.7,0,.2,1) forwards}
.anim-slices.exit .t-slice:nth-child(3){animation:trn12-sliceOut .4s .5s cubic-bezier(.7,0,.2,1) forwards}
.anim-slices.exit .t-slice:nth-child(4){animation:trn12-sliceOut .4s .55s cubic-bezier(.7,0,.2,1) forwards}
.anim-slices.exit .t-slice:nth-child(5){animation:trn12-sliceOut .4s .6s cubic-bezier(.7,0,.2,1) forwards}
@keyframes trn12-sliceIn{from{transform:scaleY(0);transform-origin:top}to{transform:scaleY(1)}}
@keyframes trn12-sliceOut{from{transform:scaleY(1);transform-origin:bottom}to{transform:scaleY(0)}}
/* transition type selector */
.type-select{position:fixed;top:20px;left:50%;transform:translateX(-50%);z-index:300;display:flex;gap:8px;background:rgba(255,255,255,.08);backdrop-filter:blur(12px);padding:8px;border-radius:30px;border:1px solid rgba(255,255,255,.12)}
.ts-btn{padding:8px 16px;border-radius:22px;border:none;background:transparent;color:rgba(255,255,255,.5);font-family:'Lexend';font-size:.78rem;font-weight:600;cursor:pointer;transition:background .2s,color .2s}
.ts-btn.active,.ts-btn:hover{background:rgba(255,255,255,.15);color:#fff}
/* page indicator */
.dots{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:300;display:flex;gap:8px}
.dot{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.25);transition:background .3s,transform .3s;cursor:pointer}
.dot.active{background:#fff;transform:scale(1.3)}
@media (prefers-reduced-motion:reduce){.t-overlay *{animation:none !important}}
```
**JS:**
```js
let currentPage = 0;
let currentType = 'wipe';
let animating = false;
const pages = document.querySelectorAll('.page');
const overlay = document.getElementById('overlay');
const dotsEl = document.getElementById('dots');
// Build dots
pages.forEach((_,i) => {
const d = document.createElement('div');
d.className = 'dot' + (i===0?' active':'');
d.onclick = () => goToPage(i);
dotsEl.appendChild(d);
});
// Type selector
document.getElementById('typeSelect').addEventListener('click', e => {
const btn = e.target.closest('[data-type]');
if(!btn) return;
currentType = btn.dataset.type;
document.querySelectorAll('.ts-btn').forEach(b => b.classList.remove('active'));
btn.classList.add('active');
});
function nextPage(){ goToPage((currentPage+1) % pages.length); }
function goToPage(next){
if(animating || next === currentPage) return;
animating = true;
overlay.className = 't-overlay anim-' + currentType + ' enter';
setTimeout(() => {
pages[currentPage].classList.remove('active');
currentPage = next;
pages[currentPage].classList.add('active');
document.querySelectorAll('.dot').forEach((d,i) => d.classList.toggle('active', i===currentPage));
overlay.classList.remove('enter');
overlay.classList.add('exit');
setTimeout(() => { overlay.className = 't-overlay'; animating = false; }, 1000);
}, 480);
}
```
### 13. Ripple Effect on Click
**Type:** CSS + JS
**Description:** Material Design ripple: JS inserts a wave span at click coordinates with contained, outlined and text buttons, FABs, chips, list items and cards.
**HTML:**
```html
CSS Ripple Effect
Material Design ripple on click — click any element below to trigger the wave
Contained buttons
Primary
Secondary
Success
Warning
Outlined + text buttons
Outlined
Outlined
Text button
Text button
FABs + chips
✚
♥
↑
✎
Filter chips
All
Design
Development
Marketing
Research
Strategy
List items
🗑️
Trash
Auto-deleted in 30 days
Cards
📊 Analytics Report Monthly performance summary across all tracked campaigns and organic channels.
🚀 Deploy Pipeline Automated CI/CD with staging, canary release and one-click rollback capability.
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Roboto',sans-serif;background:#fafafa;color:#212121;min-height:100vh;padding:60px 24px}
.wrap{max-width:1000px;margin:0 auto}
h1{font-size:clamp(2rem,5vw,3rem);font-weight:700;text-align:center;margin-bottom:8px;letter-spacing:-.02em}
.sub{text-align:center;color:#757575;margin-bottom:56px}
.sl{font-size:.65rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:#9e9e9e;margin-bottom:16px;display:block}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:20px;margin-bottom:48px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:48px}
@media(max-width:600px){.grid-2{grid-template-columns:1fr}}
/* RIPPLE CORE */
.ripple{position:relative;overflow:hidden;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}
.ripple-wave{position:absolute;border-radius:50%;transform:scale(0);animation:trn13-ripple .6s cubic-bezier(.4,0,.2,1) forwards;pointer-events:none}
@keyframes trn13-ripple{to{transform:scale(4);opacity:0}}
/* Material Buttons */
.mat-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:'Roboto';font-weight:500;font-size:.875rem;letter-spacing:.089em;text-transform:uppercase;padding:0 24px;height:36px;border:none;border-radius:4px;cursor:pointer;position:relative;overflow:hidden;transition:box-shadow .28s cubic-bezier(.4,0,.2,1)}
.mat-btn span{position:relative;z-index:1}
/* Contained */
.mat-contained{background:var(--c,#6200ea);color:#fff;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}
.mat-contained:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}
.mat-contained .ripple-wave{background:rgba(255,255,255,.3)}
/* Outlined */
.mat-outlined{background:transparent;color:var(--c,#6200ea);border:1px solid currentColor}
.mat-outlined .ripple-wave{background:rgba(var(--crgb,98,0,234),.12)}
/* Text */
.mat-text{background:transparent;color:var(--c,#6200ea)}
.mat-text .ripple-wave{background:rgba(var(--crgb,98,0,234),.12)}
/* FAB */
.mat-fab{width:56px;height:56px;border-radius:50%;background:var(--c,#6200ea);color:#fff;font-size:1.2rem;border:none;cursor:pointer;position:relative;overflow:hidden;display:grid;place-items:center;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12);transition:box-shadow .28s}
.mat-fab:hover{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}
.mat-fab .ripple-wave{background:rgba(255,255,255,.3)}
/* Card ripple */
.mat-card{background:#fff;border-radius:4px;padding:24px;cursor:pointer;position:relative;overflow:hidden;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow .28s}
.mat-card:hover{box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12)}
.mat-card .ripple-wave{background:rgba(0,0,0,.08)}
.mat-card h3{font-size:1rem;font-weight:500;margin-bottom:8px;position:relative;z-index:1}
.mat-card p{font-size:.875rem;color:#757575;line-height:1.5;position:relative;z-index:1}
/* List ripple */
.mat-list{background:#fff;border-radius:4px;overflow:hidden;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);margin-bottom:48px}
.mat-list-item{display:flex;align-items:center;gap:16px;padding:16px;cursor:pointer;position:relative;overflow:hidden;border-bottom:1px solid rgba(0,0,0,.12);transition:background .15s}
.mat-list-item:last-child{border:0}
.mat-list-item:hover{background:rgba(0,0,0,.04)}
.mat-list-item .ripple-wave{background:rgba(0,0,0,.08)}
.mat-list-icon{width:40px;height:40px;border-radius:50%;background:var(--ic,#e8eaf6);display:grid;place-items:center;font-size:1.1rem;flex:0 0 40px;position:relative;z-index:1}
.mat-list-text{position:relative;z-index:1}
.mat-list-title{font-size:.875rem;font-weight:500}
.mat-list-sub{font-size:.75rem;color:#757575;margin-top:2px}
/* Chip ripple */
.mat-chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:48px}
.mat-chip{display:inline-flex;align-items:center;gap:6px;padding:0 12px;height:32px;border-radius:16px;background:#e0e0e0;font-size:.875rem;font-weight:500;cursor:pointer;position:relative;overflow:hidden;transition:background .2s}
.mat-chip:hover,.mat-chip.selected{background:#bdbdbd}
.mat-chip.selected{background:var(--c,#6200ea);color:#fff}
.mat-chip .ripple-wave{background:rgba(0,0,0,.1)}
.mat-chip.selected .ripple-wave{background:rgba(255,255,255,.3)}
/* colours */
.c-purple{--c:#6200ea;--crgb:98,0,234}
.c-pink{--c:#e91e63;--crgb:233,30,99}
.c-teal{--c:#009688;--crgb:0,150,136}
.c-orange{--c:#ff5722;--crgb:255,87,34}
.c-indigo{--c:#3f51b5;--crgb:63,81,181}
@media (prefers-reduced-motion:reduce){.ripple-wave{animation:none !important}}
```
**JS:**
```js
// Ripple on click
document.querySelectorAll('.ripple').forEach(el => {
el.addEventListener('click', e => {
const rect = el.getBoundingClientRect();
const x = e.clientX - rect.left;
const y = e.clientY - rect.top;
const size = Math.max(rect.width, rect.height) * 2;
const wave = document.createElement('span');
wave.className = 'ripple-wave';
wave.style.cssText = `width:${size}px;height:${size}px;left:${x - size/2}px;top:${y - size/2}px`;
el.appendChild(wave);
wave.addEventListener('animationend', () => wave.remove());
});
});
// Chip toggle
document.getElementById('chips').addEventListener('click', e => {
const chip = e.target.closest('[data-chip]');
if(!chip) return;
chip.classList.toggle('selected');
});
```
### 14. Underline Animation Hover
**Type:** Pure CSS
**Description:** Ten underline variants: left-grow, center-out, RTL, thick bar, double line, fill-from-bottom, dot fade, strikethrough, rainbow gradient and fade-up.
**HTML:**
```html
Underline Animations
Ten CSS underline transition effects — the most typographically considered hover system for links, navigation and headings.
10 underline variants — hover each
Navigation with center-out
Editorial
Culture
Design
Technology
Archive
Article links — fill-from-bottom highlight
We spent three weeks in rural Oaxaca , watching the way light falls at six in the evening across the valley. Every designer should experience that quality of warmth at least once — it informs how you approach colour theory forever. The trip also introduced us to Zapotec textile traditions , whose geometric logic rhymes unexpectedly with the grid systems we reach for daily.
Article cards — thick underline on heading
Design
Apr 2026 · 8 min read
Technology
Mar 2026 · 12 min read
Culture
Feb 2026 · 6 min read
Editorial
Jan 2026 · 10 min read
Hero headings — rainbow underline
Exhibitions
Collections
Publications
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,600;1,300;1,600&family=Jost:wght@300;400;500;600;700&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Jost',sans-serif;background:#faf9f7;color:#1a1a1a;padding:60px 24px;min-height:100vh}
.wrap{max-width:1100px;margin:0 auto}
.hero{padding:80px 0 60px;border-bottom:1px solid #e5e0d8}
.hero h1{font-family:'Cormorant Garamond';font-size:clamp(3rem,9vw,6.5rem);font-weight:300;line-height:.9;letter-spacing:-.03em;margin-bottom:24px}
.hero h1 em{font-style:italic}
.hero p{font-size:1rem;color:#888;max-width:50ch;line-height:1.7}
.sl{font-size:.65rem;font-weight:600;letter-spacing:.3em;text-transform:uppercase;color:#aaa;margin-bottom:12px;display:block;margin-top:56px}
/* ─────────────────────────── */
/* All underline variants */
/* ─────────────────────────── */
.ul-base{display:inline-block;position:relative;cursor:pointer;text-decoration:none;color:inherit}
/* 1 — left to right grow */
.ul-grow::after{content:'';position:absolute;left:0;bottom:-2px;width:0;height:2px;background:currentColor;transition:width .3s cubic-bezier(.7,0,.2,1)}
.ul-grow:hover::after{width:100%}
/* 2 — center out */
.ul-center::after{content:'';position:absolute;left:50%;right:50%;bottom:-2px;height:2px;background:currentColor;transition:left .3s cubic-bezier(.7,0,.2,1),right .3s cubic-bezier(.7,0,.2,1)}
.ul-center:hover::after{left:0;right:0}
/* 3 — right to left */
.ul-rtl::after{content:'';position:absolute;right:0;bottom:-2px;width:0;height:2px;background:currentColor;transition:width .3s cubic-bezier(.7,0,.2,1)}
.ul-rtl:hover::after{width:100%}
/* 4 — thick chunky highlight */
.ul-thick::after{content:'';position:absolute;left:0;bottom:-3px;width:0;height:4px;background:var(--ul,#fbbf24);transition:width .4s cubic-bezier(.7,0,.2,1)}
.ul-thick:hover::after{width:100%}
/* 5 — double line slide */
.ul-double::before,.ul-double::after{content:'';position:absolute;left:0;bottom:-2px;width:0;height:2px;background:currentColor;transition:width .3s cubic-bezier(.7,0,.2,1)}
.ul-double::before{bottom:-6px;transition-delay:.08s}
.ul-double:hover::before,.ul-double:hover::after{width:100%}
/* 6 — fill from bottom (background highlight) */
.ul-fill{overflow:hidden}
.ul-fill::before{content:'';position:absolute;left:0;bottom:0;width:100%;height:0;background:var(--ul,#fef08a);z-index:-1;transition:height .35s cubic-bezier(.7,0,.2,1)}
.ul-fill:hover::before{height:80%}
/* 7 — dot underline grows */
.ul-dot{border-bottom:2px dotted transparent;transition:border-color .3s}
.ul-dot:hover{border-color:currentColor}
/* 8 — strikethrough on hover */
.ul-strike::after{content:'';position:absolute;left:50%;top:50%;width:0;height:2px;background:currentColor;transition:left .3s,right .3s,width .3s}
.ul-strike:hover::after{left:0;width:100%}
/* 9 — rainbow gradient underline */
.ul-rainbow::after{content:'';position:absolute;left:0;bottom:-3px;width:0;height:3px;background:linear-gradient(90deg,#f97316,#ec4899,#a78bfa,#38bdf8,#34d399);transition:width .4s cubic-bezier(.7,0,.2,1)}
.ul-rainbow:hover::after{width:100%}
/* 10 — fade on scroll underline (always visible, fades) */
.ul-fade{border-bottom:1px solid rgba(0,0,0,.2);transition:border-color .3s}
.ul-fade:hover{border-color:currentColor}
/* ─────────────────────────── */
/* Showcase layouts */
/* ─────────────────────────── */
.inline-demo{display:flex;flex-wrap:wrap;gap:32px;font-size:1.2rem;font-weight:500;margin-bottom:48px}
.nav-demo{display:flex;gap:0;flex-wrap:wrap;margin-bottom:48px;border-bottom:1px solid #e5e0d8}
.nav-link{padding:16px 24px;font-size:.95rem;font-weight:500;color:#888;cursor:pointer;position:relative}
.nav-link.ul-center::after{height:3px;background:#1a1a1a;bottom:0}
.nav-link:hover,.nav-link.act{color:#1a1a1a}
.article-body{max-width:700px;font-family:'Cormorant Garamond';font-size:1.3rem;line-height:1.8;color:#333;margin-bottom:48px}
.article-body a{--ul:#fef08a}
.link-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:24px;margin-bottom:48px}
.link-card{padding:24px;background:#fff;border:1px solid #e5e0d8;border-radius:12px}
.link-card .lc-cat{font-size:.68rem;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:#aaa;margin-bottom:8px}
.link-card h3{font-family:'Cormorant Garamond';font-size:1.6rem;font-weight:600;line-height:1.1;margin-bottom:8px}
.link-card h3 a{--ul:#fbbf24}
.link-card .meta{font-size:.78rem;color:#aaa}
/* type scale showcase */
.type-scale{display:flex;flex-direction:column;gap:16px;margin-bottom:48px}
.type-scale h2{font-family:'Cormorant Garamond';font-size:clamp(2rem,6vw,4rem);font-weight:300;letter-spacing:-.02em;cursor:pointer;display:inline-block}
@media (prefers-reduced-motion:reduce){.ul-base::before,.ul-base::after{transition:none !important}.ul-dot,.ul-fade{transition:none !important}}
```
### 15. Number Counter Animation
**Type:** CSS + JS
**Description:** Stat grid counters animating on load, live odometer incrementing every three seconds and SVG circular progress rings with stroke-dashoffset transition.
**HTML:**
```html
Number Counter Animations
CSS-powered counters, odometers and progress rings — JavaScript drives the count, CSS handles the motion.
0
+ Active Users
↑ 24% this month
0 %
Uptime SLA
↑ 0.02% vs last quarter
0 ms
Avg. Response
↓ 18ms faster
0 M
API Calls / Day
↑ 3.2M new
$ 0 .00
Total transaction volume (live demo)
82%
Performance
Performance
95%
Accessibility
Accessibility
91%
Best Practices
Best Practices
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@300;400;600;700;900&family=Barlow:wght@300;400;500&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Barlow',sans-serif;background:#050810;color:#f8fafc;min-height:100vh;padding:60px 24px}
.wrap{max-width:1200px;margin:0 auto}
.hero{text-align:center;padding-bottom:60px;border-bottom:1px solid rgba(255,255,255,.06);margin-bottom:60px}
.hero h1{font-family:'Barlow Condensed';font-size:clamp(3rem,9vw,6rem);font-weight:900;letter-spacing:-.02em;text-transform:uppercase;line-height:.9;margin-bottom:16px}
.hero h1 span{color:#818cf8}
.hero p{color:#6b7280;font-size:1rem;max-width:50ch;margin:0 auto}
/* COUNTER CORE */
.counter-num{font-family:'Barlow Condensed';font-weight:900;line-height:1;display:inline-block;transition:opacity .3s}
/* STAT GRID */
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.06);border-radius:16px;overflow:hidden;margin-bottom:56px}
.stat-cell{background:#0a0c14;padding:40px 32px;text-align:center;position:relative;overflow:hidden}
.stat-cell::before{content:'';position:absolute;inset:0;background:var(--glow,transparent);opacity:.06;pointer-events:none}
.stat-cell:hover::before{opacity:.12}
.stat-cell:nth-child(1){--glow:radial-gradient(circle,#818cf8,transparent 60%)}
.stat-cell:nth-child(2){--glow:radial-gradient(circle,#34d399,transparent 60%)}
.stat-cell:nth-child(3){--glow:radial-gradient(circle,#fb923c,transparent 60%)}
.stat-cell:nth-child(4){--glow:radial-gradient(circle,#f472b6,transparent 60%)}
.stat-num{font-size:clamp(3rem,7vw,5rem);color:var(--nc,#818cf8)}
.stat-suffix{font-family:'Barlow Condensed';font-size:clamp(1.5rem,4vw,2.5rem);font-weight:700;color:var(--nc,#818cf8)}
.stat-label{font-size:.8rem;font-weight:500;letter-spacing:.15em;text-transform:uppercase;color:#6b7280;margin-top:8px}
.stat-delta{display:inline-flex;align-items:center;gap:4px;font-size:.75rem;font-weight:600;margin-top:8px;padding:3px 8px;border-radius:20px;background:var(--dc,rgba(52,211,153,.15));color:var(--dcc,#34d399)}
/* TICKER rows */
.ticker-section{margin-bottom:56px}
.ticker-row{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:16px;padding:20px 0;border-bottom:1px solid rgba(255,255,255,.05)}
.ticker-row:last-child{border:0}
.ticker-name{font-weight:500;font-size:1rem}
.ticker-symbol{font-size:.78rem;color:#6b7280;font-weight:400}
.ticker-val{font-family:'Barlow Condensed';font-size:1.4rem;font-weight:700;color:var(--tv,#f8fafc)}
.ticker-chg{font-size:.8rem;font-weight:600;padding:4px 10px;border-radius:6px;background:var(--cb,rgba(52,211,153,.12));color:var(--cc,#34d399)}
/* ODOMETER style */
.odometer{font-family:'Barlow Condensed';font-size:clamp(4rem,12vw,8rem);font-weight:900;text-align:center;letter-spacing:.02em;padding:48px;background:linear-gradient(135deg,#0e1020,#12142a);border-radius:20px;margin-bottom:56px;border:1px solid rgba(255,255,255,.06);position:relative;overflow:hidden}
.odometer::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 50% 0%,rgba(129,140,248,.1),transparent 60%)}
.odometer-label{font-family:'Barlow';font-size:.8rem;letter-spacing:.3em;text-transform:uppercase;color:#6b7280;display:block;margin-top:8px}
.odo-num{display:inline-block;position:relative}
.odo-col{display:inline-flex;flex-direction:column;overflow:hidden;height:1em;vertical-align:top}
.odo-col-inner{display:flex;flex-direction:column;transition:transform 1.2s cubic-bezier(.22,1,.36,1)}
.odo-digit{height:1em;display:flex;align-items:center;justify-content:center}
.od-active{color:#818cf8}
.odo-sep{color:rgba(255,255,255,.2)}
/* circular progress */
.circles{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:24px;margin-bottom:56px}
.circle-wrap{text-align:center}
.circle-svg{width:120px;height:120px;transform:rotate(-90deg)}
.circle-bg{fill:none;stroke:rgba(255,255,255,.06);stroke-width:8}
.circle-progress{fill:none;stroke-width:8;stroke-linecap:round;stroke-dasharray:var(--dash,283);stroke-dashoffset:var(--off,283);transition:stroke-dashoffset 1.4s cubic-bezier(.22,1,.36,1) var(--delay,0s)}
.circle-progress.animated{stroke-dashoffset:calc(283 - 283 * var(--pct,.7))}
.circle-val{font-family:'Barlow Condensed';font-size:1.6rem;font-weight:900;fill:#f8fafc}
.circle-label{font-size:.75rem;fill:#6b7280;font-size:9px}
.circle-title{margin-top:12px;font-size:.82rem;font-weight:500;color:#9ca3af}
@media (prefers-reduced-motion:reduce){.counter-num,.circle-progress,.odo-col-inner{transition:none !important}}
```
**JS:**
```js
// Animate stat numbers
function animateCounter(el, target, decimals, duration){
let start = 0, startTime = null;
const step = timestamp => {
if(!startTime) startTime = timestamp;
const p = Math.min((timestamp - startTime) / duration, 1);
const ease = 1 - Math.pow(1-p, 3);
const val = ease * target;
el.textContent = decimals ? val.toFixed(2) : Math.floor(val).toLocaleString();
if(p < 1) requestAnimationFrame(step);
};
requestAnimationFrame(step);
}
const statCells = document.querySelectorAll('.stat-cell');
const targets = [[48200, 0], [99.97, 2], [12, 0], [4.8, 0]];
const labels = [null, null, null, null];
const statNums = document.querySelectorAll('.stat-cell span[style*="font-family"]');
// Count up on load with slight stagger
const pairs = [
{el: statNums[0], val: 48200, dec: 0},
{el: statNums[1], val: 99.97, dec: 2},
{el: statNums[2], val: 12, dec: 0},
{el: statNums[3], val: 4.8, dec: 1},
];
pairs.forEach((p, i) => {
if(p.el) setTimeout(() => animateCounter(p.el, p.val, p.dec, 1800), i * 200);
});
// Odometer random increment
let odo = 1284739;
const odoEl = document.getElementById('odoNum');
animateCounter(odoEl, odo, 0, 2000);
setInterval(() => {
odo += Math.floor(Math.random() * 8000 + 2000);
animateCounter(odoEl, odo, 0, 800);
}, 3000);
// Trigger circle animations on load
setTimeout(() => {
document.querySelectorAll('.circle-progress').forEach(c => c.classList.add('animated'));
}, 300);
```
### 16. Card Tilt 3D Hover
**Type:** CSS + JS
**Description:** Four cards with CSS custom property glare driven by --gx/--gy, floating gradient orbs with parallax offset, JS mousemove rotating up to 18 degrees.
**HTML:**
```html
3D Card Tilt Effect
Move your cursor over each card — perspective tilt with specular glare highlight
💎
Holographic Card
CSS 3D tilt with a rotating conic gradient shimmer and a radial specular glare that follows your cursor.
🏆
Gold Edition
Warm amber gradient with a soft radial bloom. The tilt depth is controlled by JavaScript reading mousemove coordinates.
⚡
Neon Green
Deep forest background with teal glow accents. Floating gradient orbs shift with a parallax offset during tilt.
🔮
Chrome Grid
Diagonal grid texture with silver accents. The glare layer uses a CSS custom property for real-time cursor tracking.
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@400;600;700&family=General+Sans:wght@300;400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Outfit',sans-serif;background:radial-gradient(ellipse at 30% 40%,#1a0533,#0d0d1a 60%,#000510);min-height:100vh;padding:60px 24px;display:flex;flex-direction:column;align-items:center}
h1{font-size:clamp(2rem,5vw,3.2rem);font-weight:700;color:#fff;text-align:center;margin-bottom:8px;letter-spacing:-.03em}
.sub{color:#6b7280;text-align:center;margin-bottom:60px;font-size:.9rem}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:32px;width:100%;max-width:1100px;perspective:2000px}
/* TILT CARD */
.tilt-wrap{perspective:1000px;width:100%}
.tilt-card{width:100%;border-radius:20px;position:relative;transform-style:preserve-3d;cursor:pointer;transition:transform .1s ease-out;will-change:transform}
/* glare layer */
.tilt-glare{position:absolute;inset:0;border-radius:20px;overflow:hidden;pointer-events:none;z-index:5}
.tilt-glare::after{content:'';position:absolute;width:100%;height:100%;background:radial-gradient(circle at var(--gx,50%) var(--gy,50%),rgba(255,255,255,.18),transparent 70%);opacity:0;transition:opacity .3s}
.tilt-wrap:hover .tilt-glare::after{opacity:1}
/* card content */
.tilt-inner{border-radius:20px;padding:32px;position:relative;overflow:hidden;height:340px;display:flex;flex-direction:column;justify-content:space-between}
/* Card 1 — Holographic */
.tc1 .tilt-inner{background:linear-gradient(135deg,#1a0533,#280648,#1a0533);border:1px solid rgba(167,139,250,.3)}
.tc1 .tilt-inner::before{content:'';position:absolute;inset:0;background:conic-gradient(from 0deg at 50% 50%,rgba(167,139,250,.08),rgba(236,72,153,.06),rgba(56,189,248,.08),rgba(167,139,250,.08));animation:trn16-holo 6s linear infinite}
@keyframes trn16-holo{to{transform:rotate(360deg)}}
/* Card 2 — Gold */
.tc2 .tilt-inner{background:linear-gradient(145deg,#1a1008,#2d1c06,#1a1008);border:1px solid rgba(251,191,36,.2)}
.tc2 .tilt-inner::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 30% 30%,rgba(251,191,36,.1),transparent 50%)}
/* Card 3 — Neon */
.tc3 .tilt-inner{background:linear-gradient(145deg,#001a14,#003020,#001a14);border:1px solid rgba(52,211,153,.25)}
.tc3 .tilt-inner::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 70% 70%,rgba(52,211,153,.08),transparent 50%)}
/* Card 4 — Chrome */
.tc4 .tilt-inner{background:linear-gradient(145deg,#111827,#1f2937,#111827);border:1px solid rgba(148,163,184,.15)}
.tc4 .tilt-inner::before{content:'';position:absolute;inset:0;background:linear-gradient(135deg,rgba(255,255,255,.04) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.04) 50%,rgba(255,255,255,.04) 75%,transparent 75%);background-size:20px 20px}
/* card elements */
.tc-badge{font-size:.65rem;font-weight:700;letter-spacing:.2em;text-transform:uppercase;padding:6px 12px;border-radius:20px;display:inline-flex;align-items:center;gap:6px;position:relative;z-index:2}
.tc1 .tc-badge{background:rgba(167,139,250,.15);color:#c4b5fd;border:1px solid rgba(167,139,250,.2)}
.tc2 .tc-badge{background:rgba(251,191,36,.12);color:#fde68a;border:1px solid rgba(251,191,36,.2)}
.tc3 .tc-badge{background:rgba(52,211,153,.12);color:#6ee7b7;border:1px solid rgba(52,211,153,.2)}
.tc4 .tc-badge{background:rgba(148,163,184,.1);color:#cbd5e1;border:1px solid rgba(148,163,184,.15)}
.tc-icon{font-size:3.5rem;display:block;position:relative;z-index:2;filter:drop-shadow(0 4px 16px rgba(0,0,0,.4))}
.tc-title{font-size:1.4rem;font-weight:700;color:#fff;margin-bottom:6px;position:relative;z-index:2}
.tc-desc{font-size:.82rem;color:rgba(255,255,255,.5);line-height:1.5;position:relative;z-index:2}
.tc-footer{display:flex;align-items:center;justify-content:space-between;position:relative;z-index:2}
.tc-action{font-size:.8rem;font-weight:600;color:var(--ac,#c4b5fd);display:flex;align-items:center;gap:6px}
.tc1{--ac:#c4b5fd}.tc2{--ac:#fde68a}.tc3{--ac:#6ee7b7}.tc4{--ac:#cbd5e1}
.tc-stat{font-size:.75rem;color:rgba(255,255,255,.35)}
/* parallax floating elements inside card */
.tc-float{position:absolute;border-radius:50%;pointer-events:none;z-index:1;transition:transform .15s ease-out}
```
**JS:**
```js
document.querySelectorAll('.tilt-wrap').forEach(wrap => {
const card = wrap.querySelector('.tilt-card');
const glare = wrap.querySelector('.tilt-glare');
const floats = wrap.querySelectorAll('.tc-float');
const MAX_TILT = 18;
wrap.addEventListener('mousemove', e => {
const rect = wrap.getBoundingClientRect();
const x = (e.clientX - rect.left) / rect.width;
const y = (e.clientY - rect.top) / rect.height;
const rotY = (x - .5) * MAX_TILT * 2;
const rotX = (.5 - y) * MAX_TILT * 2;
card.style.transform = `rotateX(${rotX}deg) rotateY(${rotY}deg) scale(1.04)`;
glare.style.setProperty('--gx', (x * 100) + '%');
glare.style.setProperty('--gy', (y * 100) + '%');
glare.querySelector('::after');
// Parallax floats
floats.forEach(f => {
f.style.transform = `translate(${(x-.5)*20}px,${(y-.5)*20}px)`;
});
});
wrap.addEventListener('mouseleave', () => {
card.style.transform = 'rotateX(0) rotateY(0) scale(1)';
floats.forEach(f => { f.style.transform = ''; });
});
});
```
### 17. Glassmorphism Hover Transition
**Type:** Pure CSS
**Description:** Frost-reveal cards, layered depth buttons, profile cards with banner and avatar scale, and notification toasts with glass blur depth on hover.
**HTML:**
```html
Glassmorphism Hover Transitions
Frost, blur & depth effects on hover
Frost-reveal Cards
✦
Design System Unified tokens and components for consistent UI.
⚡
Performance Sub-50ms interactions with optimised rendering.
🔒
Security End-to-end encryption and zero-trust architecture.
🌐
Global CDN Edge nodes in 180+ countries for instant delivery.
Layered Depth Buttons
Get Started
Upgrade Plan
Learn More
View Docs
Profile Cards
👩🎨
Aria Chen
Senior Designer
👨💻
Leo Marquez
Full-Stack Engineer
🧠
Nova Singh
ML Researcher
Notification Toasts
✅
Deployment successful Production v2.4.1 is now live
just now
⚠️
High memory usage Server node-03 at 89% capacity
2m ago
💬
New comment Aria replied to your design review
5m ago
🔔
Reminder Sprint planning starts in 30 minutes
12m ago
```
**CSS:**
```css
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: #0f0c29; min-height: 100vh; overflow-x: hidden; }
/* ── Shared animated background ── */
.glass-bg {
position: fixed; inset: 0; z-index: 0;
background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}
.glass-bg::before, .glass-bg::after {
content: ''; position: absolute; border-radius: 50%;
filter: blur(80px); opacity: 0.6;
animation: orb-drift 12s ease-in-out infinite alternate;
}
.glass-bg::before {
width: 600px; height: 600px;
background: radial-gradient(circle, #7928ca, #ff0080);
top: -150px; left: -100px;
}
.glass-bg::after {
width: 500px; height: 500px;
background: radial-gradient(circle, #00d2ff, #3a47d5);
bottom: -100px; right: -100px;
animation-delay: -6s;
}
@keyframes orb-drift {
from { transform: translate(0, 0) scale(1); }
to { transform: translate(60px, 40px) scale(1.15); }
}
.page { position: relative; z-index: 1; padding: 60px 40px; }
h1 { color: #fff; text-align: center; font-size: 2rem; margin-bottom: 8px; }
.subtitle { color: rgba(255,255,255,.5); text-align: center; margin-bottom: 50px; font-size: .95rem; }
section { margin-bottom: 70px; }
section > h2 { color: rgba(255,255,255,.7); font-size: .8rem; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 24px; }
/* ─────────────────────────────────────
1. Frost-reveal cards
───────────────────────────────────── */
.frost-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.frost-card {
border-radius: 20px; padding: 32px 24px; cursor: default;
background: rgba(255,255,255,.04);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
border: 1px solid rgba(255,255,255,.08);
transition: background .4s, backdrop-filter .4s, border-color .4s, transform .4s, box-shadow .4s;
}
.frost-card:hover {
background: rgba(255,255,255,.18);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-color: rgba(255,255,255,.35);
transform: translateY(-6px);
box-shadow: 0 20px 60px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.3);
}
.frost-card .icon { font-size: 2.2rem; margin-bottom: 14px; }
.frost-card h3 { color: #fff; font-size: 1rem; margin-bottom: 8px; }
.frost-card p { color: rgba(255,255,255,.55); font-size: .82rem; line-height: 1.5; }
/* ─────────────────────────────────────
2. Layered depth buttons
───────────────────────────────────── */
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.glass-btn {
position: relative; overflow: hidden;
padding: 14px 32px; border-radius: 50px; border: none; cursor: pointer;
font-size: .95rem; font-weight: 600; color: #fff;
background: rgba(255,255,255,.08);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: 1px solid rgba(255,255,255,.15);
transition: background .35s, border-color .35s, box-shadow .35s, transform .2s;
}
.glass-btn::before {
content: ''; position: absolute;
inset: 0; border-radius: inherit;
background: linear-gradient(135deg, rgba(255,255,255,.25) 0%, transparent 60%);
opacity: 0; transition: opacity .35s;
}
.glass-btn:hover {
background: rgba(255,255,255,.2);
border-color: rgba(255,255,255,.4);
box-shadow: 0 8px 32px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.1) inset;
transform: translateY(-2px);
}
.glass-btn:hover::before { opacity: 1; }
.glass-btn.accent { background: rgba(121, 40, 202, .35); border-color: rgba(121,40,202,.5); }
.glass-btn.accent:hover { background: rgba(121,40,202,.6); border-color: rgba(200,120,255,.6); box-shadow: 0 8px 32px rgba(121,40,202,.4); }
/* ─────────────────────────────────────
3. Profile / feature card big
───────────────────────────────────── */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.profile-card {
border-radius: 24px; overflow: hidden; cursor: pointer;
border: 1px solid rgba(255,255,255,.1);
background: rgba(255,255,255,.06);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
transition: transform .4s cubic-bezier(.34,1.56,.64,1), box-shadow .4s, border-color .4s;
}
.profile-card:hover { transform: scale(1.03) translateY(-4px); border-color: rgba(255,255,255,.3); box-shadow: 0 24px 64px rgba(0,0,0,.4); }
.profile-banner {
height: 110px;
transition: filter .4s;
}
.profile-card:hover .profile-banner { filter: brightness(1.2); }
.pb-1 { background: linear-gradient(135deg, #7928ca, #ff0080); }
.pb-2 { background: linear-gradient(135deg, #00d2ff, #3a47d5); }
.pb-3 { background: linear-gradient(135deg, #f7971e, #ffd200); }
.profile-body { padding: 20px; }
.profile-avatar {
width: 56px; height: 56px; border-radius: 50%;
background: rgba(255,255,255,.2); border: 3px solid rgba(255,255,255,.3);
display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
margin-top: -40px; margin-bottom: 12px;
backdrop-filter: blur(10px);
transition: border-color .4s, transform .4s;
}
.profile-card:hover .profile-avatar { border-color: rgba(255,255,255,.7); transform: scale(1.1); }
.profile-name { color: #fff; font-weight: 700; font-size: 1rem; }
.profile-role { color: rgba(255,255,255,.5); font-size: .8rem; margin-bottom: 14px; }
.profile-stats { display: flex; gap: 20px; }
.stat { text-align: center; }
.stat-n { color: #fff; font-weight: 700; font-size: 1rem; }
.stat-l { color: rgba(255,255,255,.45); font-size: .72rem; }
/* ─────────────────────────────────────
4. Notification / toast strip
───────────────────────────────────── */
.toast-stack { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
.toast {
display: flex; align-items: center; gap: 14px;
padding: 16px 20px; border-radius: 14px;
background: rgba(255,255,255,.06);
border: 1px solid rgba(255,255,255,.1);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
cursor: default;
transition: background .3s, border-color .3s, transform .3s, box-shadow .3s;
}
.toast:hover {
background: rgba(255,255,255,.16);
border-color: rgba(255,255,255,.3);
transform: translateX(6px);
box-shadow: -4px 0 0 rgba(255,255,255,.3), 0 8px 24px rgba(0,0,0,.2);
}
.toast-icon { font-size: 1.4rem; flex-shrink: 0; }
.toast-text strong { color: #fff; font-size: .9rem; display: block; }
.toast-text span { color: rgba(255,255,255,.5); font-size: .8rem; }
.toast-time { margin-left: auto; color: rgba(255,255,255,.35); font-size: .75rem; white-space: nowrap; }
```
### 18. Staggered List Animation
**Type:** CSS + JS
**Description:** Sequential entrance for tasks (slide left), feature cards (scale up), navigation menu (slide right) and data table rows (fade up) with replay controls.
**HTML:**
```html
Staggered List Animation
Sequential entrance animations for lists, cards & rows
Task List — Slide from Left
↺ Replay
Set up CI/CD pipeline High
Design system token audit High
Write API documentation Mid
Migrate legacy endpoints Mid
Lighthouse performance audit Low
Update onboarding guide Low
Feature Cards — Scale Up
↺ Replay
🚀
Instant Deploy
Push to production in under 30 seconds.
🔍
Smart Search
Full-text search across all your content.
📊
Analytics
Real-time insights and custom dashboards.
🤝
Collaboration
Work together with your team in real time.
🛡️
Security
Enterprise-grade protection built in.
🌍
Global CDN
Serve from 180+ edge locations worldwide.
Navigation Menu — Slide from Right
↺ Replay
Data Table — Rows Fade Up
↺ Replay
Service Status Uptime Latency
API Gateway Operational99.98% 12ms
Auth Service Operational99.95% 18ms
Storage CDN Degraded99.41% 84ms
Database Operational100% 4ms
Queue Worker Outage97.12% —
```
**CSS:**
```css
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: #0d1117; color: #e6edf3; min-height: 100vh; }
.page { padding: 60px 40px; max-width: 1100px; margin: 0 auto; }
h1 { font-size: 2rem; text-align: center; margin-bottom: 8px; color: #fff; }
.subtitle { color: #8b949e; text-align: center; margin-bottom: 50px; }
section { margin-bottom: 64px; }
section > h2 { color: #58a6ff; font-size: .75rem; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 20px; padding-bottom: 8px; border-bottom: 1px solid #21262d; }
/* ─── Trigger button ─── */
.trigger-btn {
display: inline-flex; align-items: center; gap: 8px;
padding: 10px 22px; border-radius: 8px; border: 1px solid #30363d;
background: #161b22; color: #c9d1d9; font-size: .875rem; cursor: pointer;
transition: background .2s, border-color .2s;
margin-bottom: 20px;
}
.trigger-btn:hover { background: #21262d; border-color: #58a6ff; }
/* ─────────────────────────────────────
1. Slide-in task list
───────────────────────────────────── */
.task-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.task-item {
display: flex; align-items: center; gap: 14px;
padding: 14px 18px; border-radius: 10px;
background: #161b22; border: 1px solid #21262d;
opacity: 0; transform: translateX(-40px);
transition: opacity .5s ease, transform .5s ease, background .2s, border-color .2s;
}
.task-item.in { opacity: 1; transform: none; }
.task-item:hover { background: #1c2128; border-color: #30363d; }
.task-cb {
width: 18px; height: 18px; border-radius: 50%;
border: 2px solid #30363d; flex-shrink: 0; cursor: pointer;
transition: border-color .2s, background .2s;
display: flex; align-items: center; justify-content: center; font-size: .65rem;
}
.task-item.done .task-cb { background: #238636; border-color: #238636; }
.task-item.done .task-cb::after { content: '✓'; color: #fff; }
.task-item.done .task-label { text-decoration: line-through; color: #484f58; }
.task-label { flex: 1; font-size: .9rem; }
.task-badge {
font-size: .7rem; padding: 2px 8px; border-radius: 12px; font-weight: 600;
}
.badge-high { background: rgba(248,81,73,.15); color: #f85149; border: 1px solid rgba(248,81,73,.3); }
.badge-mid { background: rgba(210,153,34,.15); color: #d2a004; border: 1px solid rgba(210,153,34,.3); }
.badge-low { background: rgba(35,134,54,.15); color: #3fb950; border: 1px solid rgba(35,134,54,.3); }
/* ─────────────────────────────────────
2. Feature cards fan-in
───────────────────────────────────── */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.feat-card {
padding: 24px 20px; border-radius: 12px;
background: #161b22; border: 1px solid #21262d;
opacity: 0; transform: translateY(30px) scale(.94);
transition: opacity .5s ease, transform .5s cubic-bezier(.34,1.56,.64,1), background .2s, box-shadow .2s;
cursor: default;
}
.feat-card.in { opacity: 1; transform: none; }
.feat-card:hover { background: #1c2128; box-shadow: 0 0 0 1px #30363d, 0 8px 24px rgba(0,0,0,.4); }
.feat-icon { font-size: 1.8rem; margin-bottom: 12px; }
.feat-title { color: #e6edf3; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.feat-desc { color: #8b949e; font-size: .8rem; line-height: 1.5; }
/* ─────────────────────────────────────
3. Menu items
───────────────────────────────────── */
.menu-list { list-style: none; max-width: 340px; }
.menu-item {
display: flex; align-items: center; gap: 12px;
padding: 12px 16px; border-radius: 8px;
opacity: 0; transform: translateX(30px);
transition: opacity .4s ease, transform .4s ease, background .2s;
cursor: pointer;
}
.menu-item.in { opacity: 1; transform: none; }
.menu-item:hover { background: rgba(88,166,255,.08); }
.menu-item.active { background: rgba(88,166,255,.12); }
.menu-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.mi-blue { background: rgba(88,166,255,.15); }
.mi-green { background: rgba(63,185,80,.15); }
.mi-purple { background: rgba(188,140,255,.15); }
.mi-orange { background: rgba(255,166,87,.15); }
.mi-red { background: rgba(248,81,73,.15); }
.menu-text strong { display: block; font-size: .875rem; color: #e6edf3; }
.menu-text span { font-size: .75rem; color: #8b949e; }
.menu-badge { margin-left: auto; background: #58a6ff; color: #0d1117; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
/* ─────────────────────────────────────
4. Table rows
───────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 10px 16px; font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: #8b949e; border-bottom: 1px solid #21262d; }
.data-table td { padding: 14px 16px; font-size: .875rem; border-bottom: 1px solid #161b22; }
.data-table tbody tr {
opacity: 0; transform: translateY(16px);
transition: opacity .45s ease, transform .45s ease, background .15s;
cursor: default;
}
.data-table tbody tr.in { opacity: 1; transform: none; }
.data-table tbody tr:hover td { background: #161b22; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot-green { background: #3fb950; }
.dot-yellow { background: #d2a004; }
.dot-red { background: #f85149; }
```
**JS:**
```js
const DELAY = 80; // ms per item
function stagger(items, delay = DELAY) {
items.forEach((el, i) => {
el.classList.remove('in');
void el.offsetWidth;
setTimeout(() => el.classList.add('in'), i * delay);
});
}
function resetAndStagger(items, delay) {
items.forEach(el => el.classList.remove('in'));
requestAnimationFrame(() => stagger(items, delay));
}
function replayTasks() { resetAndStagger([...document.querySelectorAll('#taskList .task-item')]); }
function replayCards() { resetAndStagger([...document.querySelectorAll('#featGrid .feat-card')], 90); }
function replayMenu() { resetAndStagger([...document.querySelectorAll('#menuList .menu-item')], 70); }
function replayTable() { resetAndStagger([...document.querySelectorAll('#tableBody tr')], 75); }
// Auto-run on load
replayTasks();
setTimeout(replayCards, 200);
setTimeout(replayMenu, 400);
setTimeout(replayTable, 600);
```
### 19. Cursor Trail Effect
**Type:** CSS + JS
**Description:** Custom cursor dot and ring with four switchable trail modes: coloured dots, sparkle particles, comet streaks and rainbow — plus live position stats.
**HTML:**
```html
Cursor Trail Effect
Move your mouse to see different trail styles
Trail Style
● Dots
✦ Sparkle
— Comet
🌈 Rainbow
✕ None
Interactive Zones
Card
Move freely The cursor ring expands when hovering interactive elements.
Button
Hover me
```
**CSS:**
```css
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: #060612; min-height: 100vh; overflow-x: hidden; cursor: none; }
/* ─── Custom cursor ─── */
#cursor-dot {
position: fixed; z-index: 9999; pointer-events: none;
width: 10px; height: 10px; border-radius: 50%;
background: #fff; transform: translate(-50%, -50%);
transition: width .15s, height .15s, background .15s;
mix-blend-mode: difference;
}
#cursor-ring {
position: fixed; z-index: 9998; pointer-events: none;
width: 36px; height: 36px; border-radius: 50%;
border: 1.5px solid rgba(255,255,255,.6);
transform: translate(-50%, -50%);
transition: transform .12s ease, width .25s, height .25s, border-color .25s;
mix-blend-mode: difference;
}
body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring { width: 56px; height: 56px; border-color: rgba(255,255,255,.9); }
body:has(a:hover) #cursor-dot,
body:has(button:hover) #cursor-dot { width: 4px; height: 4px; }
/* ─── Trails ─── */
.trail-dot {
position: fixed; z-index: 9990; pointer-events: none; border-radius: 50%;
transform: translate(-50%, -50%) scale(1);
transition: opacity .6s ease, transform .6s ease;
}
/* ─── Page layout ─── */
.page { position: relative; z-index: 1; padding: 80px 40px; min-height: 100vh; }
/* Background grid */
.page::before {
content: ''; position: fixed; inset: 0; z-index: 0;
background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
background-size: 60px 60px;
}
h1 { color: #fff; text-align: center; font-size: 2rem; margin-bottom: 8px; position: relative; z-index: 2; }
.subtitle { color: rgba(255,255,255,.4); text-align: center; margin-bottom: 50px; position: relative; z-index: 2; }
section { margin-bottom: 60px; position: relative; z-index: 2; }
section > h2 { color: rgba(255,255,255,.35); font-size: .72rem; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 20px; }
/* ─── Trail mode switcher ─── */
.mode-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.mode-btn {
padding: 10px 20px; border-radius: 8px; border: 1px solid rgba(255,255,255,.15);
background: rgba(255,255,255,.05); color: rgba(255,255,255,.7); font-size: .85rem; cursor: none;
transition: background .2s, border-color .2s, color .2s;
}
.mode-btn.active { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.4); color: #fff; }
/* ─── Demo zones ─── */
.demo-zone {
border-radius: 16px; border: 1px solid rgba(255,255,255,.08);
background: rgba(255,255,255,.03); padding: 40px;
display: flex; align-items: center; justify-content: center; min-height: 200px;
position: relative; overflow: hidden;
}
.zone-label { color: rgba(255,255,255,.25); font-size: .8rem; position: absolute; top: 14px; left: 16px; text-transform: uppercase; letter-spacing: 2px; }
/* Interactive elements inside zones */
.zone-link { color: #a78bfa; text-decoration: none; font-size: 1.1rem; padding: 12px 24px; border-radius: 8px; border: 1px solid rgba(167,139,250,.3); transition: background .2s; }
.zone-link:hover { background: rgba(167,139,250,.1); }
.zone-card {
background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
padding: 24px; text-align: center; max-width: 260px;
transition: transform .3s, background .3s;
}
.zone-card:hover { transform: scale(1.03); background: rgba(255,255,255,.09); }
.zone-card h3 { color: #fff; margin-bottom: 8px; }
.zone-card p { color: rgba(255,255,255,.5); font-size: .85rem; }
.neon-btn {
padding: 14px 36px; border-radius: 50px; border: none; cursor: none; font-size: 1rem; font-weight: 600;
background: linear-gradient(135deg, #7c3aed, #3b82f6); color: #fff;
box-shadow: 0 0 0 rgba(124,58,237,0); transition: box-shadow .3s, transform .2s;
}
.neon-btn:hover { box-shadow: 0 0 32px rgba(124,58,237,.6), 0 0 64px rgba(59,130,246,.3); transform: scale(1.04); }
/* Info grid */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.info-box {
border-radius: 12px; padding: 20px;
background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
}
.info-box .num { font-size: 2rem; font-weight: 700; background: linear-gradient(135deg, #a78bfa, #60a5fa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.info-box p { color: rgba(255,255,255,.5); font-size: .8rem; margin-top: 4px; }
```
**JS:**
```js
const dot = document.getElementById('cursor-dot');
const ring = document.getElementById('cursor-ring');
let mx = 0, my = 0, px = 0, py = 0;
let mode = 'dots';
let total = 0;
const TRAIL_COUNT = 20;
// Move custom cursor
document.addEventListener('mousemove', e => {
mx = e.clientX; my = e.clientY;
dot.style.left = mx + 'px'; dot.style.top = my + 'px';
ring.style.left = mx + 'px'; ring.style.top = my + 'px';
document.getElementById('posX').textContent = Math.round(mx);
document.getElementById('posY').textContent = Math.round(my);
});
// Trail creation
function createTrail(x, y, speed) {
if (mode === 'none') return;
const el = document.createElement('div');
el.className = 'trail-dot';
const size = mode === 'comet' ? Math.max(4, Math.min(speed * 2.5, 22)) : (mode === 'sparkle' ? 6 : 8);
el.style.width = size + 'px';
el.style.height = size + 'px';
if (mode === 'dots') {
el.style.background = 'rgba(167,139,250,.8)';
} else if (mode === 'sparkle') {
const hue = Math.random() * 60 + 260;
el.style.background = `hsl(${hue},90%,70%)`;
el.style.borderRadius = Math.random() > .5 ? '0' : '50%';
el.style.transform = `translate(-50%,-50%) rotate(${Math.random()*360}deg)`;
} else if (mode === 'comet') {
el.style.background = 'rgba(255,255,255,.6)';
el.style.borderRadius = '2px';
el.style.width = size * 3 + 'px';
} else if (mode === 'rainbow') {
const hue = (Date.now() / 5) % 360;
el.style.background = `hsl(${hue},100%,65%)`;
}
el.style.left = x + 'px';
el.style.top = y + 'px';
document.body.appendChild(el);
total++;
document.getElementById('trailCount').textContent = total;
requestAnimationFrame(() => {
el.style.opacity = '0';
el.style.transform = `translate(-50%,-50%) scale(0)`;
});
setTimeout(() => el.remove(), 650);
}
// Throttled trail on mousemove
let lastTrail = 0;
document.addEventListener('mousemove', e => {
const now = Date.now();
const speed = Math.hypot(e.clientX - px, e.clientY - py);
document.getElementById('speed').textContent = Math.round(speed);
px = e.clientX; py = e.clientY;
if (now - lastTrail > 30) {
createTrail(e.clientX, e.clientY, speed);
lastTrail = now;
}
});
function setMode(btn, m) {
document.querySelectorAll('.mode-btn').forEach(b => b.classList.remove('active'));
btn.classList.add('active');
mode = m;
}
```
### 20. Magnetic Button Effect
**Type:** CSS + JS
**Description:** Buttons, icon links, nav items and FABs that translate toward the cursor within a 120px radius using mousemove vector math and spring easing.
**HTML:**
```html
Magnetic Button Effect
Move your cursor near the buttons — they'll pull toward it
↓ hover to activate magnetism
Call-to-Action Buttons
Get Started
Upgrade Plan
Learn More
Navigation Items
Home
Work
About
Blog
Contact
```
**CSS:**
```css
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: #09090f; min-height: 100vh; overflow-x: hidden; }
.page { padding: 70px 40px; max-width: 1000px; margin: 0 auto; }
h1 { color: #fff; text-align: center; font-size: 2rem; margin-bottom: 8px; }
.subtitle { color: rgba(255,255,255,.4); text-align: center; margin-bottom: 50px; }
section { margin-bottom: 70px; }
section > h2 { color: rgba(255,255,255,.35); font-size: .72rem; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 28px; }
/* Shared magnetic wrapper */
.mag-wrap {
display: inline-flex; position: relative;
/* JS will translate this on mousemove */
transition: transform .15s cubic-bezier(.25,.46,.45,.94);
}
/* ─────────────────────────────────────
1. Primary call-to-action buttons
───────────────────────────────────── */
.cta-row { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.btn-mag {
position: relative; overflow: hidden;
padding: 16px 40px; border-radius: 50px; border: none; cursor: pointer;
font-size: 1rem; font-weight: 700; letter-spacing: .5px;
transition: transform .15s cubic-bezier(.25,.46,.45,.94), box-shadow .25s;
}
/* Inner text span — also shifts slightly */
.btn-mag .label {
position: relative; z-index: 1; pointer-events: none;
display: block; transition: transform .15s cubic-bezier(.25,.46,.45,.94);
}
.btn-solid {
background: #fff; color: #09090f;
box-shadow: 0 4px 24px rgba(255,255,255,.1);
}
.btn-solid:hover { box-shadow: 0 8px 40px rgba(255,255,255,.25); }
.btn-purple {
background: linear-gradient(135deg, #7c3aed, #4f46e5); color: #fff;
box-shadow: 0 4px 24px rgba(124,58,237,.2);
}
.btn-purple:hover { box-shadow: 0 8px 40px rgba(124,58,237,.5); }
.btn-outline {
background: transparent; color: #fff;
border: 1.5px solid rgba(255,255,255,.3);
box-shadow: none;
}
.btn-outline:hover { border-color: rgba(255,255,255,.8); box-shadow: 0 0 32px rgba(255,255,255,.1); }
/* Ripple on click */
.btn-mag .ripple-burst {
position: absolute; border-radius: 50%;
background: rgba(255,255,255,.3); pointer-events: none;
transform: scale(0); animation: burst .55s ease-out forwards;
}
@keyframes burst {
to { transform: scale(3); opacity: 0; }
}
/* ─────────────────────────────────────
2. Icon / social buttons
───────────────────────────────────── */
.icon-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.btn-icon {
width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
transition: transform .15s cubic-bezier(.25,.46,.45,.94), box-shadow .25s;
}
.btn-icon .label { display: flex; align-items: center; justify-content: center; }
.bi-dark { background: #1a1a2e; border: 1px solid rgba(255,255,255,.1); color: #fff; }
.bi-dark:hover { box-shadow: 0 8px 30px rgba(0,0,0,.6); }
.bi-blue { background: #1d9bf0; color: #fff; }
.bi-blue:hover { box-shadow: 0 8px 30px rgba(29,155,240,.4); }
.bi-insta { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; }
.bi-insta:hover { box-shadow: 0 8px 30px rgba(220,39,67,.4); }
.bi-gh { background: #24292f; color: #fff; border: 1px solid rgba(255,255,255,.1); }
.bi-gh:hover { box-shadow: 0 8px 30px rgba(0,0,0,.6); }
.bi-li { background: #0077b5; color: #fff; }
.bi-li:hover { box-shadow: 0 8px 30px rgba(0,119,181,.4); }
/* ─────────────────────────────────────
3. Nav links
───────────────────────────────────── */
.nav-mag {
display: flex; gap: 0; align-items: center;
background: rgba(255,255,255,.04); border-radius: 16px; padding: 6px;
border: 1px solid rgba(255,255,255,.08); width: fit-content;
}
.nav-item {
padding: 10px 22px; border-radius: 10px; border: none; cursor: pointer;
background: transparent; color: rgba(255,255,255,.6); font-size: .875rem; font-weight: 500;
transition: background .2s, color .2s, transform .15s cubic-bezier(.25,.46,.45,.94);
position: relative;
}
.nav-item.active { background: rgba(255,255,255,.1); color: #fff; }
/* ─────────────────────────────────────
4. Floating action cluster
───────────────────────────────────── */
.fab-cluster { display: flex; gap: 16px; align-items: center; }
.fab {
border-radius: 18px; border: none; cursor: pointer;
display: flex; align-items: center; gap: 10px;
font-size: .9rem; font-weight: 600; color: #fff;
transition: transform .15s cubic-bezier(.25,.46,.45,.94), box-shadow .25s;
}
.fab-primary { padding: 14px 28px; background: linear-gradient(135deg,#10b981,#059669); }
.fab-primary:hover { box-shadow: 0 10px 40px rgba(16,185,129,.4); }
.fab-sm { width: 48px; height: 48px; border-radius: 14px; padding: 0; justify-content: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 1.1rem; }
.fab-sm:hover { background: rgba(255,255,255,.14); }
/* ─── Cursor hint ─── */
.hint { color: rgba(255,255,255,.2); font-size: .8rem; text-align: center; margin-top: -30px; margin-bottom: 50px; }
```
**JS:**
```js
const RADIUS = 120; // activation radius in px
document.querySelectorAll('.mag-wrap').forEach(wrap => {
const strength = parseFloat(wrap.dataset.strength) || 0.4;
const btn = wrap.querySelector('button');
const label = btn.querySelector('.label');
wrap.addEventListener('mousemove', e => {
const r = wrap.getBoundingClientRect();
const cx = r.left + r.width / 2;
const cy = r.top + r.height / 2;
const dx = e.clientX - cx;
const dy = e.clientY - cy;
const dist = Math.hypot(dx, dy);
if (dist < RADIUS) {
const factor = (1 - dist / RADIUS) * strength;
const tx = dx * factor;
const ty = dy * factor;
wrap.style.transform = `translate(${tx}px, ${ty}px)`;
if (label) label.style.transform = `translate(${tx * .4}px, ${ty * .4}px)`;
btn.style.transform = '';
}
});
wrap.addEventListener('mouseleave', () => {
wrap.style.transform = '';
if (label) label.style.transform = '';
});
// Ripple on click
btn.addEventListener('click', e => {
const r = btn.getBoundingClientRect();
const x = e.clientX - r.left;
const y = e.clientY - r.top;
const span = document.createElement('span');
span.className = 'ripple-burst';
const s = Math.max(r.width, r.height);
span.style.cssText = `width:${s}px;height:${s}px;left:${x - s/2}px;top:${y - s/2}px`;
btn.appendChild(span);
setTimeout(() => span.remove(), 600);
});
});
// Nav active state
document.querySelectorAll('.nav-item').forEach(b => {
b.addEventListener('click', () => {
document.querySelectorAll('.nav-item').forEach(x => x.classList.remove('active'));
b.classList.add('active');
});
});
```
### 21. Split Text Reveal Transition
**Type:** CSS + JS
**Description:** Character-split hero headline, word-by-word reveal, rotating word swap, per-character colour wave and text scramble with progressive decode.
**HTML:**
```html
Split Text Reveal Transition
Characters, words and lines animated into view
Hero Headline — Character Split
↺ Replay All
```
**CSS:**
```css
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: #0c0c0e; min-height: 100vh; overflow-x: hidden; }
.page { padding: 70px 40px; max-width: 1000px; margin: 0 auto; }
h1 { color: #fff; text-align: center; font-size: 2rem; margin-bottom: 8px; }
.subtitle { color: rgba(255,255,255,.4); text-align: center; margin-bottom: 60px; }
section { margin-bottom: 80px; }
section > h2 { color: rgba(255,255,255,.3); font-size: .72rem; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 30px; }
.replay-btn {
display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px;
padding: 8px 18px; border-radius: 8px; border: 1px solid rgba(255,255,255,.15);
background: rgba(255,255,255,.05); color: rgba(255,255,255,.7); font-size: .82rem; cursor: pointer;
transition: background .2s;
}
.replay-btn:hover { background: rgba(255,255,255,.1); }
/* ─────────────────────────────────────
Shared split char helpers
Each .char is a clip container; the inner span slides in from below / above
───────────────────────────────────── */
.split-text { overflow: hidden; display: inline-block; }
.split-text .line { overflow: hidden; display: block; }
.split-text .char {
display: inline-block; overflow: hidden;
vertical-align: top; /* prevent layout shift */
}
.split-text .char .inner {
display: inline-block;
transition: transform .6s cubic-bezier(.16,1,.3,1), opacity .6s ease;
}
/* Initial hidden states */
.from-below .char .inner { transform: translateY(110%); opacity: 0; }
.from-above .char .inner { transform: translateY(-110%); opacity: 0; }
.from-left .char .inner { transform: translateX(-80px); opacity: 0; }
.from-right .char .inner { transform: translateX(80px); opacity: 0; }
.scale-blur .char .inner { transform: scale(1.4); opacity: 0; filter: blur(6px); transition: transform .7s cubic-bezier(.16,1,.3,1), opacity .6s, filter .6s; }
.rotate-in .char .inner { transform: rotateX(90deg) translateY(40px); opacity: 0; transform-origin: top center; transition: transform .65s cubic-bezier(.16,1,.3,1), opacity .5s; }
/* Revealed state */
.char.visible .inner { transform: none; opacity: 1; filter: none; }
/* ─────────────────────────────────────
1. Hero headline — from-below
───────────────────────────────────── */
.hero { text-align: center; padding: 20px 0; }
.hero .big { font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; }
.hero .line1 { color: #fff; }
.hero .line2 {
background: linear-gradient(90deg,#a78bfa,#60a5fa);
-webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .sub {
margin-top: 20px; color: rgba(255,255,255,.5); font-size: 1.1rem; overflow: hidden;
}
/* ─────────────────────────────────────
2. Staggered word reveal
───────────────────────────────────── */
.word-reveal { font-size: 1.6rem; font-weight: 700; color: #fff; line-height: 1.5; }
.word-reveal .word { display: inline-block; overflow: hidden; margin-right: .25em; }
.word-reveal .word .inner {
display: inline-block;
transform: translateY(100%);
transition: transform .55s cubic-bezier(.16,1,.3,1);
}
.word-reveal .word.visible .inner { transform: none; }
/* ─────────────────────────────────────
3. Rotating word swap
───────────────────────────────────── */
.swap-container { display: flex; align-items: baseline; gap: 12px; font-size: 2rem; font-weight: 800; }
.swap-static { color: #fff; }
.swap-word {
color: #a78bfa; display: inline-block; overflow: hidden;
min-width: 200px;
}
.swap-word .active {
display: block; animation: swap-in .5s cubic-bezier(.16,1,.3,1) forwards;
}
.swap-word .exit {
display: block; animation: swap-out .4s ease-in forwards;
}
@keyframes swap-in { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes swap-out { from { transform: none; opacity: 1; } to { transform: translateY(-100%); opacity: 0; } }
/* ─────────────────────────────────────
4. Per-character colour wave
───────────────────────────────────── */
.wave-text {
font-size: 3rem; font-weight: 900; letter-spacing: -.02em;
display: flex; flex-wrap: wrap; gap: 0;
}
.wave-text .char {
display: inline-block; overflow: hidden;
color: rgba(255,255,255,.15);
transition: color .4s ease;
}
.wave-text .char.lit { color: #fff; }
.wave-text .char.space { width: .35em; }
/* ─────────────────────────────────────
5. Scramble + reveal (JS)
───────────────────────────────────── */
.scramble-block { display: flex; flex-direction: column; gap: 10px; }
.scramble-item { overflow: hidden; }
.scramble-target { font-size: 1.2rem; font-weight: 600; color: #fff; font-family: monospace; letter-spacing: .02em; }
.scramble-target .reveal-bar {
position: relative; display: inline-block;
background: linear-gradient(90deg,#7c3aed,#3b82f6); border-radius: 2px;
height: 3px; width: 0; display: block; margin-top: 4px;
transition: width 1s ease;
}
.scramble-target.done .reveal-bar { width: 100%; }
```
**JS:**
```js
/* ── 1. Build char splits ─────────────────────────── */
function buildCharSplit(el, text, baseDelay = 0) {
const line = el.querySelector('.line');
line.innerHTML = '';
[...text].forEach((ch, i) => {
const wrap = document.createElement('span');
wrap.className = 'char';
if (ch === ' ') { wrap.style.width = '.3em'; wrap.style.display = 'inline-block'; }
const inner = document.createElement('span');
inner.className = 'inner';
inner.textContent = ch;
wrap.appendChild(inner);
line.appendChild(wrap);
// stagger
setTimeout(() => wrap.classList.add('visible'), baseDelay + i * 40);
});
}
function resetSplit(el) {
el.querySelectorAll('.char').forEach(c => c.classList.remove('visible'));
}
/* ── 2. Word reveal ───────────────────────────────── */
const WORDS = 'Design systems that feel like magic.'.split(' ');
function buildWordReveal() {
const el = document.getElementById('wordReveal');
el.innerHTML = '';
WORDS.forEach((w, i) => {
const wrap = document.createElement('span');
wrap.className = 'word';
const inner = document.createElement('span');
inner.className = 'inner';
inner.textContent = w;
wrap.appendChild(inner);
el.appendChild(wrap);
el.appendChild(document.createTextNode(' '));
setTimeout(() => wrap.classList.add('visible'), 300 + i * 90);
});
}
/* ── 3. Rotating swap ────────────────────────────── */
const SWAP_WORDS = ['interfaces','experiences','products','identities','systems','futures'];
let swapIdx = 0;
function nextSwap() {
const el = document.getElementById('swapWord');
const active = el.querySelector('.active');
swapIdx = (swapIdx + 1) % SWAP_WORDS.length;
if (active) {
active.className = 'exit';
setTimeout(() => active.remove(), 420);
}
const next = document.createElement('span');
next.className = 'active';
next.textContent = SWAP_WORDS[swapIdx];
el.appendChild(next);
}
setInterval(nextSwap, 2200);
/* ── 4. Wave ─────────────────────────────────────── */
const WAVE_TEXT = 'CREATIVE MOTION';
function buildWave() {
const el = document.getElementById('waveText');
el.innerHTML = '';
[...WAVE_TEXT].forEach((ch, i) => {
const span = document.createElement('span');
span.className = 'char' + (ch === ' ' ? ' space' : '');
span.textContent = ch;
el.appendChild(span);
});
}
function runWave(delay = 0) {
const chars = [...document.querySelectorAll('#waveText .char:not(.space)')];
chars.forEach(c => c.classList.remove('lit'));
chars.forEach((c, i) => setTimeout(() => c.classList.add('lit'), delay + i * 55));
// Loop
setTimeout(() => {
chars.forEach(c => c.classList.remove('lit'));
setTimeout(() => runWave(0), 400);
}, delay + chars.length * 55 + 800);
}
/* ── 5. Scramble ──────────────────────────────────── */
const LINES = ['The quick brown fox','Jumps over the lazy','Dog at dawn'];
const CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%';
function scramble(el, target, delay = 0) {
const bar = el.querySelector('.reveal-bar');
const text = el.querySelector('.text-content') || el;
let frame = 0;
const total = 30;
setTimeout(() => {
const iv = setInterval(() => {
const progress = frame / total;
const revealedCount = Math.floor(progress * target.length);
let out = '';
for (let i = 0; i < target.length; i++) {
if (target[i] === ' ') { out += ' '; continue; }
if (i < revealedCount) { out += target[i]; }
else { out += CHARS[Math.floor(Math.random() * CHARS.length)]; }
}
el.childNodes[0].textContent = out;
frame++;
if (frame > total) {
clearInterval(iv);
el.childNodes[0].textContent = target;
el.classList.add('done');
}
}, 35);
}, delay);
}
function buildScramble() {
const block = document.getElementById('scrambleBlock');
block.innerHTML = '';
LINES.forEach((line, i) => {
const item = document.createElement('div');
item.className = 'scramble-item';
const tgt = document.createElement('div');
tgt.className = 'scramble-target';
tgt.appendChild(document.createTextNode(line));
const bar = document.createElement('span');
bar.className = 'reveal-bar';
tgt.appendChild(bar);
item.appendChild(tgt);
block.appendChild(item);
scramble(tgt, line, 500 + i * 600);
});
}
/* ── Init & replay ───────────────────────────────── */
function heroLine1() {
const el = document.getElementById('heroL1');
el.classList.add('line1');
buildCharSplit(el, 'Build Beautiful', 0);
}
function heroLine2() {
const el = document.getElementById('heroL2');
el.classList.add('line2');
buildCharSplit(el, 'Transitions', 200);
}
function heroSub() {
buildCharSplit(document.getElementById('heroSub'), 'Every character, perfectly timed.', 600);
}
function runAll() {
heroLine1(); heroLine2(); heroSub();
buildWordReveal();
buildScramble();
}
buildWave();
runAll();
runWave(1200);
```
### 22. Progress Bar Animation
**Type:** CSS + JS
**Description:** Labelled skill bars, shimmer and striped variants, thin page-load indicators, circular SVG rings and step segment indicators with animated fills.
**HTML:**
```html
Progress Bar Animation CSS
Smooth fills, shimmer, radial rings and step indicators
Skill / Label Bars
↺ Replay
Shimmer & Striped Variants
Page / Loading Indicators
Determinate — fetching data
Indeterminate — waiting for server
Circular Progress Rings
↺ Replay
Step Indicators
↺ Replay
Order progress Step 3 of 5
Placed Confirmed Packed Shipped Delivered
```
**CSS:**
```css
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: #0d1117; color: #e6edf3; min-height: 100vh; }
.page { padding: 60px 40px; max-width: 900px; margin: 0 auto; }
h1 { font-size: 2rem; text-align: center; margin-bottom: 8px; color: #fff; }
.subtitle { color: #8b949e; text-align: center; margin-bottom: 50px; }
section { margin-bottom: 60px; }
section > h2 { color: #58a6ff; font-size: .75rem; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 20px; padding-bottom: 8px; border-bottom: 1px solid #21262d; }
.replay-btn {
display: inline-flex; gap: 6px; align-items: center; margin-bottom: 20px;
padding: 8px 18px; border-radius: 8px; border: 1px solid #30363d;
background: #161b22; color: #c9d1d9; font-size: .82rem; cursor: pointer;
transition: background .2s;
}
.replay-btn:hover { background: #21262d; }
/* ─────────────────────────────────────
1. Standard labelled bars
───────────────────────────────────── */
.bar-list { display: flex; flex-direction: column; gap: 18px; }
.bar-row { }
.bar-meta { display: flex; justify-content: space-between; margin-bottom: 8px; }
.bar-label { font-size: .875rem; color: #e6edf3; }
.bar-pct { font-size: .875rem; color: #8b949e; font-variant-numeric: tabular-nums; }
.bar-track {
height: 8px; border-radius: 4px;
background: #21262d; overflow: hidden;
}
.bar-fill {
height: 100%; border-radius: 4px; width: 0;
transition: width 1.2s cubic-bezier(.25,1,.5,1);
}
.bf-blue { background: linear-gradient(90deg, #1d6fe6, #58a6ff); }
.bf-green { background: linear-gradient(90deg, #1a7f37, #3fb950); }
.bf-purple { background: linear-gradient(90deg, #5e2d91, #a78bfa); }
.bf-orange { background: linear-gradient(90deg, #9a4f00, #f0883e); }
.bf-red { background: linear-gradient(90deg, #8a1f1f, #f85149); }
/* ─────────────────────────────────────
2. Striped / animated shimmer bars
───────────────────────────────────── */
.bar-fill.striped {
background-image: repeating-linear-gradient(
45deg,
rgba(255,255,255,.08) 0,
rgba(255,255,255,.08) 10px,
transparent 10px,
transparent 20px
);
background-size: 28px 100%;
animation: stripe-move 1s linear infinite;
}
@keyframes stripe-move {
from { background-position: 0 0; }
to { background-position: 28px 0; }
}
.bar-fill.shimmer::after {
content: ''; display: block; height: 100%;
background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.25) 50%, transparent 100%);
background-size: 60% 100%; background-repeat: no-repeat;
animation: shimmer-sweep 2s ease-in-out infinite;
}
@keyframes shimmer-sweep {
from { background-position: -60% 0; }
to { background-position: 160% 0; }
}
/* ─────────────────────────────────────
3. Thin loader / page-top bars
───────────────────────────────────── */
.loader-box { background: #161b22; border-radius: 12px; padding: 24px; margin-bottom: 12px; }
.loader-label { color: #8b949e; font-size: .8rem; margin-bottom: 12px; }
.loader-track { height: 3px; background: #21262d; border-radius: 2px; overflow: hidden; }
.loader-fill {
height: 100%; border-radius: 2px;
background: linear-gradient(90deg, #58a6ff, #a78bfa);
}
.loader-fill.indeterminate {
width: 40%; animation: indeterminate 1.8s ease-in-out infinite;
}
@keyframes indeterminate {
0% { transform: translateX(-100%); }
100% { transform: translateX(350%); }
}
.loader-fill.pulse-glow {
width: 0; transition: width 2s ease;
box-shadow: 0 0 8px rgba(88,166,255,.7);
}
/* ─────────────────────────────────────
4. Circular / radial
───────────────────────────────────── */
.circle-grid { display: flex; flex-wrap: wrap; gap: 24px; }
.circle-wrap { text-align: center; }
.circle-svg { transform: rotate(-90deg); }
.circle-track { fill: none; stroke: #21262d; stroke-width: 6; }
.circle-arc {
fill: none; stroke-width: 6; stroke-linecap: round;
stroke-dashoffset: 283; /* full circumference = 2π×45 ≈ 283 */
transition: stroke-dashoffset 1.4s cubic-bezier(.25,1,.5,1);
}
.ca-blue { stroke: url(#grad-blue); }
.ca-green { stroke: #3fb950; }
.ca-purple { stroke: #a78bfa; }
.ca-orange { stroke: #f0883e; }
.circle-inner {
font-size: 1.1rem; font-weight: 700; color: #fff; margin-top: 8px;
}
.circle-sub { font-size: .75rem; color: #8b949e; }
/* ─────────────────────────────────────
5. Step / multi-segment
───────────────────────────────────── */
.step-track { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.step-seg { flex: 1; background: #21262d; border-radius: 3px; transform-origin: left; transform: scaleX(0); transition: transform .4s ease; }
.step-seg.filled { background: #3fb950; }
.step-seg.done { transform: scaleX(1); }
.step-labels { display: flex; justify-content: space-between; margin-top: 8px; }
.step-labels span { font-size: .72rem; color: #8b949e; }
```
**JS:**
```js
/* ── Animate % counter ── */
function animatePct(el, to, dur = 1200) {
let start = null;
function step(ts) {
if (!start) start = ts;
const p = Math.min((ts - start) / dur, 1);
el.textContent = Math.round(p * to) + '%';
if (p < 1) requestAnimationFrame(step);
}
requestAnimationFrame(step);
}
/* ── 1 & 2. Linear bars ── */
function runBars() {
['barList','barList2'].forEach(id => {
document.querySelectorAll(`#${id} .bar-fill`).forEach((fill, i) => {
fill.style.width = '0';
void fill.offsetWidth;
const to = fill.dataset.to;
setTimeout(() => {
fill.style.width = to + '%';
const pctEl = document.getElementById('pct' + (id === 'barList' ? i : i + 5));
if (pctEl) animatePct(pctEl, parseInt(to));
}, i * 150);
});
});
// Thin loader
const tl = document.getElementById('thinLoader');
tl.style.width = '0';
void tl.offsetWidth;
setTimeout(() => { tl.style.width = '78%'; }, 300);
}
/* ── 4. Circular ── */
const CIRCLES = [
{ pct: 87, color: 'ca-blue', label: 'Performance', stroke: 'url(#grad-blue)' },
{ pct: 73, color: 'ca-green', label: 'Accessibility', stroke: '#3fb950' },
{ pct: 94, color: 'ca-purple', label: 'Best Practice', stroke: '#a78bfa' },
{ pct: 61, color: 'ca-orange', label: 'SEO Score', stroke: '#f0883e' },
];
const C = 2 * Math.PI * 45; // ≈ 282.7
function buildCircles() {
const grid = document.getElementById('circleGrid');
// keep the defs svg
const defs = grid.querySelector('svg');
grid.innerHTML = '';
grid.appendChild(defs);
CIRCLES.forEach(d => {
const wrap = document.createElement('div');
wrap.className = 'circle-wrap';
wrap.innerHTML = `
0%
${d.label}
`;
grid.appendChild(wrap);
});
}
function runCircles() {
buildCircles();
CIRCLES.forEach((d, i) => {
const arcs = document.querySelectorAll('.circle-arc');
const nums = document.querySelectorAll('.circle-inner');
setTimeout(() => {
arcs[i].style.strokeDashoffset = C * (1 - d.pct / 100);
animatePct(nums[i], d.pct, 1400);
}, i * 180);
});
}
/* ── 5. Steps ── */
const TOTAL_STEPS = 5, FILLED = 3;
function buildSteps() {
const track = document.getElementById('stepTrack');
track.innerHTML = '';
for (let i = 0; i < TOTAL_STEPS; i++) {
const seg = document.createElement('div');
seg.className = 'step-seg' + (i < FILLED ? ' filled' : '');
track.appendChild(seg);
}
}
function runSteps() {
buildSteps();
document.querySelectorAll('.step-seg').forEach((seg, i) => {
setTimeout(() => seg.classList.add('done'), i * 150 + 100);
});
}
// Init
setTimeout(runBars, 300);
setTimeout(runCircles, 500);
setTimeout(runSteps, 700);
```
---
## 14 CSS Typewriter Effect Designs
URL: https://codefronts.com/motion/css-typewriter-effect/
Description: 14 hand-coded CSS typewriter effects with live demos — canonical pure-CSS steps() + ch cursor, multi-line stagger, infinite word-swap loop, neon terminal prompt, clip-path reveal mask, SVG stroke-dashoffset handwriting, gradient highlight sweep, variable-font weight morph, per-character split stagger, vanilla-JS character injection, Matrix-rain scramble decode, RGB-channel glitch-on-type, syntax-highlighted code-editor typewriter, and scroll-triggered word reveal. 9 pure CSS (no JavaScript) + 5 with a tiny vanilla JS snippet — no framework. Modern @property + steps() techniques, prefers-reduced-motion honoured, MIT licensed.
Demo count: 14
### 01. CSS Typewriter steps() Cursor
**Type:** Pure CSS
**Description:** The canonical CSS-only typewriter: width animates from 0 to a fixed ch value using steps() timing, paired with a blinking border-right cursor — no JS at all.
**HTML:**
```html
Frontend Developer
Hello, World.
Building beautiful interfaces with code.
```
**CSS:**
```css
.tw-01, .tw-01 *, .tw-01 *::before, .tw-01 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-01 ::selection { background: #a78bfa; color: #0f0a1e; }
.tw-01 {
--bg: #0f0a1e;
--surface: #1a1033;
--accent: #a78bfa;
--text: #e2d9f3;
--muted: #6b5fa0;
font-family: 'Courier New', Courier, monospace;
min-height: 340px;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 24px;
}
.tw-01__stage {
display: flex;
flex-direction: column;
gap: 16px;
}
.tw-01__label {
font-size: 0.75rem;
letter-spacing: 0.2em;
text-transform: uppercase;
color: var(--accent);
opacity: 0;
animation: tw-01-fadein 0.4s 0.2s forwards;
}
.tw-01__text {
font-size: clamp(1.8rem, 5vw, 3rem);
font-weight: 700;
color: var(--text);
overflow: hidden;
white-space: nowrap;
width: 0;
border-right: 3px solid var(--accent);
animation:
tw-01-type 1.1s steps(13) 0.8s forwards,
tw-01-blink 0.75s steps(2) 0.8s infinite;
}
.tw-01__sub {
font-size: 0.95rem;
color: var(--muted);
overflow: hidden;
white-space: nowrap;
width: 0;
animation: tw-01-sub 1.5s steps(38) 2.2s forwards;
}
@keyframes tw-01-type {
from { width: 0; }
to { width: 13ch; }
}
@keyframes tw-01-sub {
from { width: 0; }
to { width: 38ch; }
}
@keyframes tw-01-blink {
0%, 100% { border-color: var(--accent); }
50% { border-color: transparent; }
}
@keyframes tw-01-fadein {
to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
.tw-01__text { width: 13ch; animation: none; border-right-color: var(--accent); }
.tw-01__sub { width: 38ch; animation: none; }
.tw-01__label { opacity: 1; animation: none; }
}
```
### 02. CSS Typewriter Multiline Stagger
**Type:** Pure CSS
**Description:** Multiple lines reveal sequentially using staggered animation-delay on each row, creating a cascading terminal-output feel entirely in CSS.
**HTML:**
```html
terminal — bash
$ initialising project scaffold...
✓ Dependencies resolved (1.2s)
✓ TypeScript config generated
✓ Tailwind CSS v4 installed
$ npm run dev █
```
**CSS:**
```css
.tw-02, .tw-02 *, .tw-02 *::before, .tw-02 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-02 ::selection { background: #22d3ee; color: #001a1f; }
.tw-02 {
--green: #4ade80;
--cyan: #22d3ee;
--bg: #0a0f0a;
--surface: #111811;
--border: #1e2d1e;
font-family: 'Courier New', monospace;
min-height: 340px;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 24px;
}
.tw-02__terminal {
width: 100%;
max-width: 520px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(74,222,128,0.05);
overflow: hidden;
}
.tw-02__bar {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 16px;
background: #0d150d;
border-bottom: 1px solid var(--border);
}
.tw-02__dot {
width: 12px; height: 12px;
border-radius: 50%;
background: #3a3a3a;
}
.tw-02__dot:nth-child(1) { background: #ff5f57; }
.tw-02__dot:nth-child(2) { background: #febc2e; }
.tw-02__dot:nth-child(3) { background: #28c840; }
.tw-02__title {
margin-left: auto;
font-size: 0.72rem;
color: #3a5a3a;
letter-spacing: 0.05em;
}
.tw-02__body {
padding: 24px 20px;
display: flex;
flex-direction: column;
gap: 10px;
}
.tw-02__line {
font-size: 0.9rem;
color: var(--green);
overflow: hidden;
white-space: nowrap;
width: 0;
animation: tw-02-type steps(var(--len)) var(--delay) forwards;
animation-duration: calc(var(--len) * 0.055s);
}
.tw-02__line:nth-child(2) { color: #86efac; }
.tw-02__line:nth-child(3) { color: #86efac; }
.tw-02__line:nth-child(4) { color: #86efac; }
.tw-02__line--active { color: var(--cyan); }
@keyframes tw-02-type {
from { width: 0; }
to { width: calc(var(--len) * 1ch); }
}
@media (prefers-reduced-motion: reduce) {
.tw-02__line { width: calc(var(--len) * 1ch); animation: none; }
}
```
### 03. CSS Typewriter Word Swap Loop
**Type:** Pure CSS
**Description:** A hero headline cycles through swappable highlight words using a single CSS keyframe that animates width and color on a looping overflow-hidden container.
**HTML:**
```html
We design
websites
products
systems
futures
websites
Digital craftsmanship for ambitious brands.
```
**CSS:**
```css
.tw-03, .tw-03 *, .tw-03 *::before, .tw-03 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-03 ::selection { background: #f97316; color: #1a0800; }
.tw-03 {
--orange: #f97316;
--amber: #fbbf24;
--bg: #0c0802;
--text: #fef3c7;
--muted: #92400e;
font-family: 'Georgia', serif;
min-height: 340px;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 24px;
}
.tw-03__hero {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
}
.tw-03__headline {
font-size: clamp(1.8rem, 5vw, 3.2rem);
color: var(--text);
font-weight: 300;
line-height: 1.3;
display: flex;
align-items: baseline;
gap: 0.3em;
flex-wrap: wrap;
justify-content: center;
}
.tw-03__slot {
display: inline-block;
overflow: hidden;
height: 1.2em;
vertical-align: bottom;
border-right: 3px solid var(--orange);
background: linear-gradient(135deg, rgba(249,115,22,0.15), rgba(251,191,36,0.08));
border-radius: 4px;
padding: 0 6px;
animation:
tw-03-width 8s steps(1) infinite,
tw-03-blink 0.65s steps(2) infinite;
}
.tw-03__words {
display: flex;
flex-direction: column;
animation: tw-03-scroll 8s steps(4) infinite;
}
.tw-03__words span {
font-style: italic;
font-weight: 600;
color: var(--orange);
flex-shrink: 0;
height: 1.2em;
line-height: 1.2;
white-space: nowrap;
}
.tw-03__sub {
font-size: 1rem;
color: var(--muted);
letter-spacing: 0.05em;
}
@keyframes tw-03-scroll {
0% { transform: translateY(0); }
25% { transform: translateY(-1.2em); }
50% { transform: translateY(-2.4em); }
75% { transform: translateY(-3.6em); }
100% { transform: translateY(0); }
}
@keyframes tw-03-width {
0%,100% { width: 7.5ch; }
25% { width: 8ch; }
50% { width: 7.5ch; }
75% { width: 7.5ch; }
}
@keyframes tw-03-blink {
0%,100% { border-color: var(--orange); }
50% { border-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
.tw-03__slot { animation: none; border-right-color: var(--orange); }
.tw-03__words { animation: none; }
}
```
### 04. CSS Typewriter Neon Terminal
**Type:** Pure CSS
**Description:** A glowing neon CRT-style terminal with scanlines, phosphor bloom, and a stepped-width typewriter revealing a command prompt sequence — all in pure CSS.
**HTML:**
```html
════════════════════════════════
Last login: Mon Jun 9 04:12:33 UTC 2025
root@axiom:~$ ls -la /vault
drwxr-x--- 8 root root 4096 vault/
root@axiom:~$ cat manifest.enc
DECRYPTING... ██░░░░
```
**CSS:**
```css
.tw-04, .tw-04 *, .tw-04 *::before, .tw-04 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-04 ::selection { background: #00ff41; color: #000; }
.tw-04 {
--phosphor: #00ff41;
--dim: #00882a;
--bg: #030a03;
font-family: 'Courier New', monospace;
background: #000;
min-height: 340px;
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
}
.tw-04__crt {
position: relative;
width: 100%;
max-width: 540px;
border: 2px solid #00441a;
border-radius: 8px;
padding: 28px 24px;
box-shadow:
0 0 40px rgba(0,255,65,0.12),
0 0 80px rgba(0,255,65,0.06),
inset 0 0 60px rgba(0,0,0,0.5);
overflow: hidden;
}
.tw-04__scanlines {
position: absolute;
inset: 0;
background: repeating-linear-gradient(
to bottom,
transparent 0px,
transparent 2px,
rgba(0,0,0,0.25) 2px,
rgba(0,0,0,0.25) 4px
);
pointer-events: none;
z-index: 2;
border-radius: 8px;
}
.tw-04__content {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
gap: 8px;
}
.tw-04__header {
font-size: 0.72rem;
color: var(--dim);
letter-spacing: 0.12em;
margin-bottom: 4px;
text-shadow: 0 0 6px var(--dim);
}
.tw-04__divider {
color: #00441a;
font-size: 0.75rem;
letter-spacing: 0;
margin-bottom: 8px;
}
.tw-04__line {
font-size: 0.88rem;
color: var(--phosphor);
text-shadow: 0 0 8px rgba(0,255,65,0.8), 0 0 20px rgba(0,255,65,0.3);
white-space: nowrap;
overflow: hidden;
}
.tw-04__line--dim {
color: var(--dim);
text-shadow: 0 0 4px rgba(0,136,42,0.5);
}
.tw-04__line--cmd {
width: 0;
animation: tw-04-type steps(var(--len)) var(--d, 0s) forwards;
animation-duration: calc(var(--len, 24) * 0.06s);
}
.tw-04__line--out {
opacity: 0;
animation: tw-04-appear 0.1s var(--d, 0s) forwards;
}
.tw-04__line--active {
color: #7fff7f;
width: 0;
animation: tw-04-type steps(var(--len)) var(--d, 0s) forwards;
animation-duration: calc(var(--len, 18) * 0.08s);
}
@keyframes tw-04-type {
from { width: 0; }
to { width: calc(var(--len) * 1ch); }
}
@keyframes tw-04-appear {
to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
.tw-04__line--cmd, .tw-04__line--active { width: calc(var(--len, 24) * 1ch); animation: none; }
.tw-04__line--out { opacity: 1; animation: none; }
}
```
### 05. CSS Typewriter clip-path Reveal
**Type:** Pure CSS
**Description:** Text is revealed character-by-character using an animated clip-path inset that travels left-to-right — giving a hard-edged paint-stroke reveal instead of the usual overflow trick.
**HTML:**
```html
Award-winning studio
Craft that
moves people.
```
**CSS:**
```css
.tw-05, .tw-05 *, .tw-05 *::before, .tw-05 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-05 ::selection { background: #ec4899; color: #1a0010; }
.tw-05 {
--pink: #ec4899;
--rose: #fb7185;
--bg: #0d0008;
--text: #fdf2f8;
--muted: #831843;
font-family: 'Georgia', 'Times New Roman', serif;
min-height: 340px;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 32px;
}
.tw-05__stage {
display: flex;
flex-direction: column;
gap: 12px;
max-width: 480px;
}
.tw-05__eyebrow {
font-size: 0.72rem;
letter-spacing: 0.25em;
text-transform: uppercase;
color: var(--pink);
clip-path: inset(0 100% 0 0);
animation: tw-05-reveal 0.6s steps(1) 0.3s forwards;
}
.tw-05__heading {
display: flex;
flex-direction: column;
gap: 4px;
}
.tw-05__line {
display: block;
position: relative;
font-size: clamp(2rem, 6vw, 3.8rem);
font-weight: 700;
color: var(--text);
line-height: 1.1;
clip-path: inset(0 100% 0 0);
overflow: hidden;
}
.tw-05__line::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(90deg, var(--pink), var(--rose));
opacity: 0.25;
clip-path: inset(0 100% 0 0);
}
.tw-05__line--1 {
animation: tw-05-reveal 0.9s steps(10) 0.8s forwards;
}
.tw-05__line--1::before {
animation: tw-05-reveal 0.9s steps(10) 0.6s forwards;
}
.tw-05__line--2 {
animation: tw-05-reveal 1.1s steps(13) 2s forwards;
}
.tw-05__line--2::before {
animation: tw-05-reveal 1.1s steps(13) 1.8s forwards;
}
.tw-05__cursor {
width: 3px;
height: 2.4rem;
background: var(--pink);
box-shadow: 0 0 12px var(--pink);
animation: tw-05-blink 0.8s steps(2) 2.8s infinite;
opacity: 0;
}
@keyframes tw-05-reveal {
from { clip-path: inset(0 100% 0 0); }
to { clip-path: inset(0 0% 0 0); }
}
@keyframes tw-05-blink {
0%,100% { opacity: 1; }
50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
.tw-05__eyebrow, .tw-05__line, .tw-05__line::before { clip-path: none; animation: none; }
.tw-05__cursor { opacity: 1; animation: none; }
}
```
### 06. CSS Typewriter SVG stroke-dashoffset
**Type:** Pure CSS
**Description:** SVG text paths are drawn stroke-first using an animated stroke-dashoffset, revealing each letter as a hand-lettered signature — a technique impossible with HTML alone.
**HTML:**
```html
Signature
SVG stroke-dashoffset draw technique
```
**CSS:**
```css
.tw-06, .tw-06 *, .tw-06 *::before, .tw-06 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-06 ::selection { background: #818cf8; color: #0a0820; }
.tw-06 {
--indigo: #818cf8;
--purple: #c084fc;
--bg: #0a0820;
font-family: Georgia, serif;
background: radial-gradient(ellipse at 50% 60%, #12103a 0%, var(--bg) 70%);
min-height: 340px;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 24px;
}
.tw-06__stage {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
width: 100%;
max-width: 520px;
}
.tw-06__svg {
width: 100%;
height: auto;
overflow: visible;
filter: drop-shadow(0 0 20px rgba(129,140,248,0.3));
}
.tw-06__word {
stroke-dasharray: var(--dash, 1400);
stroke-dashoffset: var(--dash, 1400);
fill-opacity: 0;
animation:
tw-06-draw 2.4s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards,
tw-06-fill 0.5s ease 2.7s forwards;
}
.tw-06__caption {
font-size: 0.75rem;
letter-spacing: 0.15em;
text-transform: uppercase;
color: #4338ca;
}
@keyframes tw-06-draw {
from { stroke-dashoffset: var(--dash, 1400); }
to { stroke-dashoffset: 0; }
}
@keyframes tw-06-fill {
from { fill-opacity: 0; }
to { fill-opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
.tw-06__word { stroke-dashoffset: 0; fill-opacity: 1; animation: none; }
}
```
### 07. CSS Typewriter Gradient Highlight Sweep
**Type:** Pure CSS
**Description:** Text is revealed by a travelling gradient mask that sweeps left-to-right, creating a spotlight-highlight typewriter where unread text sits invisible and highlighted text glows into view.
**HTML:**
```html
INCOMING TRANSMISSION
The future is already here.
```
**CSS:**
```css
.tw-07, .tw-07 *, .tw-07 *::before, .tw-07 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-07 ::selection { background: #06b6d4; color: #00090f; }
.tw-07 {
--cyan: #06b6d4;
--blue: #3b82f6;
--bg: #00090f;
--dim: #0e2830;
font-family: 'Courier New', monospace;
min-height: 340px;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 32px;
}
.tw-07__scene {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
text-align: center;
max-width: 560px;
}
.tw-07__label {
font-size: 0.72rem;
letter-spacing: 0.3em;
color: #0e4a5a;
animation: tw-07-fadein 0.5s 0.3s both;
}
.tw-07__text {
font-size: clamp(1.6rem, 5vw, 2.6rem);
font-weight: 700;
position: relative;
white-space: nowrap;
color: var(--dim);
}
.tw-07__text::after {
content: attr(data-text);
position: absolute;
inset: 0;
background: linear-gradient(
90deg,
transparent 0%,
var(--cyan) 48%,
#ffffff 50%,
transparent 52%,
transparent 100%
);
background-size: 220% 100%;
background-position: 140% center;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: tw-07-sweep 2.4s steps(26) 0.8s forwards;
}
.tw-07__bar {
height: 2px;
width: 0;
background: linear-gradient(90deg, var(--blue), var(--cyan));
box-shadow: 0 0 12px var(--cyan);
animation: tw-07-bar 2.4s steps(26) 0.8s forwards;
border-radius: 1px;
align-self: flex-start;
margin-left: calc(50% - 13ch);
}
@keyframes tw-07-sweep {
from { background-position: 140% center; }
to { background-position: -20% center; }
}
@keyframes tw-07-bar {
from { width: 0; }
to { width: 26ch; }
}
@keyframes tw-07-fadein {
from { opacity: 0; }
to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
.tw-07__text::after { background-position: -20% center; animation: none; }
.tw-07__bar { width: 26ch; animation: none; }
.tw-07__label { opacity: 1; animation: none; }
}
```
### 08. CSS Typewriter Variable Font Weight Morph
**Type:** Pure CSS
**Description:** Each character of a variable font headline morphs from ultra-light to black weight as it "types in", using staggered font-variation-settings animations — no width tricks required.
**HTML:**
```html
Variable font axis animation
E
V
O
L
V
E
font-variation-settings "wght" morph
```
**CSS:**
```css
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');
.tw-08, .tw-08 *, .tw-08 *::before, .tw-08 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-08 ::selection { background: #f59e0b; color: #1a0e00; }
.tw-08 {
--amber: #f59e0b;
--gold: #fcd34d;
--bg: #0d0900;
font-family: 'Inter', system-ui, sans-serif;
background: radial-gradient(ellipse at 50% 40%, #1a1000 0%, var(--bg) 65%);
min-height: 340px;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 24px;
}
.tw-08__stage {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.tw-08__pre, .tw-08__post {
font-size: 0.72rem;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #4a3500;
animation: tw-08-fadein 0.5s 0.2s both;
}
.tw-08__word {
display: flex;
gap: 0.02em;
font-size: clamp(3rem, 12vw, 7rem);
line-height: 1;
}
.tw-08__word span {
display: inline-block;
opacity: 0;
font-variation-settings: 'wght' 100;
color: var(--amber);
letter-spacing: 0.05em;
text-shadow: 0 0 0px transparent;
animation: tw-08-stamp 0.6s cubic-bezier(0.2, 0, 0, 1) calc(var(--i) * 0.12s + 0.5s) both;
}
@keyframes tw-08-stamp {
0% { opacity: 0; font-variation-settings: 'wght' 100; letter-spacing: 0.3em; text-shadow: 0 0 0 transparent; }
60% { opacity: 1; font-variation-settings: 'wght' 950; letter-spacing: -0.02em; text-shadow: 0 0 30px rgba(245,158,11,0.6); }
100% { opacity: 1; font-variation-settings: 'wght' 700; letter-spacing: 0.02em; text-shadow: 0 0 8px rgba(245,158,11,0.2); }
}
@keyframes tw-08-fadein {
from { opacity: 0; }
to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
.tw-08__word span {
opacity: 1;
font-variation-settings: 'wght' 700;
letter-spacing: 0.02em;
animation: none;
}
}
```
### 09. CSS Typewriter Split Char Stagger
**Type:** Pure CSS
**Description:** Individual characters pop in sequentially using staggered translateY + opacity keyframes, creating a kinetic editorial type-in effect used in modern agency hero sections.
**HTML:**
```html
New collection 2025
M
O
T
I
O
N
Design
Studio
```
**CSS:**
```css
.tw-09, .tw-09 *, .tw-09 *::before, .tw-09 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-09 ::selection { background: #10b981; color: #001a10; }
.tw-09 {
--green: #10b981;
--emerald: #34d399;
--bg: #020e09;
--text: #ecfdf5;
font-family: 'Georgia', serif;
min-height: 340px;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 24px;
}
.tw-09__canvas {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
}
.tw-09__kicker {
font-size: 0.72rem;
letter-spacing: 0.25em;
text-transform: uppercase;
color: var(--green);
opacity: 0;
animation: tw-09-fade 0.4s 0.1s both;
}
.tw-09__headline {
display: flex;
font-size: clamp(3.5rem, 14vw, 8rem);
font-weight: 700;
line-height: 1;
gap: 0;
letter-spacing: -0.03em;
}
.tw-09__char {
display: inline-block;
overflow: hidden;
padding-bottom: 0.1em;
}
.tw-09__char > span,
.tw-09__word > span {
display: inline-block;
color: var(--text);
opacity: 0;
transform: translateY(0.8em);
animation: tw-09-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i) * 0.05s + 0.2s) both;
}
.tw-09__sub {
display: flex;
gap: 0.5em;
font-size: 1.1rem;
letter-spacing: 0.15em;
text-transform: uppercase;
font-style: italic;
color: var(--green);
overflow: hidden;
}
.tw-09__word {
display: inline-block;
overflow: hidden;
}
@keyframes tw-09-up {
from { opacity: 0; transform: translateY(0.8em); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes tw-09-fade {
to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
.tw-09__char > span, .tw-09__word > span { opacity: 1; transform: none; animation: none; }
.tw-09__kicker { opacity: 1; animation: none; }
}
```
### 10. CSS Typewriter JS Character Injection
**Type:** CSS + JS
**Description:** JavaScript injects characters one by one into the DOM at a configurable speed, enabling proportional fonts, dynamic strings, pause-on-hover, and click-to-restart — all styled with CSS.
**HTML:**
```html
claude@studio:~$
↺ Restart
```
**CSS:**
```css
.tw-10, .tw-10 *, .tw-10 *::before, .tw-10 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-10 ::selection { background: #7c3aed; color: #f5f3ff; }
.tw-10 {
--violet: #7c3aed;
--lavender: #a78bfa;
--bg: #09050f;
--card: #120e1f;
--border: #2a1f45;
font-family: 'Courier New', monospace;
min-height: 340px;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 24px;
}
.tw-10__card {
width: 100%;
max-width: 500px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 16px;
padding: 32px 28px;
box-shadow: 0 24px 64px rgba(124,58,237,0.15);
display: flex;
flex-direction: column;
gap: 16px;
}
.tw-10__prompt {
font-size: 0.8rem;
color: var(--lavender);
opacity: 0.6;
}
.tw-10__output {
font-size: clamp(1.1rem, 3.5vw, 1.5rem);
color: #f5f3ff;
min-height: 2.4em;
line-height: 1.5;
position: relative;
}
.tw-10__output::after {
content: '';
display: inline-block;
width: 2px;
height: 1.1em;
background: var(--lavender);
vertical-align: middle;
margin-left: 2px;
animation: tw-10-blink 0.75s steps(2) infinite;
}
.tw-10__output[data-state="done"]::after {
background: var(--violet);
animation-duration: 1.2s;
}
.tw-10__restart {
align-self: flex-start;
background: transparent;
border: 1px solid var(--border);
color: var(--lavender);
font-family: inherit;
font-size: 0.8rem;
padding: 6px 14px;
border-radius: 6px;
cursor: pointer;
transition: border-color 0.2s, color 0.2s;
}
.tw-10__restart:hover { border-color: var(--lavender); color: #fff; }
@keyframes tw-10-blink {
0%,100% { opacity: 1; }
50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
.tw-10__output::after { animation: none; opacity: 1; }
}
```
**JS:**
```js
(function() {
const el = document.getElementById('tw-10-output');
const btn = document.getElementById('tw-10-restart');
if (!el) return;
const strings = [
'Designing with intention, building with precision.',
'Every pixel tells a story.',
'Code is craft. Make it beautiful.'
];
let strIdx = 0, charIdx = 0, timer = null;
function getDelay(char) {
if ('.!?'.includes(char)) return 520;
if (',;:'.includes(char)) return 240;
return 55 + Math.random() * 30;
}
function type() {
const str = strings[strIdx];
if (charIdx < str.length) {
el.textContent += str[charIdx];
charIdx++;
timer = setTimeout(type, getDelay(str[charIdx - 1]));
} else {
el.dataset.state = 'done';
timer = setTimeout(() => {
erase();
}, 2200);
}
}
function erase() {
const str = strings[strIdx];
if (el.textContent.length > 0) {
el.textContent = el.textContent.slice(0, -1);
el.dataset.state = 'typing';
timer = setTimeout(erase, 28);
} else {
strIdx = (strIdx + 1) % strings.length;
charIdx = 0;
timer = setTimeout(type, 400);
}
}
function restart() {
clearTimeout(timer);
el.textContent = '';
el.dataset.state = 'typing';
strIdx = 0; charIdx = 0;
timer = setTimeout(type, 300);
}
btn.addEventListener('click', restart);
restart();
})();
```
### 11. CSS Typewriter Matrix Scramble Decode
**Type:** CSS + JS
**Description:** Random characters scramble across the target string before each letter snaps to its final value — a hacker-movie decode effect powered by JS with CSS glow styling.
**HTML:**
```html
DECRYPTING PAYLOAD
▶ DECODE
```
**CSS:**
```css
.tw-11, .tw-11 *, .tw-11 *::before, .tw-11 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-11 ::selection { background: #00ff41; color: #000; }
.tw-11 {
--green: #00ff41;
--dim: #003d10;
--bg: #020a03;
font-family: 'Courier New', monospace;
min-height: 340px;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 24px;
}
.tw-11__screen {
width: 100%;
max-width: 480px;
border: 1px solid #0a2a0a;
border-radius: 8px;
padding: 32px 24px;
position: relative;
overflow: hidden;
background: #030c03;
box-shadow: 0 0 40px rgba(0,255,65,0.08), inset 0 0 40px rgba(0,0,0,0.5);
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 20px;
}
.tw-11__scan {
position: absolute;
inset: 0;
background: repeating-linear-gradient(
0deg, transparent, transparent 2px, rgba(0,255,65,0.03) 2px, rgba(0,255,65,0.03) 4px
);
pointer-events: none;
}
.tw-11__status {
font-size: 0.7rem;
letter-spacing: 0.2em;
color: var(--dim);
}
.tw-11__output {
font-size: clamp(1.4rem, 4vw, 2rem);
font-weight: 700;
color: var(--green);
text-shadow: 0 0 10px rgba(0,255,65,0.6);
letter-spacing: 0.08em;
min-height: 1.4em;
display: flex;
flex-wrap: wrap;
gap: 0;
}
.tw-11__output .tw-11-char {
display: inline-block;
color: var(--dim);
text-shadow: none;
transition: color 0.1s, text-shadow 0.1s;
}
.tw-11__output .tw-11-char.locked {
color: var(--green);
text-shadow: 0 0 12px rgba(0,255,65,0.8);
}
.tw-11__btn {
background: transparent;
border: 1px solid var(--dim);
color: var(--green);
font-family: inherit;
font-size: 0.78rem;
letter-spacing: 0.15em;
padding: 8px 18px;
cursor: pointer;
border-radius: 4px;
transition: border-color 0.2s, box-shadow 0.2s;
}
.tw-11__btn:hover {
border-color: var(--green);
box-shadow: 0 0 12px rgba(0,255,65,0.2);
}
@media (prefers-reduced-motion: reduce) {
.tw-11__output .tw-11-char { transition: none; }
}
```
**JS:**
```js
(function() {
const container = document.getElementById('tw-11-output');
const btn = document.getElementById('tw-11-run');
if (!container) return;
const TARGET = 'ACCESS GRANTED';
const NOISE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*<>?/|';
const SCRAMBLE_FRAMES = 10;
const CHAR_DELAY = 60;
let intervals = [];
function rand(str) {
return str[Math.floor(Math.random() * str.length)];
}
function run() {
intervals.forEach(clearInterval);
intervals = [];
container.innerHTML = '';
const spans = TARGET.split('').map((ch) => {
const span = document.createElement('span');
span.className = 'tw-11-char';
span.textContent = ch === ' ' ? ' ' : rand(NOISE);
container.appendChild(span);
return { span, final: ch };
});
spans.forEach(({ span, final }, i) => {
if (final === ' ') { span.textContent = ' '; return; }
let frames = 0;
const startDelay = i * CHAR_DELAY;
setTimeout(() => {
const iv = setInterval(() => {
if (frames >= SCRAMBLE_FRAMES) {
clearInterval(iv);
span.textContent = final;
span.classList.add('locked');
} else {
span.textContent = rand(NOISE);
frames++;
}
}, 40);
intervals.push(iv);
}, startDelay);
});
}
btn.addEventListener('click', run);
run();
})();
```
### 12. CSS Typewriter Glitch on Type
**Type:** CSS + JS
**Description:** Each character causes a brief glitch distortion on the preceding text as it lands — RGB channel splitting and clip-path slice distortion fire per-keystroke via JS class toggling.
**HTML:**
```html
SYSTEM BREACH
↺ REINITIALISE
```
**CSS:**
```css
.tw-12, .tw-12 *, .tw-12 *::before, .tw-12 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-12 ::selection { background: #ef4444; color: #1a0000; }
.tw-12 {
--red: #ef4444;
--cyan: #22d3ee;
--bg: #0a0000;
--text: #f8fafc;
font-family: 'Courier New', monospace;
min-height: 340px;
display: flex;
align-items: center;
justify-content: center;
padding: 48px 24px;
}
.tw-12__stage {
width: 100%;
max-width: 500px;
display: flex;
flex-direction: column;
gap: 20px;
}
.tw-12__chip {
font-size: 0.68rem;
letter-spacing: 0.25em;
color: var(--red);
border: 1px solid rgba(239,68,68,0.3);
display: inline-block;
padding: 4px 10px;
border-radius: 3px;
}
.tw-12__wrap {
position: relative;
overflow: hidden;
min-height: 3.5rem;
}
.tw-12__text {
font-size: clamp(1.4rem, 4.5vw, 2.2rem);
font-weight: 700;
color: var(--text);
line-height: 1.3;
position: relative;
white-space: pre-wrap;
word-break: break-word;
}
.tw-12__text::before,
.tw-12__text::after {
content: attr(data-text);
position: absolute;
inset: 0;
overflow: hidden;
opacity: 0;
pointer-events: none;
}
.tw-12__text.glitching::before {
opacity: 0.8;
color: var(--red);
transform: translateX(-4px);
clip-path: inset(var(--ct, 20%) 0 var(--cb, 60%) 0);
}
.tw-12__text.glitching::after {
opacity: 0.8;
color: var(--cyan);
transform: translateX(4px);
clip-path: inset(var(--ct2, 50%) 0 var(--cb2, 30%) 0);
}
.tw-12__controls {
display: flex;
gap: 12px;
}
.tw-12__btn {
background: transparent;
border: 1px solid rgba(239,68,68,0.3);
color: var(--red);
font-family: inherit;
font-size: 0.75rem;
letter-spacing: 0.12em;
padding: 7px 16px;
cursor: pointer;
border-radius: 4px;
transition: border-color 0.2s;
}
.tw-12__btn:hover { border-color: var(--red); }
@media (prefers-reduced-motion: reduce) {
.tw-12__text.glitching::before,
.tw-12__text.glitching::after { opacity: 0; }
}
```
**JS:**
```js
(function() {
const el = document.getElementById('tw-12-text');
const btn = document.getElementById('tw-12-restart');
if (!el) return;
const LINES = [
'Firewall bypassed.',
'Injecting payload...',
'Root access obtained.'
];
let timer = null;
let lineIdx = 0;
let charIdx = 0;
function glitch() {
const t1 = Math.random() * 40;
const t2 = t1 + 10 + Math.random() * 20;
el.style.setProperty('--ct', t1 + '%');
el.style.setProperty('--cb', (100 - t2) + '%');
el.style.setProperty('--ct2', (t1 + 30) % 80 + '%');
el.style.setProperty('--cb2', (100 - t2 - 10) + '%');
el.classList.add('glitching');
setTimeout(() => el.classList.remove('glitching'), 80);
}
function typeNext() {
const line = LINES[lineIdx];
if (charIdx <= line.length) {
const current = line.slice(0, charIdx);
el.textContent = current;
el.dataset.text = current;
if (charIdx > 0) glitch();
charIdx++;
timer = setTimeout(typeNext, 70 + Math.random() * 40);
} else {
timer = setTimeout(() => {
lineIdx = (lineIdx + 1) % LINES.length;
charIdx = 0;
timer = setTimeout(typeNext, 300);
}, 1800);
}
}
function restart() {
clearTimeout(timer);
el.textContent = '';
el.dataset.text = '';
el.classList.remove('glitching');
lineIdx = 0; charIdx = 0;
timer = setTimeout(typeNext, 400);
}
btn.addEventListener('click', restart);
restart();
})();
```
### 13. CSS Typewriter Code Editor Syntax
**Type:** CSS + JS
**Description:** A realistic VS Code-style editor types out syntax-highlighted code line by line, with a live line-number gutter, blinking cursor, and language-aware coloring — all orchestrated by JS.
**HTML:**
```html
```
**CSS:**
```css
.tw-13, .tw-13 *, .tw-13 *::before, .tw-13 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-13 ::selection { background: #264f78; color: #d4d4d4; }
.tw-13 {
--bg: #1e1e1e;
--surface: #252526;
--border: #3e3e42;
--text: #d4d4d4;
font-family: 'Courier New', 'Fira Code', monospace;
background: #111;
min-height: 340px;
display: flex;
align-items: center;
justify-content: center;
padding: 24px 16px;
}
.tw-13__editor {
width: 100%;
max-width: 540px;
border-radius: 10px;
border: 1px solid var(--border);
box-shadow: 0 24px 60px rgba(0,0,0,0.6);
overflow: hidden;
}
.tw-13__topbar {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 14px;
background: var(--surface);
border-bottom: 1px solid var(--border);
}
.tw-13__dot {
width: 12px; height: 12px; border-radius: 50%;
}
.tw-13__dot--r { background: #ff5f57; }
.tw-13__dot--y { background: #febc2e; }
.tw-13__dot--g { background: #28c840; }
.tw-13__filename {
margin-left: 8px;
font-size: 0.78rem;
color: #9d9d9d;
font-family: inherit;
}
.tw-13__body {
display: flex;
padding: 16px 0;
}
.tw-13__gutter {
padding: 0 16px;
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 2px;
min-width: 44px;
color: #495c73;
font-size: 0.82rem;
line-height: 1.7;
user-select: none;
}
.tw-13__code {
padding: 0 16px;
flex: 1;
font-size: 0.82rem;
line-height: 1.7;
color: var(--text);
display: flex;
flex-direction: column;
gap: 0;
min-height: 200px;
position: relative;
overflow: hidden;
}
.tw-13__code .ln {
display: block;
min-height: 1.7em;
white-space: pre;
}
.tw-13__code .kw { color: #569cd6; }
.tw-13__code .fn { color: #dcdcaa; }
.tw-13__code .str { color: #ce9178; }
.tw-13__code .num { color: #b5cea8; }
.tw-13__code .cm { color: #6a9955; }
.tw-13__code .tp { color: #4ec9b0; }
.tw-13__code .op { color: #d4d4d4; }
.tw-13__cursor {
display: inline-block;
width: 2px;
height: 1em;
background: #aeafad;
vertical-align: middle;
animation: tw-13-blink 0.9s steps(2) infinite;
}
@keyframes tw-13-blink {
0%,100% { opacity: 1; }
50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
.tw-13__cursor { animation: none; opacity: 1; }
}
```
**JS:**
```js
(function() {
const codeEl = document.getElementById('tw-13-code');
const gutterEl = document.getElementById('tw-13-gutter');
if (!codeEl) return;
// Pre-tokenised lines (HTML strings)
const LINES = [
'// Typewriter code editor demo ',
'interface User {',
' id: number ;',
' name: string ;',
' role: "admin" | "user" ;',
'}',
'',
'async function fetchUser (id: number ) {',
' const res = await fetch (`/api/users/${id}` );',
' return res.json () as User ;',
'}',
];
let lineIdx = 0, timer = null;
function addGutterLine(n) {
const span = document.createElement('span');
span.textContent = n;
gutterEl.appendChild(span);
}
function typeLine(html, lineEl, callback) {
// Extract plain text length for speed calculation
const tmp = document.createElement('div');
tmp.innerHTML = html;
const plain = tmp.textContent;
let i = 0;
// We reveal character-by-character by tracking text position through HTML
function tick() {
i++;
// Slice HTML to show first i plain-text characters
let visible = 0;
let result = '';
let inTag = false;
for (let ci = 0; ci < html.length; ci++) {
const ch = html[ci];
if (ch === '<') { inTag = true; result += ch; continue; }
if (ch === '>') { inTag = false; result += ch; continue; }
if (inTag) { result += ch; continue; }
if (visible < i) { result += ch; visible++; }
else break;
}
// Close any open tags
lineEl.innerHTML = result + ' ';
if (i <= plain.length) {
timer = setTimeout(tick, plain[i-1] === ' ' ? 30 : 55 + Math.random() * 20);
} else {
lineEl.innerHTML = html;
callback();
}
}
tick();
}
function typeNextLine() {
if (lineIdx >= LINES.length) return;
addGutterLine(lineIdx + 1);
const lineEl = document.createElement('span');
lineEl.className = 'ln';
codeEl.appendChild(lineEl);
const html = LINES[lineIdx];
lineIdx++;
typeLine(html, lineEl, () => {
timer = setTimeout(typeNextLine, 120);
});
}
typeNextLine();
})();
```
### 14. CSS Typewriter Scroll-Triggered Word Reveal
**Type:** CSS + JS
**Description:** Words in a long-form paragraph reveal sequentially only when the element enters the viewport — IntersectionObserver triggers staggered CSS class additions for a scroll-activated typewriter effect.
**HTML:**
```html
The art of good design.
Good design is not just about how something looks — it is about how it works, how it feels, and how it makes people feel in return. Every decision carries weight.
Typography, spacing, colour, motion — each is a tool in the designer's hand. Used well, they create clarity. Used poorly, they create noise. The difference is intention.
Design is intelligence made visible.
```
**CSS:**
```css
.tw-14, .tw-14 *, .tw-14 *::before, .tw-14 *::after { box-sizing: border-box; margin: 0; padding: 0; }
.tw-14 ::selection { background: #0ea5e9; color: #001a28; }
.tw-14 {
--blue: #0ea5e9;
--sky: #38bdf8;
--bg: #020d17;
--text: #e0f2fe;
--muted: #334e5e;
font-family: 'Georgia', 'Times New Roman', serif;
min-height: 340px;
display: flex;
align-items: flex-start;
justify-content: center;
padding: 48px 24px;
}
.tw-14__article {
max-width: 520px;
display: flex;
flex-direction: column;
gap: 24px;
}
.tw-14__heading {
font-size: clamp(1.8rem, 5vw, 2.8rem);
font-weight: 700;
color: var(--text);
line-height: 1.2;
}
.tw-14__body {
font-size: 1.05rem;
line-height: 1.8;
color: #94a3b8;
}
.tw-14__pullquote {
font-size: 1.2rem;
font-style: italic;
color: var(--sky);
border-left: 3px solid var(--blue);
padding-left: 20px;
}
/* Word reveal state machine */
.tw-14__reveal .tw-14-word {
display: inline-block;
opacity: 0;
transform: translateY(10px);
transition: opacity 0.4s ease, transform 0.4s ease;
transition-delay: min(calc(var(--wi) * 40ms), 900ms);
}
.tw-14__reveal.visible .tw-14-word {
opacity: 1;
transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
.tw-14__reveal .tw-14-word { opacity: 1; transform: none; transition: none; }
}
```
**JS:**
```js
(function() {
const targets = document.querySelectorAll('.tw-14__reveal');
if (!targets.length) return;
// Split text into word spans
targets.forEach((el) => {
const words = el.textContent.split(/(s+)/);
el.innerHTML = words.map((part, i) => {
if (/^s+$/.test(part)) return part;
return `${part} `;
}).join('');
});
// Observe each element
const observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting && entry.intersectionRatio > 0) {
entry.target.classList.add('visible');
observer.unobserve(entry.target);
}
});
}, { threshold: 0.15 });
targets.forEach((el) => observer.observe(el));
})();
```
---
## Tools
### Base64 Encoder / Decoder
URL: https://codefronts.com/tools/base64-encoder-decoder/
Description: Encode or decode Base64 — text, JSON, JWTs, and files up to 5 MB. Standard and URL-safe variants with full UTF-8 support and live preview.
Summary: Free online Base64 encoder and decoder. Encode UTF-8 text or files, decode standard or URL-safe Base64, inspect JWTs, and copy ready-to-use data: URIs.
### Colour Contrast Checker
URL: https://codefronts.com/tools/color-contrast-checker/
Description: Check WCAG 2.1 contrast ratios between any two colours — instant AA / AAA pass-fail with a live preview.
Summary: Free online colour contrast checker. Enter foreground and background colours to get the WCAG 2.1 contrast ratio with AA and AAA pass-fail ratings and a live preview.
### Color Format Converter
URL: https://codefronts.com/tools/color-format-converter/
Description: Convert between hex, rgb, hsl, oklch, oklab, hwb, and named colors. Bulk mode — paste a whole stylesheet and convert every color at once with one click.
Summary: Free online color format converter. Convert between hex, rgb, hsl, oklch, oklab, hwb, and named colors. Paste a whole stylesheet and convert every color at once.
### CSS Formatter & Beautifier
URL: https://codefronts.com/tools/css-formatter/
Description: Paste minified or messy CSS and instantly get a cleanly indented, readable version — configurable indent, optional alphabetical sorting, lowercase hex, and live preview.
Summary: Free CSS formatter and beautifier. Paste minified or messy CSS, get cleanly indented output with configurable indent, optional property sorting, live preview.
### CSS-in-JS to CSS Converter
URL: https://codefronts.com/tools/css-in-js-to-css-converter/
Description: Paste a styled-components or emotion block and get plain CSS — handles tagged templates and object syntax, resolves & nesting into real selectors, converts camelCase to kebab-case, and outputs Plain CSS, CSS Modules, or SCSS.
Summary: Free CSS-in-JS to CSS converter. Paste styled-components or emotion styles, get plain CSS, CSS Modules, or SCSS. Resolves & nesting and camelCase props.
### CSS Minifier
URL: https://codefronts.com/tools/css-minifier/
Description: Paste any CSS and instantly get a minified, production-ready version — strips comments, whitespace, and redundant tokens with live size savings.
Summary: Free online CSS minifier. Paste any stylesheet and get a minified output with live size savings. Trims whitespace, comments, leading zeros, hex colours and zero-units.
### CSS Specificity Calculator
URL: https://codefronts.com/tools/css-specificity-calculator/
Description: Paste any CSS selector and get its (a, b, c) specificity score — with a colour-coded breakdown of every ID, class, attribute, pseudo, and element.
Summary: Free online CSS specificity calculator. Paste selectors and get the (a, b, c) score with token-by-token breakdown. Compare selectors, see which wins, copy the result.
### CSS to Tailwind Converter
URL: https://codefronts.com/tools/css-to-tailwind-converter/
Description: Free CSS to Tailwind converter that turns any CSS block into clean Tailwind utility classes — instantly, in your browser, with no signup. Paste raw CSS, hover/focus pseudo-classes, or @media queries and get back Tailwind v3 or v4 utility classes with auto-applied variant prefixes (hover:, focus:, md:, lg:, dark:) and arbitrary-value fallbacks like px-[14px] for anything outside the default scale. Live preview included. Works offline. 100% client-side.
Summary: Free CSS to Tailwind converter. Paste CSS, get v3 + v4 utility classes. Auto-maps :hover, :focus, @media → hover:, focus:, md:. Live preview. No signup.
### CSS Unit Converter
URL: https://codefronts.com/tools/css-unit-converter/
Description: Convert between every CSS unit — px, rem, em, pt, vw, vh, %, cm, in, deg, rad, ms, dpi — with live context controls and copy-on-click.
Summary: Free online CSS unit converter for length, time, angle, and resolution. Convert px, rem, em, pt, vw, vh, %, cm, in, deg, rad, ms, dpi — with live context controls.
### CSS Variable Checker
URL: https://codefronts.com/tools/css-variable-checker/
Description: Paste any :root block and instantly see every --variable as a swatch, chip, or chain — with live filter, type detection, and var() resolution.
Summary: Free online CSS variable checker. Paste any :root or theme block to see every custom property as a colour swatch or typed chip, follow var() chains, and audit tokens.
### HTML Entity Encoder / Decoder
URL: https://codefronts.com/tools/html-entity-encoder/
Description: Encode or decode HTML entities — escape <, >, &, quotes, and special characters with named, decimal, or hex output.
Summary: Free online HTML entity encoder and decoder. Convert <, >, &, quotes, and Unicode symbols to named, decimal, or hex entities — and decode them back instantly.
### HTML to JSX Converter
URL: https://codefronts.com/tools/html-to-jsx-converter/
Description: Paste HTML, get React JSX — converts class to className, for to htmlFor, void elements to self-closing, event handlers to camelCase, and inline styles to object syntax. Handles 50+ attribute conversions and edge cases.
Summary: Free HTML to JSX converter for React. Paste HTML, get JSX with className, htmlFor, self-closed void elements, camelCase events, style objects. 50+ conversions.
### JSON to TypeScript Converter
URL: https://codefronts.com/tools/json-to-typescript-converter/
Description: Paste any JSON and get TypeScript interfaces, Zod schemas, JSON Schema, and Go structs — all four formats from one input, with full inference options.
Summary: Free online JSON to TypeScript converter with Zod, JSON Schema and Go output. Paste JSON and get types, runtime validators and structs instantly. 100% in-browser.
### JSON / YAML / CSV Converter
URL: https://codefronts.com/tools/json-yaml-csv-converter/
Description: Convert between JSON, YAML, and CSV in one tool. All 9 conversions, with options for indent, sort keys, YAML quote style, CSV delimiter, nested-object flattening and more.
Summary: Free JSON ↔ YAML ↔ CSV converter. Paste any format, output any other. Auto-detect, sort keys, custom delimiters, nested flattening. 100% in-browser.
### PX to REM Converter
URL: https://codefronts.com/tools/px-to-rem-converter/
Description: Convert pixel values to REM units instantly — set your base font size and get exact REM equivalents.
Summary: Free online px to rem converter. Enter any pixel value and instantly get the REM equivalent based on your root font size. Essential for responsive CSS.
### Responsive Breakpoint Tester
URL: https://codefronts.com/tools/responsive-breakpoint-tester/
Description: Preview any URL across iPhone, iPad, laptop, and desktop sizes — with Tailwind breakpoint detection, rotation, and live zoom.
Summary: Free online responsive design tester. Preview any URL across mobile, tablet, and desktop viewports with Tailwind breakpoint detection, rotation, and live zoom.
### SVG to JSX Converter
URL: https://codefronts.com/tools/svg-to-jsx-converter/
Description: Paste any SVG and get a clean React component — auto-renames attributes, swaps hardcoded colors for currentColor or props, wraps in forwardRef with TypeScript and a size prop, and previews the result on light and dark backgrounds.
Summary: Free SVG to JSX converter. Get a React component with attribute renames, color-to-prop swaps, forwardRef + TypeScript, and live preview. 100% in-browser.
### Tailwind Config Theme Builder
URL: https://codefronts.com/tools/tailwind-config-theme-builder/
Description: Pick a primary color, get a complete Tailwind theme — 11-shade color scale, semantic tokens, dark mode variants, and four output formats: Tailwind v3, v4 @theme, plain CSS variables, and shadcn/ui tokens.
Summary: Free Tailwind config theme builder. Pick a primary color, get full theme.extend with 50-950 scale, semantic tokens, dark mode. Output v3, v4 @theme, CSS vars, shadcn/ui.
### Tailwind to CSS Converter
URL: https://codefronts.com/tools/tailwind-to-css-converter/
Description: Paste any Tailwind CSS class string and instantly get equivalent plain CSS — supports variants (hover, focus, md), arbitrary values, and four output formats: plain CSS, custom properties, SCSS, and @apply.
Summary: Free Tailwind to CSS converter. Paste utility classes and get plain CSS, SCSS, custom properties, or @apply. Variants and arbitrary values supported.
### Viewport Unit Calculator
URL: https://codefronts.com/tools/viewport-unit-calculator/
Description: Convert pixels to vw, vh, vmin, vmax — and back — at any viewport size, with device presets and a fluid-typography reference table.
Summary: Free online viewport unit calculator. Convert px to vw, vh, vmin, vmax (and back) at any viewport size. Device presets, fluid typography table, and clamp() patterns.
### XML to JSON Converter
URL: https://codefronts.com/tools/xml-to-json-converter/
Description: Convert XML to JSON in your browser — configurable attribute prefix, namespace handling, force-array tag list, type coercion, CDATA preservation, and a JSON to XML reverse direction. Works on SOAP responses, RSS feeds, sitemaps, and Maven POMs. 100% client-side, no upload.
Summary: Free XML to JSON converter — configurable attribute prefix, namespace handling, force-array, CDATA, type coercion, lossless round-trip. JSON to XML reverse too.
---
## Generators
### CSS Animation Generator
URL: https://codefronts.com/generators/css-animation-generator/
Description: Build CSS @keyframes animations visually — 20+ presets across fade / slide / zoom / bounce / spin / flip / rubber-band / swing, with full timing controls (duration, delay, iteration, easing, direction, fill-mode), animation-composition, prefers-reduced-motion guard, live replay, and export to CSS, SCSS, Tailwind, React, or Vue.
Summary: Free CSS animation generator with 20+ presets (fade, slide, zoom, bounce, spin, flip, rubber-band, swing), full timing controls, prefers-reduced-motion guard, animation-composition, live replay, and one-click export to CSS, SCSS, Tailwind, React, or Vue. No login, no signup, no watermark.
### CSS Aspect Ratio Calculator
URL: https://codefronts.com/generators/css-aspect-ratio-calculator/
Description: Calculate any CSS aspect ratio and visualize it across six device viewports — iPhone, iPad, laptop, desktop, ultrawide, square. 10 presets (16:9, 4:3, 21:9, 1:1, 9:16, 3:2, golden, A4), computed values panel (decimal / inverse / padding-bottom %), legacy padding-bottom fallback, and export to CSS, SCSS, Tailwind, styled-components, or React.
Summary: Free CSS aspect-ratio calculator with 6-device viewport preview. 10 presets — 16:9, 4:3, 21:9, 1:1, 9:16, 3:2, 2:3, golden, A4, 4:5. Computed decimal + simplified ratio + padding-bottom fallback. Export to CSS, SCSS, Tailwind, styled-components, React. No login, no signup.
### CSS Background Pattern Generator
URL: https://codefronts.com/generators/css-background-pattern-generator/
Description: Build CSS-only repeating background patterns visually — dots, stripes, grids, checkerboards, cross-hatch, triangles, zigzag, hexagons, topographic, plus, diamonds — with full color / size / density / rotation / opacity control and themeable CSS variable output.
Summary: Free CSS background pattern generator — 12 patterns, full color + size + density + rotation + opacity control, themeable CSS-variable output. Pure CSS gradients, no SVG, no image assets. No login, no signup, no watermark.
### CSS Border Radius Generator
URL: https://codefronts.com/generators/css-border-radius-generator/
Description: Design CSS border-radius shapes visually — per-corner H/V control for elliptical corners (slash syntax), 12 curated presets (sharp / slight / rounded / pill / circle / 3 blobs / leaf / diamond / ticket / chat), px / % units, 4 preview surfaces, and one-click copy to CSS, SCSS, Tailwind, React, or Vue.
Summary: Free CSS border-radius generator with per-corner H/V control. 12 presets (sharp, rounded, pill, circle, 3 blobs, leaf, diamond, ticket, chat). Elliptical corners via slash syntax. Px / % units. 4 preview surfaces. Exports to CSS, SCSS, Tailwind, React, Vue. No login, no signup, no watermark.
### CSS Box Shadow Generator
URL: https://codefronts.com/generators/css-box-shadow-generator/
Description: Build layered CSS box shadows visually — stack up to 20 shadows in one declaration with per-layer x/y/blur/spread/color/opacity/inset controls, optional hover variant + transition, background-aware preview, and export to CSS, SCSS, Tailwind, React, or Vue.
Summary: Free CSS box shadow generator with multi-layer shadow stacks (up to 20), Material elevation presets, Apple-style soft+sharp, long-shadow, neumorphic dual, smooth-shadow, hover transition variant, background-aware preview, and one-click export to CSS, SCSS, Tailwind, React, or Vue. No login, no signup, no watermark.
### CSS Button Generator
URL: https://codefronts.com/generators/css-button-generator/
Description: Design a complete CSS button — all 6 interactive states (default, hover, active, focus, disabled, loading) in one editor — with live preview on your real page background, WCAG contrast checking, and export to plain CSS, SCSS, Tailwind, React, or Vue.
Summary: Free CSS button generator with all 6 states (hover, focus, disabled, loading), WCAG contrast checker, background-aware preview, and one-click export to CSS, Tailwind, SCSS, React, or Vue. No login, no signup, no watermark.
### CSS Clip-Path Generator
URL: https://codefronts.com/generators/css-clip-path-generator/
Description: Design any CSS clip-path visually — drag polygon vertices, switch between polygon / circle / ellipse / inset modes, 21 presets (triangle, trapezoid, parallelogram, rhombus, pentagon, hexagon, octagon, star5, star6, arrows, chevrons, message, cross, rabbet, notched), and one-click copy.
Summary: Free CSS clip-path generator with drag-to-edit polygon vertices. 21 presets — triangles, hexagons, stars, chevrons, arrows, message bubbles, crosses, notched shapes. Polygon, circle, ellipse, inset modes. Background-aware preview, one-click copy to CSS, SCSS, Tailwind, React, or Vue. No login, no signup, no watermark.
### CSS Color Palette Generator
URL: https://codefronts.com/generators/css-color-palette-generator/
Description: Extract a 3-12 color palette from any image — 100% client-side k-means clustering, no upload, no server. Real WCAG contrast scores (vs white + vs black) on every swatch, click any swatch to copy hex, and export to CSS custom properties, Tailwind config, design tokens (W3C format), SCSS variables, or JS array.
Summary: Free CSS color palette generator. Drop any image → k-means clustering → 3-12 dominant colors with WCAG contrast scores. 100% in-browser, no upload. 4 sample images for trial. Export to CSS variables, Tailwind config, design tokens, SCSS, JS. No login, no signup.
### CSS Cubic Bezier Generator
URL: https://codefronts.com/generators/css-cubic-bezier-generator/
Description: Design CSS cubic-bezier easing curves visually — drag two handles on the SVG plot, see the curve play live as a moving ball, compare against linear / ease / ease-in / ease-in-out simultaneously, 8 curated presets including spring + bounce-out, and export to CSS, SCSS, Tailwind config, or JS animation library.
Summary: Free visual cubic-bezier curve editor. Drag two handles to design CSS easing, see a live moving-ball preview, compare against CSS keywords side-by-side, 8 presets (ease, ease-in, spring, bounce-out, snap, gentle), export to CSS, Tailwind config, SCSS, JS array for Framer Motion / GSAP / anime.js. No login, no signup, no watermark.
### CSS Cursor Generator
URL: https://codefronts.com/generators/css-cursor-generator/
Description: Browse all 36 standard CSS cursor keywords (organized into 6 groups — general, links, selection, drag, resize, zoom) with live-hover preview on each tile. Build custom data-URL cursors from emoji, 2-char text badges, or raw SVG with a visual hotspot picker. Multi-format export to CSS, SCSS, Tailwind, styled-components.
Summary: Free CSS cursor generator. All 36 standard cursor keywords (pointer, grab, zoom-in, ew-resize…) grouped + live-preview-on-hover. Build custom cursors from emoji / text / SVG with hotspot picker. Export CSS, SCSS, Tailwind arbitrary, styled-components. No login, no signup.
### CSS Filter Generator
URL: https://codefronts.com/generators/css-filter-generator/
Description: Build CSS filter chains visually — blur, brightness, contrast, saturate, grayscale, sepia, hue-rotate, invert, opacity, and drop-shadow — with live before/after preview, 13 curated presets (vintage, noir, cinematic, pop, dreamy, ghost), and one-click copy.
Summary: Free CSS filter generator with live before/after preview. Tune blur, brightness, contrast, saturate, grayscale, sepia, hue-rotate, invert, opacity, drop-shadow. 13 curated presets (vintage, noir, cinematic, pop, faded, ghost). One-click copy. No login, no signup, no watermark.
### CSS Flexbox Generator
URL: https://codefronts.com/generators/css-flexbox-generator/
Description: Build CSS flexbox layouts visually — flex-direction (row / row-reverse / column / column-reverse), flex-wrap (nowrap / wrap / wrap-reverse), justify-content (6 options), align-items (5 options), align-content (6 options), gap, and 1-12 child items with live preview.
Summary: Free CSS flexbox generator with live preview. All container properties — flex-direction, flex-wrap, justify-content, align-items, align-content, gap. 1-12 child items. Export to CSS, SCSS, Tailwind, React, Vue. No login, no signup, no watermark.
### Font Pairing Finder — Curated Heading + Body
URL: https://codefronts.com/generators/css-font-pairing-finder/
Description: Find a working web font pairing in seconds — 8 curated headings (Inter, Playfair Display, Space Grotesk, Fraunces, Archivo, Manrope, Syne, DM Serif Display) each paired with 3-4 hand-picked body fonts. Multi-size live preview across hero / subhead / card title / body / caption, automatic Google Fonts loading, copy-ready CSS / Tailwind / SCSS export.
Summary: Free font pairing finder. 8 curated headings with hand-picked body matches across editorial / tech / friendly / serif vibes. Live preview at 5 sizes. Auto Google Fonts. Export CSS / Tailwind / SCSS. No login, no signup.
### CSS Glassmorphism Generator
URL: https://codefronts.com/generators/css-glassmorphism-generator/
Description: Build frosted-glass surfaces visually — tune blur, tint, saturation, brightness, and border with live preview on 9 vivid surfaces, WCAG contrast scoring, multi-layer refraction, prefers-reduced-transparency fallback, and export to CSS, SCSS, Tailwind, CSS Modules, styled-components, React, or Vue.
Summary: Free CSS glassmorphism generator. Live preview on 9 vivid surfaces, WCAG AA/AAA contrast checker, saturation + brightness controls, multi-layer glass refraction, prefers-reduced-transparency fallback, and one-click export to CSS, Tailwind, SCSS, styled-components, CSS Modules, React, or Vue. No login, no signup, no watermark.
### CSS Gradient Generator
URL: https://codefronts.com/generators/css-gradient-generator/
Description: Design linear, radial, conic, repeating, and mesh CSS gradients with live preview, drag-to-reorder color stops, per-stop alpha, optional animation, background-aware compositing, and export to CSS, SCSS, Tailwind, React, or Vue.
Summary: Free CSS gradient generator — linear, radial, conic, repeating, and mesh gradients with drag-to-reorder stops, per-stop alpha, animated keyframes, background-aware preview, and one-click export to CSS, SCSS, Tailwind, React, or Vue. No login, no signup, no watermark.
### CSS Grid Generator
URL: https://codefronts.com/generators/css-grid-generator/
Description: Build CSS Grid layouts visually — column / row counts (1-8 each), per-axis units (fr / px / % / auto), independent column-gap and row-gap, all alignment properties (justify-items, align-items, justify-content, align-content), live preview, and exports to CSS, SCSS, Tailwind, React, or Vue.
Summary: Free CSS Grid generator with live preview. Build grid-template-columns and grid-template-rows with fr / px / % / auto units. Independent column-gap and row-gap. Full alignment control. Exports to CSS, SCSS, Tailwind, React, Vue. No login, no signup, no watermark.
### CSS Letter Spacing & Line Height Generator
URL: https://codefronts.com/generators/css-letter-spacing-generator/
Description: Tune CSS letter-spacing and line-height visually across 8 elements (h1, h2, h3, body, small, caption, uppercase label, mono) × 8 font stacks (system, geometric, humanist, slab, modern serif, mono, display). Goldilocks side-by-side line-height comparison so your eye picks the right value, not your guesswork. Multi-format export.
Summary: Free CSS letter-spacing and line-height generator. 8 element roles (h1 / h2 / h3 / body / small / caption / uppercase / mono) × 8 font stacks. Goldilocks 3-up line-height comparison. Export CSS, SCSS, Tailwind, styled-components. No login, no signup.
### CSS Loader Generator
URL: https://codefronts.com/generators/css-loader-generator/
Description: Design a complete CSS loader — pick from 8 families (spinner, dots, bars, pulse, skeleton, progress, dual-ring, cube), preview on your real page background, transition through Loading / Success / Error / Idle states, check WCAG contrast, and export to plain CSS, Tailwind, SCSS, React + TS, Vue, Svelte, or Astro.
Summary: Free CSS loader generator with 8 families, 24 presets, multi-state preview, WCAG-aware export (role=status + aria-live + sr-only caption), prefers-reduced-motion fallback, and one-click copy to CSS, Tailwind, SCSS, React, Vue, Svelte, or Astro. No login, no signup, no watermark.
### CSS Outline & Border Generator
URL: https://codefronts.com/generators/css-outline-border-generator/
Description: Build CSS borders, outlines, and gradient borders visually — three modes in one tool with per-side border controls, side-by-side border-vs-outline comparison, gradient-border recipe via mask, and one-click export to CSS, SCSS, Tailwind, styled-components, React, or Vue.
Summary: Free CSS border / outline / gradient-border generator. Per-side border widths, 8 styles (solid, dashed, dotted, double, groove, ridge, inset, outset), outline-offset, gradient borders via linear-gradient + mask. Side-by-side border-vs-outline compare. Exports to CSS, SCSS, Tailwind, styled-components, React, Vue. No login, no signup, no watermark.
### CSS Scrollbar Generator
URL: https://codefronts.com/generators/css-scrollbar-generator/
Description: Generate custom CSS scrollbars visually — width, thumb color, track color, hover state, padding, border-radius. Outputs both modern scrollbar-color and legacy ::-webkit-scrollbar CSS side by side, with a live scrollable preview, 6 curated presets, and one-click copy.
Summary: Free CSS scrollbar generator with live preview. Customize width, thumb / track colors, hover, radius, padding. 6 presets (Minimal, GitHub, macOS, Neon, Thin, Hidden). Outputs both scrollbar-color (Firefox + 2024 Chromium) and ::-webkit-scrollbar (legacy WebKit) syntax side by side. No login, no signup, no watermark.
### CSS Spacing Scale Generator
URL: https://codefronts.com/generators/css-spacing-scale-generator/
Description: Build a modular CSS spacing scale visually — pick a base size and modular ratio (minor 2nd, major 3rd, perfect 4th, augmented 4th √2, perfect 5th, golden), see the cascade as size-proportional rectangles + a numeric token table, customize naming (T-shirt / numeric / step), prefix, and unit (rem / px / em), then export to CSS variables, Tailwind config, W3C design tokens, SCSS map, or a JS object.
Summary: Free CSS spacing scale generator. 8 modular ratios (minor 2nd, major 3rd, perfect 4th, √2, golden), 4-12 steps, T-shirt / numeric / step naming, rem / px / em units. Export to CSS vars, Tailwind config, design tokens, SCSS map, JS object. No login.
### CSS Text Shadow Generator
URL: https://codefronts.com/generators/css-text-shadow-generator/
Description: Stack multi-layer CSS text-shadows visually — 13 curated presets (neon, retro, hard-long, emboss, outline, 3D, fire, pastel, letterpress) with full per-layer x/y/blur/color control, live preview, editable text/font/background, and one-click copy.
Summary: Free CSS text-shadow generator with stacked-layer support. 13 presets — soft, drop, glow, neon (4-layer), retro (3-color), hard-long (6-layer), emboss, outline, 3D, fire, pastel, letterpress. Live preview with editable text + font + background. No login, no signup, no watermark.
### CSS Transform Generator
URL: https://codefronts.com/generators/css-transform-generator/
Description: Stack CSS transforms visually — translate (X / Y / Z), rotate (X / Y / Z), scale (X / Y with lock), skew (X / Y), perspective, and transform-origin (9-position picker). 14 curated presets, ghost-reference overlay, identity-aware output, and export to CSS, SCSS, Tailwind, React, or Vue.
Summary: Free CSS transform generator with live preview. Stack translate / rotate / scale / skew / perspective transforms in 3D space. 14 presets (lift-hover, pop, tilt, flipX / flipY, card3D, isometric). 9-position origin picker. Ghost-reference overlay. Identity values auto-omitted. Export to CSS, SCSS, Tailwind, React, Vue.
### CSS Wave Generator
URL: https://codefronts.com/generators/css-wave-generator/
Description: Design a complete CSS wave — pick from 6 families (sine, compound, bezier, stepped, organic turbulence, hand-drawn), stack 1-4 parallax layers, load from 18 real-world templates (SaaS hero, footer, divider, wellness, agency, 404), animate via @property typed-angle or scroll-timeline, check WCAG contrast on dark/light/mesh backgrounds, and export to 8 formats: SVG, CSS background-image, clip-path, mask-image, Tailwind, React, Vue, Svelte, Astro.
Summary: Free CSS wave generator — 6 wave types, multi-layer parallax, animated, 8 export formats (SVG, clip-path, mask, React, Vue, Tailwind). No watermark.
### Neumorphism Generator
URL: https://codefronts.com/generators/neumorphism-generator/
Description: Design soft-UI neumorphism visually — three depth modes (convex, flat, concave), six palettes including dark mode, multi-component preview (button, card, input, toggle), four interactive states, WCAG contrast checker, and one-click export to plain CSS, SCSS, Tailwind, styled-components, React, or Vue.
Summary: Free neumorphism generator with convex/flat/concave depth, dark mode, multi-component preview, WCAG contrast checker, and export to CSS, Tailwind, SCSS, styled-components, React, or Vue. No signup.